Skip to content

Commit

Permalink
logic: fix handling of partial fnargs/ctxargs data
Browse files Browse the repository at this point in the history
Fix a condition for detecting missing function args for collapsed leaf
entry. Also make sure we handle fake records added by
add_missing_records_msg() correctly.

Reported-by: David Wei <dw@davidwei.uk>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
  • Loading branch information
anakryiko committed Sep 13, 2024
1 parent 6fe04d6 commit 2732def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ static void prepare_trace_items(struct ctx *ctx, struct stack_items_cache *cache

if (found)
t->fai = fai;
else if (t->depth > 0) /* func entry */
else if (t == tn || t->depth > 0) /* func entry */
t->fai = FNARGS_MISSING_RECORD;
else
t->fai = NULL;
Expand Down Expand Up @@ -846,7 +846,7 @@ static void print_trace_items(struct ctx *ctx, const struct stack_items_cache *c
res_len, s->err,
dur_len, s->dur);

if (env.capture_args) {
if (env.capture_args && s->extra) {
struct trace_item *ti = s->extra;
const struct inj_probe_info *inj;

Expand Down

0 comments on commit 2732def

Please sign in to comment.