diff options
author | Stanislav Fomichev <stfomichev@yandex-team.ru> | 2013-11-01 12:25:47 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-27 12:58:36 -0500 |
commit | 753c505dc49a87a4421d452bda048e4b93e8e42b (patch) | |
tree | 9a7e1d71da78f36c7f8a82d98cb28711bbedd47b /tools | |
parent | 54874e3236b834064943c02a647823ab5d97be57 (diff) |
perf timechart: Use proc_num to implement --power-only
Don't use special flag to indicate power-only mode, just set proc_num to
0.
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-4-git-send-email-stfomichev@yandex-team.ru
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-timechart.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index c352be418f98..6410c9ead9e2 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c | |||
@@ -912,7 +912,7 @@ static int determine_display_tasks(u64 threshold) | |||
912 | /* no exit marker, task kept running to the end */ | 912 | /* no exit marker, task kept running to the end */ |
913 | if (p->end_time == 0) | 913 | if (p->end_time == 0) |
914 | p->end_time = last_time; | 914 | p->end_time = last_time; |
915 | if (p->total_time >= threshold && !power_only) | 915 | if (p->total_time >= threshold) |
916 | p->display = 1; | 916 | p->display = 1; |
917 | 917 | ||
918 | c = p->all; | 918 | c = p->all; |
@@ -923,7 +923,7 @@ static int determine_display_tasks(u64 threshold) | |||
923 | if (c->start_time == 1) | 923 | if (c->start_time == 1) |
924 | c->start_time = first_time; | 924 | c->start_time = first_time; |
925 | 925 | ||
926 | if (c->total_time >= threshold && !power_only) { | 926 | if (c->total_time >= threshold) { |
927 | c->display = 1; | 927 | c->display = 1; |
928 | count++; | 928 | count++; |
929 | } | 929 | } |
@@ -950,6 +950,8 @@ static void write_svg_file(const char *filename) | |||
950 | 950 | ||
951 | numcpus++; | 951 | numcpus++; |
952 | 952 | ||
953 | if (power_only) | ||
954 | proc_num = 0; | ||
953 | 955 | ||
954 | /* We'd like to show at least proc_num tasks; | 956 | /* We'd like to show at least proc_num tasks; |
955 | * be less picky if we have fewer */ | 957 | * be less picky if we have fewer */ |
@@ -967,9 +969,11 @@ static void write_svg_file(const char *filename) | |||
967 | svg_cpu_box(i, max_freq, turbo_frequency); | 969 | svg_cpu_box(i, max_freq, turbo_frequency); |
968 | 970 | ||
969 | draw_cpu_usage(); | 971 | draw_cpu_usage(); |
970 | draw_process_bars(); | 972 | if (proc_num) |
973 | draw_process_bars(); | ||
971 | draw_c_p_states(); | 974 | draw_c_p_states(); |
972 | draw_wakeups(); | 975 | if (proc_num) |
976 | draw_wakeups(); | ||
973 | 977 | ||
974 | svg_close(); | 978 | svg_close(); |
975 | } | 979 | } |