Skip to content

Commit

Permalink
samples/bpf: fix trace_output example
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
4ast authored and davem330 committed Apr 28, 2016
1 parent 6aff67c commit 569cc39
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion samples/bpf/trace_output_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ int bpf_prog1(struct pt_regs *ctx)
u64 cookie;
} data;

memset(&data, 0, sizeof(data));
data.pid = bpf_get_current_pid_tgid();
data.cookie = 0x12345678;

Expand Down

0 comments on commit 569cc39

Please sign in to comment.