pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Fix jit_profiling_support when unavailable.
Date: Wed, 31 Dec 2025 02:03:46 +0000
Message-ID: <E1valYu-003ZZb-36@gemulon.postgresql.org> (raw)

jit: Fix jit_profiling_support when unavailable.

jit_profiling_support=true captures profile data for Linux perf.  On
other platforms, LLVMCreatePerfJITEventListener() returns NULL and the
attempt to register the listener would crash.

Fix by ignoring the setting in that case.  The documentation already
says that it only has an effect if perf support is present, and we
already did the same for older LLVM versions that lacked support.

No field reports, unsurprisingly for an obscure developer-oriented
setting.  Noticed in passing while working on commit 1a28b4b4.

Backpatch-through: 14
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKGJgB6gvrdDohgwLfCwzVQm%3DVMtb9m0vzQn%3DCwWn-kwG9w%40mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2e2753df739eb85fd3d69faa7d148831b6691896

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



view thread (6+ messages)

Message-ID: <E1valYu-003ZZb-36@gemulon.postgresql.org>
Permalink:  ../E1valYu-003ZZb-36@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1valYu-003ZZb-36@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: jit: Fix jit_profiling_support when unavailable.
  In-Reply-To: <E1valYu-003ZZb-36@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox