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: Sat, 19 Feb 2022 22:10:13 +0000 Message-ID: References: <838ruq2z5t.fsf@gnu.org> <83v8xt20db.fsf@gnu.org> <83ee4gyzrh.fsf@gnu.org> <83v8xryh4d.fsf@gnu.org> <831qzyzt5t.fsf@gnu.org> <874k4u92gp.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="20769"; 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 Sat Feb 19 23:12:11 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 1nLXxb-0005DR-1Q for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 23:12:11 +0100 Original-Received: from localhost ([::1]:49936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLXxZ-0005KQ-Ht for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 17:12:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLXvn-0004Y4-2u for emacs-devel@gnu.org; Sat, 19 Feb 2022 17:10:19 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:36446 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nLXvk-0001U8-PG for emacs-devel@gnu.org; Sat, 19 Feb 2022 17:10:18 -0500 Original-Received: (qmail 95802 invoked by uid 3782); 19 Feb 2022 22:10:15 -0000 Original-Received: from acm.muc.de (p4fe159ac.dip0.t-ipconnect.de [79.225.89.172]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 19 Feb 2022 23:10:15 +0100 Original-Received: (qmail 9483 invoked by uid 1000); 19 Feb 2022 22:10:13 -0000 Content-Disposition: inline In-Reply-To: <874k4u92gp.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:286496 Archived-At: Hello, David. On Sat, Feb 19, 2022 at 18:43:34 +0100, David Engster wrote: > >> Date: Sat, 19 Feb 2022 16:42:07 +0000 > >> Cc: gregory@heytings.org, monnier@iro.umontreal.ca, mattiase@acm.org, > >> larsi@gnus.org, emacs-devel@gnu.org > >> From: Alan Mackenzie > >> I haven't got any useful information out of the exercise, so far. I > >> can't help feeling that I'm missing something. Is there anything I ought > >> to be doing that I've not yet done? > > Maybe you should make EQ real function, with an attribute that would > > preclude its inlining. > > I have no other ideas. Maybe someone else does. > Making EQ a non-inlined function would be the first step. But since perf > is a sampling profiler, it is not easy to measure something that's > already very quick - it's simply quite unlikely that perf would hit it, > unless it is called extremely often. It is called extremely often. I managed to de-inline EQ. > The default sampling frequency of perf is 1kHz, so the first thing you > can try is to increase that, so that it becomes more likely to hit EQ > (see the '-F' switch for 'perf record'). 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. > However, it might simply be that a tracing profiler would be the better > choice here, so maybe look into good old gprof or valgrind. Or maybe > even instrument EQ yourself and count cycles between start and end. Time to sleep on it, I think. Thanks for the post. > -David -- Alan Mackenzie (Nuremberg, Germany).