From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 08:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22114 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 22114@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1449562446725 (code B ref -1); Tue, 08 Dec 2015 08:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Dec 2015 08:14:06 +0000 Received: from localhost ([127.0.0.1]:42298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6DPS-0000Bd-00 for submit@debbugs.gnu.org; Tue, 08 Dec 2015 03:14:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60756) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6DPP-0000BV-UB for submit@debbugs.gnu.org; Tue, 08 Dec 2015 03:14:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6DPO-0002vU-FU for submit@debbugs.gnu.org; Tue, 08 Dec 2015 03:14:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6DPO-0002vQ-D6 for submit@debbugs.gnu.org; Tue, 08 Dec 2015 03:14:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6DPN-0006ft-0w for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2015 03:14:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6DPL-0002v6-Qu for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2015 03:14:00 -0500 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:33071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6DPL-0002v2-LZ for bug-gnu-emacs@gnu.org; Tue, 08 Dec 2015 03:13:59 -0500 Received: by qgea14 with SMTP id a14so10032891qge.0 for ; Tue, 08 Dec 2015 00:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=RQpIBLmgRBsfx5XDFb6Rkkat5V1kU6pRKG1XhBgB90c=; b=F2If4zv804002kvbjPBJpx1FixqHYfE4P3BHdWwIlkVzOkXA3D4mvwLeHJHntz6jTq qA2uLvRy50XPAnuH3Bwyp1gzurI2KGJUXcIK6u42GtumN/b+4rG/gYmW6hbVyHGCSQAq 3Pv4PNeWruGEcXn2tjd5T07s3JnRSrNR4psgKhDGSeBJcyOqskqnfMXtn2JBrjRH8y06 AzbM7zpOMC/uLm78VSRNcdlqezl6bLK/qSdTOgNLwcmxnnH7KVYPxhU6pgC6vnYMzoyd sPuIf3SEdFVVS/tKrBl9GUOJYmMHADo1bafv8S6/d19ZSo+FA8gOZ/puPy/S7VvJkjlP 48HQ== MIME-Version: 1.0 X-Received: by 10.140.27.228 with SMTP id 91mr2876346qgx.78.1449562439117; Tue, 08 Dec 2015 00:13:59 -0800 (PST) Received: by 10.55.42.34 with HTTP; Tue, 8 Dec 2015 00:13:58 -0800 (PST) Date: Tue, 8 Dec 2015 09:13:58 +0100 Message-ID: From: Vasilij Schneidermann Content-Type: multipart/mixed; boundary=001a11c13aa843a1d105265e8e45 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11c13aa843a1d105265e8e45 Content-Type: multipart/alternative; boundary=001a11c13aa843a1cc05265e8e43 --001a11c13aa843a1cc05265e8e43 Content-Type: text/plain; charset=UTF-8 I've worked with a few other profilers than profiler.el so far and one striking difference is that they allowed you to start a profiling run, stop it and then retrieve the profiling log between these two points in time. profiler.el on the other hand flatout refuses to display a report after stopping which is especially puzzling given the `profiler-stop` docstring: "Stop started profilers. Profiler logs will be kept." If the logs are kept after all, why can't I take a look at them? I've attached a patch that solves this by caching the last accessable profiler log. This allows both workflows to work, be it displaying a report while the profiler is still running or displaying it after stopping the profiler. --001a11c13aa843a1cc05265e8e43 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've worked with a few other profilers than profiler.e= l so far and one
striking difference is that they allowed you to start a= profiling run,
stop it and then retrieve the profiling log between thes= e two points in
time. =C2=A0profiler.el on the other hand flatout refuse= s to display a report
after stopping which is especially puzzling given = the `profiler-stop`
docstring: "Stop started profilers.=C2=A0 Profi= ler logs will be kept." =C2=A0If
the logs are kept after all, why c= an't I take a look at them?

I've attached a patch that solve= s this by caching the last accessable
profiler log.=C2=A0 This allows bo= th workflows to work, be it displaying a
report while the profiler is st= ill running or displaying it after
stopping the profiler.
--001a11c13aa843a1cc05265e8e43-- --001a11c13aa843a1d105265e8e45 Content-Type: text/x-diff; charset=US-ASCII; name="0001-Allow-for-retrieving-profiler-logs-after-stopping.patch" Content-Disposition: attachment; filename="0001-Allow-for-retrieving-profiler-logs-after-stopping.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ihx41nqn0 RnJvbSAzNDY0NDQ2YjgzMTUxYWQ4OTRmZjRlZTdmNjJlZDFjYjc4NTJiMWI2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBWYXNpbGlqIFNjaG5laWRlcm1hbm4gPHYuc2NobmVpZGVybWFu bkBnbWFpbC5jb20+CkRhdGU6IFR1ZSwgOCBEZWMgMjAxNSAwOTowMToxNSArMDEwMApTdWJqZWN0 OiBbUEFUQ0hdIEFsbG93IGZvciByZXRyaWV2aW5nIHByb2ZpbGVyIGxvZ3MgYWZ0ZXIgc3RvcHBp bmcKCi0tLQogbGlzcC9wcm9maWxlci5lbCB8IDU5ICsrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAxIGZpbGUgY2hhbmdlZCwgMzUgaW5zZXJ0 aW9ucygrKSwgMjQgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9wcm9maWxlci5lbCBi L2xpc3AvcHJvZmlsZXIuZWwKaW5kZXggZjI4YmJmZS4uMTBjZGNmYiAxMDA2NDQKLS0tIGEvbGlz cC9wcm9maWxlci5lbAorKysgYi9saXNwL3Byb2ZpbGVyLmVsCkBAIC0yMTQsMjEgKzIxNCwyMyBA QCBPcHRpb25hbCBhcmd1bWVudCBNT0RFIG1lYW5zIG9ubHkgY2hlY2sgZm9yIHRoZSBzcGVjaWZp ZWQgbW9kZSAoY3B1IG9yIG1lbSkuIgogICAgICAgICAodCAob3IgKHByb2ZpbGVyLXJ1bm5pbmct cCAnY3B1KQogICAgICAgICAgICAgICAgKHByb2ZpbGVyLXJ1bm5pbmctcCAnbWVtKSkpKSkKIAor KGRlZnZhciBwcm9maWxlci1jcHUtbG9nIG5pbCkKKworKGRlZnZhciBwcm9maWxlci1tZW1vcnkt bG9nIG5pbCkKKwogKGRlZnVuIHByb2ZpbGVyLWNwdS1wcm9maWxlICgpCiAgICJSZXR1cm4gQ1BV IHByb2ZpbGUuIgotICAod2hlbiAocHJvZmlsZXItcnVubmluZy1wICdjcHUpCi0gICAgKHByb2Zp bGVyLW1ha2UtcHJvZmlsZQotICAgICA6dHlwZSAnY3B1Ci0gICAgIDp0aW1lc3RhbXAgKGN1cnJl bnQtdGltZSkKLSAgICAgOmxvZyAocHJvZmlsZXItY3B1LWxvZykpKSkKKyAgKHByb2ZpbGVyLW1h a2UtcHJvZmlsZQorICAgOnR5cGUgJ2NwdQorICAgOnRpbWVzdGFtcCAoY3VycmVudC10aW1lKQor ICAgOmxvZyBwcm9maWxlci1jcHUtbG9nKSkKIAogKGRlZnVuIHByb2ZpbGVyLW1lbW9yeS1wcm9m aWxlICgpCiAgICJSZXR1cm4gbWVtb3J5IHByb2ZpbGUuIgotICAod2hlbiAocHJvZmlsZXItbWVt b3J5LXJ1bm5pbmctcCkKLSAgICAocHJvZmlsZXItbWFrZS1wcm9maWxlCi0gICAgIDp0eXBlICdt ZW1vcnkKLSAgICAgOnRpbWVzdGFtcCAoY3VycmVudC10aW1lKQotICAgICA6bG9nIChwcm9maWxl ci1tZW1vcnktbG9nKSkpKQorICAocHJvZmlsZXItbWFrZS1wcm9maWxlCisgICA6dHlwZSAnbWVt b3J5CisgICA6dGltZXN0YW1wIChjdXJyZW50LXRpbWUpCisgICA6bG9nIHByb2ZpbGVyLW1lbW9y eS1sb2cpKQogCiAMCiA7OzsgQ2FsbHRyZWVzCkBAIC04MjgsNyArODMwLDExIEBAIEFsc28sIGlm IE1PREUgaXMgYG1lbScgb3IgYGNwdSttZW0nLCB0aGVuIG1lbW9yeSBwcm9maWxlciB3aWxsIGJl IHN0YXJ0ZWQuIgogKGRlZnVuIHByb2ZpbGVyLXN0b3AgKCkKICAgIlN0b3Agc3RhcnRlZCBwcm9m aWxlcnMuICBQcm9maWxlciBsb2dzIHdpbGwgYmUga2VwdC4iCiAgIChpbnRlcmFjdGl2ZSkKLSAg KGxldCAoKGNwdSAoaWYgKGZib3VuZHAgJ3Byb2ZpbGVyLWNwdS1zdG9wKSAocHJvZmlsZXItY3B1 LXN0b3ApKSkKKyAgKHdoZW4gKGFuZCAoZmJvdW5kcCAncHJvZmlsZXItY3B1LXJ1bm5pbmctcCkg KHByb2ZpbGVyLWNwdS1ydW5uaW5nLXApKQorICAgIChzZXRxIHByb2ZpbGVyLWNwdS1sb2cgKHBy b2ZpbGVyLWNwdS1sb2cpKSkKKyAgKHdoZW4gKHByb2ZpbGVyLW1lbW9yeS1ydW5uaW5nLXApCisg ICAgKHNldHEgcHJvZmlsZXItbWVtb3J5LWxvZyAocHJvZmlsZXItbWVtb3J5LWxvZykpKQorICAo bGV0ICgoY3B1ICh3aGVuIChmYm91bmRwICdwcm9maWxlci1jcHUtc3RvcCkgKHByb2ZpbGVyLWNw dS1zdG9wKSkpCiAgICAgICAgIChtZW0gKHByb2ZpbGVyLW1lbW9yeS1zdG9wKSkpCiAgICAgKG1l c3NhZ2UgIiVzIHByb2ZpbGVyIHN0b3BwZWQiCiAgICAgICAgICAgICAgKGNvbmQgKChhbmQgbWVt IGNwdSkgIkNQVSBhbmQgbWVtb3J5IikKQEAgLTgzOSwyNiArODQ1LDMxIEBAIEFsc28sIGlmIE1P REUgaXMgYG1lbScgb3IgYGNwdSttZW0nLCB0aGVuIG1lbW9yeSBwcm9maWxlciB3aWxsIGJlIHN0 YXJ0ZWQuIgogKGRlZnVuIHByb2ZpbGVyLXJlc2V0ICgpCiAgICJSZXNldCBwcm9maWxlciBsb2dz LiIKICAgKGludGVyYWN0aXZlKQotICAod2hlbiAoZmJvdW5kcCAncHJvZmlsZXItY3B1LWxvZykK LSAgICAoaWdub3JlIChwcm9maWxlci1jcHUtbG9nKSkpCi0gIChpZ25vcmUgKHByb2ZpbGVyLW1l bW9yeS1sb2cpKQotICB0KQorICAod2hlbiAoYW5kIChmYm91bmRwICdwcm9maWxlci1jcHUtcnVu bmluZy1wKSAocHJvZmlsZXItY3B1LXJ1bm5pbmctcCkpCisgICAgKHByb2ZpbGVyLWNwdS1zdG9w KSkKKyAgKHdoZW4gKHByb2ZpbGVyLW1lbW9yeS1ydW5uaW5nLXApCisgICAgKHByb2ZpbGVyLW1l bW9yeS1zdG9wKSkKKyAgKHNldHEgcHJvZmlsZXItY3B1LWxvZyBuaWwKKyAgICAgICAgcHJvZmls ZXItbWVtb3J5LWxvZyBuaWwpKQogCiAoZGVmdW4gcHJvZmlsZXItcmVwb3J0LWNwdSAoKQotICAo bGV0ICgocHJvZmlsZSAocHJvZmlsZXItY3B1LXByb2ZpbGUpKSkKLSAgICAod2hlbiBwcm9maWxl Ci0gICAgICAocHJvZmlsZXItcmVwb3J0LXByb2ZpbGUtb3RoZXItd2luZG93IHByb2ZpbGUpKSkp CisgICh3aGVuIHByb2ZpbGVyLWNwdS1sb2cKKyAgICAocHJvZmlsZXItcmVwb3J0LXByb2ZpbGUt b3RoZXItd2luZG93IChwcm9maWxlci1jcHUtcHJvZmlsZSkpKSkKIAogKGRlZnVuIHByb2ZpbGVy LXJlcG9ydC1tZW1vcnkgKCkKLSAgKGxldCAoKHByb2ZpbGUgKHByb2ZpbGVyLW1lbW9yeS1wcm9m aWxlKSkpCi0gICAgKHdoZW4gcHJvZmlsZQotICAgICAgKHByb2ZpbGVyLXJlcG9ydC1wcm9maWxl LW90aGVyLXdpbmRvdyBwcm9maWxlKSkpKQorICAod2hlbiBwcm9maWxlci1tZW1vcnktbG9nCisg ICAgKHByb2ZpbGVyLXJlcG9ydC1wcm9maWxlLW90aGVyLXdpbmRvdyAocHJvZmlsZXItbWVtb3J5 LXByb2ZpbGUpKSkpCiAKIChkZWZ1biBwcm9maWxlci1yZXBvcnQgKCkKICAgIlJlcG9ydCBwcm9m aWxpbmcgcmVzdWx0cy4iCi0gIChpbnRlcmFjdGl2ZSkKLSAgKHByb2ZpbGVyLXJlcG9ydC1jcHUp Ci0gIChwcm9maWxlci1yZXBvcnQtbWVtb3J5KSkKKyAgKHdoZW4gKGFuZCAoZmJvdW5kcCAncHJv ZmlsZXItY3B1LXJ1bm5pbmctcCkgKHByb2ZpbGVyLWNwdS1ydW5uaW5nLXApKQorICAgIChzZXRx IHByb2ZpbGVyLWNwdS1sb2cgKHByb2ZpbGVyLWNwdS1sb2cpKSkKKyAgKHdoZW4gKHByb2ZpbGVy LW1lbW9yeS1ydW5uaW5nLXApCisgICAgKHNldHEgcHJvZmlsZXItbWVtb3J5LWxvZyAocHJvZmls ZXItbWVtb3J5LWxvZykpKQorICAoaWYgKGFuZCAobm90IHByb2ZpbGVyLWNwdS1sb2cpIChub3Qg cHJvZmlsZXItbWVtb3J5LWxvZykpCisgICAgICAodXNlci1lcnJvciAiTm8gcHJvZmlsZXIgcnVu IHJlY29yZGVkIikKKyAgICAocHJvZmlsZXItcmVwb3J0LWNwdSkKKyAgICAocHJvZmlsZXItcmVw b3J0LW1lbW9yeSkpKQogCiA7OzsjIyNhdXRvbG9hZAogKGRlZnVuIHByb2ZpbGVyLWZpbmQtcHJv ZmlsZSAoZmlsZW5hbWUpCi0tIAoyLjYuMgoK --001a11c13aa843a1d105265e8e45-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 16:24:01 +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 To: Vasilij Schneidermann Cc: 22114@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144959179626363 (code B ref 22114); Tue, 08 Dec 2015 16:24:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 16:23:16 +0000 Received: from localhost ([127.0.0.1]:43402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6L2p-0006r8-J5 for submit@debbugs.gnu.org; Tue, 08 Dec 2015 11:23:16 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:53087) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6L2n-0006r0-5b for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 11:23:13 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NZ100B00S1QY600@a-mtaout20.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 18:22:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ100BHYS61XJ10@a-mtaout20.012.net.il>; Tue, 08 Dec 2015 18:22:49 +0200 (IST) Date: Tue, 08 Dec 2015 18:22:47 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83bna0di5k.fsf@gnu.org> References: X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Tue, 8 Dec 2015 09:13:58 +0100 > From: Vasilij Schneidermann > > I've worked with a few other profilers than profiler.el so far and one > striking difference is that they allowed you to start a profiling run, > stop it and then retrieve the profiling log between these two points in > time. profiler.el on the other hand flatout refuses to display a report > after stopping which is especially puzzling given the `profiler-stop` > docstring: "Stop started profilers. Profiler logs will be kept." If > the logs are kept after all, why can't I take a look at them? > > I've attached a patch that solves this by caching the last accessable > profiler log. This allows both workflows to work, be it displaying a > report while the profiler is still running or displaying it after > stopping the profiler. Thanks. But I don't see why we would need to keep a copy of the profile around (and it looks weird to do that anyway, when we have a function that reports it). When profiler-cpu-log is called, it returns the profile before it resets it, so the data is available and should simply be used. 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))) (defun profiler-memory-profile () "Return memory profile." - (when (profiler-memory-running-p) - (profiler-make-profile - :type 'memory - :timestamp (current-time) - :log (profiler-memory-log)))) + (profiler-make-profile + :type 'memory + :timestamp (current-time) + :log (profiler-memory-log))) ;;; Calltrees @@ -846,12 +844,12 @@ (defun profiler-report-cpu () (let ((profile (profiler-cpu-profile))) - (when profile + (when (and profile (profiler-profile-log profile)) (profiler-report-profile-other-window profile)))) (defun profiler-report-memory () (let ((profile (profiler-memory-profile))) - (when profile + (when (and profile (profiler-profile-log profile)) (profiler-report-profile-other-window profile)))) (defun profiler-report () From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 16:33:01 +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 To: Eli Zaretskii Cc: 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144959235327360 (code B ref 22114); Tue, 08 Dec 2015 16:33:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 16:32:33 +0000 Received: from localhost ([127.0.0.1]:43413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6LBo-00077D-Gv for submit@debbugs.gnu.org; Tue, 08 Dec 2015 11:32:32 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:34998) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6LBU-00076f-2f for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 11:32:30 -0500 Received: by wmuu63 with SMTP id u63so187886576wmu.0 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 08:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=klBEmEqd8Dmj6pfcrgaYPMygLguTwmXnpDlhzxLYuTw=; b=xzELctHd5VhZfkFU6L4zidSRlpAjOXevHGLiBdExtO1oUMpiaFQ1jhZaOB7lerZ74g xySl7OqS9IpSryvCNFa9pwsYa5tuFP0BGVnsKW30+rvPKxF+5T/YN5FZerDx40vZAZG9 4PORot13p/0Ebvg6ntqXBZRTRwzcHyFeoRtzRaC/pyAKOMmy1DTIlt5yTxJzlaFAckQs 0xpiWRzE+rZfzafOQsqJNzWchYtp94g3h11vPLGGvLWfed+R5EQOI7MWYrUQ3sr6ath9 8G8yO+72WjiNBEPx+Dsv9E9YhXEhFZmQt0tyDtgWD5FNMMNe83E32lMXevyxfqP2BuMg fzFA== X-Received: by 10.28.21.204 with SMTP id 195mr5286707wmv.17.1449592330897; Tue, 08 Dec 2015 08:32:10 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id 198sm4172611wmr.18.2015.12.08.08.32.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 08:32:10 -0800 (PST) Date: Tue, 8 Dec 2015 17:32:08 +0100 From: Vasilij Schneidermann Message-ID: <20151208163208.GA1080@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83bna0di5k.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Thanks. But I don't see why we would need to keep a copy of the > profile around (and it looks weird to do that anyway, when we have a > function that reports it). When profiler-cpu-log is called, it > returns the profile before it resets it, so the data is available and > should simply be used. > > 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? This works only once. If the profiler has been stopped and you retrieve the log, it resets and subsequent access will yield an error. While your variant may be simpler, it is less user-friendly as viewing the report a second time will yield an incomprehensible error. Avoiding this either requires fixing the function retrieving the log (which is at the C level and out of my reach) or using a workaround like the two extra variables in my patch. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 16:41:01 +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 To: Eli Zaretskii Cc: 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144959285328252 (code B ref 22114); Tue, 08 Dec 2015 16:41:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 16:40:53 +0000 Received: from localhost ([127.0.0.1]:43428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6LJs-0007Lb-Gu for submit@debbugs.gnu.org; Tue, 08 Dec 2015 11:40:52 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:33018) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6LJr-0007LU-EO for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 11:40:51 -0500 Received: by wmec201 with SMTP id c201so220741103wme.0 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 08:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=QW+JpTrtfVaEITolFx+zsFMHxyOSjeLaJKQfKh2afek=; b=yOTEUolTf2iZbFlpygthDzuvDGNESWavCIoVOLEemAYq5+WG24YTIGBnUVqUyMBhVa fQqOq71+XjRNhWZdbez3RWPQqjXE4kt6PBYBtthucNGEWo+cXpD21IkE7hM7Hb/w7jxc wty3b7NMYLzEs579i/9OUeWgu7HP5RRgu9o7oSnYcbXp5IsHVQSPf3lYLXMYBX6VZoT/ FMw0aQ+KLNl8cQ8eGPoyDsj7HQ5u0kU/OSGkmKMnbb9KTJnjhoeffhmviIoCt2868+AJ d5LqWlc8ZKc05MxH4ZEg+cRfi1ThMo73gHTCL8I/rxRUUZN5leYSY4s8ifnUG8ftZZkE nnSA== X-Received: by 10.194.59.108 with SMTP id y12mr517696wjq.33.1449592850810; Tue, 08 Dec 2015 08:40:50 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id vu4sm3755752wjc.2.2015.12.08.08.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 08:40:50 -0800 (PST) Date: Tue, 8 Dec 2015 17:40:49 +0100 From: Vasilij Schneidermann Message-ID: <20151208164049.GB1080@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83bna0di5k.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Or imposing a restriction on the profiler workflow such as that it must be running to produce a profiler report... From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 17:29: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 To: Vasilij Schneidermann Cc: 22114@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.1449595739468 (code B ref 22114); Tue, 08 Dec 2015 17:29:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 17:28:59 +0000 Received: from localhost ([127.0.0.1]:43445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6M4Q-00007T-Qw for submit@debbugs.gnu.org; Tue, 08 Dec 2015 12:28:59 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:39863) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6M4O-00007I-L9 for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 12:28:57 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NZ100D00V0R6Z00@a-mtaout23.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 19:28:55 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ100DYBV864840@a-mtaout23.012.net.il>; Tue, 08 Dec 2015 19:28:55 +0200 (IST) Date: Tue, 08 Dec 2015 19:28:53 +0200 From: Eli Zaretskii In-reply-to: <20151208163208.GA1080@odonien.bevuta.com> X-012-Sender: halo1@inter.net.il Message-id: <837fkodf3e.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Tue, 8 Dec 2015 17:32:08 +0100 > From: Vasilij Schneidermann > Cc: 22114@debbugs.gnu.org > > > Thanks. But I don't see why we would need to keep a copy of the > > profile around (and it looks weird to do that anyway, when we have a > > function that reports it). When profiler-cpu-log is called, it > > returns the profile before it resets it, so the data is available and > > should simply be used. > > > > 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? > > This works only once. If the profiler has been stopped and you retrieve > the log, it resets and subsequent access will yield an error. But why would you need a subsequent access to the same data? The profiler report is in the buffer, and you can review it whenever you want. The buffer has the time of the report creation as part of its name, so the next report will not destroy the buffer. You can also save the report to a file (there's a separate command to do that). By contrast,producing a report again from the same data will simply produce an identical report. I guess I don't see a use case where the user would need to produce the same report twice. I never needed that myself, FWIW. > While your variant may be simpler, it is less user-friendly as > viewing the report a second time will yield an incomprehensible > error. If the error message needs improvement, we could do that as well. > Avoiding this either requires fixing the function retrieving the log > (which is at the C level and out of my reach) or using a workaround > like the two extra variables in my patch. The code implemented in C resets the data deliberately (there are comments there that explain why), so it cannot be fixed. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 17:39:01 +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 To: Vasilij Schneidermann Cc: 22114@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495963351482 (code B ref 22114); Tue, 08 Dec 2015 17:39:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 17:38:55 +0000 Received: from localhost ([127.0.0.1]:43453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6ME2-0000Nq-Jf for submit@debbugs.gnu.org; Tue, 08 Dec 2015 12:38:54 -0500 Received: from mtaout27.012.net.il ([80.179.55.183]:55771) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MDh-0000NA-Es for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 12:38:52 -0500 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NZ100M00V2WMF00@mtaout27.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 19:33:42 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ100LQJVG66420@mtaout27.012.net.il>; Tue, 08 Dec 2015 19:33:42 +0200 (IST) Date: Tue, 08 Dec 2015 19:38:30 +0200 From: Eli Zaretskii In-reply-to: <20151208164049.GB1080@odonien.bevuta.com> X-012-Sender: halo1@inter.net.il Message-id: <834mfsdend.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208164049.GB1080@odonien.bevuta.com> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Tue, 8 Dec 2015 17:40:49 +0100 > From: Vasilij Schneidermann > Cc: 22114@debbugs.gnu.org > > Or imposing a restriction on the profiler workflow such as that it must > be running to produce a profiler report... Sorry, I don't understand this comment. If the report can be produced when the profiler is stopped, then the limitation is lifted, right? From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 17:43: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 To: Eli Zaretskii Cc: 22114@debbugs.gnu.org, Vasilij Schneidermann Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495965681949 (code B ref 22114); Tue, 08 Dec 2015 17:43:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 17:42:48 +0000 Received: from localhost ([127.0.0.1]:43461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MHo-0000VN-2N for submit@debbugs.gnu.org; Tue, 08 Dec 2015 12:42:48 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35852) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MHl-0000VE-Gh for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 12:42:46 -0500 Received: by pacdm15 with SMTP id dm15so15255402pac.3 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 09:42:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=pMG3L7l9oU+DqVhbDQfSoJzboykm+CcAPXkp+Tkp17I=; b=1HwoJ6VlD0Doy+P3mMR4WPbeEkxAZhTPdUmN46Plg0kCYI1KQmaFHFlovateL1b5Wk DvdQKed3lFoGIiPP5tSzWJzvAAJ0Ql/wtqn9Q7Cfw9D/rIK9rrsVpXBNnTBtdOvk1odF PL7HI2JBVamHpCCA0Zz2xK17TranD/m14/v5E/NU9jEQ9EnqnEDWX1PFD1NzzN93lELI dhymtiP+ZijPq5ZuddBHF65Eugfezk/rPoTYpkLY++edMSIlt5laJX3fVtrvr/grKO8Q dxjXDF9gf+ydttg3Js7zGF4XoOYpI63Vb/Aa6PrBWBH+qx98LF8XJ0DdSpV9Dkk/LyDM BCxQ== X-Received: by 10.66.122.72 with SMTP id lq8mr1611971pab.1.1449596564864; Tue, 08 Dec 2015 09:42:44 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id q23sm6065123pfi.34.2015.12.08.09.42.43 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Dec 2015 09:42:43 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 7315B10FCF349; Tue, 8 Dec 2015 09:42:42 -0800 (PST) In-Reply-To: <837fkodf3e.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2015 19:28:53 +0200") Date: Tue, 08 Dec 2015 09:42:37 -0800 Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Eli Zaretskii writes: > But why would you need a subsequent access to the same data? The profiler > report is in the buffer, and you can review it whenever you want. The buf= fer > has the time of the report creation as part of its name, so the next repo= rt > will not destroy the buffer. You can also save the report to a file (ther= e's > a separate command to do that). By contrast,producing a report again from > the same data will simply produce an identical report. > I guess I don't see a use case where the user would need to produce the s= ame > report twice. I never needed that myself, FWIW. I think the OP wants to: 1. Start a profile 2. View the "results in progress" 3. Allow it to continue execution 4. View the "results at the end" It's step #2 that's missing. If we can only view the results in progress by taking away the option for #4, this is less optimal. This is something that other profilers do let you do; I use Instruments on = the Mac to view "statistics as they happen" all the time, to spot trends, for example. =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGcBAEBCgAGBQJWZxaNAAoJEMFE2PTxn+YwfXcL/2otKX3rUKKj26vrZBpenlCj gPyyGml3pfFx9vtMgBJQ4c5vBCE6XNBCJvUK2QRFUjCn0lkonFzCYLAYuHjjzVcC ywyWJjjLS3Nrr+5B2ID8T21Dx2rC//6sYxf/9pc+U2x4Cc6sL/hwPXZ+f6uOCzp/ HG8gGONvC9E4Vid6vqnPSMiCJO+rryxiuM1IC7KurVjSwYmZe+uoJkbu2pvyIoFe VMdaonq2fmxXHxE9Gs0EUFUQWBeOVcdv0qMHIxM/p+31zZj2i8HM+vN7Q9HKfmkJ nYytVbnAYq98Wx1pKKhhIOK6Y+AR3VLATsK/RnB8SWoPMFXsWHIS4RUUCQsf5Phh aplytFwNqVIOBhzeovNzEGem6t367VmVtz66RaEffhPFHSOOEnILP20cTWYRFNHR cAI/f5Qh2yVem/DG2eP2js/qp9p36IQHtRIZpUE4XVlyVOs3lSfHOZdINhCBKcXj lFWxBv+ilTy2Nh54GCnnAfzFoFTEhwomF9vnQsd6Qw== =1bmg -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 17:45: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 To: Eli Zaretskii Cc: 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495966842179 (code B ref 22114); Tue, 08 Dec 2015 17:45:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 17:44:44 +0000 Received: from localhost ([127.0.0.1]:43476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MJg-0000Z3-AP for submit@debbugs.gnu.org; Tue, 08 Dec 2015 12:44:44 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35496) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MJf-0000Yu-2f for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 12:44:43 -0500 Received: by wmuu63 with SMTP id u63so190563964wmu.0 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 09:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5uqeDMJnOfAapC4vIqnEujG5TZNz+CGbyim4wykP2RY=; b=nCtnqAuWKeuZXtQz0blLPydxd/4LeO4KbfZKNwZW+Ilr50gwOh88zKfAu1BVvyxJpy 71A7gQ+TamHVU2/MG5tu8DoWY79EC3snEzbHx5D81iDoNmK8L9rCMpdTtCAwUUs4yFIS 1+zvTeSGo/PEmqeGH3DPC7EgiI4mqRhx4UuKTQ6Rkva/RpK6RQxAB9ZJC05uYsOT+hl9 jZ/q9QqadHjrcF+agZC+R1YGTfA5xg9sFAefl9ZTSViLyXrMs44IfWGCJYx1ShFfhYpa 8kJEWUr9cq2VDD6VWP7H9Rtmpq0kc/4n1VWc/1bFoo+t1l6KuGx1oThzDrM+6UVfpata nGpw== X-Received: by 10.194.179.162 with SMTP id dh2mr858413wjc.17.1449596682461; Tue, 08 Dec 2015 09:44:42 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id c4sm3919218wjs.36.2015.12.08.09.44.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 09:44:42 -0800 (PST) Date: Tue, 8 Dec 2015 18:44:41 +0100 From: Vasilij Schneidermann Message-ID: <20151208174441.GC1080@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> <20151208164049.GB1080@odonien.bevuta.com> <834mfsdend.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <834mfsdend.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Sorry, I don't understand this comment. If the report can be produced > when the profiler is stopped, then the limitation is lifted, right? This was specifically targeted at an earlier comment of yours: > I don't really understand why profiler.el insists on having the > profiler running for providing the profile. My theory as for the code was written this way is that its author noticed that accessing the log without getting an error is only possible while the profiler is still running, so he implemented exactly that. That's why I've discarded my earlier version of the patch (which pretty much looks like what you've proposed) and replaced it with something more elaborate working around this problem. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 17:57: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 To: John Wiegley Cc: 22114@debbugs.gnu.org, Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495974183326 (code B ref 22114); Tue, 08 Dec 2015 17:57:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 17:56:58 +0000 Received: from localhost ([127.0.0.1]:43485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MVW-0000rY-3H for submit@debbugs.gnu.org; Tue, 08 Dec 2015 12:56:58 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37474) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MVU-0000rQ-5W for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 12:56:56 -0500 Received: by wmww144 with SMTP id w144so39943755wmw.0 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 09:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=cZPxm6kldAXr9YppkLo3GPJSUHCsyBqmqDbr7S4QFEg=; b=Y6nNiInQMW6xkFgP2hUyPFx7zbS6CCFo6Ybj8XDoulDRJhswslj+IT0KUPnhlRqyiK YfxcG3d1HuN8hudPbQR5+iEikV+qfSlAGxcwlfTVUKzQAJm8ohvT5tJ/tX0T9b1R5Nc7 DshPyUheV443VC7+/yDrsZ0CSZhFRBkyzFX3SLY1H1tq7dB67pb0IdW/cUwMx+Rypkgf RTw1BuNiPJHn48ELLdrrSMa71mKC5TAqTBYpDd6XnK/fdFBNWHcJvpkS+2eZRYGJF/4v 5qAIz0Sv/t46M8o5A7PB7kW7vVdUF1CX3WKHoUVsUrUI+eh4CrexRRx+cyWxlm8ENjmq ktMA== X-Received: by 10.28.228.138 with SMTP id b132mr31095549wmh.46.1449597415498; Tue, 08 Dec 2015 09:56:55 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id t3sm3623394wjz.11.2015.12.08.09.56.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 09:56:55 -0800 (PST) Date: Tue, 8 Dec 2015 18:56:54 +0100 From: Vasilij Schneidermann Message-ID: <20151208175654.GD1080@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > I think the OP wants to: > > 1. Start a profile > 2. View the "results in progress" > 3. Allow it to continue execution > 4. View the "results at the end" This would be a nice addition to have, but is currently not possible (and not what I'm after with this patch). The very act of viewing the results in progress (which requires accessing the profiler log) creates a log *and* resets the profiler. If you access the log again while the profiler is still running, you'll get a new log starting from that point of time and spanning until access time. This can be repeated ad nauseam and is IMO rather unhelpful. What can be fixed though is the behaviour of profiler report with a stopped profiler. You are still limited to accessing the profiler log once, but if you make profiler.el cache it (be it by storing it in a variable before stopping or by opening an already existing profiler report buffer), the user won't be aware of this limitation, because no matter how often they display the report, it will stay exactly the same and not throw an error. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 18:03: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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495977453941 (code B ref 22114); Tue, 08 Dec 2015 18:03:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 18:02:25 +0000 Received: from localhost ([127.0.0.1]:43489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mam-00011U-BZ for submit@debbugs.gnu.org; Tue, 08 Dec 2015 13:02:24 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35052) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Maj-00011E-FD for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 13:02:22 -0500 Received: by pfu207 with SMTP id 207so15611127pfu.2 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 10:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=vWTsNBGvjb/pfZ9hfq5MASnkr8FJNT2g9R3MCjsUjD4=; b=z0fMXDFmrnDvHKOanOL5VafBupqdmXgwIYomXWQnIWUqQnNnEht7atGk1c/t5q8w4C ICItRg/oSGPIp/n7fYBJ6eZWv+rShhTw40pRIHZ+qkJy3DeEFJUxVe+zkA6HtAJldoq6 x+a19WaR0eXpm+puJKqQ0MyfHRZmgDncWUreoh0vg5APrnnNl6DZYrPuuhkBGVA6oOWr r3XESK0hJ9tCcmWybIxwu8beViH5ywQy58xQncgjP+FnM9v4lEqbchiTek5M2/Tug9/b FeA+wm18AdPXIx2kcL5t3bQQ+TeW7pr+ThR24/+NWDO7zzdeM5JX0+0nwg4R2iV99mek aFLA== X-Received: by 10.98.0.73 with SMTP id 70mr6794797pfa.4.1449597740659; Tue, 08 Dec 2015 10:02:20 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id c79sm6117725pfj.71.2015.12.08.10.02.19 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Dec 2015 10:02:20 -0800 (PST) Received: by Vulcan.local (Postfix, from userid 501) id 4DD0710FCF885; Tue, 8 Dec 2015 10:02:19 -0800 (PST) From: John Wiegley In-Reply-To: <20151208175654.GD1080@odonien.bevuta.com> (Vasilij Schneidermann's message of "Tue, 8 Dec 2015 18:56:54 +0100") Date: Tue, 08 Dec 2015 10:02:17 -0800 Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <20151208175654.GD1080@odonien.bevuta.com> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Vasilij Schneidermann writes: > This would be a nice addition to have, but is currently not possible (and > not what I'm after with this patch). The very act of viewing the results in > progress (which requires accessing the profiler log) creates a log *and* > resets the profiler. If you access the log again while the profiler is still > running, you'll get a new log starting from that point of time and spanning > until access time. This can be repeated ad nauseam and is IMO rather > unhelpful. I see. > What can be fixed though is the behaviour of profiler report with a stopped > profiler. You are still limited to accessing the profiler log once, but if > you make profiler.el cache it (be it by storing it in a variable before > stopping or by opening an already existing profiler report buffer), the user > won't be aware of this limitation, because no matter how often they display > the report, it will stay exactly the same and not throw an error. You just want the profiler report display to be idempotent? Wouldn't this mean necessitating another command call in order to reset results? Some people may be used to the fact that a report resets the results. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 18:09: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 To: John Wiegley Cc: 22114@debbugs.gnu.org, v.schneidermann@gmail.com Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495981304542 (code B ref 22114); Tue, 08 Dec 2015 18:09:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 18:08:50 +0000 Received: from localhost ([127.0.0.1]:43501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mh0-0001BC-4N for submit@debbugs.gnu.org; Tue, 08 Dec 2015 13:08:50 -0500 Received: from mtaout28.012.net.il ([80.179.55.184]:55602) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mgx-0001B1-H2 for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 13:08:48 -0500 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NZ100I00WSD4T00@mtaout28.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 20:07:55 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ100FVQX17WU20@mtaout28.012.net.il>; Tue, 08 Dec 2015 20:07:55 +0200 (IST) Date: Tue, 08 Dec 2015 20:08:44 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83zixkbyoj.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > From: John Wiegley > Cc: Vasilij Schneidermann , 22114@debbugs.gnu.org > Date: Tue, 08 Dec 2015 09:42:37 -0800 > > > But why would you need a subsequent access to the same data? The profiler > > report is in the buffer, and you can review it whenever you want. The buffer > > has the time of the report creation as part of its name, so the next report > > will not destroy the buffer. You can also save the report to a file (there's > > a separate command to do that). By contrast,producing a report again from > > the same data will simply produce an identical report. > > > I guess I don't see a use case where the user would need to produce the same > > report twice. I never needed that myself, FWIW. > > I think the OP wants to: > > 1. Start a profile > 2. View the "results in progress" > 3. Allow it to continue execution > 4. View the "results at the end" > > It's step #2 that's missing. If we can only view the results in progress by > taking away the option for #4, this is less optimal. This is a completely different issue, and AFAIU the proposed patch didn't allow that. The C-level implementation of producing a profiler log (which is then used to format a report) resets the profile data once it returns the log, and then starts collecting the profile data anew. The OP's patch didn't change that. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 18:11: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 To: Vasilij Schneidermann Cc: 22114@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495982264716 (code B ref 22114); Tue, 08 Dec 2015 18:11:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 18:10:26 +0000 Received: from localhost ([127.0.0.1]:43505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MiT-0001Dt-Oj for submit@debbugs.gnu.org; Tue, 08 Dec 2015 13:10:26 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:58653) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6MiR-0001Df-Ir for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 13:10:20 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NZ100J00WQ8E400@a-mtaout22.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 20:10:18 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ100J5LX551NB0@a-mtaout22.012.net.il>; Tue, 08 Dec 2015 20:10:18 +0200 (IST) Date: Tue, 08 Dec 2015 20:10:16 +0200 From: Eli Zaretskii In-reply-to: <20151208174441.GC1080@odonien.bevuta.com> X-012-Sender: halo1@inter.net.il Message-id: <83y4d4bylz.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208164049.GB1080@odonien.bevuta.com> <834mfsdend.fsf@gnu.org> <20151208174441.GC1080@odonien.bevuta.com> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Tue, 8 Dec 2015 18:44:41 +0100 > From: Vasilij Schneidermann > Cc: 22114@debbugs.gnu.org > > > Sorry, I don't understand this comment. If the report can be produced > > when the profiler is stopped, then the limitation is lifted, right? > > This was specifically targeted at an earlier comment of yours: > > > I don't really understand why profiler.el insists on having the > > profiler running for providing the profile. > > My theory as for the code was written this way is that its author > noticed that accessing the log without getting an error is only possible > while the profiler is still running, so he implemented exactly that. But that was because of a very simple bug, not some inherent limitation of the profiler. > That's why I've discarded my earlier version of the patch (which pretty > much looks like what you've proposed) and replaced it with something > more elaborate working around this problem. I prefer to solve the problem rather than work around it. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 18:13: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 To: John Wiegley Cc: 22114@debbugs.gnu.org, Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495983614930 (code B ref 22114); Tue, 08 Dec 2015 18:13:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 18:12:41 +0000 Received: from localhost ([127.0.0.1]:43510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mki-0001HS-Rn for submit@debbugs.gnu.org; Tue, 08 Dec 2015 13:12:41 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34738) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mkh-0001HI-52 for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 13:12:39 -0500 Received: by wmvv187 with SMTP id v187so225693262wmv.1 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 10:12:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=si0WqwApG/q0NqOWEnunAibJF2kTjR3UBs2K6B7CnHo=; b=vMP1uqh2QAHGmwvAb/qoXOnvn9xn41RvQirhCeSqEit/0u3wL6giG0Lj9A2mD9Gjeo 9Zhc+h902wcFwVNb/yK/DGx/oxQn62sS1oa/9KK+BO5J2yKTuA19rTNBJx5k3yRW6Ey7 dll9eZMYfBn/ibt5BhLRZwl7FdUKsHClNNEwdKVqDw/ux3Iq4EuwwO3c9861PBGSJM7T t9acsOiU2zy9zbrlnpLz/G585WXgMLPoKi2CSp1UK1cMb+sCf9mDhSsqFk8BZVRD6b+s 5nxQiJ48XEkflaf4PRuX0T/vw5PKuMvJKpZ29Bt7hwAEj1w9jIFTq4eU6Sn+GpN5E3xA vElA== X-Received: by 10.28.153.137 with SMTP id b131mr6412711wme.3.1449598358645; Tue, 08 Dec 2015 10:12:38 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id lx4sm4060168wjb.5.2015.12.08.10.12.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 10:12:38 -0800 (PST) Date: Tue, 8 Dec 2015 19:12:37 +0100 From: Vasilij Schneidermann Message-ID: <20151208181237.GA19310@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <20151208175654.GD1080@odonien.bevuta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > You just want the profiler report display to be idempotent? Wouldn't this mean > necessitating another command call in order to reset results? Some people may > be used to the fact that a report resets the results. That's correct. I consider an implementation using a variable more resilient than relying on the user not to kill the buffer (which isn't as unlikely as you'd think, given newbie questions of how to make Emacs open less buffers). Resetting does already have a command, `profiler-reset`. I've adjusted it in my patch to set the variables to `nil` so that it will behave correctly in accordance with the other changes. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 18:16:01 +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 To: Eli Zaretskii Cc: John Wiegley , v.schneidermann@gmail.com, 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14495985045223 (code B ref 22114); Tue, 08 Dec 2015 18:16:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 18:15:04 +0000 Received: from localhost ([127.0.0.1]:43529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mn2-0001MB-8G for submit@debbugs.gnu.org; Tue, 08 Dec 2015 13:15:04 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34706) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Mmh-0001L6-Mx for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 13:15:02 -0500 Received: by pacwq6 with SMTP id wq6so15585588pac.1 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 10:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=QCuPYnNjsS76CHiE8qDK/lgFEEgzVav8wPI/XHR/gus=; b=FTmotrPEnTqAdGv5J1QCEOEBCuWLz2muzBXZnxjpdBRUgR8uIDEXrWeFef+1b0/7Mp Jbmvd4nkmc7+Pl6RL4YYS41+cVANYavsAe2DnLW6JM02PTzy3FPReoigUTDKZ1cOnkI5 GGelqlfTYTV3cTpSCcFTC0dTH3ymxgATczx4ZkfH5N65MT/AXt/Cd9N4so2p44SPNdk5 1geJbjEEYngqD50zagW8mpjI75syVLA+wBVLeITJf8XPxyC8oKDBNbWb05IXTcZ8uDDC GaSOBTaI3obu7OAUxkD1C+OnK3wcoP5ru2Ujl4Lfv24GfNRRWMAzRu7kTGYJLrHzYZFB O6vw== X-Received: by 10.66.119.237 with SMTP id kx13mr1828033pab.158.1449598483081; Tue, 08 Dec 2015 10:14:43 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id f5sm6304118pas.8.2015.12.08.10.14.42 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Dec 2015 10:14:42 -0800 (PST) Received: by Vulcan.local (Postfix, from userid 501) id B688510FCFB84; Tue, 8 Dec 2015 10:14:41 -0800 (PST) From: John Wiegley In-Reply-To: <83zixkbyoj.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2015 20:08:44 +0200") Date: Tue, 08 Dec 2015 10:14:38 -0800 Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Eli Zaretskii writes: > This is a completely different issue, and AFAIU the proposed patch didn't > allow that. The C-level implementation of producing a profiler log (which is > then used to format a report) resets the profile data once it returns the > log, and then starts collecting the profile data anew. The OP's patch didn't > change that. Ah right, thanks for clarifying. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 19:16:01 +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 To: Eli Zaretskii , John Wiegley Cc: 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144960215417603 (code B ref 22114); Tue, 08 Dec 2015 19:16:01 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 19:15:54 +0000 Received: from localhost ([127.0.0.1]:43678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Nju-0004Zp-8H for submit@debbugs.gnu.org; Tue, 08 Dec 2015 14:15:54 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:34000) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6NjR-0004Ys-NX for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 14:15:53 -0500 Received: by wmvv187 with SMTP id v187so228039476wmv.1 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 11:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=g8FnCr/WVg4LuRgXNKYC5BaqZccryDKSSiAhGj6Rwek=; b=hTPYtGp7zReazTH4PQhxq4lz5bFFEvhC0ADRUy/tabK1nuxGitAglh+VXSFmNWVugL bXow1j7CYma1xGQeFHtfpTh4JJQ7yPbPaUeWyrc0l50KzahL/kILbf89es8wIRIXo0+p 1thW7c7VoauByKyvxQgUyYto9L71SgsTMtHx8NUC7u8IgNhozM+ETOIik6lhVzTb31ln gJ/OQ+G1OM5PnRAB8j1//2MXBaz1Y8qMs4OniNRGdrPkv+Tz+SiVTpE8lLHN7gJtE8uR ZCfEiA7BXTq9fklz4BWRTzKIj0OUKZEDssHBgsidApnX0q6vSX8GAb+FPF676CdfaKlV E2Tg== X-Received: by 10.28.156.75 with SMTP id f72mr30403397wme.91.1449602125039; Tue, 08 Dec 2015 11:15:25 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id z13sm4200598wjr.47.2015.12.08.11.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 11:15:24 -0800 (PST) Date: Tue, 8 Dec 2015 20:15:23 +0100 From: Vasilij Schneidermann Message-ID: <20151208191523.GB19310@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <83bna0di5k.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > I prefer to solve the problem rather than work around it. I'm not sure I'm understanding this correctly. How is your suggestion of just removing the check for whether the profiler is running not a workaround? The only way I see of solving this without extra code in the frontend is by fixing the underlying C code, but you've confirmed that this is not an option. At least not without restructuring profiler.c heavily. To prove that I'm not the crazy one here, I've written two example programs in Ruby (with ruby-prof) and Python (with cProfile). Both of them calculate a Fibonacci number in a profiler run, then display the recorded data. You can easily verify that the profiler behaves idempotently and does not just discard data on a whim by editing these. This does make a lot of sense if you consider that profiling data is precious and would make sure it isn't easily lost unless someone intentionally discards it. I've been told by others that other tools like gprof, perf and callgrind don't reset either, therefore my conclusion on the topic is that Emacs is the odd one in this group. Considering that this problem hasn't been reported before, I doubt anyone has been using the profiler seriously and this change will not disrupt anyone's workflow (which would need to be weird anyways because the only user-visible part that did change is that stopping doesn't prevent you from viewing a profiler run). --gBBFr7Ir9EOA20Yy Content-Type: application/x-ruby Content-Disposition: attachment; filename="profile.rb" Content-Transfer-Encoding: quoted-printable require 'ruby-prof'=0A=0Adef fib(n)=0A if n =3D=3D 0=0A 0=0A elsif n = =3D=3D 1=0A 1=0A else=0A fib(n-1) + fib(n-2)=0A end=0Aend=0A=0ARuby= Prof.start=0Afib(30)=0Alog =3D RubyProf.stop=0A=0Aprinter =3D RubyProf::Fla= tPrinter.new(log)=0Aprinter.print(STDOUT)=0A --gBBFr7Ir9EOA20Yy Content-Type: text/x-python; charset=utf-8 Content-Disposition: attachment; filename="profile.py" import cProfile, pstats, io def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-1) + fib(n-2) pr = cProfile.Profile() pr.enable() fib(30) pr.disable() s= io.StringIO() sortby = 'cumulative' ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) --gBBFr7Ir9EOA20Yy-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 19:22: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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144960248618267 (code B ref 22114); Tue, 08 Dec 2015 19:22:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 19:21:26 +0000 Received: from localhost ([127.0.0.1]:43707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6NpG-0004kY-Ci for submit@debbugs.gnu.org; Tue, 08 Dec 2015 14:21:26 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36463) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6NpE-0004kP-AM for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 14:21:24 -0500 Received: by pfdd184 with SMTP id d184so16548199pfd.3 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 11:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=oseKy16NGi6bN9rFnxve8tIYpAHougaYAq0DLDbKCoM=; b=BxIGJSbzrntw6P2Rfs/JyCOM84A8sjacM72EHKK/1U0Eis3X8SiMRkEphzmtmY7+a2 bTxm7mt6tAf1a7CfZjF31lpybltpVWaYdhmTKxSIgxLrNoU9N4XxfO5Gc2f/8lGMPEXF xp/G5VIzz3q3/WWTFg3GK/DiYe3IFs+MV4grKO9IU3Vd1Fz8SFxVDZ5DPzGQO6lWsZmD WYxtTL531/atU5gSxKleMvDtlBBVE8A+6DU64SB0bLOvPbc0rl2+JSK2qsSto4sBgHOz t70yOrlEa58nRXo3QWxts2AxC095pFNCDtpZjwiq1DryjqZpo43gsEWWpzp3vlUZxnuZ Lw6A== X-Received: by 10.98.71.92 with SMTP id u89mr7154838pfa.143.1449602482723; Tue, 08 Dec 2015 11:21:22 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id sm8sm6467674pac.43.2015.12.08.11.21.20 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Dec 2015 11:21:20 -0800 (PST) Received: by Vulcan.local (Postfix, from userid 501) id 9FD3410FE323C; Tue, 8 Dec 2015 11:21:19 -0800 (PST) From: John Wiegley In-Reply-To: <20151208191523.GB19310@odonien.bevuta.com> (Vasilij Schneidermann's message of "Tue, 8 Dec 2015 20:15:23 +0100") Date: Tue, 08 Dec 2015 11:21:15 -0800 Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208191523.GB19310@odonien.bevuta.com> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Vasilij Schneidermann writes: > Considering that this problem hasn't been reported before, I doubt anyone > has been using the profiler seriously and this change will not disrupt > anyone's workflow (which would need to be weird anyways because the only > user-visible part that did change is that stopping doesn't prevent you from > viewing a profiler run). I would like to maintain UI consistency with well-established tools, since this module is fairly new. How does that sound, Eli? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 20:11: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 To: Vasilij Schneidermann Cc: jwiegley@gmail.com, 22114@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144960545029342 (code B ref 22114); Tue, 08 Dec 2015 20:11:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 20:10:50 +0000 Received: from localhost ([127.0.0.1]:43771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Ob4-0007dB-Cx for submit@debbugs.gnu.org; Tue, 08 Dec 2015 15:10:50 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:45233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6Ob2-0007d2-3f for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 15:10:48 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NZ200K0029G6000@a-mtaout22.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 22:10:46 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ200KB92PY2M40@a-mtaout22.012.net.il>; Tue, 08 Dec 2015 22:10:46 +0200 (IST) Date: Tue, 08 Dec 2015 22:10:45 +0200 From: Eli Zaretskii In-reply-to: <20151208191523.GB19310@odonien.bevuta.com> X-012-Sender: halo1@inter.net.il Message-id: <83si3cbt16.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208191523.GB19310@odonien.bevuta.com> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > Date: Tue, 8 Dec 2015 20:15:23 +0100 > From: Vasilij Schneidermann > Cc: 22114@debbugs.gnu.org > > > I prefer to solve the problem rather than work around it. > > I'm not sure I'm understanding this correctly. How is your suggestion > of just removing the check for whether the profiler is running not a > workaround? Removing the check is not what I alluded to. Removing the check just lifts the artificial limitation that shouldn't have been there to begin with. The problem I didn't want to work around is the one solved by this hunk: @@ -846,12 +844,12 @@ (defun profiler-report-cpu () (let ((profile (profiler-cpu-profile))) - (when profile + (when (and profile (profiler-profile-log profile)) (profiler-report-profile-other-window profile)))) (defun profiler-report-memory () (let ((profile (profiler-memory-profile))) - (when profile + (when (and profile (profiler-profile-log profile)) (profiler-report-profile-other-window profile)))) IOW, the original test was incorrect, and caused errors if only one of the 2 profiles was collected (as it usually is, since the memory profiler is mostly useless, so the only really useful one is the cpu one). > Considering that this problem hasn't been reported before, I doubt > anyone has been using the profiler seriously Actually, I use it all the time. I just never need to produce again the same report, that's all. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 20:13: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 To: John Wiegley Cc: 22114@debbugs.gnu.org, v.schneidermann@gmail.com Reply-To: Eli Zaretskii Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144960554429508 (code B ref 22114); Tue, 08 Dec 2015 20:13:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 20:12:24 +0000 Received: from localhost ([127.0.0.1]:43775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6OcZ-0007fr-Vn for submit@debbugs.gnu.org; Tue, 08 Dec 2015 15:12:24 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:57906) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6OcY-0007fh-9W for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 15:12:22 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NZ200D002I1CH00@a-mtaout20.012.net.il> for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 22:12:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ200DEH2SK5Z50@a-mtaout20.012.net.il>; Tue, 08 Dec 2015 22:12:21 +0200 (IST) Date: Tue, 08 Dec 2015 22:12:19 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83r3iwbsyk.fsf@gnu.org> References: <83bna0di5k.fsf@gnu.org> <20151208191523.GB19310@odonien.bevuta.com> X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) > From: John Wiegley > Cc: Eli Zaretskii , John Wiegley , 22114@debbugs.gnu.org > Date: Tue, 08 Dec 2015 11:21:15 -0800 > > I would like to maintain UI consistency with well-established tools, since > this module is fairly new. How does that sound, Eli? I don't see any consistency issue here. But since I've already managed to irritate, I guess it's time for me to crawl back under my rock and let you decide. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: John Wiegley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Dec 2015 20:40: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 To: Eli Zaretskii Cc: John Wiegley , v.schneidermann@gmail.com, 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144960715732347 (code B ref 22114); Tue, 08 Dec 2015 20:40:02 +0000 Received: (at 22114) by debbugs.gnu.org; 8 Dec 2015 20:39:17 +0000 Received: from localhost ([127.0.0.1]:43805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6P2a-0008Pf-Ia for submit@debbugs.gnu.org; Tue, 08 Dec 2015 15:39:17 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35828) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a6P2Y-0008PX-BJ for 22114@debbugs.gnu.org; Tue, 08 Dec 2015 15:39:14 -0500 Received: by pacej9 with SMTP id ej9so17430645pac.2 for <22114@debbugs.gnu.org>; Tue, 08 Dec 2015 12:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=qjP47TpMh/L+z/G9eb9PXa03S58S+aW+qxUy1DsYTVE=; b=G9cnPtASv04o5yfZMcLx9CJT4h2byV9+NOsZIU7xqVlKNUfjDD/0leLqvd1UsciiEZ NV6usEr/rryYlQSayh06OrsrCX3VVsycNNkHLMZ1G7opk8lkn99afuwV1belrKAM8PYQ OrAhFzUP6IGb9J3hCnsXjC4hnASrp1QEy0X4iWRBceZoMQwL2SNJW0XP0L7FXvaDV4LY uexMOVNDGATAeDqNKWcUhobNbKylmyaXI+j/7Y8BlrnS+gGexptkpOFR7FGvPI2BBQM5 U+rBL17434oQVj8btDB9daThKS9qI8BezLBEFptGjxb3RqaM4Cbkfj+XafM8m3Cr6RgS 85hQ== X-Received: by 10.66.150.198 with SMTP id uk6mr2778400pab.70.1449607153660; Tue, 08 Dec 2015 12:39:13 -0800 (PST) Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id p86sm6589028pfi.42.2015.12.08.12.39.12 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Dec 2015 12:39:12 -0800 (PST) From: John Wiegley X-Google-Original-From: "John Wiegley" Received: by Vulcan.local (Postfix, from userid 501) id 0E2BE11132DA4; Tue, 8 Dec 2015 12:39:12 -0800 (PST) In-Reply-To: <83r3iwbsyk.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2015 22:12:19 +0200") Date: Tue, 08 Dec 2015 12:39:07 -0800 Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208191523.GB19310@odonien.bevuta.com> <83r3iwbsyk.fsf@gnu.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>>> Eli Zaretskii writes: > I don't see any consistency issue here. But since I've already managed to > irritate, I guess it's time for me to crawl back under my rock and let you > decide. Based on research by the OP, it seems that both Python and Ruby's debuggers are idempotent in asking for results. Although, like you, I've never before asked for the same results twice, however, we should keep consistent with other tools, if only because there's no real reason not to. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Dec 2015 09:19:01 +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 To: Eli Zaretskii Cc: John Wiegley , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.144973910215656 (code B ref 22114); Thu, 10 Dec 2015 09:19:01 +0000 Received: (at 22114) by debbugs.gnu.org; 10 Dec 2015 09:18:22 +0000 Received: from localhost ([127.0.0.1]:38594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6xMj-00044S-Qe for submit@debbugs.gnu.org; Thu, 10 Dec 2015 04:18:21 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38762) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a6xMh-000447-VO for 22114@debbugs.gnu.org; Thu, 10 Dec 2015 04:18:20 -0500 Received: by wmec201 with SMTP id c201so15717223wme.1 for <22114@debbugs.gnu.org>; Thu, 10 Dec 2015 01:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=VbYlN9MokhPT6WC6EWBAnjXi7v99fpsUioXzjgszFWk=; b=opRL1CkGgfsLrFSloF3nKjlsaoL9JgfnTiSz4eJfProEP3siiLHhMuEDoQ/8A8Ej4F tfcRR3quDVOekUen/kQU6sXz8n38Id/AvB6l0HVOV1tSq/45Q/KGnKpZ/lcREPHwhIp/ dmT0LHGfzKeogcOmxAl17MDYpaKL01NKWxGkSkYKeYr/JgZANF99tUqMu8/7nnreWJQb ULOnSM6KwjVYM6bBDOX7QmU01alIXD9HJhYnpbITqP/BaMLwIpodUdKBTjcgP2DQmoNe HSuJ9VPvQKEW447WdDNwZbJi1gNl/IOAvbWY2QzRM30Q/YtbbeK/0Cz9XEYHDVykmxGB n4WA== X-Received: by 10.194.250.39 with SMTP id yz7mr12577515wjc.92.1449739094424; Thu, 10 Dec 2015 01:18:14 -0800 (PST) Received: from localhost ([89.15.236.120]) by smtp.gmail.com with ESMTPSA id u205sm11851243wmb.12.2015.12.10.01.18.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 01:18:13 -0800 (PST) Date: Thu, 10 Dec 2015 10:18:04 +0100 From: Vasilij Schneidermann Message-ID: <20151210091804.GA1785@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83zixkbyoj.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > This is a completely different issue, and AFAIU the proposed patch > didn't allow that. The C-level implementation of producing a profiler > log (which is then used to format a report) resets the profile data > once it returns the log, and then starts collecting the profile data > anew. The OP's patch didn't change that. How feasible would it be to make the log a regular hash table, fill it with vectors of the right size and then manipulate these vectors every time a profiling signal is received? Or alternatively, fiddle with the hash table values? A successful patch doing that would remove the need for being clever about storing logs/reports, resetting logs and on top of that allow you to view in-progress reports like John Wiegley suggested. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Dec 2015 20:34: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 To: Eli Zaretskii Cc: John Wiegley , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.145003881327144 (code B ref 22114); Sun, 13 Dec 2015 20:34:02 +0000 Received: (at 22114) by debbugs.gnu.org; 13 Dec 2015 20:33:33 +0000 Received: from localhost ([127.0.0.1]:50607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8DKn-00073k-Hi for submit@debbugs.gnu.org; Sun, 13 Dec 2015 15:33:33 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:34331) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8DKl-00073W-31 for 22114@debbugs.gnu.org; Sun, 13 Dec 2015 15:33:31 -0500 Received: by mail-wm0-f41.google.com with SMTP id p66so36784715wmp.1 for <22114@debbugs.gnu.org>; Sun, 13 Dec 2015 12:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=IrhsvkIQtYczPIToTsrdTSy9m7EQsSOc9LEKGRsT8r8=; b=O+c4/2QDs70kT7CdTyp8dAjt/BqV51+mqAAUqpY+G7/JwR8C2SjSra/yQoPzvxXeJU JH5+z6ONuP2KPB/wsxeOHxw7NYqZtZ6BzhfIB5iBkwcc7omdhDJGxscSSYbaaBmFc71T 7NEoMC7mdRHZAGmi7Axz6pKRTfDvgNqll9HZWWrKImz3WZpdHKLiOfQ1bkNVNc08oyQn zXeCdZNajwlQsaOcj1RvI5aTT9uJae7xFwXTdfy9167yrJ+0HYF/Z4C629lDFzOOxkGm sx9th76FKVOdv7iMt9RwIBMLVPgIjJP5LuzNaXfrp7ZzTvpSe1PfoxjZtltpUuhbIOK3 6sIQ== X-Received: by 10.28.143.11 with SMTP id r11mr20301759wmd.28.1450038805414; Sun, 13 Dec 2015 12:33:25 -0800 (PST) Received: from localhost (dslb-088-078-205-095.088.078.pools.vodafone-ip.de. [88.78.205.95]) by smtp.gmail.com with ESMTPSA id e136sm7483590wma.23.2015.12.13.12.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Dec 2015 12:33:24 -0800 (PST) Date: Sun, 13 Dec 2015 21:33:23 +0100 From: Vasilij Schneidermann Message-ID: <20151213203323.GB1296@odonien.fritz.box> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <83zixkbyoj.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Meanwhile, I've come up with a simpler approach to solving this at the C level. Basically the problem is that if log is exposed, it cannot be used again from profiler.el. What if one would just create a deep copy of the log that can be safely used externally? From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Dec 2015 22:19:01 +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 To: Eli Zaretskii Cc: John Wiegley , Paul Eggert , Stefan Monnier , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14500451143824 (code B ref 22114); Sun, 13 Dec 2015 22:19:01 +0000 Received: (at 22114) by debbugs.gnu.org; 13 Dec 2015 22:18:34 +0000 Received: from localhost ([127.0.0.1]:50683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8EyQ-0000zc-A1 for submit@debbugs.gnu.org; Sun, 13 Dec 2015 17:18:34 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:38063) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8EyP-0000zM-0r for 22114@debbugs.gnu.org; Sun, 13 Dec 2015 17:18:33 -0500 Received: by wmpp66 with SMTP id p66so38294909wmp.1 for <22114@debbugs.gnu.org>; Sun, 13 Dec 2015 14:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=3KJ7NMoVKD8FXY4+ruHIlSTlosSnzzJOQeXgUiNaoxA=; b=nrKwQscH6i/Sbz4wHyZJL1xO+LP+Q8022ebKCB+eGZ367X615SvndKLpMNBEUrlsY/ bMtoRb+tJ7aR7Y7HPP8XxwaACZQgTSx5eczZryZwy686uYV7g5bzVWreYA9lCcYXvxaD GX0pFkVW2lRHqfb4aVFHupZ8fnAUGdGa6xD9C0gfExPTE7v70Uzd43syFGSIv5ehB+TM nc3nwNSD8a1kyoZtAqoNZQtfNm4Helrx+eUfTDK/9UzLgqNdwrzSI8n1d817Mtjl4PUP xsYUNQvaIiYqlwAdgeQq8me7ROKgH4dg7/y+wR5nx5ATd8O2twRoFMVLxunathjbqL1d e9pA== X-Received: by 10.194.77.51 with SMTP id p19mr33229936wjw.159.1450045107150; Sun, 13 Dec 2015 14:18:27 -0800 (PST) Received: from localhost (dslb-088-078-205-095.088.078.pools.vodafone-ip.de. [88.78.205.95]) by smtp.gmail.com with ESMTPSA id l128sm13315908wmf.10.2015.12.13.14.18.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Dec 2015 14:18:26 -0800 (PST) Date: Sun, 13 Dec 2015 23:18:25 +0100 From: Vasilij Schneidermann Message-ID: <20151213221825.GC1296@odonien.fritz.box> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <20151213203323.GB1296@odonien.fritz.box> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On 12/13/15 at 09:33pm, Vasilij Schneidermann wrote: > What if one would just create a deep copy of the log that can be > safely used externally? Apparently not even that is necessary. I wrote another variant of the patch that disables the check for a running profiler before generating a report, avoids erroring out if generating a report for a non-running profiler and doesn't reset the log after stopping. Either my testing has been too superficial and something unexpected will come bite me or the comments are simply outdated. I've taken the liberty to include Paul Eggert and Stefan Monnier into the CC as they've contributed several patches to profiler.c and should be able to illuminate this matter. --h31gzZEtNLTqOjlF Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Disable-profiler-log-reset-on-stop.patch" >From 7153c42d55d14ad6d367f4e7f8a5482cb814e810 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sun, 13 Dec 2015 23:09:12 +0100 Subject: [PATCH] Disable profiler log reset on stop --- lisp/profiler.el | 31 +++++++++++++++---------------- src/profiler.c | 16 +--------------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/lisp/profiler.el b/lisp/profiler.el index f28bbfe..90a4241 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -216,19 +216,17 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (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))) (defun profiler-memory-profile () "Return memory profile." - (when (profiler-memory-running-p) - (profiler-make-profile - :type 'memory - :timestamp (current-time) - :log (profiler-memory-log)))) + (profiler-make-profile + :type 'memory + :timestamp (current-time) + :log (profiler-memory-log))) ;;; Calltrees @@ -845,20 +843,21 @@ Also, if MODE is `mem' or `cpu+mem', then memory profiler will be started." t) (defun profiler-report-cpu () + (when (profiler-cpu-log)) (let ((profile (profiler-cpu-profile))) - (when profile - (profiler-report-profile-other-window profile)))) + (profiler-report-profile-other-window profile))) (defun profiler-report-memory () (let ((profile (profiler-memory-profile))) - (when profile - (profiler-report-profile-other-window profile)))) + (profiler-report-profile-other-window profile))) (defun profiler-report () "Report profiling results." (interactive) - (profiler-report-cpu) - (profiler-report-memory)) + (when (and (fboundp 'profiler-cpu-log) (profiler-cpu-log)) + (profiler-report-cpu)) + (when (profiler-memory-log) + (profiler-report-memory))) ;;;###autoload (defun profiler-find-profile (filename) diff --git a/src/profiler.c b/src/profiler.c index efdb1d9..4cd6bb0 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -41,9 +41,7 @@ static Lisp_Object make_log (EMACS_INT heap_size, EMACS_INT max_stack_depth) { /* We use a standard Elisp hash-table object, but we use it in - a special way. This is OK as long as the object is not exposed - to Elisp, i.e. until it is returned by *-profiler-log, after which - it can't be used any more. */ + a special way. */ Lisp_Object log = make_hash_table (hashtest_profiler, make_number (heap_size), make_float (DEFAULT_REHASH_SIZE), @@ -412,12 +410,6 @@ Before returning, a new log is allocated for future samples. */) (void) { Lisp_Object result = cpu_log; - /* Here we're making the log visible to Elisp, so it's not safe any - more for our use afterwards since we can't rely on its special - pre-allocated keys anymore. So we have to allocate a new one. */ - cpu_log = (profiler_cpu_running - ? make_log (profiler_log_size, profiler_max_stack_depth) - : Qnil); Fputhash (Fmake_vector (make_number (1), Qautomatic_gc), make_number (cpu_gc_count), result); @@ -487,12 +479,6 @@ Before returning, a new log is allocated for future samples. */) (void) { Lisp_Object result = memory_log; - /* Here we're making the log visible to Elisp , so it's not safe any - more for our use afterwards since we can't rely on its special - pre-allocated keys anymore. So we have to allocate a new one. */ - memory_log = (profiler_memory_running - ? make_log (profiler_log_size, profiler_max_stack_depth) - : Qnil); return result; } -- 2.6.2 --h31gzZEtNLTqOjlF-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Dec 2015 04:22:01 +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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , Paul Eggert , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.14500669092896 (code B ref 22114); Mon, 14 Dec 2015 04:22:01 +0000 Received: (at 22114) by debbugs.gnu.org; 14 Dec 2015 04:21:49 +0000 Received: from localhost ([127.0.0.1]:50817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8Kdx-0000ke-Dh for submit@debbugs.gnu.org; Sun, 13 Dec 2015 23:21:49 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:37833) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8Kdw-0000kW-AY for 22114@debbugs.gnu.org; Sun, 13 Dec 2015 23:21:48 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id tBE4LXi9012175; Sun, 13 Dec 2015 23:21:34 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 06B66AE06F; Sun, 13 Dec 2015 23:21:33 -0500 (EST) From: Stefan Monnier Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> Date: Sun, 13 Dec 2015 23:21:32 -0500 In-Reply-To: <20151213221825.GC1296@odonien.fritz.box> (Vasilij Schneidermann's message of "Sun, 13 Dec 2015 23:18:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5519=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5519> : inlines <4104> : streams <1553845> : uri <2101157> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > profiler and doesn't reset the log after stopping. Either my testing > has been too superficial and something unexpected will come bite me or > the comments are simply outdated. Your testing was too superficial. IIRC The problem to which the comments refer can only show up if you modify the hash-table. The problem is corner-case, but real. And there's no reason not to plug that hole. E.g. I don't think you need to the C-side changes to get the Elisp side to provide the functionality you're looking for. Stefan From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Dec 2015 08:29: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 To: Stefan Monnier Cc: John Wiegley , Eli Zaretskii , Paul Eggert , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.145008173124611 (code B ref 22114); Mon, 14 Dec 2015 08:29:02 +0000 Received: (at 22114) by debbugs.gnu.org; 14 Dec 2015 08:28:51 +0000 Received: from localhost ([127.0.0.1]:50875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8OV0-0006Ot-M7 for submit@debbugs.gnu.org; Mon, 14 Dec 2015 03:28:50 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34978) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8OUy-0006Of-Nh for 22114@debbugs.gnu.org; Mon, 14 Dec 2015 03:28:49 -0500 Received: by mail-wm0-f50.google.com with SMTP id p66so32569062wmp.0 for <22114@debbugs.gnu.org>; Mon, 14 Dec 2015 00:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6w6GBa9ozj+TBNfUhxGRAmSwoOL3/5q5yxBvOUwyXTU=; b=xAVSG03FyGmAcbCwHZuwgmPChgtmeCvNMckijP2PI5NpH2rdKhWn61a66vWMJlS1Vp P5QXbkFhT/4z/TN2dj3JNHbghjS/lOjYQQeWzeRwWFFXgvaqCKq/3AW0GdGgIjv/v7W0 KbdaIyjONf+Gcj9qEHn04NNqQsD+EjXvg+vqLLdlCejMZZc9WPx4yy62nSQGKxdlZP8b B2b2KQw70geMgc6GiMTp9ib4424M1xfapIF4Dm7a7ctpJO0brhp3rYS6EneGdbxQgmbt HFIVmV9l44dq3qHfxB7V3Y5/aBG6f8KBrOF6ZMG9JXOIQ8AYF54ZAj3n9VwqQ/HV8+2j BLhQ== X-Received: by 10.194.179.71 with SMTP id de7mr35224649wjc.119.1450081723172; Mon, 14 Dec 2015 00:28:43 -0800 (PST) Received: from localhost ([89.204.139.24]) by smtp.gmail.com with ESMTPSA id m67sm14844277wmf.16.2015.12.14.00.28.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2015 00:28:42 -0800 (PST) Date: Mon, 14 Dec 2015 09:28:36 +0100 From: Vasilij Schneidermann Message-ID: <20151214082836.GA806@odonien.fritz.box> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > Your testing was too superficial. IIRC The problem to which the comments > refer can only show up if you modify the hash-table. > > The problem is corner-case, but real. And there's no reason not to plug > that hole. I see, I can trigger this by removing a key from the log. I haven't thought about that possibility yet, because, why would you do that? Nevertheless, if I'd want to fix this, I'd just need to use `copy-hash-table` on the log and return its result? > E.g. I don't think you need to the C-side changes to get the Elisp > side to provide the functionality you're looking for. I've initially provided an elisp-only patch that works around the profiler resetting the log with an extra level of indirection: Before stopping the profiler or accessing the log while it's still running, the log is saved to a variable, the other code just accesses that variable instead of retrieving the log directly. I'm not really happy with it though as it does need more code than the other variant and does only fix the UI aspect of viewing a report after the profiler has been stopped. In case you haven't seen it yet, I'll attach it to this message. --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Allow-for-retrieving-profiler-logs-after-stopping.patch" >From 3464446b83151ad894ff4ee7f62ed1cb7852b1b6 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Tue, 8 Dec 2015 09:01:15 +0100 Subject: [PATCH] Allow for retrieving profiler logs after stopping --- lisp/profiler.el | 59 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/lisp/profiler.el b/lisp/profiler.el index f28bbfe..10cdcfb 100644 --- a/lisp/profiler.el +++ b/lisp/profiler.el @@ -214,21 +214,23 @@ Optional argument MODE means only check for the specified mode (cpu or mem)." (t (or (profiler-running-p 'cpu) (profiler-running-p 'mem))))) +(defvar profiler-cpu-log nil) + +(defvar profiler-memory-log nil) + (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)) (defun profiler-memory-profile () "Return memory profile." - (when (profiler-memory-running-p) - (profiler-make-profile - :type 'memory - :timestamp (current-time) - :log (profiler-memory-log)))) + (profiler-make-profile + :type 'memory + :timestamp (current-time) + :log profiler-memory-log)) ;;; Calltrees @@ -828,7 +830,11 @@ Also, if MODE is `mem' or `cpu+mem', then memory profiler will be started." (defun profiler-stop () "Stop started profilers. Profiler logs will be kept." (interactive) - (let ((cpu (if (fboundp 'profiler-cpu-stop) (profiler-cpu-stop))) + (when (and (fboundp 'profiler-cpu-running-p) (profiler-cpu-running-p)) + (setq profiler-cpu-log (profiler-cpu-log))) + (when (profiler-memory-running-p) + (setq profiler-memory-log (profiler-memory-log))) + (let ((cpu (when (fboundp 'profiler-cpu-stop) (profiler-cpu-stop))) (mem (profiler-memory-stop))) (message "%s profiler stopped" (cond ((and mem cpu) "CPU and memory") @@ -839,26 +845,31 @@ Also, if MODE is `mem' or `cpu+mem', then memory profiler will be started." (defun profiler-reset () "Reset profiler logs." (interactive) - (when (fboundp 'profiler-cpu-log) - (ignore (profiler-cpu-log))) - (ignore (profiler-memory-log)) - t) + (when (and (fboundp 'profiler-cpu-running-p) (profiler-cpu-running-p)) + (profiler-cpu-stop)) + (when (profiler-memory-running-p) + (profiler-memory-stop)) + (setq profiler-cpu-log nil + profiler-memory-log nil)) (defun profiler-report-cpu () - (let ((profile (profiler-cpu-profile))) - (when profile - (profiler-report-profile-other-window profile)))) + (when profiler-cpu-log + (profiler-report-profile-other-window (profiler-cpu-profile)))) (defun profiler-report-memory () - (let ((profile (profiler-memory-profile))) - (when profile - (profiler-report-profile-other-window profile)))) + (when profiler-memory-log + (profiler-report-profile-other-window (profiler-memory-profile)))) (defun profiler-report () "Report profiling results." - (interactive) - (profiler-report-cpu) - (profiler-report-memory)) + (when (and (fboundp 'profiler-cpu-running-p) (profiler-cpu-running-p)) + (setq profiler-cpu-log (profiler-cpu-log))) + (when (profiler-memory-running-p) + (setq profiler-memory-log (profiler-memory-log))) + (if (and (not profiler-cpu-log) (not profiler-memory-log)) + (user-error "No profiler run recorded") + (profiler-report-cpu) + (profiler-report-memory))) ;;;###autoload (defun profiler-find-profile (filename) -- 2.6.2 --9jxsPFA5p3P2qPhR-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Dec 2015 14:45: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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , Paul Eggert , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.145010424232207 (code B ref 22114); Mon, 14 Dec 2015 14:45:02 +0000 Received: (at 22114) by debbugs.gnu.org; 14 Dec 2015 14:44:02 +0000 Received: from localhost ([127.0.0.1]:51203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8UM6-0008NO-A1 for submit@debbugs.gnu.org; Mon, 14 Dec 2015 09:44:02 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:34056) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8UM4-0008Mt-Bk for 22114@debbugs.gnu.org; Mon, 14 Dec 2015 09:44:00 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id tBEEhj5J022472; Mon, 14 Dec 2015 09:43:46 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id AD358AE06F; Mon, 14 Dec 2015 09:43:44 -0500 (EST) From: Stefan Monnier Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> Date: Mon, 14 Dec 2015 09:43:44 -0500 In-Reply-To: <20151214082836.GA806@odonien.fritz.box> (Vasilij Schneidermann's message of "Mon, 14 Dec 2015 09:28:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5520=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5520> : inlines <4105> : streams <1554075> : uri <2101434> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> Your testing was too superficial. IIRC The problem to which the comments >> refer can only show up if you modify the hash-table. >> The problem is corner-case, but real. And there's no reason not to plug >> that hole. > I see, I can trigger this by removing a key from the log. I haven't > thought about that possibility yet, because, why would you do that? > Nevertheless, if I'd want to fix this, I'd just need to use > `copy-hash-table` on the log and return its result? Yes, copying the hash table would solve this, tho if you still share the keys there's a risk of interference (e.g. if you go and modify one of the arrays used as keys), but there shouldn't be any risk of a crash, at least. > Before stopping the profiler or accessing the log while it's still > running, the log is saved to a variable, the other code just accesses > that variable instead of retrieving the log directly. [...] > In case you haven't seen it yet, I'll attach it to this message. That looks OK to me. > I'm not really happy with it though as it does need more code than the > other variant and does only fix the UI aspect of viewing a report > after the profiler has been stopped. What are the other aspects that worry you? Stefan From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Dec 2015 18:24:01 +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 To: Stefan Monnier Cc: John Wiegley , Eli Zaretskii , Paul Eggert , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.1450117411558 (code B ref 22114); Mon, 14 Dec 2015 18:24:01 +0000 Received: (at 22114) by debbugs.gnu.org; 14 Dec 2015 18:23:31 +0000 Received: from localhost ([127.0.0.1]:51842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8XmU-00008w-Lw for submit@debbugs.gnu.org; Mon, 14 Dec 2015 13:23:30 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33705) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8XmS-00008i-R9 for 22114@debbugs.gnu.org; Mon, 14 Dec 2015 13:23:29 -0500 Received: by mail-wm0-f48.google.com with SMTP id n186so59487727wmn.0 for <22114@debbugs.gnu.org>; Mon, 14 Dec 2015 10:23:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=IxDealjyLh64WcJdbBJhHeUP2GIEGhyvz/c+PzVUr9c=; b=lqVpDeBvl0Noe+LMdXktS9+qkHlYsSEYQthxrB3HYsLUGDctSOkmRB4R0LAbqw6OUH 7dDzrQU8psvd5rgD5Btdl2HZefDz59gNisEpUhUfdwPFvXDpirQzIvzKavK9xGNfENzU AkBq0gTRCD49dMchIL+Pks0u6pSKmghd5oyNerA1xt10xRNr+mp7UNgOS0jm7rRHcxKz 3mXMVITIrPJONqlpVQq7e73yD84aiVJ0ZyFB8wNUJFgAKxmc3wQ7WnhqqV9nR5LqCeip 2n5iDeFbrCBrDjz9NJO2nsRFfzX36Ve8jlE5upNcePy1ip5Y0aqYVsv5ejKYPawNdf3W aklg== X-Received: by 10.194.63.238 with SMTP id j14mr44133845wjs.172.1450117403193; Mon, 14 Dec 2015 10:23:23 -0800 (PST) Received: from localhost (port-92-204-65-240.dynamic.qsc.de. [92.204.65.240]) by smtp.gmail.com with ESMTPSA id f11sm17312449wmd.7.2015.12.14.10.23.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2015 10:23:22 -0800 (PST) Date: Mon, 14 Dec 2015 19:23:21 +0100 From: Vasilij Schneidermann Message-ID: <20151214182321.GA15225@odonien.bevuta.com> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > What are the other aspects that worry you? If you perform `M-x profiler-report` while the profiler is still running, every time you do the report, the profiler is reset. This can be easily observed by starting it, performing an intensive computation, viewing the report, then viewing it again after a short while. The second report has a lower number of CPU cycles/memory usage. This isn't really helpful. Preserving the profiler status on the other hand would be because you could then take a look at the usage throughout the stages of an interesting computation, then later stop it to freeze its status and inspect the final report. My elisp-only patch achieves the latter, the patch involving C however does the former as well. The only remaining thing I'd need to figure out is how to incorporate a reset function as profiler.el relies on accessing a log to reset the profiler... From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Dec 2015 04:30: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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , Paul Eggert , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.145015378821933 (code B ref 22114); Tue, 15 Dec 2015 04:30:02 +0000 Received: (at 22114) by debbugs.gnu.org; 15 Dec 2015 04:29:48 +0000 Received: from localhost ([127.0.0.1]:52098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8hFE-0005hh-6I for submit@debbugs.gnu.org; Mon, 14 Dec 2015 23:29:48 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41517) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a8hFC-0005hZ-NB for 22114@debbugs.gnu.org; Mon, 14 Dec 2015 23:29:47 -0500 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id tBF4Tb1h026119; Mon, 14 Dec 2015 23:29:38 -0500 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id EC0A5AE520; Mon, 14 Dec 2015 23:29:35 -0500 (EST) From: Stefan Monnier Message-ID: References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> <20151214182321.GA15225@odonien.bevuta.com> Date: Mon, 14 Dec 2015 23:29:35 -0500 In-Reply-To: <20151214182321.GA15225@odonien.bevuta.com> (Vasilij Schneidermann's message of "Mon, 14 Dec 2015 19:23:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5520=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5520> : inlines <4110> : streams <1554386> : uri <2101802> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> What are the other aspects that worry you? > If you perform `M-x profiler-report` while the profiler is still > running, every time you do the report, the profiler is reset. Indeed. But I think the right way to solve this is to write code that can merge profiler logs. It should be pretty easy, especially if you constrain yourself to logs that have the same stack depth. Stefan From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2019 14:47:01 +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 To: Eli Zaretskii Cc: 22114@debbugs.gnu.org, Vasilij Schneidermann Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.156147401518437 (code B ref 22114); Tue, 25 Jun 2019 14:47:01 +0000 Received: (at 22114) by debbugs.gnu.org; 25 Jun 2019 14:46:55 +0000 Received: from localhost ([127.0.0.1]:33182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmik-0004n6-Lk for submit@debbugs.gnu.org; Tue, 25 Jun 2019 10:46:54 -0400 Received: from quimby.gnus.org ([80.91.231.51]:50864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfmii-0004kQ-0D for 22114@debbugs.gnu.org; Tue, 25 Jun 2019 10:46:53 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfmid-00014F-VL; Tue, 25 Jun 2019 16:46:50 +0200 From: Lars Ingebrigtsen References: <83bna0di5k.fsf@gnu.org> Date: Tue, 25 Jun 2019 16:46:47 +0200 In-Reply-To: <83bna0di5k.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Dec 2015 18:22:47 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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 whethe [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping 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 To: Lars Ingebrigtsen Cc: 22114@debbugs.gnu.org, v.schneidermann@gmail.com Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.15616445647426 (code B ref 22114); Thu, 27 Jun 2019 14:10:02 +0000 Received: (at 22114) by debbugs.gnu.org; 27 Jun 2019 14:09:24 +0000 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 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 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 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 Date: Thu, 27 Jun 2019 17:09:02 +0300 Message-Id: <83tvcbi0ht.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Lars Ingebrigtsen on Tue, 25 Jun 2019 16:46:47 +0200) References: <83bna0di5k.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jun 2019 18:19:01 +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 To: Vasilij Schneidermann Cc: John Wiegley , Eli Zaretskii , Paul Eggert , Stefan Monnier , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.15616595344588 (code B ref 22114); Thu, 27 Jun 2019 18:19:01 +0000 Received: (at 22114) by debbugs.gnu.org; 27 Jun 2019 18:18:54 +0000 Received: from localhost ([127.0.0.1]:39623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgYyz-0001Bw-Nh for submit@debbugs.gnu.org; Thu, 27 Jun 2019 14:18:53 -0400 Received: from quimby.gnus.org ([80.91.231.51]:46816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgYyx-0001Bo-Q9 for 22114@debbugs.gnu.org; Thu, 27 Jun 2019 14:18:52 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgYyt-0000Na-Jb; Thu, 27 Jun 2019 20:18:49 +0200 From: Lars Ingebrigtsen References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> Date: Thu, 27 Jun 2019 20:18:47 +0200 In-Reply-To: <20151214082836.GA806@odonien.fritz.box> (Vasilij Schneidermann's message of "Mon, 14 Dec 2015 09:28:36 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Vasilij Schneidermann writes: > Subject: [PATCH] Allow for retrieving profiler logs after stopping I've now applied your patch to the Emacs trunk. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Vasilij Schneidermann writes: > Subject: [PATCH] Allow for retrieving profiler logs after stopping I've now applied your patch to the Emacs trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 27 14:18:58 2019 Received: (at control) by debbugs.gnu.org; 27 Jun 2019 18:18:58 +0000 Received: from localhost ([127.0.0.1]:39626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgYz4-0001CG-0W for submit@debbugs.gnu.org; Thu, 27 Jun 2019 14:18:58 -0400 Received: from quimby.gnus.org ([80.91.231.51]:46836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgYz1-0001C7-Ji for control@debbugs.gnu.org; Thu, 27 Jun 2019 14:18:56 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgYyz-0000Ni-3D for control@debbugs.gnu.org; Thu, 27 Jun 2019 20:18:55 +0200 Date: Thu, 27 Jun 2019 20:18:52 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #22114 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 22114 fixed close 22114 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 22114 fixed close 22114 27.1 quit From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2019 09:22:01 +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 fixed To: Lars Ingebrigtsen Cc: John Wiegley , Eli Zaretskii , Paul Eggert , Stefan Monnier , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.156188648612816 (code B ref 22114); Sun, 30 Jun 2019 09:22:01 +0000 Received: (at 22114) by debbugs.gnu.org; 30 Jun 2019 09:21:26 +0000 Received: from localhost ([127.0.0.1]:45357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhW1W-0003Ke-8S for submit@debbugs.gnu.org; Sun, 30 Jun 2019 05:21:26 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:37505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhW1T-0003KR-W2 for 22114@debbugs.gnu.org; Sun, 30 Jun 2019 05:21:24 -0400 Received: by mail-wr1-f50.google.com with SMTP id v14so10546157wrr.4 for <22114@debbugs.gnu.org>; Sun, 30 Jun 2019 02:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8Ak93MY6Ms49d+xQAq/EAXlrU4HCv6VNadYhwmlvRDI=; b=UIVuF/g4hgB70A56RKV/I/NasA79Klax/2GGM24SMMytA7y5ePbt5ZKE8uy7FTwlTu vaOfz7KSWnuGnAn9SEaA7cLkaulcbDnwWDGo13ayevWsewj6VntqQo5PkZHQbamjC0Nc JfK5TbxRxhQYmzC4ECPiRgi4A9wLo0E1ezPKmEeULI2JH1AXofLJR5JtXt/MOKq4ycYF u1ObZpst2Ts/ZIbdUWbxLx22ObSAELcXBDlH71TVAcmYZ7safuxhIlwonzdx4m0zCZyv rbvkyoIH9orpodGxe8AK53MvowsbHHGHMb7V9RsXJKOYBldjEudMD2KDvQVQU23DcGXO Dlzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8Ak93MY6Ms49d+xQAq/EAXlrU4HCv6VNadYhwmlvRDI=; b=RMjYfjLx7BKXaLTDzRBlhIFm6Tdhqvkrv8N9KaDDT6fS9hd9IOw7lx2oykDYb6+8L8 KtL/E0szRQCmTVh9fw7l4pUr2SNoLjlnlBT/KqsbDjaSXQUVI/S/8721Rt1xIcc2zAfb PD+2G+Qckjz+umXdxlPrVIrxZu6G3jdR2CQq0H1SYv/BMLOFL1rp74edqXKAsw7lbOsC Hvsu4q9lR3MkZ6Ml2IBd8bY9tI4SHXMpW89v2h2ly0IyslBwRsO0mewbziuH5QO3Yr7d icWaJZFn++Dt2ZC68Jy6qAcgEtF+0VZ9pDp0Q9hNTPIZx6PrQcxyBkdoz7XdQ2JXTuRv OteQ== X-Gm-Message-State: APjAAAX8wOE1Ae6GFA4dBNDY7efzexqSDuJRFpHmrVrGxk6q5y5nJ1Jb Whqp4TLXyGG1+AYcwodRmb8= X-Google-Smtp-Source: APXvYqwYmjXn1VZd0cOuUY+Ii0AIGlyD5zRAMWIyWjV8Oy3CD+3M5g2HuWk1bPircSt23thvlc+Jnw== X-Received: by 2002:a5d:468a:: with SMTP id u10mr14709305wrq.177.1561886477935; Sun, 30 Jun 2019 02:21:17 -0700 (PDT) Received: from localhost (x5d8492ec.dyn.telefonica.de. [93.132.146.236]) by smtp.gmail.com with ESMTPSA id x3sm7087070wrp.78.2019.06.30.02.21.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 02:21:16 -0700 (PDT) Date: Sun, 30 Jun 2019 11:21:15 +0200 From: Vasilij Schneidermann Message-ID: <20190630092115.go436lcukufadafc@odonien.localdomain> References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p2pmj7pibnswyl3b" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --p2pmj7pibnswyl3b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hello Lars, > I've now applied your patch to the Emacs trunk. Thanks! I've tested it on trunk and noticed a big oversight on my part: My patch removed the `(interactive)` declaration of the `profiler-report` command, therefore turning it into a regular function. Could someone please add that line back before it makes it into the next release? Vasilij --p2pmj7pibnswyl3b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAl0YfwAACgkQFmfJg6zC ifrfzQgAtth/KsU0eRVPFSxOGz/nAPglY9WnvpevhlvHsxQz3DOQ8ux1CulT8Gpj Y2HBNaSqvsPCHVKFZYW1I0wXC5nHge5iEfxj23h20L+z0aX4POP7M1u+6Fr3JsxM jd3/Lgs06s31iM12wp5YAIP4XSlBuXd7GH6U3NTDu7N9Woc5rv7rkKaoqMv3lPRX J1qdtyIOLDgYzXExki2IC+zQRW5KfDNZeDhsp9bFQhnN2W+KTmDjEBKOunkiUPUH lW6q3/zShooeooWJFh2HQPiHd7t+Jqay0bU+ScQsvxBxXohDdtTe9yC8M4OkuxEI 1ly905LQsojYswgd9ylhlRO8c/GAaw== =ucqL -----END PGP SIGNATURE----- --p2pmj7pibnswyl3b-- From unknown Mon Aug 18 17:53:35 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2019 12:36:01 +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 fixed To: Vasilij Schneidermann Cc: John Wiegley , Lars Ingebrigtsen , Paul Eggert , Stefan Monnier , 22114@debbugs.gnu.org Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.15618981066482 (code B ref 22114); Sun, 30 Jun 2019 12:36:01 +0000 Received: (at 22114) by debbugs.gnu.org; 30 Jun 2019 12:35:06 +0000 Received: from localhost ([127.0.0.1]:45478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhZ2w-0001gU-15 for submit@debbugs.gnu.org; Sun, 30 Jun 2019 08:35:06 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhZ2u-0001fi-6l for 22114@debbugs.gnu.org; Sun, 30 Jun 2019 08:35:04 -0400 Received: by mail-ed1-f66.google.com with SMTP id e3so18193361edr.10 for <22114@debbugs.gnu.org>; Sun, 30 Jun 2019 05:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=VXpyyHLr1g0pkBdN7lc2+PVgi4YebVAakABZziT7KZQ=; b=tGMKhixsVVkwxbKkFOh16AkXhD8cwrRN4J3H4ma9T1Y3A1mKN3dgS7HJTimJVNH8WJ 4sApLw3S2zvQ4klNdfNqxFfDZxpcSohmi4KHYCuaFZumm2rJ8ZREjQIFQJDQAHvIo60Q L/WmpzqEnzzx7UtH39SutAoWa052ZePTsq0mn0ev2Umh1rCK7XfZIMfPC65fG+Oz/hKW eA682NbpnYTSvHeK9g3mwRuGMzjooxET2sc/J6W0mb/r8N2S8qIO0/Y/zsjJ9wIp4qVw YCXDL75fQ3y5t272G5stIJ1Mv/kcezsXDRRoXdtbhRXKVWaK83yf/tB2gvD8oqR9DU6I Ru2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=VXpyyHLr1g0pkBdN7lc2+PVgi4YebVAakABZziT7KZQ=; b=puWOl8NIfIQD5dV7sqJsPnXLL97ugm0Jdtf4bTtjxADHEFGQT467e1XAPSxMNtkWBq LTqmHBleom0pl120lWTQja3+xqg7b+hjYeJdeLWEhxY5d1/5Yilq9mbMHpT7xBR2+Sv5 5O32J+Sf1/A04/A3ishWBEFGZIezJOjZheLbRlXJpcrdlcjO8ZNeE9m6f9eKVbtcPF6z QsE3g2VTEJ2B2PB6CNw9I0z1HFge+2XgcJofvScoENaua2zrHVV1e3QRGMjCh6Ng0Z5X Jwi0WnvMG0kOobfUZVXbG9IV999eQaalP6U0i8nB7bvRsUgeUMrP7M7IK7VmCz4phamD XmcQ== X-Gm-Message-State: APjAAAUe1V9LmcN0Y8kyGfvLL6O3FtBuQiotVZ9tOuORhxFyNH6/aW7Z ce1GO45s4WrFdgWgnY+fIjHZZQ== X-Google-Smtp-Source: APXvYqzKZMaLGFvMoXCQPOekfqLZm4pwiWrb3nTGh2d9dGc9mXzPwDSA2aDS0yj7vgVo0eF3m90q4w== X-Received: by 2002:a05:6402:8cc:: with SMTP id d12mr22884925edz.60.1561898097252; Sun, 30 Jun 2019 05:34:57 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id 17sm2576841edu.21.2019.06.30.05.34.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 05:34:56 -0700 (PDT) From: "Basil L. Contovounesios" References: <83bna0di5k.fsf@gnu.org> <20151208163208.GA1080@odonien.bevuta.com> <837fkodf3e.fsf@gnu.org> <83zixkbyoj.fsf@gnu.org> <20151213203323.GB1296@odonien.fritz.box> <20151213221825.GC1296@odonien.fritz.box> <20151214082836.GA806@odonien.fritz.box> <20190630092115.go436lcukufadafc@odonien.localdomain> Date: Sun, 30 Jun 2019 13:34:49 +0100 In-Reply-To: <20190630092115.go436lcukufadafc@odonien.localdomain> (Vasilij Schneidermann's message of "Sun, 30 Jun 2019 11:21:15 +0200") Message-ID: <87imsngsk6.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Vasilij Schneidermann writes: >> I've now applied your patch to the Emacs trunk. > > Thanks! I've tested it on trunk and noticed a big oversight on my part: > My patch removed the `(interactive)` declaration of the > `profiler-report` command, therefore turning it into a regular function. > Could someone please add that line back before it makes it into the next > release? Done[1], thanks. [1: f24d47359d]: ; Fix last change to profiler-report 2019-06-30 13:30:03 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f24d47359d9b6621215f20795d585c5024d91783 -- Basil