Skip to content

Commit

Permalink
improve kernel annotation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Jul 30, 2017
1 parent e7441fd commit 99972c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion stackcollapse-perf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,12 @@ sub inline {
# detect kernel from the module name; eg, frames to parse include:
# ffffffff8103ce3b native_safe_halt ([kernel.kallsyms])
# 8c3453 tcp_sendmsg (/lib/modules/4.3.0-rc1-virtual/build/vmlinux)
# 7d8 ipv4_conntrack_local+0x7f8f80b8 ([nf_conntrack_ipv4])
# detect jit from the module name; eg:
# 7f722d142778 Ljava/io/PrintStream;::print (/tmp/perf-19982.map)
if (scalar(@inline) > 0) {
$func .= "_[i]"; # inlined
} elsif ($annotate_kernel == 1 && $mod =~ m/(kernel\.|vmlinux$)/) {
} elsif ($annotate_kernel == 1 && $mod =~ m/(^\[|vmlinux$)/ && $mod !~ /unknown/) {
$func .= "_[k]"; # kernel
} elsif ($annotate_jit == 1 && $mod =~ m:/tmp/perf-\d+\.map:) {
$func .= "_[j]"; # jitted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
iperf;[unknown];[iperf] 1
iperf;[unknown];[iperf];__vdso_gettimeofday 1
iperf;[unknown];[iperf];__vdso_gettimeofday_[k] 1
iperf;[unknown];[libpthread-2.19.so];entry_SYSCALL_64_fastpath_[k];__fdget_pos_[k] 1
iperf;[unknown];[libpthread-2.19.so];entry_SYSCALL_64_fastpath_[k];sys_write_[k];vfs_write_[k];__vfs_write_[k];sock_write_iter_[k];sock_sendmsg_[k];inet_sendmsg_[k];copy_from_iter_[k] 1
iperf;[unknown];[libpthread-2.19.so];entry_SYSCALL_64_fastpath_[k];sys_write_[k];vfs_write_[k];__vfs_write_[k];sock_write_iter_[k];sock_sendmsg_[k];inet_sendmsg_[k];release_sock_[k] 1
Expand Down

0 comments on commit 99972c0

Please sign in to comment.