Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/progs/kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ static inline int default_handle_entry(context_info_t *info);

static __always_inline int get_ret_key(int func)
{
#ifndef BPF_MAP_TYPE_PERCPU_ARRAY
return func * bpf_get_smp_processor_id();
#else
return func;
#endif
}

static inline void get_ret(context_info_t *info)
Expand Down
2 changes: 1 addition & 1 deletion src/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ static void trace_print_enabled()
} else {
fmt = "tracepoint";
}
pr_verb("\t%s: %s, prog: %s, status: %x\n", fmt, trace->name,
pr_verb("\t%s: %s, prog: %s, status: 0x%x\n", fmt, trace->name,
trace->prog, trace_get_status(trace->index));
}
}
Expand Down
11 changes: 6 additions & 5 deletions src/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,14 @@ static inline bool trace_is_usable(trace_t *t)
return trace_is_enable(t) && !trace_is_invalid(t);
}

static inline void trace_set_status(int func, int status)
{
trace_ctx.bpf_args.trace_status[func] |= status;
}

static inline void trace_set_ret(trace_t *t)
{
trace_set_status(t->index, FUNC_STATUS_RET);
t->status |= TRACE_RET;
}

Expand All @@ -245,11 +251,6 @@ static inline bool trace_is_retonly(trace_t *t)
return t->status & TRACE_RET_ONLY;
}

static inline void trace_set_status(int func, int status)
{
trace_ctx.bpf_args.trace_status[func] |= status;
}

static inline u8 trace_get_status(int func)
{
return trace_ctx.bpf_args.trace_status[func];
Expand Down