commit 862074c1a1d397e1abbbb7e22f1ca0ab7688b148
parent ef645645a3fe814f155e3b6bb6446d1c10c7c2e1
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date: Mon, 16 Jan 2017 16:40:56 -0800
change whole stack delimiter to be -- and user/kernel delimeter to be -
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/flamegraph.pl b/flamegraph.pl
@@ -573,16 +573,16 @@ foreach (sort @Data) {
# 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:
@@ -968,11 +968,12 @@ my $inc = <<INC;
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"');
@@ -1040,8 +1041,10 @@ while (my ($id, $node) = each %Node) {
$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) {