lkml.org 
[lkml]   [2014]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] perf tools: Set attr.task bit for a tracking event
Em Mon, Dec 22, 2014 at 01:44:15PM +0900, Namhyung Kim escreveu:
> The perf_event_attr.task bit is to track task (fork and exit) events
> but it missed to be set by perf_evsel__config(). While it was not a
> problem in practice since setting other bits (comm/mmap) ended up
> being in same result, it'd be good to set it explicitly anyway.

I didn't understand, so this isn't strictly needed? I.e. what is the
point of the attr->task bit then?

/me goes to check...

- Arnaldo

> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/evsel.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 1e90c8557ede..e17d2b1624bc 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -709,6 +709,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
> if (opts->sample_weight)
> perf_evsel__set_sample_bit(evsel, WEIGHT);
>
> + attr->task = track;
> attr->mmap = track;
> attr->mmap2 = track && !perf_missing_features.mmap2;
> attr->comm = track;
> --
> 2.1.3


\
 
 \ /
  Last update: 2014-12-22 16:01    [W:0.187 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site