Skip to content

Commit fff1787

Browse files
Song Chenrostedt
authored andcommitted
trace/kprobe: remove duplicated calls of ring_buffer_event_data
Function __kprobe_trace_func calls ring_buffer_event_data to get a ring buffer, however, it has been done in above call trace_event_buffer_reserve. So does __kretprobe_trace_func. This patch removes those duplicated calls. Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Steven Rostedt (Google) <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Song Chen <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent 8c2b997 commit fff1787

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/trace/trace_kprobe.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,6 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
13441344
return;
13451345

13461346
fbuffer.regs = regs;
1347-
entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
13481347
entry->ip = (unsigned long)tk->rp.kp.addr;
13491348
store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
13501349

@@ -1385,7 +1384,6 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
13851384
return;
13861385

13871386
fbuffer.regs = regs;
1388-
entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
13891387
entry->func = (unsigned long)tk->rp.kp.addr;
13901388
entry->ret_ip = get_kretprobe_retaddr(ri);
13911389
store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);

0 commit comments

Comments
 (0)