From: Arnaldo Carvalho de Melo Date: Tue, 8 May 2012 13:47:09 +0000 (-0300) Subject: perf top: Default to system wide using perf_target methods X-Git-Tag: v3.5-rc1~120^3~40^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80eebd94d2090cf9e13ecdc305a0cf7996fa0070;p=profile%2Fcommon%2Fkernel-common.git perf top: Default to system wide using perf_target methods Additionally we were not checking if a cpu list had been provided by the user. Fix that. Reported-by: David Ahern Reported-by: Namhyung Kim Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-ao3zrouylwmt7h9ikj0krubi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index e4ca827..c53cdab 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1270,8 +1270,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) goto out_delete_evlist; } - if (top.target.tid == 0 && top.target.pid == 0 && - top.target.uid_str == NULL) + if (perf_target__none(&top.target)) top.target.system_wide = true; if (perf_evlist__create_maps(top.evlist, &top.target) < 0)