Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] sched_process_exec
@ 2012-10-11  9:24 Woegerer, Paul
  2012-10-11 14:58 ` Mathieu Desnoyers
  0 siblings, 1 reply; 6+ messages in thread
From: Woegerer, Paul @ 2012-10-11  9:24 UTC (permalink / raw)


Hi,

Is there a reason why instrumentation/events/lttng-module/sched.h does 
not include TRACE_EVENT(sched_process_exec) ?

The patch below adds the missing tracepoint definition (tested with 
kernel 3.4.6-2.10).

diff --git a/instrumentation/events/lttng-module/sched.h 
b/instrumentation/events/lttng-module/sched.h
index b68616e..ef791ac 100644
--- a/instrumentation/events/lttng-module/sched.h
+++ b/instrumentation/events/lttng-module/sched.h
@@ -314,6 +314,32 @@ TRACE_EVENT(sched_process_fork,
  )

  /*
+ * Tracepoint for exec:
+ */
+TRACE_EVENT(sched_process_exec,
+
+       TP_PROTO(struct task_struct *p, pid_t old_pid,
+                struct linux_binprm *bprm),
+
+       TP_ARGS(p, old_pid, bprm),
+
+       TP_STRUCT__entry(
+               __string(       filename,       bprm->filename  )
+               __field(        pid_t,          pid             )
+               __field(        pid_t,          old_pid         )
+       ),
+
+       TP_fast_assign(
+               tp_strcpy(filename, bprm->filename);
+               tp_assign(pid, p->pid)
+               tp_assign(old_pid, old_pid)
+       ),
+
+       TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename),
+                 __entry->pid, __entry->old_pid)
+)
+
+/*
   * XXX the below sched_stat tracepoints only apply to 
SCHED_OTHER/BATCH/IDLE
   *     adding sched_stat support to SCHED_FIFO/RR would be welcome.
   */

-- 
Paul Woegerer | SW Development Engineer
http://go.mentor.com/sourceryanalyzer

Mentor Embedded(tm) | Prinz Eugen Stra?e 72/2/4, Vienna, 1040 Austria
Nucleus? | Linux? | Android(tm) | Services | UI | Multi-OS

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-12 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11  9:24 [lttng-dev] sched_process_exec Woegerer, Paul
2012-10-11 14:58 ` Mathieu Desnoyers
2012-10-11 15:28   ` Woegerer, Paul
2012-10-11 16:07     ` Mathieu Desnoyers
2012-10-12 12:12       ` Woegerer, Paul
2012-10-12 14:20         ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox