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: Native compilation on MPS branch Date: Fri, 26 Apr 2024 12:15:59 +0200 Message-ID: References: <86wmor6owq.fsf@gnu.org> <861q6u2ex2.fsf@gnu.org> <86cyqd1nbh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15301"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Andrea Corallo , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 26 12:17:12 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 1s0Idj-0003jG-NO for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Apr 2024 12:17:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0Icv-00049l-2Z; Fri, 26 Apr 2024 06:16:21 -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 1s0Icn-00048v-3g for emacs-devel@gnu.org; Fri, 26 Apr 2024 06:16:13 -0400 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0Icf-0004EB-By; Fri, 26 Apr 2024 06:16:12 -0400 Original-Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a58c09e2187so152911366b.3; Fri, 26 Apr 2024 03:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714126561; x=1714731361; darn=gnu.org; h=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=MbjhtqkiTcheXc7GI3jMTVjlpxIRfAmTiwhrAHQJZYE=; b=F7ehoQPu1g54ZS9dLxyeBo6NFDGGKTqwSUOWlTWi9rFcysN/Ne0UQfoTJwgSLRglWi Z938uMam7omHmWahbnD856vDbdLAhW9Z3ZZlMK+H253JdDkNFf0uF+rwCgtKTWG63S6m FyoQtC1A8OeiZdI97sM08O+42hNqo1ZC5lVyYHliO3VrI1535po15GOv+L5E9nbHfdLT kABCl2vCqDZfyVvzQxkXuAL5nKPfnMLHJ5Q2RgOBKSP7lv+kb31gs3+ZD0OFBvZv0JLU YzRvUG09EYgtqa21FtRvG08bae4LqMkA/lsaXsP1ONGy2utao9P6sWbxUt611tCuvrhR VD0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714126561; x=1714731361; h=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=MbjhtqkiTcheXc7GI3jMTVjlpxIRfAmTiwhrAHQJZYE=; b=G99yCFKq6c/wPwZ9blM4eIhCSjpSPbgqFUcc25LU574X7bYLqItLVHpLmEhHvP3MRJ ugJbd4QFgJKxkUcY4nSpGZh7SgrMxqNIyg7zvyOI0E7LDi9INVXtSsmpHCPF7/+CKavU v+FKjrNlq5PrQkWObsP2tBA7kf3IqSxd1xU6T8pQheILmRJCqT3GQBvjntyCkv/z31aO XiLf7EmEgCVK5FA2LNp+Cel13FXVtIe9gdPtOV6dNf57QEouq5M2lfD42IZlHrS59WRE 03QbDeQl+34NclSnhIee3eVzJI8trcTXnlNhP25wGwR1I+qogXtgH8Fp6zVTTV8hytuP M/NQ== X-Forwarded-Encrypted: i=1; AJvYcCXigaofZ22AA8NnYZsiLa4nV4jHhrKm58+cHPNuKYYaDW7z5gTqeWYmLLIC3RH+LWIzk2rIw1az3gCanQB8mCvzwqr5 X-Gm-Message-State: AOJu0YxUUVqTTK6gjoNDz/e751yNp+t2yEFwMf600yUrkq/fLQEkkXPY vT7r8weKBmcVxR0qIAMU3rmMaJ+bMfyM/Ry3N5hos8Czq4+ACx1Z+CDnkw== X-Google-Smtp-Source: AGHT+IHEk8ZuSBGq7lBtSO3my640w5iLK34YT9GOTGsbQBoDlxFSaMibk8AVNeSa/xssHiUKJuWPQA== X-Received: by 2002:a17:906:b112:b0:a55:5ba7:2889 with SMTP id u18-20020a170906b11200b00a555ba72889mr1560988ejy.42.1714126561118; Fri, 26 Apr 2024 03:16:01 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a4eb.dip0.t-ipconnect.de. [79.227.164.235]) by smtp.gmail.com with ESMTPSA id kt17-20020a170906aad100b00a58ae8464d2sm1739291ejb.211.2024.04.26.03.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 03:16:00 -0700 (PDT) In-Reply-To: <86cyqd1nbh.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Apr 2024 18:20:18 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:318117 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org >> Date: Thu, 25 Apr 2024 01:48:43 -0400 >> >> Eli Zaretskii writes: >> >> >> From: Andrea Corallo >> >> Cc: Eli Zaretskii , emacs-devel@gnu.org >> >> Date: Wed, 24 Apr 2024 16:54:30 -0400 >> >> >> >> IME rr is invaluable for debugging GC bugs, one can do things like >> >> placing watch-points while doing reverse execution and discover >> >> immediately where something was modified the last time. You did a very >> >> good job reaching this point of the development without rr. >> > >> > We have the last_marked[] array to facilitate debugging of GC without >> > rr. I hope we will be able to do something similar with MPS, because >> > rr is not universally available (e.g., not on Windows). >> > >> >> Anyway I'll mention a trick I find extremely usefull to discover where >> >> something was modified last time before a certain event without rr, I >> >> apologize if you know it already but in case it might help some other >> >> reader :) >> >> >> >> 1 When we crash we set a watch point on the memory we see got >> >> unexpectedly modified >> >> 2 We set the ignore number of the watch-point to a very large number >> >> 3 We restart the execution of the program >> >> 4 When the program crashes again we can see how many time the watch point >> >> was actually ignored >> >> 5 We subtract 1 to this number and we set it again as the ignore number >> >> of the watch-point >> >> 6 We restart again and tada!! We are where that piece of memory was >> >> modified for the last time :) >> > >> > This only works if you disable ASLR, AFAIU. >> >> Correct, on GNU/Linux gdb does that by default, no idea on other >> systems. > > It does it also on Windows, if the version of the OS is new enough to > support that. LLDB does it too on macOS. I'm BTW one step further, in that emacs_lldb.py works unchanged with LLVM/HEAD. So, they apparently have broken something in in 18. And I'm now using the fixes that Eli and Helmut made. I thought it didn't matter to change the baseline because I got a new clang with LLVM too, so how much more could I possibly rock the boat? Result is that the same scenario as before (clean build, then build with macroexp native-compiled) leads to a different outcode Loading bindings (source)... Loading window (source)... Loading /Users/gerd/emacs/savannah/igc/lisp/files.el (source)... 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 (source)... ./lisp.h:1777: Emacs fatal error: assertion failed: VECTORLIKEP (a) Fatal error 6: Aborted Just for info.