aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-05-07 14:09:03 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-07 17:52:05 -0300
commitd67356e7f80f5c2ef487bedc11a91d5fe18c5a15 (patch)
tree4aa72408deba73d07cc8232ecb43a3782acb2ab7 /tools/perf/builtin-record.c
parentperf tools: Introduce perf_target__strerror() (diff)
downloadlinux-dev-d67356e7f80f5c2ef487bedc11a91d5fe18c5a15.tar.xz
linux-dev-d67356e7f80f5c2ef487bedc11a91d5fe18c5a15.zip
perf target: Consolidate target task/cpu checking
There are places that check whether target task/cpu is given or not and some of them didn't check newly introduced uid or cpu list. Add and use three of helper functions to treat them properly. Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Reviewed-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1336367344-28071-7-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index c8bf6ea000da..42e24149c791 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -843,9 +843,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
argc = parse_options(argc, argv, record_options, record_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
- if (!argc && !rec->opts.target.pid && !rec->opts.target.tid &&
- !rec->opts.target.system_wide && !rec->opts.target.cpu_list &&
- !rec->opts.target.uid_str)
+ if (!argc && perf_target__none(&rec->opts.target))
usage_with_options(record_usage, record_options);
if (rec->force && rec->append_file) {