emacs-devel
[Top][All Lists]
Advanced

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

Re: Elisp native profiler


From: Eli Zaretskii
Subject: Re: Elisp native profiler
Date: Mon, 01 Oct 2012 12:37:24 +0200

> Date: Sun, 30 Sep 2012 13:43:14 -0700
> From: Paul Eggert <address@hidden>
> Cc: Tomohiro Matsuyama <address@hidden>, address@hidden
> 
> If the sample interval is too small,
> bad things happen: Emacs goes catatonic or dumps
> core or whatever.  (I found this out by using a
> sample interval of 1 microsecond -- silly, I know,
> but I wanted to see what would happen....)

That's a bug somewhere, isn't it?  We already arrange for SIGPROF to
be blocked while we are in the SIGPROF handler, so why would too
frequent signals be a problem?

Hmm... what happens when the SIGPROF handler exits, and SIGPROF is
unblocked?  Will the signals caught during the period it was blocked
be reissued, and if so, how many times?

> Whether an interval is "too small" depends on the
> platform.  The platforms most at risk are the older,
> slower ones.

Slower platforms should have their minimal supported interval in
itimers be higher, no?  And 'setitimer' should round up the interval
to the minimal supported value, shouldn't it?

> All that being said, it's no big deal.
> 1 ms is fine too, I expect.

Default value is just that: the default.  If there are bad
consequences possible when using very small sampling intervals, we
should warn users about that in the doc strings, and perhaps even test
the value inside profiler-start and ask for confirmation.



reply via email to

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