1. Config LEDE/OpenWRT with
- CONFIG_PACKAGE_perf=y
- CONFIG_KERNEL_PERF_EVENTS=y
2. Add dynamic probe with external modules
1 2 3 4 | $ perf probe -a -m /lib/modules/4.9.109/ath9k.ko 'ath_tx*' $ perf probe -a -m /lib/modules/4.9.109/ath9k.ko 'ath9k_wake_tx_queue' $ perf probe -a -m /lib/modules/4.9.109/mac80211.ko 'fq_*' $ perf probe -a -m /lib/modules/4.9.109/mac80211.ko 'ieee80211_tx*' |
3. Perf Recording
1 2 | # Sample CPU stack traces, only with "probe:" events, by ping, with timestamp $ perf record -agT -e 'probe:*' ping 192.168.1.150 > /dev/null |
4. Perf Reporting
1 2 3 4 5 6 7 8 9 10 11 | # Show perf.data in an ncurses browser (TUI) if possible: $ perf report # Show perf.data by function graph: $ perf report -g # List all events from perf.data: perf script # List all perf.data events, with customized fields (>= Linux 4.1): perf script -F time,event,trace |
5. References
如果你覺得這篇文章不錯,歡迎打賞
BTH: 35QooNA82isrmQLmpEnqXpJoxeZmaPubPf
ETH:0x4cf61fea5EA842D202B85158d8b5e239C872De46