Re: [PATCH 2/3] perf stat: Don't require a workload when using systemwide or CPU options

From: David Ahern
Date: Mon Sep 30 2013 - 09:40:30 EST


This is a multi-part message in MIME format.On 9/30/13 2:47 AM, Namhyung Kim wrote:
@@ -1517,8 +1517,10 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
} else if (big_num_opt == 0) /* User passed --no-big-num */
big_num = false;

- if (!argc && !perf_target__has_task(&target))
+ if (!argc && !perf_target__has_task(&target) &&
+ !perf_target__has_cpu(&target))

You can use perf_target__none() for this.

Indeed. Updated patch attached.

David