Blame samples/bpf/test_overhead_tp_kern.c

f2d475
/* Copyright (c) 2016 Facebook
f2d475
 *
f2d475
 * This program is free software; you can redistribute it and/or
f2d475
 * modify it under the terms of version 2 of the GNU General Public
f2d475
 * License as published by the Free Software Foundation.
f2d475
 */
f2d475
#include <uapi/linux/bpf.h>
f2d475
#include "bpf_helpers.h"
f2d475
f2d475
/* from /sys/kernel/debug/tracing/events/task/task_rename/format */
f2d475
struct task_rename {
f2d475
	__u64 pad;
f2d475
	__u32 pid;
f2d475
	char oldcomm[16];
f2d475
	char newcomm[16];
f2d475
	__u16 oom_score_adj;
f2d475
};
f2d475
SEC("tracepoint/task/task_rename")
f2d475
int prog(struct task_rename *ctx)
f2d475
{
f2d475
	return 0;
f2d475
}
f2d475
f2d475
/* from /sys/kernel/debug/tracing/events/random/urandom_read/format */
f2d475
struct urandom_read {
f2d475
	__u64 pad;
f2d475
	int got_bits;
f2d475
	int pool_left;
f2d475
	int input_left;
f2d475
};
f2d475
SEC("tracepoint/random/urandom_read")
f2d475
int prog2(struct urandom_read *ctx)
f2d475
{
f2d475
	return 0;
f2d475
}
f2d475
char _license[] SEC("license") = "GPL";