X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fsignal.h;h=ae6e3e13d1c76ce718d649c6f1f5418119055b80;hb=c9b7e9c8cee5e9ee5f8a9288bb77d2b52deed077;hp=8783b52769e8bb20addec8f31b33c27a746a292e;hpb=0a0d736ec89dffdbc83e7181166a99d5563acfe8;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/signal.h b/instrumentation/events/lttng-module/signal.h index 8783b527..ae6e3e13 100644 --- a/instrumentation/events/lttng-module/signal.h +++ b/instrumentation/events/lttng-module/signal.h @@ -12,6 +12,18 @@ #include #include #undef LTTNG_FIELDS_SIGINFO +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0)) +#define LTTNG_FIELDS_SIGINFO(info) \ + ctf_integer(int, errno, \ + (info == SEND_SIG_NOINFO || info == SEND_SIG_PRIV) ? \ + 0 : \ + info->si_errno) \ + ctf_integer(int, code, \ + (info == SEND_SIG_NOINFO) ? \ + SI_USER : \ + ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code)) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */ #define LTTNG_FIELDS_SIGINFO(info) \ ctf_integer(int, errno, \ (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \ @@ -21,6 +33,7 @@ (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \ SI_USER : \ ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code)) +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */ #endif /* _TRACE_SIGNAL_DEF */ /** @@ -35,7 +48,8 @@ * SEND_SIG_NOINFO means that si_code is SI_USER, and SEND_SIG_PRIV * means that si_code is SI_KERNEL. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(signal_generate, TP_PROTO(int sig, struct kernel_siginfo *info, struct task_struct *task, @@ -99,7 +113,8 @@ LTTNG_TRACEPOINT_EVENT(signal_generate, * This means, this can show which signals are actually delivered, but * matching generated signals and delivered signals may not be correct. */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \ + LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0)) LTTNG_TRACEPOINT_EVENT(signal_deliver, TP_PROTO(int sig, struct kernel_siginfo *info, struct k_sigaction *ka),