首页 > 解决方案 > 性能:无法跟踪 tp->snd_cwnd_clamp

问题描述

我一直在尝试(成功)来自 http://www.brendangregg.com/perf.html#DynamicTracingEg的示例

然后,当我尝试调整示例以跟踪tp->snd_cwnd_clamphte function中变量的值时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/

此致

注意:我在 perf 邮件列表上问了这个问题,但无济于事

标签: linuxtcpperf

解决方案


推荐阅读