Skip to content

Commit

Permalink
fix #125
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Aug 18, 2017
1 parent 8f2e64e commit a8d807a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

1 comment on commit a8d807a

@ufo19890607
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.