Browse Source

basic support for usdt probes

pull/13081/head
Zachary P. Landau 10 months ago
committed by Björn Linse
parent
commit
d4fc7b25e8
3 changed files with 12 additions and 0 deletions
  1. +1
    -0
      config/CMakeLists.txt
  2. +1
    -0
      config/config.h.in
  3. +10
    -0
      src/nvim/log.h

+ 1
- 0
config/CMakeLists.txt View File

@ -32,6 +32,7 @@ endif()
check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_files(termios.h HAVE_TERMIOS_H)
check_include_files(sys/uio.h HAVE_SYS_UIO_H)
check_include_files(sys/sdt.h HAVE_SYS_SDT_H)
# Functions
check_function_exists(fseeko HAVE_FSEEKO)

+ 1
- 0
config/config.h.in View File

@ -33,6 +33,7 @@
#cmakedefine HAVE_STRCASECMP
#cmakedefine HAVE_STRINGS_H
#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_SYS_SDT_H
#cmakedefine HAVE_SYS_UTSNAME_H
#cmakedefine HAVE_SYS_WAIT_H
#cmakedefine HAVE_TERMIOS_H

+ 10
- 0
src/nvim/log.h View File

@ -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

Loading…
Cancel
Save