From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: MPS: pdump Date: Fri, 03 May 2024 07:54:35 +0200 Message-ID: <87ikzv5tk4.fsf@gmail.com> References: <87bk5tc1j6.fsf@gmail.com> <877cghc0yy.fsf@gmail.com> <86jzkhu5rv.fsf@gnu.org> <87ttjlabic.fsf@gmail.com> <87v8408wsr.fsf@gmail.com> <87o79sasl5.fsf@gmail.com> <86edanqf8x.fsf@gnu.org> <86v83wlf1l.fsf@gnu.org> <87msp86yh5.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="6119"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 03 07:55:18 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 1s2lt6-0001LP-Iz for ged-emacs-devel@m.gmane-mx.org; Fri, 03 May 2024 07:55:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2lsY-0006bn-GB; Fri, 03 May 2024 01:54:42 -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 1s2lsW-0006bL-9w for emacs-devel@gnu.org; Fri, 03 May 2024 01:54:40 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2lsU-0002Nc-Fg; Fri, 03 May 2024 01:54:39 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a519e1b0e2dso1240668466b.2; Thu, 02 May 2024 22:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714715676; x=1715320476; 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=Eh42/AcXiNH1iknq49Qrc+PhYhwjh4exkuTtIXvl/Bc=; b=Q51nbM9ZgFnzu1kfQ0EYHbCzTLpC0C3NOswGupfZBHYeTKMVIcoXMUtPrJ8OQRfTju nbrtOXyEZfm1epjPZ86vl1G4fRfky+8wBO6BuVsMEws7jesyVBxidFQ0fg2dlVH2hyxy TB0MTN3Vie2Q33Ey2gLVaXQm767Y2fx7f3o/XSWSpAHHf3VKRb2gtFTznKC8TCf7wtwu RhRQHkWVhfnhclAhFr7463zcHlz/xhPcsUIn5otnYKhzQQFOfhYksa378gXiQs7bZNJH BZdum0hkKIOMdUmYfRbmN/lTh0jqG3mRU7AdSQSEUzPD8ES0Vl2PN75uacaaJiAUweMU eMlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714715676; x=1715320476; 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=Eh42/AcXiNH1iknq49Qrc+PhYhwjh4exkuTtIXvl/Bc=; b=E6flinThzWrj7h9TSwgAhsg6IkJDtTONhkRKghJzJom1D4oPYhwOJY3EDMJpjO+5sm OtgsohqknQMkeR+mTzPRXn8dUSWvOtWT3uGdgb3hovFwtca6pJbeRlvo/I+uyvNQhsbW i8x0O6zdVypCTzLVdVawttAW59wWmeHxYCiPL/1xDGegPdUi11GUnqGpRxYmyXxpF4Ti us/XqdiOltQHVsltOmnBY2L/Uffl6Ah+MHhyB4+I6LmTFgOTtCgN2LNPHzQ6X8FYLSTH c9+lDDKkdQqpsj6toJetRxrVia0S/of3fDYnYzkDa5vVQSsRA40nE+pSddZeBJq58R6Q liZA== X-Forwarded-Encrypted: i=1; AJvYcCV1t0d9Xyn52qdgS2RX1OfrI3fzIHby0HTETBybJ7EvIL/u43CY7Rk5h+vv++29elfhhLW3a7q7Zg52hCmJV7ZT8Q6n X-Gm-Message-State: AOJu0Yw3mHq9wNO9SAnYTBmQdZVnRHYmGV4KMvbmGOFwuY9UbWFcobrs +f7kESQUE1j/YBDa6c/56bIBJzp4MpPNBvHfivX2BE/g45eutzMJPxt2OQ== X-Google-Smtp-Source: AGHT+IFvYXt2ZAVKmk5IKIncrdbNCPnuJDU+AqEF6L6l7EsuSWjQzN/c0XAGOrn3ook8+HqEhoVNrw== X-Received: by 2002:a17:906:cecc:b0:a58:7ddb:a99b with SMTP id si12-20020a170906cecc00b00a587ddba99bmr888075ejb.44.1714715676338; Thu, 02 May 2024 22:54:36 -0700 (PDT) Original-Received: from caladan (dial-184253.pool.broadband44.net. [212.46.184.253]) by smtp.gmail.com with ESMTPSA id f17-20020a170906391100b00a5992566e62sm274605eje.85.2024.05.02.22.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 22:54:36 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6ll?= =?utf-8?Q?mann=22's?= message of "Thu, 02 May 2024 20:28:42 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x629.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:318632 Archived-At: On Thu, May 02 2024, Gerd M=C3=B6llmann wrote: > Helmut Eller writes: > >>> @Helmut: Did we already talk about what the problem with the frame in >>> the loaded pdump could be? Sorry that I don't remember. >> >> I never heard of that before. > > As the famous philosopher Manuel Manousakis says: Katastrophe! > :-) Never heard of that one either. :-) [...] > Good. Now let's load that file. We mmap the whole file and now have H', > C', R' in the new process. C' and R'are good to go (In C are leaf > objects). H' is patches according to the reloc info that is in S'. In not sure what the difference between R and S is, but I guess it's a minor detail. > At the end of the relocation H' is ready to use. Some additional setup > and initalizations, and we are good to go. I won't describe these. (I think copying H' to MPS memory would not cost much more. Due to copy-on-write, the patching must already have some cost. Something we could consider in the future.) > Thing is that H' now contains real Lisp objects of basically all types. > Lisp objects contain references, so I make H' an ambig root. > > So far so good, but some Lisp objects contain not only references to > other Lisp objects but also pointers to malloc'd memory. Not initially, > in the dump, but during their lifetime. > > And finally we have reached face_cache. > > If initial_frame is an object in H', fix_frame won't be called for it. > It cannot because the dump is not part of the MPS memory, and is instead > traced ambigously as part of the big blob H'. > > Does that make any sense? Yes. I'm surprised that frames are pdumped. Windows too? Is that necessary or more of an accident?