Re: LLVM JITLink attempt II (WIP)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Gregory Burd <greg(at)burd(dot)me>, Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
Subject: Re: LLVM JITLink attempt II (WIP)
Date: 2026-01-06 00:09:02
Message-ID: CA+hUKGKjhxHe24p4-mNrQQ7U6PJnJcsF=Q1AfYwqAc2SqHWdzQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 3, 2026 at 4:09 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> I still don't know how to enable GDB and Perf support with JITLink...

jit_debugging_support may just be just a matter of calling
LLVMOrcLLJITEnableDebugSupport()[1], though it looks like it might
only work for ELF (the other interesting object format at this stage
being macOS's MachO, and in the past/possible future AIX's COFF/XCOFF
and eventually Windows COFF/PE), but I'm not sure. You can tell if
it's working by making it crash/abort in JITed code and seeing if the
stack is decodable by GDB I had been thinking we were going to have
to write that function because I'd missed its arrival in LLVM 18[2],
d'uh. It sounds like we might need to wait for or write a similar
function for perf support. Sorry for drip-feeding incomplete work,
but since others expressed an interest in helping :-)

[1] https://github.com/llvm/llvm-project/issues/174305#issuecomment-3709546309
[2] https://github.com/llvm/llvm-project/commit/54397f9ac128568838f2ac7bfc8e1f94b3eb264d

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-01-06 00:11:28 Re: Row pattern recognition
Previous Message David E. Wheeler 2026-01-05 23:55:00 Reject Foreign Tables from MIN/MAX indexscan Optimization?