Messages in this thread Patch in this message |  | | From | Stanislav Fomichev <> | Subject | [PATCH 4/7] perf timechart: add support for displaying only tasks related data | Date | Fri, 1 Nov 2013 20:25:48 +0400 |
| |
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> --- tools/perf/Documentation/perf-timechart.txt | 3 +++ tools/perf/builtin-timechart.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-timechart.txt b/tools/perf/Documentation/perf-timechart.txt index 919cbe9ce428..a79d473394f6 100644 --- a/tools/perf/Documentation/perf-timechart.txt +++ b/tools/perf/Documentation/perf-timechart.txt @@ -34,6 +34,9 @@ OPTIONS -P:: --power-only:: Only output the CPU power section of the diagram +-T:: +--tasks-only:: + Don't output processor state transitions -p:: --process:: Select the processes to display, by name or PID diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 74c040abb3af..7819006387f0 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -50,6 +50,7 @@ static u64 turbo_frequency; static u64 first_time, last_time; static bool power_only; +static bool tasks_only; struct per_pid; @@ -970,7 +971,8 @@ static void write_svg_file(const char *filename) draw_cpu_usage(); if (proc_num) draw_process_bars(); - draw_c_p_states(); + if (!tasks_only) + draw_c_p_states(); if (proc_num) draw_wakeups(); @@ -1096,6 +1098,8 @@ int cmd_timechart(int argc, const char **argv, OPT_STRING('o', "output", &output_name, "file", "output file name"), OPT_INTEGER('w', "width", &svg_page_width, "page width"), OPT_BOOLEAN('P', "power-only", &power_only, "output power data only"), + OPT_BOOLEAN('T', "tasks-only", &tasks_only, + "output processes data only"), OPT_CALLBACK('p', "process", NULL, "process", "process selector. Pass a pid or process name.", parse_process), @@ -1113,6 +1117,11 @@ int cmd_timechart(int argc, const char **argv, argc = parse_options(argc, argv, options, timechart_usage, PARSE_OPT_STOP_AT_NON_OPTION); + if (power_only && tasks_only) { + pr_err("-P and -T options cannot be used at the same time.\n"); + return -1; + } + symbol__init(); if (argc && !strncmp(argv[0], "rec", 3)) -- 1.8.3.2
|  |