Fix: pid tracker should track "pgid"
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Jun 2017 18:24:11 +0000 (14:24 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Jun 2017 18:29:19 +0000 (14:29 -0400)
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 <mathieu.desnoyers@efficios.com>
probes/lttng-tracepoint-event-impl.h

index cd7af77639945f3326729fe6a84ea2e038d5fd67..7ec0d757e62bc75abaa4a6b39b4cec73b924ba2d 100644 (file)
@@ -1150,7 +1150,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;                                                       \
        __orig_dynamic_len_offset = this_cpu_ptr(&lttng_dynamic_len_stack)->offset; \
        __dynamic_len_idx = __orig_dynamic_len_offset;                        \
This page took 0.025588 seconds and 4 git commands to generate.