Skip to content

Commit 71e5a78

Browse files
timbuncebrendangregg
authored andcommitted
Fix search to work if the nameattr href is being used
1 parent a1849b1 commit 71e5a78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flamegraph.pl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,13 @@ sub flow {
796796
func = func.substr(3);
797797
func = func.replace(/ .*/, "");
798798
var r = find_child(e, "rect");
799+
if (r == null) {
800+
// the rect might be wrapped in an anchor
801+
// if nameattr href is being used
802+
if (r = find_child(e, "a")) {
803+
r = find_child(r, "rect");
804+
}
805+
}
799806
}
800807
if (func != null && r != null &&
801808
func.match(re)) {

0 commit comments

Comments
 (0)