Skip to content

Commit

Permalink
perf top: Default to system wide using perf_target methods
Browse files Browse the repository at this point in the history
Additionally we were not checking if a cpu list had been provided by the
user. Fix that.

Reported-by: David Ahern <dsahern@gmail.com>
Reported-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ao3zrouylwmt7h9ikj0krubi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed May 8, 2012
1 parent 77a6f01 commit 80eebd9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 80eebd9

Please sign in to comment.