Skip to content

Commit

Permalink
Simplify regexp in stackcollapse-perf.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg authored Nov 7, 2023
1 parent 208c495 commit 4bdf606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stackcollapse-perf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ sub inline {
# detect jit from the module name; eg:
# 7f722d142778 Ljava/io/PrintStream;::print (/tmp/perf-19982.map)
if (scalar(@inline) > 0) {
$func .= "_[i]" unless $func =~ m/.*.\_\[i\]/; # inlined
$func .= "_[i]" unless $func =~ m/\_\[i\]/; # inlined
} elsif ($annotate_kernel == 1 && $mod =~ m/(^\[|vmlinux$)/ && $mod !~ /unknown/) {
$func .= "_[k]"; # kernel
} elsif ($annotate_jit == 1 && $mod =~ m:/tmp/perf-\d+\.map:) {
$func .= "_[j]" unless $func =~ m/.*.\_\[j\]/; # jitted
$func .= "_[j]" unless $func =~ m/\_\[j\]/; # jitted
}

#
Expand Down

0 comments on commit 4bdf606

Please sign in to comment.