]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
perf timechart: Fix wrong SVG height
authorStanislav Fomichev <stfomichev@yandex-team.ru>
Mon, 20 Jan 2014 11:39:38 +0000 (15:39 +0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 20 Jan 2014 19:19:08 +0000 (16:19 -0300)
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>
tools/perf/builtin-timechart.c

index 652af0b66a625305deac34b0f18ec2e5ccf1d8f0..25526d6eae59f65a4a0405c9186d93b9cd5d3d59 100644 (file)
@@ -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();