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: Fri, 28 Sep 2012 16:16:21 +0200 Message-ID: <83vceyfd1m.fsf@gnu.org> References: <83zk4egs0w.fsf@gnu.org> <83y5jygrni.fsf@gnu.org> <50620443.8050301@cs.ucla.edu> <20120926151625.229ef3cc9caf90e5098b18ef@cx4a.org> <83ipb1grs9.fsf@gnu.org> <20120926165946.87a9f8c58aad890dafb50494@cx4a.org> <83d319gmd6.fsf@gnu.org> <20120927074655.a943e298fc9319a438825f47@cx4a.org> <83wqzgf1qs.fsf@gnu.org> <20120928190956.3ec9efaa97178d2e16ad6179@cx4a.org> <833922h0g1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1348841802 7943 80.91.229.3 (28 Sep 2012 14:16:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2012 14:16:42 +0000 (UTC) Cc: tomo@cx4a.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 16:16:45 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 1THbMx-0002B1-2W for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2012 16:16:43 +0200 Original-Received: from localhost ([::1]:45946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THbMr-0004oC-Fb for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2012 10:16:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THbMm-0004np-Ig for emacs-devel@gnu.org; Fri, 28 Sep 2012 10:16:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THbMc-0002Im-ML for emacs-devel@gnu.org; Fri, 28 Sep 2012 10:16:32 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:54741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THbMc-0002IW-E4 for emacs-devel@gnu.org; Fri, 28 Sep 2012 10:16:22 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MB200D00CS3FS00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Fri, 28 Sep 2012 16:16:19 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MB200DKMCZ6BU60@a-mtaout20.012.net.il>; Fri, 28 Sep 2012 16:16:19 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:153679 Archived-At: > From: Stefan Monnier > Cc: Tomohiro Matsuyama , emacs-devel@gnu.org > Date: Fri, 28 Sep 2012 08:43:00 -0400 > > > If the overhead can be avoided when not profiling (e.g., depending on > > some global variable), that would be acceptable, I think. > > No, I think some of the overhead can't be chosen at runtime (e.g. the > `struct backtrace' will always use up stack space) I thought about CPU overhead, not stack size overhead. > and adding a test on a global variable to functions like `car' > doesn't sound like a good idea. Why not? Profiling is a global state, affecting all of Emacs, isn't it?