aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-timechart.c
diff options
context:
space:
mode:
authorStanislav Fomichev <stfomichev@yandex-team.ru>2013-11-01 12:25:48 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-27 12:58:37 -0500
commitc87097d39dae1c42a5068e00dd3b76a4162ee0fc (patch)
treea10189395b252d9f238cc0ee50f8f385a1697a25 /tools/perf/builtin-timechart.c
parent753c505dc49a87a4421d452bda048e4b93e8e42b (diff)
perf timechart: Add support for displaying only tasks related data
In order to make SVG smaller and faster to browse add possibility to switch off power related information with -T switch. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-5-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r--tools/perf/builtin-timechart.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 6410c9ead9e2..b3f175a30d94 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -51,6 +51,7 @@ static u64 turbo_frequency;
51static u64 first_time, last_time; 51static u64 first_time, last_time;
52 52
53static bool power_only; 53static bool power_only;
54static bool tasks_only;
54 55
55 56
56struct per_pid; 57struct per_pid;
@@ -971,7 +972,8 @@ static void write_svg_file(const char *filename)
971 draw_cpu_usage(); 972 draw_cpu_usage();
972 if (proc_num) 973 if (proc_num)
973 draw_process_bars(); 974 draw_process_bars();
974 draw_c_p_states(); 975 if (!tasks_only)
976 draw_c_p_states();
975 if (proc_num) 977 if (proc_num)
976 draw_wakeups(); 978 draw_wakeups();
977 979
@@ -1102,6 +1104,8 @@ int cmd_timechart(int argc, const char **argv,
1102 OPT_STRING('o', "output", &output_name, "file", "output file name"), 1104 OPT_STRING('o', "output", &output_name, "file", "output file name"),
1103 OPT_INTEGER('w', "width", &svg_page_width, "page width"), 1105 OPT_INTEGER('w', "width", &svg_page_width, "page width"),
1104 OPT_BOOLEAN('P', "power-only", &power_only, "output power data only"), 1106 OPT_BOOLEAN('P', "power-only", &power_only, "output power data only"),
1107 OPT_BOOLEAN('T', "tasks-only", &tasks_only,
1108 "output processes data only"),
1105 OPT_CALLBACK('p', "process", NULL, "process", 1109 OPT_CALLBACK('p', "process", NULL, "process",
1106 "process selector. Pass a pid or process name.", 1110 "process selector. Pass a pid or process name.",
1107 parse_process), 1111 parse_process),
@@ -1119,6 +1123,11 @@ int cmd_timechart(int argc, const char **argv,
1119 argc = parse_options(argc, argv, options, timechart_usage, 1123 argc = parse_options(argc, argv, options, timechart_usage,
1120 PARSE_OPT_STOP_AT_NON_OPTION); 1124 PARSE_OPT_STOP_AT_NON_OPTION);
1121 1125
1126 if (power_only && tasks_only) {
1127 pr_err("-P and -T options cannot be used at the same time.\n");
1128 return -1;
1129 }
1130
1122 symbol__init(); 1131 symbol__init();
1123 1132
1124 if (argc && !strncmp(argv[0], "rec", 3)) 1133 if (argc && !strncmp(argv[0], "rec", 3))