diff options
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 11 |
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; | |||
51 | static u64 first_time, last_time; | 51 | static u64 first_time, last_time; |
52 | 52 | ||
53 | static bool power_only; | 53 | static bool power_only; |
54 | static bool tasks_only; | ||
54 | 55 | ||
55 | 56 | ||
56 | struct per_pid; | 57 | struct 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)) |