Permalink
Browse files

fix #125

  • Loading branch information...
1 parent 8f2e64e commit a8d807a11c0f22871134324bda709618ca482b58 @brendangregg committed Aug 18, 2017
Showing with 3 additions and 3 deletions.
  1. +3 −3 flamegraph.pl
View
@@ -182,9 +182,9 @@ sub usage {
$help && usage();
# internals
-my $ypad1 = $fontsize * 4; # pad top, include title
+my $ypad1 = $fontsize * 3; # pad top, include title
my $ypad2 = $fontsize * 2 + 10; # pad bottom, include labels
-my $ypad3 = $fontsize * 2 + 1; # pad top, include subtitle (optional)
+my $ypad3 = $fontsize * 2; # pad top, include subtitle (optional)
my $xpad = 10; # pad lefm and right
my $framepad = 1; # vertical padding for frames
my $depthmax = 0;
@@ -678,7 +678,7 @@ sub flow {
}
# draw canvas, and embed interactive JavaScript program
-my $imageheight = ($depthmax * $frameheight) + $ypad1 + $ypad2;
+my $imageheight = (($depthmax + 1) * $frameheight) + $ypad1 + $ypad2;
$imageheight += $ypad3 if $subtitletext ne "";
my $im = SVG->new();
$im->header($imagewidth, $imageheight);

1 comment on commit a8d807a

Hi, Brendangregg. I have a question about flamegraph. If I collect more than one events using perf record, can I got different types of svgs using the flamegraph.pl, like cycles.svg, context-switches.svg, instructions.svg. Now, I just found the flamegraph.pl can filter different events except "cycles".

Please sign in to comment.