From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Sun, 20 Feb 2022 06:35:25 +0100 Message-ID: <87wnhq6qxu.fsf@randomsample> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22939"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: mattiase@acm.org, emacs-devel@gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca, Eli Zaretskii , larsi@gnus.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 20 06:36:30 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 1nLeta-0005lj-4C for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Feb 2022 06:36:30 +0100 Original-Received: from localhost ([::1]:55690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLetY-0001uK-Cp for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Feb 2022 00:36:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLest-0001GE-ID for emacs-devel@gnu.org; Sun, 20 Feb 2022 00:35:47 -0500 Original-Received: from [2a03:4000:42:1a1:9400:eeff:feb4:c8a0] (port=35534 helo=zplane.randomsample.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLesr-0008MO-Iw; Sun, 20 Feb 2022 00:35:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QhxuG3zW7sASHxrqmuXwJ0h2NXxMA5LEBW02ZIlpXxQ=; b=SUd3ej8coiC16CM2Nboriwlj4 MgBm4ANl2CVJKJOrxykXZCewby2dFdZ9GAagamnsve8I8Pf0zfn1QNJbsqAfXykKImptAU53EtE4n iSRrWlEB9VE3Ec8Y4nZfZg+O5fSZaM7RiDPYq7qAK4Ro164pTCeUNbasBz99P3I9lg4tBQvZo5ZPn mbmREZJmagn+Hh85BZISk062NYJqSZeZXVRgQlqazcZZsBbLqEQqELXI1F/rmOZaNPsaqs/kHn4vj xAX+s8T94wU3vqVlXkc3QCbJKB/rQpo8PiDfu3vOk1Li3PtbuYpS9pMN42ph1PHFa+pWAi+tVQD+k XC5zBE4Aw==; Original-Received: from ip5f5abad6.dynamic.kabel-deutschland.de ([95.90.186.214] helo=void) by zplane.randomsample.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nLesY-0005bQ-4L; Sun, 20 Feb 2022 06:35:26 +0100 In-Reply-To: (Alan Mackenzie's message of "Sat, 19 Feb 2022 22:10:13 +0000") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a03:4000:42:1a1:9400:eeff:feb4:c8a0 (failed) Received-SPF: pass client-ip=2a03:4000:42:1a1:9400:eeff:feb4:c8a0; envelope-from=deng@randomsample.de; helo=zplane.randomsample.de X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:286503 Archived-At: > 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? 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. 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. 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. -David