flamegraph

Fork of flamegraph without J***S*****.
git clone git://git.laack.co/flamegraph.git
Log | Files | Refs | README

commit 95cf42fb8656d3883710ab49d128803da2f22631
parent 4c7fdf3d56d20c5387e82ccdbffb501419b43737
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Thu, 29 Sep 2016 14:16:25 -0700

return <> chars, which should hopefully be escaped properly

Diffstat:
Mflamegraph.pl | 4+---
Mstackcollapse-perf.pl | 1-
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/flamegraph.pl b/flamegraph.pl @@ -570,9 +570,6 @@ foreach (sort @Data) { $maxdelta = abs($delta) if abs($delta) > $maxdelta; } - # clean up SVG breaking characters: - $stack =~ tr/<>/()/; - # 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") { @@ -1018,6 +1015,7 @@ while (my ($id, $node) = each %Node) { } else { my $pct = sprintf "%.2f", ((100 * $samples) / ($timemax * $factor)); my $escaped_func = $func; + # clean up SVG breaking characters: $escaped_func =~ s/&/&amp;/g; $escaped_func =~ s/</&lt;/g; $escaped_func =~ s/>/&gt;/g; diff --git a/stackcollapse-perf.pl b/stackcollapse-perf.pl @@ -226,7 +226,6 @@ while (defined($_ = <>)) { if ($tidy_generic) { $func =~ s/;/:/g; - $func =~ tr/<>//d; if ($func !~ m/\.\(.*\)\./) { # This doesn't look like a Go method name (such as # "net/http.(*Client).Do"), so everything after the first open