mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 20:32:36 +02:00
Merge bitcoin/bitcoin#32771: contrib: tracing: Fix read of pmsg_type
in p2p_monitor.py
3473986fe1
contrib: tracing: Correctly read msg type in p2p_monitor.py (David Gumberg) Pull request description: This fixes a bug in the contrib tracing script `p2p_monitor.py`. currently the script fails to read the `msg_type` of inbound and outbound messages, which is useful in the per-peer message view. <details> <summary>Screenshot of p2p_monitor.py on master</summary>  </details> <details> <summary>Screenshot of p2p_monitor.py on this branch</summary>  </details> ACKs for top commit: yuvicc: ACK3473986fe1
janb84: ut ACK3473986fe1
0xB10C: ACK3473986fe1
Tree-SHA512: 94da0dc35072933a20ef693024855b3c382fc6f5ae0a3108d092d7aa5a4004df478f5de07b80f675be13e00f3f4596b0f34c49ec1d8d2c38a15797dcf86c2a56
This commit is contained in:
@ -54,7 +54,7 @@ int trace_inbound_message(struct pt_regs *ctx) {
|
||||
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
|
||||
bpf_usdt_readarg(3, ctx, &pconn_type);
|
||||
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
|
||||
bpf_usdt_readarg(4, ctx, &pconn_type);
|
||||
bpf_usdt_readarg(4, ctx, &pmsg_type);
|
||||
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
|
||||
bpf_usdt_readarg(5, ctx, &msg.msg_size);
|
||||
|
||||
@ -71,7 +71,7 @@ int trace_outbound_message(struct pt_regs *ctx) {
|
||||
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
|
||||
bpf_usdt_readarg(3, ctx, &pconn_type);
|
||||
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
|
||||
bpf_usdt_readarg(4, ctx, &pconn_type);
|
||||
bpf_usdt_readarg(4, ctx, &pmsg_type);
|
||||
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
|
||||
bpf_usdt_readarg(5, ctx, &msg.msg_size);
|
||||
|
||||
|
Reference in New Issue
Block a user