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 comp Date: Thu, 09 May 2024 08:15:20 +0200 Message-ID: References: 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="6272"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, Helmut Eller To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 09 08:16: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 1s4x4k-0001Zr-9v for ged-emacs-devel@m.gmane-mx.org; Thu, 09 May 2024 08:16:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4x4D-0006Sr-Gy; Thu, 09 May 2024 02:15:45 -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 1s4x3v-0006Mw-I8 for emacs-devel@gnu.org; Thu, 09 May 2024 02:15:27 -0400 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4x3s-00005F-RX; Thu, 09 May 2024 02:15:26 -0400 Original-Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-41fd5dc0508so958215e9.0; Wed, 08 May 2024 23:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715235322; x=1715840122; 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=UOQf/PKRRcAAbnAx0dNIo7NERc8Nxe6vxG6s1cU4ZCM=; b=d3+oa+Qe/pPRcxnlXNlb8M65CWAVHHNaHNZOY9aGgPH82KHXj601ACOwa2rxNnSO14 d30TX9UiEFkF+gWkfJjhThNf0r1GqvkhPuYaxZ+ESBBqqpNhaD5Kq/sEmLnLDWmGYluW fAPF/uEUjbCAE3jZvOqf+6HuPof0GD3yAC9RS5Qix98bTAssHZItNshljRPQhz/+kGpR /SgeOaLSSurgQkfGzTaS/RIgsQwPICcubiRtVt9yR6Yik7UjP36y1hWz7UCMtZqkohxI palq9h2plWJCYeGi9eFK4YDK4SG4CPMMEoC+IQxeJ3inwKpIecZ1YCnF0K4+jXEofZDw zYEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715235322; x=1715840122; 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=UOQf/PKRRcAAbnAx0dNIo7NERc8Nxe6vxG6s1cU4ZCM=; b=v6JcPd7U65QB5cUmtasi6KUM7OsDEyoEONoI33963pHGIepDVtDGnfGydWeC9k1hRX sBVnN9qtqYGE7V5sKmEOkLNRU60hDOpjwCKFNLc2IEXgFZZ7jC+pYynlT9hmMBlhzhnf 5UPgJb/qRUQ8Eaks5PGHNVUsCBAcqF4XUCtJLl1VsJJhl9XDoD0//sreXxJSWA9ytEBL Jr5cSdAZFrpsXXhYMbGfIasxi+718WyoEnQpb/IPV7THk2eL+NVkU9p6Bb8Y2Hh+g9dq CP8wyXNH8lCfJIwF++/BYa30zqkPrW5F7WleBmxQISysIWPCVjCbpM+sAjzH1UcYDBC7 mgAQ== X-Forwarded-Encrypted: i=1; AJvYcCVJIreOFZRwalT8ic/yQBGzciBhcQgHcOeZtHipIMoEcpizJ3p/fSJ/4qu/EzV0YGsD55aJIVmACTEDPosdXSYeWFC3 X-Gm-Message-State: AOJu0YyHYeS5bfqJd7uVSxUfWSGhBQf6rEj5YB7mtcck4gM/PcSov+Mi yvv00fJPnjkwHWoegfN3fz5eHSjOByXqmUIupMI8VpuARLT84zf5YdAcsQ== X-Google-Smtp-Source: AGHT+IEJDVSulYJPce9yZk78U/NP/WdYgN9S5aKOSFyVugf72euW1V/0aLivRIFzoyKvPY2o4QeG5Q== X-Received: by 2002:a5d:510a:0:b0:34d:742f:3cd1 with SMTP id ffacd0b85a97d-34fca2426femr3334053f8f.26.1715235321596; Wed, 08 May 2024 23:15:21 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36021.dip0.t-ipconnect.de. [217.227.96.33]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502bbc4b41sm750459f8f.113.2024.05.08.23.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 23:15:21 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Wed, 08 May 2024 18:11:55 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x332.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:319045 Archived-At: Gerd M=C3=B6llmann writes: > Andrea Corallo writes: > >>> Current_thread is staticpro'd, so in Emacs we'll fix that if a >>> thread_sate moves in memory. But what does/could GCC assume about this, >>> or maybe comp? >> >> I think we'll have to update "struct comp_thread_state * * >> current_thread_reloc" as well if 'current_thread' moves. > > Thanks. > > BTW, is there a way to let libgccjit keep to .o file together with the > .c file? > > I'm asking because the .elns don't have debug info on macOS (for a > long-winded reason that made macOS handle DWARF differently from the > rest). If I had a .o with debug info, I could maybe generate .dSYM > files. Good news! I think I know what's going on, 100% - epsilon. The error occurs in an Emacs that has a pdump loaded. (I submitted a bug concerning the build process. The workaround for this made it much easier for me to recognize what's going on.) The loaded dump contains, among other things, native compilation unit objects. These objects contain pointers into the loaded .eln for things that we need to trace. For CUs that are in MPS memory, this is done by fix_comp_unit and all it good. For CUs in the dump this is not done, simply because they are not in MPS memory but in the hot segment of the loaded dump. Result is that references in these .eln are not fixed, and so on. In the end, it's always the same problem with the dump. The dump is not in MPS, MPS knows only traces as an ambig root. I guess we should do something about this. Maybe we could try Helmut's idea of copying the objects to MPS. Meanwhile, I'll try to come up with a workaround.