From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size assumption breaks on repeated runs Date: Mon, 06 Jan 2025 09:24:13 -0500 Message-ID: References: <87h66efsfx.fsf@protonmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31409"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 75357@debbugs.gnu.org, pipcet@protonmail.com To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 06 15:25:34 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tUo2v-0007zZ-Hp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 15:25:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUo2b-0007W5-T7; Mon, 06 Jan 2025 09:25:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUo2S-0007Pg-4Q for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 09:25:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUo2Q-0001FB-QI for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 09:25:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=A3ncZyB9qrhBWBoDrtFdLWFl+IcXcs7IA9OqRYU6RdY=; b=GepbYd4cK7zfgm0fBRAyXMBXgQMWMa+Yf23EVfIxA4rJng5hxiL68+YgFpRlE1ojbqNOqw2nVxmrskUGlyA8GLeS/R1hjbPHRa7rlsCkKhSZvLQW1KL6v+w3BFYKFtTt9UnvPEpl4usouk54OvM6dnJVNgSj3phhGJ11ymjQFWxOD1FBV8ME+WXsadaF5xEfCMlqwh8+cQ+A2ZP0vIrqILZb/UN/gB23PFfH+CT+8zVBsDS0uxE4UtF4yoLTZpdCpAKnNzV4yvn1wuFXPTrBqnM9374lq0aYKlpDJ5xIZr3wpSkalSemyKwiwWdNxZeyDc9pLluP24OJL6sZyxiJ2w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUo2Q-0006y4-CI for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 09:25: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, 06 Jan 2025 14:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75357 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 75357@debbugs.gnu.org, Pip Cet Original-Received: via spool by submit@debbugs.gnu.org id=B.173617347626711 (code B ref -1); Mon, 06 Jan 2025 14:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 14:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:37434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUo1z-0006wl-TR for submit@debbugs.gnu.org; Mon, 06 Jan 2025 09:24:36 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:38902) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUo1y-0006wJ-EV for submit@debbugs.gnu.org; Mon, 06 Jan 2025 09:24:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUo1p-00076S-3O for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 09:24:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUo1n-0001AN-7O; Mon, 06 Jan 2025 09:24:24 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 858FA801C2; Mon, 6 Jan 2025 09:24:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1736173455; bh=U9UVetMpaJ9ONGdC+jsS+Usg950HGIxfxS/BBcbUux4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AJaPzPWcTOn3qSFak9O3yZK+8JtxWe/jvVip6AeHtRhLAQwDSKw6PNLAzfSyoXWEH uchZAauI9FbP/dd3dBLE0ikdrWQ50W06m4/F4cdsbQUW7x7sen36vrayvnbZn+RTgU b/ip1f2kGaQuKls72aPifGjeYLMTd4BKHW1CbN2xFNYkP7xOZOYeuh1D2sCurAc/z7 cArk2VBVJ71lwo7gEzYpDCgWujdlsvH7r/VCvO7wkhxrRRLvMcbnO/Rl35214oCv/w TehkYX0qZPKf4xrvh0HnO//qn9Ech9pTTje3G0MUgOwHrHOVHnfdIG+69Xm60pa5oA NySH4sC/P5kVQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87B6A801CC; Mon, 6 Jan 2025 09:24:15 -0500 (EST) Original-Received: from pastel (69-165-162-104.dsl.teksavvy.com [69.165.162.104]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5951A12049E; Mon, 6 Jan 2025 09:24:15 -0500 (EST) In-Reply-To: (Andrea Corallo's message of "Mon, 06 Jan 2025 04:35:59 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298664 Archived-At: >> On scratch/elisp-benchmarks, the following emacs -Q invocation: >> >> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))' >> >> produces a fatal Lisp error, attempting to invoke the debugger in a >> non-interactive session: >> >> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie... >> Window size: 19 x 80 >> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark") >> signal(error ("Window size not as stipulated by the benchmark")) >> error("Window size not as stipulated by the benchmark") >> elb-scroll-entry() > > I'm not sure this is a bug as we want always to run the benchmark from a > known state, anyway adding Stefan as he's the author of the benchmark. Sounds like something has changed in Emacs's C code, or maybe it's something in some system-depend code? `elb-scroll` cares about the window size because it's a benchmark that is influenced by (and thus partly measures) the redisplay: (unless (and noninteractive (not (boundp 'redisplay-skip-initial-frame))) (defun elb-scroll-entry () ;; FIXME: This relies on `elb-smie.el' being compiled already which is ;; not necessarily the case if we're only running some of the benchmarks. (load (expand-file-name "elb-smie" elb-bench-directory) nil 'nomessage) (setq redisplay-skip-initial-frame nil) (with-temp-buffer (rename-buffer (generate-new-buffer-name "elb-scroll")) (switch-to-buffer (current-buffer)) (insert-file-contents (expand-file-name "../resources/xmenu.c" elb-bench-directory)) (redisplay 'force) ;; Refresh the window dimensions. (enlarge-window (- 23 (window-height))) (enlarge-window (- 80 (window-width)) 'horiz) (redisplay 'force) ;; Refresh the window dimensions. (unless (and (equal 23 (window-height)) (equal 80 (window-width))) (error "Window size %S x %S not as stipulated by the benchmark" (window-height) (window-width))) (dotimes (_ 10) (elb-smie-mode) (goto-char (point-min)) (condition-case nil (while t (scroll-up nil) (redisplay 'force)) (end-of-buffer nil)))))) Try and figure out why window size is 19x80 after (enlarge-window (- 23 (window-height))) (enlarge-window (- 80 (window-width)) 'horiz) - Stefan