Skip to content

Commit a8d807a

Browse files
committed
fix #125
1 parent 8f2e64e commit a8d807a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flamegraph.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ sub usage {
182182
$help && usage();
183183

184184
# internals
185-
my $ypad1 = $fontsize * 4; # pad top, include title
185+
my $ypad1 = $fontsize * 3; # pad top, include title
186186
my $ypad2 = $fontsize * 2 + 10; # pad bottom, include labels
187-
my $ypad3 = $fontsize * 2 + 1; # pad top, include subtitle (optional)
187+
my $ypad3 = $fontsize * 2; # pad top, include subtitle (optional)
188188
my $xpad = 10; # pad lefm and right
189189
my $framepad = 1; # vertical padding for frames
190190
my $depthmax = 0;
@@ -678,7 +678,7 @@ sub flow {
678678
}
679679

680680
# draw canvas, and embed interactive JavaScript program
681-
my $imageheight = ($depthmax * $frameheight) + $ypad1 + $ypad2;
681+
my $imageheight = (($depthmax + 1) * $frameheight) + $ypad1 + $ypad2;
682682
$imageheight += $ypad3 if $subtitletext ne "";
683683
my $im = SVG->new();
684684
$im->header($imagewidth, $imageheight);

0 commit comments

Comments
 (0)