Skip to content

Commit c584966

Browse files
committed
Merge bitcoin#32771: contrib: tracing: Fix read of pmsg_type in p2p_monitor.py
3473986 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> ![Screenshot From 2025-06-18 11-37-43](https://github.com/user-attachments/assets/56612088-54d7-465c-b0b6-1b425b919785) </details> <details> <summary>Screenshot of p2p_monitor.py on this branch</summary> ![Screenshot From 2025-06-18 11-41-38](https://github.com/user-attachments/assets/4438a483-938c-450b-a12e-6d6909b2c37e) </details> ACKs for top commit: yuvicc: ACK 3473986 janb84: ut ACK 3473986 0xB10C: ACK 3473986 Tree-SHA512: 94da0dc35072933a20ef693024855b3c382fc6f5ae0a3108d092d7aa5a4004df478f5de07b80f675be13e00f3f4596b0f34c49ec1d8d2c38a15797dcf86c2a56
2 parents 8a36a47 + 3473986 commit c584966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/tracing/p2p_monitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
5555
bpf_usdt_readarg(3, ctx, &pconn_type);
5656
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
57-
bpf_usdt_readarg(4, ctx, &pconn_type);
57+
bpf_usdt_readarg(4, ctx, &pmsg_type);
5858
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
5959
bpf_usdt_readarg(5, ctx, &msg.msg_size);
6060
@@ -71,7 +71,7 @@
7171
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
7272
bpf_usdt_readarg(3, ctx, &pconn_type);
7373
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
74-
bpf_usdt_readarg(4, ctx, &pconn_type);
74+
bpf_usdt_readarg(4, ctx, &pmsg_type);
7575
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
7676
bpf_usdt_readarg(5, ctx, &msg.msg_size);
7777

0 commit comments

Comments
 (0)