mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
Merge bitcoin/bitcoin#32454: tracing: fix invalid argument in mempool_monitor
31c5ebc400tracing: 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 ACK31c5ebc400Tree-SHA512: 6f3d64f0f75a44e1fdcad71af8e737ce948833498cd3879ef74cbabf53e3649145b83febceca19b1662de55346c199bf4259e17f5b28cf0352aefa730e07ea63
This commit is contained in:
@@ -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