From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Elisp native profiler Date: Mon, 01 Oct 2012 17:28:37 +0200 Message-ID: <83lifqb49m.fsf@gnu.org> References: <83zk4egs0w.fsf@gnu.org> <83y5jygrni.fsf@gnu.org> <50620443.8050301@cs.ucla.edu> <20120926151625.229ef3cc9caf90e5098b18ef@cx4a.org> <20121001014217.03ac31a69b9b43516cb0dd61@cx4a.org> <50689C1D.8080005@cs.ucla.edu> <5068AEE2.4080004@cs.ucla.edu> <83a9w6cwbf.fsf@gnu.org> <5069AEBB.5050709@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1349105344 32429 80.91.229.3 (1 Oct 2012 15:29:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2012 15:29:04 +0000 (UTC) Cc: tomo@cx4a.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 17:29:06 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TIhvX-00089p-2A for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 17:28:59 +0200 Original-Received: from localhost ([::1]:40097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhvR-0002oZ-GN for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 11:28:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhvH-0002n4-2V for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:28:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIhv7-0001sa-Ez for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:28:42 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:63455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhv7-0001ry-6Z for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:28:33 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MB800H0009Q5E00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Mon, 01 Oct 2012 17:28:31 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MB800HM10BI3010@a-mtaout22.012.net.il>; Mon, 01 Oct 2012 17:28:31 +0200 (IST) In-reply-to: <5069AEBB.5050709@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153844 Archived-At: > Date: Mon, 01 Oct 2012 07:54:51 -0700 > From: Paul Eggert > CC: monnier@iro.umontreal.ca, tomo@cx4a.org, emacs-devel@gnu.org > > > 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. That's what I thought. > >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? Or how about setting SIGPROF to SIG_IGN while the handler runs? Would this make things better? > 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. Well, you've just asked for such a change, AFAIR ;-) > > 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. But if we do allow smaller values, I think we should display a warning.