Skip to content

Commit 3415d8b

Browse files
Stanislav Fomichevacmel
authored andcommitted
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 <stfomichev@yandex-team.ru> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@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/1390217980-22424-2-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 45e6af0 commit 3415d8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/perf/builtin-timechart.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,9 @@ static void write_svg_file(struct timechart *tchart, const char *filename)
10451045
thresh /= 10;
10461046
} while (!process_filter && thresh && count < tchart->proc_num);
10471047

1048+
if (!tchart->proc_num)
1049+
count = 0;
1050+
10481051
open_svg(filename, tchart->numcpus, count, tchart->first_time, tchart->last_time);
10491052

10501053
svg_time_grid();

0 commit comments

Comments
 (0)