aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/jit/llvm/llvmjit.c17
-rw-r--r--src/include/pg_config.h.in16
-rw-r--r--src/include/pg_config.h.win3216
3 files changed, 27 insertions, 22 deletions
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 955c9667139..640c27fc408 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -28,6 +28,7 @@
#include <llvm-c/BitReader.h>
#include <llvm-c/BitWriter.h>
#include <llvm-c/Core.h>
+#include <llvm-c/ExecutionEngine.h>
#include <llvm-c/OrcBindings.h>
#include <llvm-c/Support.h>
#include <llvm-c/Target.h>
@@ -666,18 +667,22 @@ llvm_session_initialize(void)
llvm_opt0_orc = LLVMOrcCreateInstance(llvm_opt0_targetmachine);
llvm_opt3_orc = LLVMOrcCreateInstance(llvm_opt3_targetmachine);
-#if defined(HAVE_DECL_LLVMORCREGISTERGDB) && HAVE_DECL_LLVMORCREGISTERGDB
+#if defined(HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER) && HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
if (jit_debugging_support)
{
- LLVMOrcRegisterGDB(llvm_opt0_orc);
- LLVMOrcRegisterGDB(llvm_opt3_orc);
+ LLVMJITEventListenerRef l = LLVMCreateGDBRegistrationListener();
+
+ LLVMOrcRegisterJITEventListener(llvm_opt0_orc, l);
+ LLVMOrcRegisterJITEventListener(llvm_opt3_orc, l);
}
#endif
-#if defined(HAVE_DECL_LLVMORCREGISTERPERF) && HAVE_DECL_LLVMORCREGISTERPERF
+#if defined(HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER) && HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
if (jit_profiling_support)
{
- LLVMOrcRegisterPerf(llvm_opt0_orc);
- LLVMOrcRegisterPerf(llvm_opt3_orc);
+ LLVMJITEventListenerRef l = LLVMCreatePerfJITEventListener();
+
+ LLVMOrcRegisterJITEventListener(llvm_opt0_orc, l);
+ LLVMOrcRegisterJITEventListener(llvm_opt3_orc, l);
}
#endif
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index f9fb92f31c1..3eec284dc13 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -134,6 +134,14 @@
don't. */
#undef HAVE_DECL_F_FULLFSYNC
+/* Define to 1 if you have the declaration of
+ `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
+
+/* Define to 1 if you have the declaration of
+ `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
+
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
if you don't. */
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
@@ -142,14 +150,6 @@
to 0 if you don't. */
#undef HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterGDB', and to 0
- if you don't. */
-#undef HAVE_DECL_LLVMORCREGISTERGDB
-
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterPerf', and to 0
- if you don't. */
-#undef HAVE_DECL_LLVMORCREGISTERPERF
-
/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
don't. */
#undef HAVE_DECL_POSIX_FADVISE
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 01cf8daf438..ab276f7a957 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -107,6 +107,14 @@
don't. */
#define HAVE_DECL_F_FULLFSYNC 0
+/* Define to 1 if you have the declaration of
+ `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
+
+/* Define to 1 if you have the declaration of
+ `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
+
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
if you don't. */
#define HAVE_DECL_LLVMGETHOSTCPUNAME 0
@@ -115,14 +123,6 @@
to 0 if you don't. */
#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterGDB', and to 0
- if you don't. */
-#define HAVE_DECL_LLVMORCREGISTERGDB 0
-
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterPerf', and to 0
- if you don't. */
-#define HAVE_DECL_LLVMORCREGISTERPERF 0
-
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1