From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752880Ab3KEHiZ (ORCPT ); Tue, 5 Nov 2013 02:38:25 -0500 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:47713 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791Ab3KEHiY (ORCPT ); Tue, 5 Nov 2013 02:38:24 -0500 X-AuditID: 9c930179-b7c44ae000000c83-2b-5278a06e3d39 From: Namhyung Kim To: Jiri Olsa Cc: linux-kernel@vger.kernel.org, Adrian Hunter , Corey Ashford , David Ahern , Frederic Weisbecker , Ingo Molnar , Paul Mackerras , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: Re: [PATCH] perf tools: Allow multiple cpus record for -p option References: <1383321165-25252-1-git-send-email-jolsa@redhat.com> Date: Tue, 05 Nov 2013 16:38:22 +0900 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") Message-ID: <877gcnz4b5.fsf@sejong.aot.lge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 > Cc: Adrian Hunter > Cc: Corey Ashford > Cc: David Ahern > Cc: Frederic Weisbecker > Cc: Ingo Molnar > Cc: Namhyung Kim > Cc: Paul Mackerras > Cc: Peter Zijlstra > Cc: Arnaldo Carvalho de Melo > --- > 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