From: Mathieu Desnoyers Date: Thu, 1 Jun 2017 18:24:11 +0000 (-0400) Subject: Fix: pid tracker should track "pgid" X-Git-Tag: v2.8.6~1 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=c846d31aa9f92ef66bb35332b2e2a76936561e59;p=lttng-modules.git Fix: pid tracker should track "pgid" The "pid" notion exposed by LTTng translates to the "pgid" notion in the Linux kernel. Therefore using "current->pid" as argument to the PID tracker actually ends up behaving as a "tid" tracker, which does not match the intent nor the user-space tracer behavior. Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/lttng-tracepoint-event-impl.h b/probes/lttng-tracepoint-event-impl.h index 45c38ff4..f940ff41 100644 --- a/probes/lttng-tracepoint-event-impl.h +++ b/probes/lttng-tracepoint-event-impl.h @@ -961,7 +961,7 @@ static void __event_probe__##_name(void *__data, _proto) \ if (unlikely(!ACCESS_ONCE(__event->enabled))) \ return; \ __lpf = lttng_rcu_dereference(__session->pid_tracker); \ - if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->pid))) \ + if (__lpf && likely(!lttng_pid_tracker_lookup(__lpf, current->tgid))) \ return; \ _code_pre \ if (unlikely(!list_empty(&__event->bytecode_runtime_head))) { \