diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index e4ca827f687916064eb1559cd526043ea16b1537..c53cdab6143331d37934fe2eb1fe89bee146a731 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)