mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] perf tools: Allow multiple cpus record for -p option
Date: Tue, 05 Nov 2013 16:38:22 +0900	[thread overview]
Message-ID: <877gcnz4b5.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1383321165-25252-1-git-send-email-jolsa@redhat.com> (Jiri Olsa's message of "Fri, 1 Nov 2013 16:52:45 +0100")

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@redhat.com>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.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

      reply	other threads:[~2013-11-05  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 15:52 Jiri Olsa
2013-11-05  7:38 ` Namhyung Kim [this message]

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=877gcnz4b5.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /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

all inboxes | Powered by JetHome®