From: Stanislav Fomichev Date: Mon, 20 Jan 2014 11:39:38 +0000 (+0400) Subject: perf timechart: Fix wrong SVG height X-Git-Tag: v3.14-rc2~4^2~3^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3415d8b851307c75a1e8aa16030db9172306df78;p=profile%2Fivi%2Fkernel-x86-ivi.git perf timechart: Fix wrong SVG height If we call perf timechart with -p 0 arguments, it means we don't want any tasks related data. It works, but space for tasks data is reserved in the generated SVG. Remove this unused empty space via passing 0 as count to the open_svg. Signed-off-by: Stanislav Fomichev Cc: Adrian Hunter Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1390217980-22424-2-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 652af0b..25526d6 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -1045,6 +1045,9 @@ static void write_svg_file(struct timechart *tchart, const char *filename) thresh /= 10; } while (!process_filter && thresh && count < tchart->proc_num); + if (!tchart->proc_num) + count = 0; + open_svg(filename, tchart->numcpus, count, tchart->first_time, tchart->last_time); svg_time_grid();