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: a random backtrace while toying with gdb Date: Sun, 30 Jun 2024 13:20:30 +0200 Message-ID: References: <87bk3jh8bt.fsf@localhost> <867ce7hvvz.fsf@gnu.org> <86tthbgdlr.fsf@gnu.org> <86r0cehkwr.fsf@gnu.org> <86jzi6hhjv.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="29619"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, yantar92@posteo.net, emacs-devel@gnu.org, eller.helmut@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 30 13:21:27 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 1sNscZ-0007WW-15 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Jun 2024 13:21:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNsbl-0007AZ-Vi; Sun, 30 Jun 2024 07:20:37 -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 1sNsbj-0007AJ-RV for emacs-devel@gnu.org; Sun, 30 Jun 2024 07:20:35 -0400 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNsbi-0005gD-9r; Sun, 30 Jun 2024 07:20:35 -0400 Original-Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-57d203d4682so2415358a12.0; Sun, 30 Jun 2024 04:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719746432; x=1720351232; 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=EuW2aJNsz7GwGdyPssKX5oAyCoem/KcW5dw5itbUJlk=; b=UQibC5k2f8YmBfEuIf96UN5Hh47EbDQGiZVCT/Wsu0SIcUb2c1kyfWd/5HoJDSCprD lrbFx2YorMc3KgEp8Qp5Bnpj5JUeeZtRSLEYCuFYZQ9ha/75OvNrmkvxPoU8390//np7 ssIiD1ZKVtU2E53m9y5KU0wura63rMH7McxbSJYe+RM7cXH4NVpgsjVo3jR4f0u/tXYC B0ZVwLE9E34DUCEIN8TJFqsAhhv4n00S3It4/L8Ok89x2jWTCyBnRAxazFNNiXP7oepq ajSjNrfeTqYQhCFkdOcQnJKaiYTIu79QryftMcBtkA5bjnTWzQobDgAA8GYqfuL1Dpsi 8XNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719746432; x=1720351232; 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=EuW2aJNsz7GwGdyPssKX5oAyCoem/KcW5dw5itbUJlk=; b=JhcKif9wkJs5cBYqai2ubuEqGLhOeB8itxRta5sx87T2r8VJFir04Q5qetOLyYpfki kNfLSHgoRrSF9PH31oDwiGtHR0mKiBxqApdY70DHLvnVW+GCTUWQvRpO3IhtpZBmEazf nmOP0VIv3ZSZIZSYYyIGGtO+EEgMcm0gcHSBBTxBHsXAcQfR8oVo0bH7V3/8QQbMJP+T SkbhEEwGEyZ1FNyOIuDhofb9WvCDFOarWEuSZR41BK+sPssC3JHR7qJYIDic7f7KKwEN IIK1wTHBJNNsueUU1241bqA9hl76xthXePMCTWYccLu0aUjKhM2YxELh0r0dT6rURpji P4Tw== X-Forwarded-Encrypted: i=1; AJvYcCXgepSlKkYCxG/vtlB5VM+ltH5HYRLR0JsQDGPzTVVsRW2NoCdUvC/P2BCRKDsSCAA2dqWmEcaDBvrpYet9ksAYO3C3 X-Gm-Message-State: AOJu0Yyuxsf2RalnvjCCaZPU3Eq7V+qtBgVLQoy8syX+nLQkKnyASg7V 40RQ5w2F+FN+RqvzBJXfk01uvgEtfTKgK66tk9Kc4rKi9VZExxUP X-Google-Smtp-Source: AGHT+IFoNt3KzjhMZUqetOwvl/0RCq6H1Y5NGjlceoNA068KwTmu9ku367DSVzjl1NlFhvBlC3GGWA== X-Received: by 2002:a05:6402:2116:b0:57d:1e27:65ea with SMTP id 4fb4d7f45d1cf-587a0635e7amr2086473a12.34.1719746431922; Sun, 30 Jun 2024 04:20:31 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36a45.dip0.t-ipconnect.de. [217.227.106.69]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f069sm3299916a12.33.2024.06.30.04.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 04:20:31 -0700 (PDT) In-Reply-To: <86jzi6hhjv.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 30 Jun 2024 13:05:24 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52e.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:320948 Archived-At: Eli Zaretskii writes: >> Not a crime, but we are using a lib that we know uses barriers and >> functions of which get invoked when we hit such a barrier. We can't just >> ignore that. > > What alternatives do we have? Emacs code deals with Lisp objects and > memory managed by MPS all over the place. In many case, the > programmer doesn't necessarily know whether some data is or isn't in > memory managed by MPS. We know what we do in signal handlers, don't we? We'd not call the existing GC for example, and we have to be awware that GC mark bits ay be set. It's not that this is a problem all over the place in Emacs, outside of signal handlers. > You are asking to do the impossible, IMO. Refraining from touching > MPS-managed memory from signal handlers is simply not practical in > Emacs. E.g., it would make the profiler useless, because the minimum > you must do from the signal handler is to see which Lisp function is > being run; if you defer this for later, you will see a completely > skewed profile. The profiler is a special case that is true, but we could get away with doing something special here: detecting, with igc_busy, that we shouldn't do anything with Lisp atm, and instead do whatever goes. If you insist on making MPS usuable in signal handlers, please go ahead of course.