Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] sched_process_exec
Date: Thu, 11 Oct 2012 10:58:55 -0400	[thread overview]
Message-ID: <20121011145855.GA11726@Krystal> (raw)
In-Reply-To: <50769060.7070309@mentor.com>

* Woegerer, Paul (Paul_Woegerer at mentor.com) wrote:
> 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).

Hi Paul,

The only reason is because it appeared in a later kernel than the one
used when generating the lttng-modules trace event instrumentation.

A couple a details to fix before I can merge this patch though:

Please also update instrumentation/events/mainline/sched.h to add the
original mainline TRACE_EVENT, so we can keep the files in sync.

>
> 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);

Please remove the ";" above.

> +               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

A newline has been added by your mail client, which causes the patch to
not apply correctly.

Hints on how to configure mail clients for sending patches can be looked
up in the Linux kernel tree, under Documentation/email-clients.txt

Thanks!

Mathieu

>   *     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.
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



  reply	other threads:[~2012-10-11 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11  9:24 Woegerer, Paul
2012-10-11 14:58 ` Mathieu Desnoyers [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121011145855.GA11726@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox