Merge bitcoin/bitcoin#32454: tracing: fix invalid argument in mempool_monitor

31c5ebc400 tracing: fix invalid argument in mempool_monitor (William Casarin)

Pull request description:

  The mempool_monitor tracing tool is incorrectly reading the reason as the first argument. Fix this!

  Noticed this during the bitcoin++ mempool hackathon 😅

  cc 0xB10C

ACKs for top commit:
  0xB10C:
    Code Review ACK 31c5ebc400

Tree-SHA512: 6f3d64f0f75a44e1fdcad71af8e737ce948833498cd3879ef74cbabf53e3649145b83febceca19b1662de55346c199bf4259e17f5b28cf0352aefa730e07ea63
This commit is contained in:
merge-script 2025-05-09 09:21:35 +01:00
commit 5b8752198e
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ int trace_removed(struct pt_regs *ctx) {
void *phash = NULL, *preason = NULL;
bpf_usdt_readarg(1, ctx, 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_usdt_readarg(3, ctx, &removed.vsize);
bpf_usdt_readarg(4, ctx, &removed.fee);
@ -95,7 +95,7 @@ int trace_rejected(struct pt_regs *ctx) {
void *phash = NULL, *preason = NULL;
bpf_usdt_readarg(1, ctx, 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);
rejected_events.perf_submit(ctx, &rejected, sizeof(rejected));
return 0;