summaryrefslogtreecommitdiffstats
path: root/lib/subdir.am
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2020-09-28 23:22:53 +0200
committerQuentin Young <qlyoung@nvidia.com>2020-10-23 21:13:51 +0200
commit552e2a306a3b3335ee60965bbcd61c27eecc576d (patch)
tree7bc84d1121c84f56b02027cbdedde6ce09ce3c6e /lib/subdir.am
parentlib: move trace.h -> libfrr_trace.h (diff)
downloadfrr-552e2a306a3b3335ee60965bbcd61c27eecc576d.tar.xz
frr-552e2a306a3b3335ee60965bbcd61c27eecc576d.zip
lib: add trace.h, frrtrace(), support for USDT
Previous commits added LTTng tracepoints. This was primarily for testing / trial purposes; in practice we'd like to support arbitrary tracing methods, and especially USDT probes, which SystemTap and dtrace expect, and which are supported on at least one flavor of BSD (FreeBSD). To that end this patch adds an frr-specific tracing macro, frrtrace(), which proxies into either DTRACE_PROBEn() or tracepoint() macros depending on whether --enable-usdt or --enable-lttng is passed at compile time. At some point this could be tweaked to allow compiling in both types of probes. Ideally there should be some logic there to use LTTng's optional support for generating USDT probes when both are requested. No additional libraries are required to use USDT, since these probes are a kernel feature and only need the <sys/sdt.h> header. - add --enable-usdt to toggle use of LTTng tracepoints or USDT probes - add new trace.h library header for use with tracepoint definition headers - add frrtrace() wrapper macro; this should be used to define tracepoints instead of using tracepoint() or DTRACE_PROBEn() Compilation with USDT does nothing as of this commit; the existing LTTng tracepoints need to be converted to use the frrtrace*() macros in a subsequent commit. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/subdir.am')
-rw-r--r--lib/subdir.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/subdir.am b/lib/subdir.am
index 5c371f2cc..ed3c30799 100644
--- a/lib/subdir.am
+++ b/lib/subdir.am
@@ -253,6 +253,7 @@ pkginclude_HEADERS += \
lib/table.h \
lib/termtable.h \
lib/thread.h \
+ lib/trace.h \
lib/typerb.h \
lib/typesafe.h \
lib/vector.h \