Merge tag 'nfs-for-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[linux/fpc-iii.git] / samples / bpf / test_overhead_tp_kern.c
blob38f5c0b9da9f450847324aeb4c0f6c6fc72d621e
1 /* Copyright (c) 2016 Facebook
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of version 2 of the GNU General Public
5 * License as published by the Free Software Foundation.
6 */
7 #include <uapi/linux/bpf.h>
8 #include "bpf_helpers.h"
10 /* from /sys/kernel/debug/tracing/events/task/task_rename/format */
11 struct task_rename {
12 __u64 pad;
13 __u32 pid;
14 char oldcomm[16];
15 char newcomm[16];
16 __u16 oom_score_adj;
18 SEC("tracepoint/task/task_rename")
19 int prog(struct task_rename *ctx)
21 return 0;
24 /* from /sys/kernel/debug/tracing/events/random/urandom_read/format */
25 struct urandom_read {
26 __u64 pad;
27 int got_bits;
28 int pool_left;
29 int input_left;
31 SEC("tracepoint/random/urandom_read")
32 int prog2(struct urandom_read *ctx)
34 return 0;
36 char _license[] SEC("license") = "GPL";