aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-10-10 14:49:11 +0200
committerGitHub <noreply@github.com>2020-10-10 14:49:11 +0200
commit11ec53e558b547bbe49c93d206a8e4ab4247511b (patch)
tree5b977f97cd003cd54043d5e3b285dca93181c143 /src
parentce5a260c9ec5c85eb67eef268e3138b11da86224 (diff)
parentd4fc7b25e81ca043e9db9a369f31ac31404e7a86 (diff)
downloadrneovim-11ec53e558b547bbe49c93d206a8e4ab4247511b.tar.gz
rneovim-11ec53e558b547bbe49c93d206a8e4ab4247511b.tar.bz2
rneovim-11ec53e558b547bbe49c93d206a8e4ab4247511b.zip
Merge pull request #13081 from bfredl/usdt2
basic support for usdt probes
Diffstat (limited to 'src')
-rw-r--r--src/nvim/log.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/log.h b/src/nvim/log.h
index d92b4629ed..f2e74df031 100644
--- a/src/nvim/log.h
+++ b/src/nvim/log.h
@@ -7,6 +7,16 @@
#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
#define WARN_LOG_LEVEL 2