mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
tracing: fix invalid argument in mempool_monitor
The mempool_monitor tracing tool is incorrectly reading the reason
as the first argument. Fix this!
Github-Pull: #32454
Rebased-From: 31c5ebc400
This commit is contained in:
committed by
fanquake
parent
f9d2c67a0c
commit
fabf4ff237
@@ -80,7 +80,7 @@ int trace_removed(struct pt_regs *ctx) {
|
|||||||
void *phash = NULL, *preason = NULL;
|
void *phash = NULL, *preason = NULL;
|
||||||
bpf_usdt_readarg(1, ctx, phash);
|
bpf_usdt_readarg(1, ctx, phash);
|
||||||
bpf_probe_read_user(&removed.hash, sizeof(removed.hash), phash);
|
bpf_probe_read_user(&removed.hash, sizeof(removed.hash), phash);
|
||||||
bpf_usdt_readarg(1, ctx, preason);
|
bpf_usdt_readarg(2, ctx, preason);
|
||||||
bpf_probe_read_user_str(&removed.reason, sizeof(removed.reason), preason);
|
bpf_probe_read_user_str(&removed.reason, sizeof(removed.reason), preason);
|
||||||
bpf_usdt_readarg(3, ctx, &removed.vsize);
|
bpf_usdt_readarg(3, ctx, &removed.vsize);
|
||||||
bpf_usdt_readarg(4, ctx, &removed.fee);
|
bpf_usdt_readarg(4, ctx, &removed.fee);
|
||||||
@@ -95,7 +95,7 @@ int trace_rejected(struct pt_regs *ctx) {
|
|||||||
void *phash = NULL, *preason = NULL;
|
void *phash = NULL, *preason = NULL;
|
||||||
bpf_usdt_readarg(1, ctx, phash);
|
bpf_usdt_readarg(1, ctx, phash);
|
||||||
bpf_probe_read_user(&rejected.hash, sizeof(rejected.hash), phash);
|
bpf_probe_read_user(&rejected.hash, sizeof(rejected.hash), phash);
|
||||||
bpf_usdt_readarg(1, ctx, preason);
|
bpf_usdt_readarg(2, ctx, preason);
|
||||||
bpf_probe_read_user_str(&rejected.reason, sizeof(rejected.reason), preason);
|
bpf_probe_read_user_str(&rejected.reason, sizeof(rejected.reason), preason);
|
||||||
rejected_events.perf_submit(ctx, &rejected, sizeof(rejected));
|
rejected_events.perf_submit(ctx, &rejected, sizeof(rejected));
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user