[lttng-dev] [PATCH lttng-modules] Add prio field to process statedump

Antoine Busque abusque at efficios.com
Sat Nov 28 23:12:46 EST 2015


From: Antoine Busque <antoine.busque at efficios.com>

This introduces a payload field named 'prio' for the process' priority
value to the lttng_statedump_process_state event. The prio field's
value corresponds to the value which would be provided by the prio
context for a given process. It is however computed directly, rather
than by calling the equivalent task_prio() function from the kernel.

Signed-off-by: Antoine Busque <abusque at efficios.com>
---
 instrumentation/events/lttng-module/lttng-statedump.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/instrumentation/events/lttng-module/lttng-statedump.h b/instrumentation/events/lttng-module/lttng-statedump.h
index 916a6c5..fa1807f 100644
--- a/instrumentation/events/lttng-module/lttng-statedump.h
+++ b/instrumentation/events/lttng-module/lttng-statedump.h
@@ -7,6 +7,7 @@
 #include "../../../probes/lttng-tracepoint-event.h"
 #include <linux/nsproxy.h>
 #include <linux/pid_namespace.h>
+#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/version.h>
 
@@ -63,6 +64,7 @@ LTTNG_TRACEPOINT_EVENT(lttng_statedump_process_state,
 				ret;
 			}))
 		ctf_array_text(char, name, p->comm, TASK_COMM_LEN)
+		ctf_integer(int, prio, p->prio - MAX_RT_PRIO)
 		ctf_integer(int, type, type)
 		ctf_integer(int, mode, mode)
 		ctf_integer(int, submode, submode)
-- 
2.6.2




More information about the lttng-dev mailing list