brendangregg / perf-tools

Performance analysis tools based on Linux perf_events (aka perf) and ftrace
GNU General Public License v2.0
9.9k stars 1.65k forks source link

“perf script -F +insn” doesn't print insn field #96

Open QingYuDanYan opened 4 years ago

QingYuDanYan commented 4 years ago

After collecting perf data using perf record, I use perf script -i perf.data -F +insn to get the collected data. But there is nothing in the insn field.

perf 32224 15889777.194652: 1 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: perf 32224 15889777.194654: 1 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: perf 32224 15889777.194655: 11 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: perf 32224 15889777.194657: 285 cycles:ppp: ffffffff8826e44a native_write_msr ([kernel.kallsyms]) insn: perf 32224 15889777.194658: 7550 cycles:ppp: ffffffff88237a58 native_sched_clock ([kernel.kallsyms]) insn: sh 32224 15889777.194660: 191221 cycles:ppp: ffffffff886219bd apparmor_bprm_committing_creds ([kernel.kallsyms]) insn: sh 32224 15889777.194707: 2700450 cycles:ppp: 7fc66bd036d7 [unknown] (/lib/x86_64-linux-gnu/ld-2.27.so) insn: sh 32225 15889777.195051: 1 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: sh 32225 15889777.195054: 1 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: sh 32225 15889777.195055: 13 cycles:ppp: ffffffff8826e448 native_write_msr ([kernel.kallsyms]) insn: sh 32225 15889777.195056: 302 cycles:ppp: ffffffff8826e44a native_write_msr ([kernel.kallsyms]) insn: sh 32225 15889777.195057: 7713 cycles:ppp: ffffffff88237a58 native_sched_clock ([kernel.kallsyms]) insn: sh 32225 15889777.195060: 192158 cycles:ppp: ffffffff88418cdb __handle_mm_fault ([kernel.kallsyms]) insn: sh 32225 15889777.195119: 2580729 cycles:ppp: ffffffff88ba9d97 clear_page_erms ([kernel.kallsyms]) insn:

Is it a bug or just because I use it in wrong way?