From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS native subrs Date: Wed, 26 Jun 2024 19:12:32 +0200 Message-ID: References: <87v823xvq1.fsf@localhost> <86o77ulgk8.fsf@gnu.org> <87zfre1p3r.fsf@gmail.com> <87zfreo5u6.fsf@localhost> <87plsa1n8k.fsf@gmail.com> <87wmmio3vq.fsf@localhost> <87jzii1hbs.fsf_-_@gmail.com> <8734p61evv.fsf@gmail.com> <87iky0zvyz.fsf@gmail.com> <87ikxwamor.fsf_-_@gmail.com> <8734p09pw7.fsf@gmail.com> <87r0cj91li.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6589"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, larsi@gnus.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 26 19:13:25 2024 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 1sMWCy-0001cG-W8 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jun 2024 19:13:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMWCF-0001W4-SU; Wed, 26 Jun 2024 13:12:39 -0400 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 1sMWCE-0001Vf-BV for emacs-devel@gnu.org; Wed, 26 Jun 2024 13:12:38 -0400 Original-Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMWCC-0008MV-Ly; Wed, 26 Jun 2024 13:12:38 -0400 Original-Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ec52fbb50aso55699741fa.3; Wed, 26 Jun 2024 10:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719421954; x=1720026754; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uO3t983V4yOw5qK9TMHzVQlcnUfueKgNlm3W4cbyXYM=; b=Gdn/xYYzmc7oniFgWmN4XXt3UNrAlmXiym9Aut6rvw1fx3SwEINxnvhh1FfOC9xcU8 UQfx8jDkJohkNeILlYXNyEUC7QhIL4zIXw9XTv/RvKuNgW6W7iMeYcZt51GdzMpwHmo+ ldhzyNkctTfOtURe8UPoFz5rkKZeTG5LGXOEC/C3pV24D5ocAvAf9oHXQnumclfXcfZK tAbAwrQUlIl/acyD7thJ29BY60TMag/dRsRv734Vftl8FLNK/19UVDRBUCHS5UPuzHa5 uJmAefg2ZRr83K26/Ll8ixHvRdET34s5CogoEfIYFRZWdZglU0gSd55giD6q3u5DQ3Xw wxqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719421954; x=1720026754; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uO3t983V4yOw5qK9TMHzVQlcnUfueKgNlm3W4cbyXYM=; b=lngOWRSuAn+SIxG05dhfNyunluNeStSx7dXh3fY7NFKbnSNcfC0bsOmQuFUc8qyfvJ p2v4/D/aTOlhUBRLXB97W7cvg2JJi44JX3lnT5LpeD7qk97iDZEzqZHfmJ5KX/4tUuQZ WefTOk/8ZtovDtbTfnCQOpxWAYG5D3v67nCGhoMT10B+A7E+2z94hbav7ntWH2kGjscW QGmgn/rWJDFY+OvXpvOse7yhHRmVlejUQ1h0A7gwYkDIUJwoN7+jA34lvqGf396t/0sY JZsxie7H913N0IlDvWOYUf8WkLSfusvKhNtfsnvTaxRhGcWhdtNs3eHGcdKtTq8+RChS RqkQ== X-Forwarded-Encrypted: i=1; AJvYcCVwiEjSv4Yq9cax88tMktUfe8Qc1XxBhnPBSn9lYXw78qAhKWxbTiCDnoWFKGoAGwUnjWJFEVaLs2DFvob+zGlOdUEq X-Gm-Message-State: AOJu0YxBrCErOHQkwkvoWGpXW9RMeLzZZvKg1gLE6IFjI85eKNLK3vD0 Gm4Q3L32IjVPG9V2J7SUs4s/HHX2PZfExWKucUihVbAY0sU42IxW X-Google-Smtp-Source: AGHT+IFlmL0sCRcLo277f3a0tsQ8oR/2Tujsc2eEt3PqvoJ0xaa3JjWv3BTOzaoFQyXcY1oi7D934w== X-Received: by 2002:a2e:8752:0:b0:2ec:4d91:5156 with SMTP id 38308e7fff4ca-2ec5b31d14bmr78853621fa.28.1719421953874; Wed, 26 Jun 2024 10:12:33 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e360b7.dip0.t-ipconnect.de. [217.227.96.183]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366388c425fsm16278449f8f.38.2024.06.26.10.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 10:12:33 -0700 (PDT) In-Reply-To: <87r0cj91li.fsf@gmail.com> (Helmut Eller's message of "Wed, 26 Jun 2024 17:15:53 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=gerd.moellmann@gmail.com; helo=mail-lj1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320732 Archived-At: Helmut Eller writes: > On Wed, Jun 26 2024, Gerd M=C3=B6llmann wrote: > >>> More generally, it seems that the DEFUN macro works much like the DEFVAR >>> macro, in the sense that it creates a struct and puts it in a static >>> variable. So the Lisp_Subrs structs for primitives are, just like the >>> Lisp_Fwd structs, already in the data section. We could re-use them >>> instead of re-creating them in the dump. Of course, only if we can get >>> rid of the command_modes field. >> >> And it would again greatly simplify things. Maybe we should just do it := -) > > Curiously, igc-info doesn't show any PVEC_SUBRS. I think this is going o= n: > > The pdumper does something special for primitives and builtin symbols > (and threads). Those are dumped to the discardable section. On load, > it first performs relocations and then copies everything from the > discardable section to the data section. All builtin symbols can be > copied with a single memcpy to lispsym because they are sorted and > dumped in the correct order. The same happens for primitives: those are > adjacent because the DEFUN macro sets the SUBR_SECTION_ATTRIBUTE. > > This explains why igc-info doesn't show any PVEC_SUBRS (unless > configured with native compilation). So we already have what we want. > It's probably no problem that we don't trace the subr section, because > the command_modes field is nil anyway. Interesting, thanks! > I'm not sure why it is done this way; maybe it makes walking the object > graph more uniform. Hm.