From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: MPS: native comp Date: Mon, 29 Apr 2024 03:29:44 -0400 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="24945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel missing value To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 29 09:30:32 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 1s1LT6-0006Kr-SG for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Apr 2024 09:30:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1LSV-0004w8-My; Mon, 29 Apr 2024 03:29:56 -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 1s1LSN-0004vc-9s for emacs-devel@gnu.org; Mon, 29 Apr 2024 03:29:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1LSM-0006XL-1d; Mon, 29 Apr 2024 03:29:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=m2xt9h+ww/Me3a7mFqLf4Tond/iU4ivSzwrdWPrwwzQ=; b=kSIe240Nn3VKBqIUX8fc 51Uih2jde8NNO+45+jy3cp0toS7SUslLn5Z6q986m0vNh08fbWxsfQZk+Uae4bzuMiCnmfhtVsedW RgepwgaZI7N+KRsl5Z7jCX69SxTuOmt8tiEafDeqthnCac1y2RECnQ/A1dScAGIhAmDkqTyjsJfw2 ycvxs0gXANPce31db7Y6w/6hA2NHc4kFn2x8LJzERmjJH4Y7jWBL5hVAd1qMUOQ0mbMbzcQ3bsRn2 foOkhAqBmTai5h943/NN4btlP+woN7GAz2LO2zitW7/csqSw4iWQXoT23Y7Tuq4s43E8zfWS04DjH I78x3eBO+2QJaQ==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1s1LSK-00028q-NC; Mon, 29 Apr 2024 03:29:45 -0400 In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Mon, 29 Apr 2024 07:35:05 +0200") 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:318318 Archived-At: Gerd M=C3=B6llmann writes: > Hi Andrea, Hi Gerd > I'm back to this after an excursion into the GUI world with MPS. And I > might have something that could be hint where the references live that > are currently not traced. Maybe. Could you please help me with this? sure, at least I can try :) > My scribbling from this mornings debug session: > > * Bus error in styled_format > > macroexp native-compiled, rest source. Bus error while dumping. > > #+begin_src sh > Loading emacs-lisp/macroexp (native compiled elisp)... > Loading /Users/gerd/emacs/savannah/igc/lisp/cus-face.el (source)... > Loading /Users/gerd/emacs/savannah/igc/lisp/faces.el (source)... > Loading /Users/gerd/emacs/savannah/igc/lisp/ldefs-boot.el (source)... > Loading /Users/gerd/emacs/savannah/igc/lisp/button.el (source)... > Loading /Users/gerd/emacs/savannah/igc/lisp/emacs-lisp/cl-preloaded.el (s= ource)... > Process 70068 stopped > * thread #1, queue =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_A= CCESS (code=3D2, address=3D0x1089f2140) > frame #0: 0x0000000100280b5c temacs`styled_format(nargs=3D2, args=3D(= struct Lisp_Symbol *) $0 =3D 0x0000000270a89b70, message=3Dtrue) at editfns= .c:3519:35 > #+end_src > > > In styled_format > > #+begin_src sh > p args[0] > (Lisp_Object) 0x00000001089f4e94 (struct Lisp_String *) $2 =3D 0x00000001= 089f4e90 > (lldb) p *$2 > (struct Lisp_String) { > u =3D { > s =3D { > size =3D 4546790736 > size_byte =3D -1 > intervals =3D NULL > data =3D 0x00000001089f2140 "" > } > next =3D 0x000000010f028550 > gcaligned =3D 'P' > } > } > (lldb) p *(struct igc_header *) ((char *) $2 - 8) > (struct igc_header) (obj_type =3D IGC_OBJ_FWD, pvec_type =3D PVEC_FREE, = hash =3D 1074619, nwords =3D 5) > #+end_src > > > This is a reference pointing to a tombstone, so a reference that > hasn't been traced. > > #+begin_src sh > (lldb) p *(struct igc_fwd *) ((char *) $2 - 8) > (struct igc_fwd) { > header =3D (obj_type =3D IGC_OBJ_FWD, pvec_type =3D PVEC_FREE, hash =3D= 1074619, nwords =3D 5) > new_base_addr =3D 0x000000010f028550 > (lldb) p *(struct igc_header *) 0x000000010f028550 > (struct igc_header) (obj_type =3D IGC_OBJ_STRING, pvec_type =3D PVEC_FRE= E, hash =3D 1074619, nwords =3D 5) > (lldb) p base_to_client ((void*) 0x000000010f028550) > (mps_addr_t) 0x000000010f028558 > (lldb) p *(struct Lisp_String *) 0x000000010f028558 > (struct Lisp_String) { > u =3D { > s =3D { > size =3D 33 > size_byte =3D -1 > intervals =3D NULL > data =3D 0x000000010f022988 "Eager macro-expansion failure: %S" > } > next =3D 0x0000000000000021 > gcaligned =3D '!' > } > } > #+end_src > > > So, it looks like the string constant "Eager..." is a reference that is > not traced. Can you please tell me where I can find these string > constants in native cu data structures? "Eager macro-expansion failure: %S" is an immediate stored in the eln of macroexp.el. This should be deserialized by 'load_static_obj' and referenced by 'comp_u->data_vec' (see 'load_comp_unit' comp.c:5402). Maybe mps is not tracking Lisp_Native_Comp_Unit's fields? Andrea