|
24 | 24 | # Use the historical search path for providers, in the standard system library. |
25 | 25 | # -DNO_COMPAT_SYMS=1 (default disabled) |
26 | 26 | # Do not generate backwards compatibility symbols in the shared |
27 | | -# libraries. This may is necessary if using a dynmic linker that does |
| 27 | +# libraries. This may be necessary if using a dynamic linker that does |
28 | 28 | # not support symbol versions, such as uclibc. |
29 | 29 | # -DIOCTL_MODE=write (default both) |
30 | 30 | # Disable new kABI ioctl() support and support only the legacy write |
|
52 | 52 | # Disable man pages. Allows rdma-core to be built and installed |
53 | 53 | # (without man pages) when neither pandoc/rst2man nor the pandoc-prebuilt |
54 | 54 | # directory are available. |
55 | | -# -DENABLE_LTTNG (default, no tracing support) |
56 | | -# Enable LTTng tracing. |
| 55 | +# -DTRACING=LTTNG/USDT/None (default None) |
| 56 | +# Enable LTTng (Linux Trace Toolkit) or USDT (Userspace Statically Defined) |
| 57 | +# trace points for dynamic tracing. |
57 | 58 |
|
58 | 59 | if (${CMAKE_VERSION} VERSION_LESS "3.18.1") |
59 | 60 | # Centos 7 support |
@@ -171,6 +172,9 @@ endif() |
171 | 172 | set(DISTRO_FLAVOUR "None" CACHE |
172 | 173 | STRING "Flavour of distribution to install for. This primarily impacts the init.d scripts installed.") |
173 | 174 |
|
| 175 | +set(TRACING "None" CACHE |
| 176 | + STRING "Enable LTTNG (Linux Trace Toolkit) or USDT (Userspace Statically Defined Tracing).") |
| 177 | + |
174 | 178 | #------------------------- |
175 | 179 | # Load CMake components |
176 | 180 | set(BUILDLIB "${PROJECT_SOURCE_DIR}/buildlib") |
@@ -567,10 +571,14 @@ if (DRM_INCLUDE_DIRS) |
567 | 571 | endif() |
568 | 572 | endif() |
569 | 573 |
|
570 | | -# LTTng Tracer support |
571 | | -if (DEFINED ENABLE_LTTNG) |
| 574 | +# Dynamic Tracing support |
| 575 | +if (TRACING STREQUAL "LTTNG") |
572 | 576 | include(FindLTTngUST REQUIRED) |
573 | 577 | add_definitions(-DLTTNG_ENABLED) |
| 578 | +elseif (TRACING STREQUAL "USDT") |
| 579 | + add_definitions(-DUSDT_ENABLED) |
| 580 | +elseif (NOT TRACING STREQUAL "None") |
| 581 | + message(FATAL_ERROR "-DTRACING=${TRACING} is not a valid choice") |
574 | 582 | endif() |
575 | 583 |
|
576 | 584 | #------------------------- |
|
0 commit comments