Re: JIT compiling with LLVM v9.0
От | Konstantin Knizhnik |
---|---|
Тема | Re: JIT compiling with LLVM v9.0 |
Дата | |
Msg-id | 3f5a73ff-5586-a2cf-c8b3-8ef366a6bcc4@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: JIT compiling with LLVM v9.0 (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: JIT compiling with LLVM v9.0
|
Список | pgsql-hackers |
On 26.01.2018 11:23, Andres Freund wrote: > Hi, > > Thanks for testing things out! > Thank you for this work. One more question: do you have any idea how to profile JITed code? There is no LLVMOrcRegisterPerf in LLVM 5, so jit_profiling_support option does nothing. And without it perf is not able to unwind stack trace for generated code. A attached the produced profile, looks like "unknown" bar corresponds to JIT code. There is NoFramePointerElim option in LLVMMCJITCompilerOptions structure, but it requires use of ExecutionEngine. Something like this: mod = llvm_mutable_module(context); { struct LLVMMCJITCompilerOptions options; LLVMExecutionEngineRef jit; char* error; LLVMCreateExecutionEngineForModule(&jit, mod, &error); LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); options.NoFramePointerElim = 1; LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options), &error); } ... But you are compiling code using LLVMOrcAddEagerlyCompiledIR and I find no way to pass no-omit-frame pointer option here. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
Вложения
В списке pgsql-hackers по дате отправления: