aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2012-05-08 10:47:09 -0300
committerArnaldo Carvalho de Melo <[email protected]>2012-05-08 10:47:09 -0300
commit80eebd94d2090cf9e13ecdc305a0cf7996fa0070 (patch)
treeaed1f5415ef00c4c9c04a3634a970171609d8122
parent77a6f014e9ae330c747c66bebfddf29abf9b89e9 (diff)
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 <[email protected]> Reported-by: Namhyung Kim <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/builtin-top.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index e4ca827f6879..c53cdab61433 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)