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 prstack Date: Mon, 27 May 2024 14:39:37 +0200 Message-ID: <87ed9nmnsm.fsf@gmail.com> References: <87o790qsgm.fsf@gmail.com> <874jap95hi.fsf@gmail.com> <874janpa4m.fsf@gmail.com> <87le3vogt8.fsf@gmail.com> <87a5kbobt4.fsf@gmail.com> <86sey3v5p8.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="21689"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 27 14:40:24 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 1sBZeJ-0005Sv-S6 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 May 2024 14:40:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBZdj-0006y6-Ar; Mon, 27 May 2024 08:39:48 -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 1sBZdf-0006xC-2m for emacs-devel@gnu.org; Mon, 27 May 2024 08:39:43 -0400 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBZdd-0005aY-5e; Mon, 27 May 2024 08:39:42 -0400 Original-Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-57857e0f463so1411238a12.0; Mon, 27 May 2024 05:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716813579; x=1717418379; 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=X5NwDU5XebIRBtfWm0xDA1RAGDr97/OYqwi4NViZBd8=; b=D0Fv+ttceGCczBi994AvsEKiKAAc+0Z16x5+InMisH2Ow1gRLAOaweHNFh4+6CW06b vREg+O1Lkd3kCdiTEqYr5f0I1eyvTAYE3Vs/BGyjfivzz3kB9MW5V+mreNtV3cL+C7YM /mi+eqSRPL8W+GG0YfDjhevo3JeREtdjkLWjBtlrEUNKHa+DGrXbyUjYMcQNC4aLSJJe eg9E3bDoKy/x6E2HWby33eNeV9s9aiM8RF6GemBeRi+xeAhff3ejnVEy4IczMt29xMtA qGK4H5BahQQtgY3e4qNpkabi5CFgpOWMvxATxfORKDRYXlTT7zuzvk2uf5mXVbvoUaQ3 CnKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716813579; x=1717418379; 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=X5NwDU5XebIRBtfWm0xDA1RAGDr97/OYqwi4NViZBd8=; b=s9p9tpUPRe+I5ZdaH2jow/UiEz1GSxt6UBoVcbwnpzRptfCApIN/humy+CLjEoHL0Q qFL+/wOYTXKik/35cvlhNmGN0O0vS9gtKXrLgK/woUCMiFi5/TEnQAL4w/vRupjTKWx5 hmJrnti+ohQWiuKagTIqTpDzxFE7PeZ16r2ZiklhtJNXiddP08rSimB1cKxSy1PHuJK4 UyVWsJ3seikczs4M3yYDgXdQ7WUN4f0GQpbWtHATP2S1JMMkwyiIauVISRAvupxnRJL9 cvAApUtkRTxMgB07HYl0M2yRSJkWYiy5JyJ0f1IV1NKKqOEuS6jSeNOd5PxTmB0ckCR7 y4Ug== X-Forwarded-Encrypted: i=1; AJvYcCWt/zA5d3LHO+MqrOJ86JvBhljzcKoXF6JKktXGY6Sw7aAPQOLLEbUNIrg/rPU+w2I+P+widQst9pzXNzFOz8fGnB5v X-Gm-Message-State: AOJu0YxMP3m1In8PzjrNYrVIpmEKME3kTz1oU1+GIeLg9lDBv0J6lLX6 105slreYFFM103AO01ZwFb6n+oCMZYGGktBYYpmVzez6LWMki/s/iyCVLQ== X-Google-Smtp-Source: AGHT+IHHnHUEyOyQ25cLS6qh9oKrGxNnRq4GQgB5/VFcg4oU5IKJiCOdILB1F73SpHZsBjHkDHsosQ== X-Received: by 2002:a50:c946:0:b0:56e:10d3:85e3 with SMTP id 4fb4d7f45d1cf-5785194fa92mr7867833a12.13.1716813579172; Mon, 27 May 2024 05:39:39 -0700 (PDT) Original-Received: from caladan (dial-188233.pool.broadband44.net. [212.46.188.233]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc8b87fsm485110766b.158.2024.05.27.05.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:39:38 -0700 (PDT) In-Reply-To: <86sey3v5p8.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 May 2024 14:45:39 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52c.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, T_SCC_BODY_TEXT_LINE=-0.01 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:319607 Archived-At: On Mon, May 27 2024, Eli Zaretskii wrote: >> But my question was more whether MPS actually does call scan_prstack at >> "any moment" or if this is just a theoretical possibility for some >> possible future version of MPS. > > Why is all this order important, can you elaborate? Neither MPS nor > we can rely on the order in which the generated code does this stuff, > AFAIU. It is important because scan_prstack only scans the region prstack.stack[0..prstack.sp] and because scan_prstack runs (potentially) concurrent to print_stack_push. If print_stack_push increments prstack.sp before initializing prstack.stack[prstack.sp], then scan_prstack may read the old value out of that slot. That a compiler will "rewrite" prstack.stack[prstack.sp] = e; prstack.sp += 1; to prstack.sp += 1; prstack.stack[prstack.sp - 1] = e; seems very unlikely the me. But granted, compilers are known to do unhelpful things in the name of optimization.