emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp native profiler


From: Paul Eggert
Subject: Re: Elisp native profiler
Date: Mon, 01 Oct 2012 09:39:38 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120912 Thunderbird/15.0.1

>> From the user's point of view, if the sampling interval is too
>> short, Emacs spends all its time profiling and refuses to do
>> anything else.  I.e., it goes catatonic.
> 
> But on a modern multi-core machines, this shouldn't happen, I think.
> Or should it?

It shouldn't happen on any reasonably modern machine, multicore
or not.  The amount of work done per sampling interval should be well
below how much power the CPU has, if the sampling interval is 1 ms
or more.  (I had some qualms about slower machines, but Stefan has
eased them.)

> Or how about setting SIGPROF to SIG_IGN while the handler runs?  Would
> this make things better?

It's not a path I would head down, no.  Emacs would still appear
to be catatonic if the sampling interval were small enough.  And
fiddling with SIG_IGN would slow down the signal handler and introduce
potential further races.

> Well, you've just asked for such a change, AFAIR ;-)

Yes, I'm still inclined to give users the extra rope.

> if we do allow smaller values, I think we should display a
> warning.

Yes, part of the change would be to detect timer overruns and
to do the right thing when they happen.  One possibility would
be to increase the sampling interval if it appears to be too small.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]