summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2c1c207627b..4f47952eddb 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1252,21 +1252,12 @@ int cmd_top(int argc, const char **argv, const char *prefix __used)
setup_browser(false);
- top.target.uid = parse_target_uid(top.target.uid_str, top.target.tid,
- top.target.pid);
+ perf_target__validate(&top.target);
+
+ top.target.uid = parse_target_uid(top.target.uid_str);
if (top.target.uid_str != NULL && top.target.uid == UINT_MAX - 1)
goto out_delete_evlist;
- /* CPU and PID are mutually exclusive */
- if (top.target.tid && top.target.cpu_list) {
- printf("WARNING: PID switch overriding CPU\n");
- sleep(1);
- top.target.cpu_list = NULL;
- }
-
- if (top.target.pid)
- top.target.tid = top.target.pid;
-
if (perf_evlist__create_maps(top.evlist, top.target.pid,
top.target.tid, top.target.uid,
top.target.cpu_list) < 0)