Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

handle C++ function names better #3

Merged
merged 1 commit into from Mar 1, 2012
Jump to file or symbol
Failed to load files and symbols.
+5 −0
Split
View
@@ -240,6 +240,9 @@ sub flow {
$info = "all samples ($samples samples, 100%)";
} else {
my $pct = sprintf "%.2f", ((100 * $samples) / $timemax);
+ $func =~ s/&/&/g;
+ $func =~ s/</&lt;/g;
+ $func =~ s/>/&gt;/g;
$info = "$func ($samples samples, $pct%)";
}
$im->filledRectangle($x1, $y1, $x2, $y2, color("hot"), 'rx="2" ry="2" onmouseover="s(' . "'$info'" . ')" onmouseout="c()"');
View
@@ -76,6 +76,8 @@ sub remember_stack {
my $frame = $_;
$frame =~ s/^\s*//;
$frame =~ s/\+.*$//;
+ # Remove arguments from C++ function names.
+ $frame =~ s/(..)[(<].*/$1/;
$frame = "-" if $frame eq "";
unshift @stack, $frame;
}