X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=wrapper%2Ftrace-clock.c;h=6ec952b9753fc79febf33e025e05e6bd2b009136;hb=dd054d094b5d0bb7248ecfd32b021e124ed2b774;hp=1b7a21767289d4f122a6e393bb37a7430c57026b;hpb=b07252070edd244987bf160c1ee488d4796bb3a3;p=lttng-modules.git diff --git a/wrapper/trace-clock.c b/wrapper/trace-clock.c index 1b7a2176..6ec952b9 100644 --- a/wrapper/trace-clock.c +++ b/wrapper/trace-clock.c @@ -21,9 +21,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "trace-clock.h" +#include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) -DEFINE_PER_CPU(local_t, lttng_last_tsc); +#ifdef LTTNG_USE_NMI_SAFE_CLOCK +DEFINE_PER_CPU(u64, lttng_last_tsc); EXPORT_PER_CPU_SYMBOL(lttng_last_tsc); -#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */ +#endif /* #ifdef LTTNG_USE_NMI_SAFE_CLOCK */ + +#ifdef LTTNG_CLOCK_NMI_SAFE_BROKEN +#warning "Your kernel implements a bogus nmi-safe clock source. Falling back to the non-nmi-safe clock source, which discards events traced from NMI context. Upgrade your kernel to resolve this situation." +#endif