aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/log.h')
-rw-r--r--src/nvim/log.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/log.h b/src/nvim/log.h
index 17ff095473..f2e74df031 100644
--- a/src/nvim/log.h
+++ b/src/nvim/log.h
@@ -5,6 +5,17 @@
#include <stdbool.h>
#include "auto/config.h"
+#include "nvim/macros.h"
+
+// USDT probes. Example invokation:
+// NVIM_PROBE(nvim_foo_bar, 1, string.data);
+#if defined(HAVE_SYS_SDT_H)
+#include <sys/sdt.h> // NOLINT
+#define NVIM_PROBE(name, n, ...) STAP_PROBE##n(neovim, name, __VA_ARGS__)
+#else
+#define NVIM_PROBE(name, n, ...)
+#endif
+
#define DEBUG_LOG_LEVEL 0
#define INFO_LOG_LEVEL 1
@@ -68,6 +79,10 @@
# define LOG_CALLSTACK_TO_FILE(fp) log_callstack_to_file(fp, __func__, __LINE__)
#endif
+#if NVIM_HAS_INCLUDE("sanitizer/asan_interface.h")
+# include "sanitizer/asan_interface.h"
+#endif
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "log.h.generated.h"
#endif