unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tomo@cx4a.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Elisp native profiler
Date: Mon, 01 Oct 2012 07:54:51 -0700	[thread overview]
Message-ID: <5069AEBB.5050709@cs.ucla.edu> (raw)
In-Reply-To: <83a9w6cwbf.fsf@gnu.org>

On 10/01/2012 03:37 AM, Eli Zaretskii wrote:

> That's a bug somewhere, isn't it?

It shouldn't dump core, true.  Someone with some free time should
probably look into that.  (I'm guessing it'll be me....)

> Will the signals caught during the period it was blocked
> be reissued, and if so, how many times?

On modern POSIXish systems, the pending SIGPROF signal is delivered
when the SIGPROF handler returns.  It's delivered just once.  There is
an overrun counter that will tell you how many instances of the signal
were discarded.

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.

We currently don't let the user set the sampling interval to be less
than 1 ms, because our interface (perhaps unwisely) has millisecond
resolution.  As far as we know, 1 ms works on all POSIXish platforms,
and if so we don't have to worry about Emacs going catatonic, or about
overrun counts, or the like.  If we changed the API to let users
sample more often than 1 ms we would have to worry about this.

> Slower platforms should have their minimal supported interval in
> itimers be higher, no?

Typically the minimal supported interval is small enough so that an
Emacs process could easily go catatonic if we set the sampling
interval small enough (less than 1 ms).

> And 'setitimer' should round up the interval
> to the minimal supported value, shouldn't it?

Yes, but the value is pretty small.

> Default value is just that: the default.  If there are bad
> consequences possible when using very small sampling intervals,

Right now 1 ms is the default, and Stefan says that it works even on
his slow platform, and we're guessing that means that it works
everywhere of practical interest.




  parent reply	other threads:[~2012-10-01 14:54 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  2:41 Elisp native profiler Stefan Monnier
2012-09-25 11:40 ` Juanma Barranquero
2012-09-25 13:18 ` Eli Zaretskii
2012-09-25 13:26   ` Eli Zaretskii
2012-09-25 17:28     ` Stefan Monnier
2012-09-25 19:21       ` Paul Eggert
2012-09-25 20:12         ` Eli Zaretskii
2012-09-26  0:55         ` Stefan Monnier
2012-09-26  6:16           ` Tomohiro Matsuyama
2012-09-26  7:35             ` Eli Zaretskii
2012-09-26  7:59               ` Tomohiro Matsuyama
2012-09-26  9:32                 ` Eli Zaretskii
2012-09-26 22:46                   ` Tomohiro Matsuyama
2012-09-27  5:55                     ` Eli Zaretskii
2012-09-27  7:01                       ` Eli Zaretskii
2012-09-27 12:37                         ` Stefan Monnier
2012-09-27 17:49                           ` Eli Zaretskii
2012-09-27 17:52                           ` Eli Zaretskii
2012-09-27 20:35                             ` Stefan Monnier
2012-09-27 20:46                               ` Eli Zaretskii
2012-09-27 22:12                                 ` Stefan Monnier
2012-09-28  7:09                                   ` Eli Zaretskii
2012-09-28  8:24                                     ` Stefan Monnier
2012-09-28 14:11                                       ` Eli Zaretskii
2012-09-28  8:03                                   ` Stephen Berman
2012-09-28  8:26                                     ` Stefan Monnier
2012-09-30  7:39                         ` Paul Eggert
2012-09-30  7:58                           ` Eli Zaretskii
2012-09-28 10:09                       ` Tomohiro Matsuyama
2012-09-28 11:05                         ` Eli Zaretskii
2012-09-28 12:43                           ` Stefan Monnier
2012-09-28 14:16                             ` Eli Zaretskii
2012-09-28 20:11                               ` Stefan Monnier
2012-09-28 20:14                                 ` Eli Zaretskii
2012-09-29  2:13                                   ` Stefan Monnier
2012-09-28 12:40                         ` Stefan Monnier
2012-09-26 17:42             ` Stefan Monnier
2012-09-26 22:52               ` Tomohiro Matsuyama
2012-09-28  9:14               ` Tomohiro Matsuyama
2012-09-28 11:00                 ` Eli Zaretskii
2012-09-30  7:37                   ` Paul Eggert
2012-09-30  7:58                     ` Eli Zaretskii
2012-09-30  8:16                       ` Paul Eggert
2012-09-28 12:37                 ` Stefan Monnier
2012-09-30 16:42               ` Tomohiro Matsuyama
2012-09-30 19:23                 ` Paul Eggert
2012-09-30 20:13                   ` Stefan Monnier
2012-09-30 20:43                     ` Paul Eggert
2012-10-01  0:41                       ` Stefan Monnier
2012-10-01  1:49                         ` Paul Eggert
2012-10-01 14:25                           ` Stefan Monnier
2012-10-01 14:48                             ` Eli Zaretskii
2012-10-01 16:31                               ` Stefan Monnier
2012-10-01 17:19                                 ` Eli Zaretskii
2012-10-01 16:41                               ` Paul Eggert
2012-10-01 17:52                                 ` Eli Zaretskii
2012-10-01 17:59                                   ` Eli Zaretskii
2012-10-01 21:12                                     ` Eli Zaretskii
2012-10-01 22:21                                   ` Paul Eggert
2012-10-02  2:06                                   ` Stefan Monnier
2012-10-02  4:00                                     ` Eli Zaretskii
2012-10-02 12:58                                       ` Stefan Monnier
2012-10-02 17:14                                         ` Eli Zaretskii
2012-10-03  1:27                                           ` Stefan Monnier
2012-10-02  5:28                                     ` Paul Eggert
2012-10-02 13:00                                       ` Stefan Monnier
2012-10-02 16:17                                         ` Paul Eggert
2012-10-02 13:23                                   ` Jason Rumney
2012-10-02 17:20                                     ` Eli Zaretskii
2012-10-03 14:25                                       ` Jason Rumney
2012-10-03 17:43                                         ` Eli Zaretskii
2012-10-01 15:10                             ` Paul Eggert
2012-10-01 10:37                       ` Eli Zaretskii
2012-10-01 11:25                         ` Tomohiro Matsuyama
2012-10-01 14:59                           ` Paul Eggert
2012-10-01 14:54                         ` Paul Eggert [this message]
2012-10-01 15:28                           ` Eli Zaretskii
2012-10-01 16:34                             ` Stefan Monnier
2012-10-01 16:51                               ` Paul Eggert
     [not found]                                 ` <1349123390.31932.1@faina>
2012-10-02  6:41                                   ` Paul Eggert
2012-10-02 13:03                                     ` Stefan Monnier
2012-10-03  5:11                                       ` Paul Eggert
2012-10-03 12:50                                         ` Stefan Monnier
2012-10-03 14:06                                           ` Andreas Schwab
2012-10-03 17:22                                             ` Stefan Monnier
2012-10-03 17:39                                           ` Eli Zaretskii
2012-10-01 16:39                             ` Paul Eggert
2012-09-30 22:28                     ` Tomohiro Matsuyama
2012-09-30 22:26                   ` Tomohiro Matsuyama
2012-09-26  7:39         ` Tomohiro Matsuyama
2012-09-26 14:33           ` Paul Eggert
2012-09-26 18:58             ` Ivan Andrus
2012-09-27  1:11               ` Paul Eggert
2012-09-25 20:10       ` Eli Zaretskii
2012-09-26  0:53         ` Stefan Monnier
2012-09-26  0:30       ` Stephen J. Turnbull
2012-09-26  1:00     ` Stefan Monnier
2012-09-26  7:41       ` Eli Zaretskii
2012-09-26 12:55         ` Stefan Monnier
2012-09-26 13:19           ` Eli Zaretskii
2012-09-26 13:26             ` Eli Zaretskii
2012-09-26 17:49               ` Stefan Monnier
2012-09-26 19:31                 ` Eli Zaretskii
2012-09-26 20:20                   ` Stefan Monnier
2012-09-26 22:50                     ` Tomohiro Matsuyama
2012-09-27  4:02                       ` Stefan Monnier
2012-09-30  7:32                         ` Paul Eggert
2012-09-29 15:24                 ` Eli Zaretskii
2012-09-29 16:06                   ` Stefan Monnier
2012-09-29 16:18                     ` Eli Zaretskii
2012-09-29 20:17                       ` Stefan Monnier
2012-09-30 15:54             ` Eli Zaretskii
2012-09-25 13:40   ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5069AEBB.5050709@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tomo@cx4a.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).