[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877gcnz4b5.fsf@sejong.aot.lge.com>
Date: Tue, 05 Nov 2013 16:38:22 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Adrian Hunter <adrian.hunter@...el.com>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH] perf tools: Allow multiple cpus record for -p option
On Fri, 1 Nov 2013 16:52:45 +0100, Jiri Olsa wrote:
> Currently we don't create default CPU map for task related
> target, like:
>
> $ perf record -p <pid>
>
> This makes record command to disable inherited events.
> which is not desired behaviour (we have special option
> for that (-i) anyway).
>
> Fixing this by creating default CPU map for task related
> processes.
>
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
> Cc: David Ahern <dsahern@...il.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
> tools/perf/util/evlist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> index 0582f67..52bb127 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -804,7 +804,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist,
> return -1;
>
> if (perf_target__has_task(target))
> - evlist->cpus = cpu_map__dummy_new();
> + evlist->cpus = cpu_map__new(target->cpu_list);
Just a side note, if the target has task, the cpu list should be NULL as
task target has a precedence. Please see perf_target__validate().
But I'm fine with the change itself. :)
Thanks,
Namhyung
> else if (!perf_target__has_cpu(target) && !target->uses_mmap)
> evlist->cpus = cpu_map__dummy_new();
> else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists