Skip to content

Commit

Permalink
change whole stack delimiter to be -- and user/kernel delimeter to be -
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Jan 17, 2017
1 parent ef64564 commit 862074c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -573,16 +573,16 @@ sub flow {
# for chain graphs, annotate waker frames with "_[w]", for later
# coloring. This is a hack, but has a precedent ("_[k]" from perf).
if ($colors eq "chain") {
my @parts = split ";-;", $stack;
my @parts = split ";--;", $stack;
my @newparts = ();
$stack = shift @parts;
$stack .= ";-;";
$stack .= ";--;";
foreach my $part (@parts) {
$part =~ s/;/_[w];/g;
$part .= "_[w]";
push @newparts, $part;
}
$stack .= join ";-;", @parts;
$stack .= join ";--;", @parts;
}

# merge frames and populate %Node:
Expand Down Expand Up @@ -968,11 +968,12 @@ sub flow {
INC
$im->include($inc);
$im->filledRectangle(0, 0, $imagewidth, $imageheight, 'url(#background)');
my ($white, $black, $vvdgrey, $vdgrey) = (
my ($white, $black, $vvdgrey, $vdgrey, $dgrey) = (
$im->colorAllocate(255, 255, 255),
$im->colorAllocate(0, 0, 0),
$im->colorAllocate(40, 40, 40),
$im->colorAllocate(160, 160, 160),
$im->colorAllocate(200, 200, 200),
);
$im->stringTTF($black, $fonttype, $fontsize + 5, 0.0, int($imagewidth / 2), $fontsize * 2, $titletext, "middle");
$im->stringTTF($black, $fonttype, $fontsize, 0.0, $xpad, $imageheight - ($ypad2 / 2), " ", "", 'id="details"');
Expand Down Expand Up @@ -1040,8 +1041,10 @@ sub flow {
$im->group_start($nameattr);

my $color;
if ($func eq "-") {
if ($func eq "--") {
$color = $vdgrey;
} elsif ($func eq "-") {
$color = $dgrey;
} elsif (defined $delta) {
$color = color_scale($delta, $maxdelta);
} elsif ($palette) {
Expand Down

0 comments on commit 862074c

Please sign in to comment.