From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Date: Thu, 27 Jun 2019 17:09:02 +0300 Message-ID: <83tvcbi0ht.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="155361"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 22114@debbugs.gnu.org, v.schneidermann@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 16:10:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgV6O-000eEZ-8S for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 16:10:16 +0200 Original-Received: from localhost ([::1]:51034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgV6N-0007k6-3c for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2019 10:10:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44044) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgV6E-0007iG-D8 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 10:10:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgV6C-0007z7-Ee for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 10:10:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgV6A-0007yg-IO for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 10:10:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgV6A-0001wt-5H for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2019 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2019 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.15616445647426 (code B ref 22114); Thu, 27 Jun 2019 14:10:02 +0000 Original-Received: (at 22114) by debbugs.gnu.org; 27 Jun 2019 14:09:24 +0000 Original-Received: from localhost ([127.0.0.1]:39142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgV5Y-0001vg-DN for submit@debbugs.gnu.org; Thu, 27 Jun 2019 10:09:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgV5X-0001vT-1e for 22114@debbugs.gnu.org; Thu, 27 Jun 2019 10:09:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hgV5R-0007q6-TB; Thu, 27 Jun 2019 10:09:17 -0400 Original-Received: from [176.228.60.248] (port=3012 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hgV5R-0000zz-7c; Thu, 27 Jun 2019 10:09:17 -0400 In-reply-to: (message from Lars Ingebrigtsen on Tue, 25 Jun 2019 16:46:47 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161589 Archived-At: > From: Lars Ingebrigtsen > Cc: Vasilij Schneidermann , 22114@debbugs.gnu.org > Date: Tue, 25 Jun 2019 16:46:47 +0200 > > Eli Zaretskii writes: > > > I don't really understand why profiler.el insists on having the > > profiler running for providing the profile. The much simpler patch > > below makes it possible for me to invoke profiler-report whether a > > profile is running or not. Does it work for you? If not, can you > > tell what I missed? > > > > --- lisp/profiler.el~4 2015-11-11 07:57:32.000000000 +0200 > > +++ lisp/profiler.el 2015-12-08 17:54:27.380084700 +0200 > > @@ -216,19 +216,17 @@ > > > > (defun profiler-cpu-profile () > > "Return CPU profile." > > - (when (profiler-running-p 'cpu) > > - (profiler-make-profile > > - :type 'cpu > > - :timestamp (current-time) > > - :log (profiler-cpu-log)))) > > + (profiler-make-profile > > + :type 'cpu > > + :timestamp (current-time) > > + :log (profiler-cpu-log))) > > [etc] > > The discussion then turned to other things (like getting in-progress > reports), but this seems like the simplest solution that solves the > originally stated problem. But it wasn't applied -- I can do that now, > if that's convenient... I think Stefan endorsed the last patch posted there, so maybe that's what should be pushed.