Cleanup: statedump process state event pid namespace fields
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 19 Feb 2019 21:14:38 +0000 (16:14 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Oct 2019 15:17:00 +0000 (11:17 -0400)
Now that we have namespace specific events in the statedump,
remove the duplicated information in the process state event
and make it a single event instead of recursing on the pid
namespace hierarchy.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/lttng-statedump.h
lttng-statedump-impl.c

index 5ce94fa68dfc45a3f0b910428b3c5e0739ec88ed..b65a1c2594e41b66f787d49f21806a752d61bd01 100644 (file)
@@ -40,14 +40,11 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_end,
 LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_state,
        TP_PROTO(struct lttng_session *session,
                struct task_struct *p,
-               int type, int mode, int submode, int status,
-               struct pid_namespace *pid_ns),
-       TP_ARGS(session, p, type, mode, submode, status, pid_ns),
+               int type, int mode, int submode, int status),
+       TP_ARGS(session, p, type, mode, submode, status),
        TP_FIELDS(
                ctf_integer(pid_t, tid, p->pid)
-               ctf_integer(pid_t, vtid, pid_ns ? task_pid_nr_ns(p, pid_ns) : 0)
                ctf_integer(pid_t, pid, p->tgid)
-               ctf_integer(pid_t, vpid, pid_ns ? task_tgid_nr_ns(p, pid_ns) : 0)
                ctf_integer(pid_t, ppid,
                        ({
                                pid_t ret;
@@ -57,28 +54,11 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_state,
                                rcu_read_unlock();
                                ret;
                        }))
-               ctf_integer(pid_t, vppid,
-                       ({
-                               struct task_struct *parent;
-                               pid_t ret = 0;
-
-                               if (pid_ns) {
-                                       rcu_read_lock();
-                                       parent = rcu_dereference(p->real_parent);
-                                       ret = task_tgid_nr_ns(parent, pid_ns);
-                                       rcu_read_unlock();
-                               }
-                               ret;
-                       }))
                ctf_array_text(char, name, p->comm, TASK_COMM_LEN)
                ctf_integer(int, type, type)
                ctf_integer(int, mode, mode)
                ctf_integer(int, submode, submode)
                ctf_integer(int, status, status)
-               ctf_integer(int, ns_level, pid_ns ? pid_ns->level : 0)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
-               ctf_integer(unsigned int, ns_inum, pid_ns ? pid_ns->lttng_proc_inum : 0)
-#endif
                ctf_integer(unsigned int, cpu, task_cpu(p))
        )
 )
index a707c775dd683a8b6dff99b53049349ddea43fdf..066b9612c0ee5f3884f023c1211eef17c58ad305 100644 (file)
@@ -425,8 +425,6 @@ void lttng_statedump_process_ns(struct lttng_session *session,
         */
        pid_ns = task_active_pid_ns(p);
        do {
-               trace_lttng_statedump_process_state(session,
-                       p, type, mode, submode, status, pid_ns);
                trace_lttng_statedump_process_pid_ns(session, p, pid_ns);
                pid_ns = pid_ns->parent;
        } while (pid_ns);
@@ -523,6 +521,9 @@ int lttng_enumerate_process_states(struct lttng_session *session)
                                type = LTTNG_USER_THREAD;
                        else
                                type = LTTNG_KERNEL_THREAD;
+
+                       trace_lttng_statedump_process_state(session,
+                               p, type, mode, submode, status);
                        lttng_statedump_process_ns(session,
                                p, type, mode, submode, status);
                        task_unlock(p);
This page took 0.029197 seconds and 4 git commands to generate.