From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Sun, 20 Feb 2022 19:45:13 +0000 Message-ID: References: <83v8xt20db.fsf@gnu.org> <83ee4gyzrh.fsf@gnu.org> <83v8xryh4d.fsf@gnu.org> <831qzyzt5t.fsf@gnu.org> <874k4u92gp.fsf@randomsample> <87wnhq6qxu.fsf@randomsample> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22855"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, emacs-devel@gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca, Eli Zaretskii , larsi@gnus.org To: David Engster Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 20 20:46:46 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nLsAM-0005l5-CS for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Feb 2022 20:46:42 +0100 Original-Received: from localhost ([::1]:44996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLsAK-0007BI-Sk for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Feb 2022 14:46:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLs9D-0006Pn-NH for emacs-devel@gnu.org; Sun, 20 Feb 2022 14:45:32 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:12844 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nLs9A-0000x4-RC for emacs-devel@gnu.org; Sun, 20 Feb 2022 14:45:31 -0500 Original-Received: (qmail 97681 invoked by uid 3782); 20 Feb 2022 19:45:14 -0000 Original-Received: from acm.muc.de (p2e5d519e.dip0.t-ipconnect.de [46.93.81.158]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 20 Feb 2022 20:45:14 +0100 Original-Received: (qmail 5881 invoked by uid 1000); 20 Feb 2022 19:45:13 -0000 Content-Disposition: inline In-Reply-To: <87wnhq6qxu.fsf@randomsample> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286535 Archived-At: Hello, David. On Sun, Feb 20, 2022 at 06:35:25 +0100, David Engster wrote: > > I seem to have a default setting of 4kHz. This was enough to get several > > thousand hits in each build ("old" and "new") running the test suite. As > > I wrote in my post just now to Eli, the results came up contrary to what > > was expected - the "old" build, running the simple EQ spent more time in > > it than the "new" build running the complicated EQ. Possibly I've made > > some silly mistake in the measurements. > Hi Alan, > Are you comparing builds directly before/after the merge of the > correct-warnings branch? Yes. > The first thing to check would be if EQ is actually called the same > amount of times in both builds. You can do this with 'perf' by using > user-space probes ('uprobes'). Just as an example, with './emacs' > being your emacs binary, > perf probe -x ./emacs redisplay > would insert a uprobe at redisplay, and with > perf record -e probe_emacs:redisplay ./emacs > you can save the events. Just to show how flexible this system is: > perf stat -e probe_emacs:redisplay -a -I 1000 > would continuously show you the number of times redisplay is called each > second. I tried that with EQ on the new build. I aborted the run when perf.data had reached 29 GB. ;-). I then tried again with just making test/lisp/calc/calc-tests.log. That gave a file around 1 GB, which gave me the number of times EQ was called. Then I temporarily lost interest. I'll try the same on the old build soon. > Anyway, measuring things around ~1% with perf can be quite noisy. For > doing exact timings, you can also insert 'uretprobes' which are called > when a function returns, and then you can calculate how long each call > took from the timestamps. In the above example, > perf probe -x ./emacs 'redisplay%return' > will insert a return probe for 'redisplay', then use > perf record -e 'probe_emacs:*' ./emacs > and use 'perf script' to display the timestamps. Maybe I'll try that later. > I don't think there's something built-in to display durations between > uprobe/uretprobe, so a little bit of coding is needed to calculate > that from the output. Of course, these timings will usually be > increased by the probe instrumentations, but for relative comparisons, > they should be fine. Thanks! > -David -- Alan Mackenzie (Nuremberg, Germany).