On Mon, Jul 14, 2014 at 01:02:58PM +0300, Adrian Hunter wrote:
> Add an option to cause a selected event
> to be opened always without a pid when
> configured by perf_evsel__config().
> 
> This is needed when using the sched_switch
> tracepoint to follow object code execution.
> sched_switch occurs before the task
> switch and so it cannot record it in a
> context limited to that task.  Note
> that also means that sched_switch is
> useless when capturing data per-thread,
> as is the 'context-switches' software
> event for the same reason.
> 
> Signed-off-by: Adrian Hunter <adrian.hun...@intel.com>
> ---
>  tools/perf/util/evlist.c | 45 +++++++++++++++++++++++++++++++++++++--------
>  tools/perf/util/evsel.c  | 31 ++++++++++++++++++++++++++-----
>  tools/perf/util/evsel.h  |  1 +
>  3 files changed, 64 insertions(+), 13 deletions(-)
> 
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> index 282e83e..c295b7b 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -265,17 +265,27 @@ int perf_evlist__add_newtp(struct perf_evlist *evlist,
>       return 0;
>  }
>  
> +static int perf_evlist__nr_threads(struct perf_evlist *evlist,
> +                                struct perf_evsel *evsel)
> +{
> +     if (evsel->system_wide)
> +             return 1;
> +     else
> +             return thread_map__nr(evlist->threads);
> +}

how is 'evsel->system_wide' set?

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to