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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
54874e3236
commit
753c505dc4
@@ -912,7 +912,7 @@ static int determine_display_tasks(u64 threshold)
|
|||||||
/* no exit marker, task kept running to the end */
|
/* no exit marker, task kept running to the end */
|
||||||
if (p->end_time == 0)
|
if (p->end_time == 0)
|
||||||
p->end_time = last_time;
|
p->end_time = last_time;
|
||||||
if (p->total_time >= threshold && !power_only)
|
if (p->total_time >= threshold)
|
||||||
p->display = 1;
|
p->display = 1;
|
||||||
|
|
||||||
c = p->all;
|
c = p->all;
|
||||||
@@ -923,7 +923,7 @@ static int determine_display_tasks(u64 threshold)
|
|||||||
if (c->start_time == 1)
|
if (c->start_time == 1)
|
||||||
c->start_time = first_time;
|
c->start_time = first_time;
|
||||||
|
|
||||||
if (c->total_time >= threshold && !power_only) {
|
if (c->total_time >= threshold) {
|
||||||
c->display = 1;
|
c->display = 1;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@@ -950,6 +950,8 @@ static void write_svg_file(const char *filename)
|
|||||||
|
|
||||||
numcpus++;
|
numcpus++;
|
||||||
|
|
||||||
|
if (power_only)
|
||||||
|
proc_num = 0;
|
||||||
|
|
||||||
/* We'd like to show at least proc_num tasks;
|
/* We'd like to show at least proc_num tasks;
|
||||||
* be less picky if we have fewer */
|
* be less picky if we have fewer */
|
||||||
@@ -967,9 +969,11 @@ static void write_svg_file(const char *filename)
|
|||||||
svg_cpu_box(i, max_freq, turbo_frequency);
|
svg_cpu_box(i, max_freq, turbo_frequency);
|
||||||
|
|
||||||
draw_cpu_usage();
|
draw_cpu_usage();
|
||||||
draw_process_bars();
|
if (proc_num)
|
||||||
|
draw_process_bars();
|
||||||
draw_c_p_states();
|
draw_c_p_states();
|
||||||
draw_wakeups();
|
if (proc_num)
|
||||||
|
draw_wakeups();
|
||||||
|
|
||||||
svg_close();
|
svg_close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user