lkml.org 
[lkml]   [2014]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ye olde task_ctx_sched_out trace.
On Thu, May 22, 2014 at 09:52:46AM +0300, Adrian Hunter wrote:
> +/*
> + * PERF_RECORD_MISC_MMAP_DATA and PERF_RECORD_MISC_COMM_EXEC are used on
> + * different events so can reuse the same bit position.
> + */
> #define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
> +#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
> /*
> * Indicates that the content of PERF_SAMPLE_IP points to
> * the actual instruction that triggered the event. See also
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index ed50b09..760abd0 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -5067,7 +5067,7 @@ static void perf_event_comm_event(struct perf_comm_event *comm_event)
> NULL);
> }
>
> -void perf_event_comm(struct task_struct *task)
> +void perf_event_comm(struct task_struct *task, bool exec)
> {
> struct perf_comm_event comm_event;
> struct perf_event_context *ctx;
> @@ -5093,7 +5093,7 @@ void perf_event_comm(struct task_struct *task)
> .event_id = {
> .header = {
> .type = PERF_RECORD_COMM,
> - .misc = 0,
> + .misc = exec ? PERF_RECORD_MISC_COMM_EXEC : 0,
> /* .size */
> },
> /* .pid */

OK, now that you pointed out the obvious, yeah, I suppose we can do that :-)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-05-22 10:01    [W:0.117 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site