[PATCH 1/3] perf timechart: fix wrong SVG height

From: Stanislav Fomichev
Date: Mon Jan 20 2014 - 06:40:20 EST


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@xxxxxxxxxxxxxx>
---
tools/perf/builtin-timechart.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 652af0b66a62..25526d6eae59 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();
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/