From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Date: Mon, 14 Dec 2015 09:43:44 -0500 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450104417 1542 80.91.229.3 (14 Dec 2015 14:46:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Dec 2015 14:46:57 +0000 (UTC) Cc: John Wiegley , Paul Eggert , 22114@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 14 15:46:44 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a8UNI-0003on-52 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Dec 2015 15:45:16 +0100 Original-Received: from localhost ([::1]:60400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8UNH-0000ap-Gl for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Dec 2015 09:45:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8UNA-0000X3-6w for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2015 09:45:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8UN4-0000jq-IG for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2015 09:45:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8UN4-0000jk-Eg for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2015 09:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1a8UN4-0008On-7x for bug-gnu-emacs@gnu.org; Mon, 14 Dec 2015 09:45:02 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 22114-submit@debbugs.gnu.org id=B22114.145010424232207 (code B ref 22114); Mon, 14 Dec 2015 14:45:02 +0000 Original-Received: (at 22114) by debbugs.gnu.org; 14 Dec 2015 14:44:02 +0000 Original-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 Original-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 Original-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 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id AD358AE06F; Mon, 14 Dec 2015 09:43:44 -0500 (EST) 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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109972 Archived-At: >> 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