From d67356e7f80f5c2ef487bedc11a91d5fe18c5a15 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 7 May 2012 14:09:03 +0900 Subject: 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 Reviewed-by: David Ahern Cc: David Ahern Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1336367344-28071-7-git-send-email-namhyung.kim@lge.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tools/perf/builtin-record.c') diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index c8bf6ea..42e2414 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) { -- cgit v1.1