我一直在尝试(成功的)例子 http://www.brendangregg.com/perf.html#DynamicTracingEg
然后,当我尝试调整示例以跟踪
函数tp->snd_cwnd_clamp
中的变量tcp_cong_avoid_ai
,
即使在变量中列出了perf,也无法设法跟踪该变量
可能的变量:
(ins)[nix-shell:~/bitset]$ sudo perf --debug verbose probe -k /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux -s /home/teto/mptcp -V 'tcp_cong_avoid_ai'
probe-definition(0): tcp_cong_avoid_ai
symbol:tcp_cong_avoid_ai file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
Use vmlinux: /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux
map_groups__set_modules_path_dir: cannot open /lib/modules/5.1.0 dir
Problems setting modules path maps, continuing anyway...
Using /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux for symbols
Open Debuginfo file: /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux
Searching variables at tcp_cong_avoid_ai
Matched function: tcp_cong_avoid_ai [84734fd]
found inline addr: 0xffffffff816b3360
Probe point found: tcp_reno_cong_avoid+80
found inline addr: 0xffffffff816b32b0
Probe point found: tcp_cong_avoid_ai+0
Add new var: struct tcp_sock* tp
Add new var: u32 w
Add new var: u32 acked
Available variables at tcp_cong_avoid_ai
@<tcp_reno_cong_avoid+80>
(No matched variables)
@<tcp_cong_avoid_ai+0>
struct tcp_sock* tp
u32 acked
u32 w
(ins)[nix-shell:~/bitset]$ sudo perf --debug verbose probe -k /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux -s /home/teto/mptcp 'tcp_cong_avoid_ai tp->snd_cwnd_clamp'
probe-definition(0): tcp_cong_avoid_ai tp->snd_cwnd_clamp
symbol:tcp_cong_avoid_ai file:(null) line:0 offset:0 return:0 lazy:(null)
parsing arg: tp->snd_cwnd_clamp into tp, snd_cwnd_clamp(1)
1 arguments
Use vmlinux: /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux
map_groups__set_modules_path_dir: cannot open /lib/modules/5.1.0 dir
Problems setting modules path maps, continuing anyway...
Using /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux for symbols
Open Debuginfo file: /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux
Try to find probe point from debuginfo.
Matched function: tcp_cong_avoid_ai [84734fd]
found inline addr: 0xffffffff816b3360
Probe point found: tcp_reno_cong_avoid+80
Searching 'tp' variable in context.
Failed to find 'tp' in this function.
Symbol tcp_cong_avoid_ai address found : ffffffff816b32b0
Matched function: tcp_cong_avoid_ai [84734fd]
found inline addr: 0xffffffff816b3360
Probe point found: tcp_reno_cong_avoid+80
Searching 'tp' variable in context.
Failed to find 'tp' in this function.
Probe point 'tcp_cong_avoid_ai' not found.
Error: Failed to add events. Reason: No such file or directory (Code: -2)
是否可以跟踪tp->snd_cwnd_clamp
的值?如果是,怎么办?
我已经尝试使用DEBUG_INFO使用相同的更原始的内核
失败。我的配置(5.2内核),以防万一
https://paste.ubuntu.com/p/gN8tHWYmF6/
最诚挚的问候
注意:我在性能邮件列表上问了这个问题,没用