aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2016-12-05 22:40:01 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-12-07 10:00:33 -0500
commit6fa94258ce2673adc707b2ec5668464f2cf83ed3 (patch)
tree57313c59db3007d7009075a72828f6f330ba6064 /tools/perf
parentf45bf8d3939d8f32f06ec12e56d2b8651c5437b4 (diff)
perf sched: Cleanup option processing
The -D/--dump-raw-trace option is in the parent option so no need to repeat it. Also move -f/--force option to parent as it's common to handle data file. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: David Ahern <dsahern@gmail.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20161206034010.6499-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-sched.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 84c39f177bef..634d8cfb4693 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -2583,6 +2583,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
2583 struct perf_data_file file = { 2583 struct perf_data_file file = {
2584 .path = input_name, 2584 .path = input_name,
2585 .mode = PERF_DATA_MODE_READ, 2585 .mode = PERF_DATA_MODE_READ,
2586 .force = sched->force,
2586 }; 2587 };
2587 2588
2588 struct perf_session *session; 2589 struct perf_session *session;
@@ -2988,6 +2989,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
2988 "be more verbose (show symbol address, etc)"), 2989 "be more verbose (show symbol address, etc)"),
2989 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, 2990 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
2990 "dump raw trace in ASCII"), 2991 "dump raw trace in ASCII"),
2992 OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
2991 OPT_END() 2993 OPT_END()
2992 }; 2994 };
2993 const struct option latency_options[] = { 2995 const struct option latency_options[] = {
@@ -2995,8 +2997,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
2995 "sort by key(s): runtime, switch, avg, max"), 2997 "sort by key(s): runtime, switch, avg, max"),
2996 OPT_INTEGER('C', "CPU", &sched.profile_cpu, 2998 OPT_INTEGER('C', "CPU", &sched.profile_cpu,
2997 "CPU to profile on"), 2999 "CPU to profile on"),
2998 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
2999 "dump raw trace in ASCII"),
3000 OPT_BOOLEAN('p', "pids", &sched.skip_merge, 3000 OPT_BOOLEAN('p', "pids", &sched.skip_merge,
3001 "latency stats per pid instead of per comm"), 3001 "latency stats per pid instead of per comm"),
3002 OPT_PARENT(sched_options) 3002 OPT_PARENT(sched_options)
@@ -3004,9 +3004,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
3004 const struct option replay_options[] = { 3004 const struct option replay_options[] = {
3005 OPT_UINTEGER('r', "repeat", &sched.replay_repeat, 3005 OPT_UINTEGER('r', "repeat", &sched.replay_repeat,
3006 "repeat the workload replay N times (-1: infinite)"), 3006 "repeat the workload replay N times (-1: infinite)"),
3007 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
3008 "dump raw trace in ASCII"),
3009 OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
3010 OPT_PARENT(sched_options) 3007 OPT_PARENT(sched_options)
3011 }; 3008 };
3012 const struct option map_options[] = { 3009 const struct option map_options[] = {