Skip to content

Commit 569cc39

Browse files
4astdavem330
authored andcommitted
samples/bpf: fix trace_output example
llvm cannot always recognize memset as builtin function and optimize it away, so just delete it. It was a leftover from testing of bpf_perf_event_output() with large data structures. Fixes: 3911169 ("samples: bpf: add bpf_perf_event_output example") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6aff67c commit 569cc39

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

samples/bpf/trace_output_kern.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ int bpf_prog1(struct pt_regs *ctx)
1818
u64 cookie;
1919
} data;
2020

21-
memset(&data, 0, sizeof(data));
2221
data.pid = bpf_get_current_pid_tgid();
2322
data.cookie = 0x12345678;
2423

0 commit comments

Comments
 (0)