I have been trying (with success) examples from http://www.brendangregg.com/perf.html#DynamicTracingEg
Then when I try to adapt the example to track the value of the
variable tp->snd_cwnd_clamp
in hte function tcp_cong_avoid_ai
,
perf can't manage to track the variable even though it's listed in the
possible variables:
(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)
Is it possible to track the value of tp->snd_cwnd_clamp
? if yes how ?
I've tried on a more vanilla kernel with DEBUG_INFO with the same
failure. My config (5.2 kernel) in case it matters
https://paste.ubuntu.com/p/gN8tHWYmF6/
Best regards
NB: I asked this question on the perf mailing list to no avail