#include <linux/export.h>
#include <linux/profile.h>
#include <linux/memblock.h>
#include <linux/notifier.h>
#include <linux/mm.h>
#include <linux/cpumask.h>
#include <linux/cpu.h>
#include <linux/highmem.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/sched/stat.h>
#include <asm/sections.h>
#include <asm/irq_regs.h>
#include <asm/ptrace.h>
struct profile_hit { … };
#define PROFILE_GRPSHIFT …
#define PROFILE_GRPSZ …
#define NR_PROFILE_HIT …
#define NR_PROFILE_GRP …
static atomic_t *prof_buffer;
static unsigned long prof_len;
static unsigned short int prof_shift;
int prof_on __read_mostly;
EXPORT_SYMBOL_GPL(…);
int profile_setup(char *str)
{ … }
__setup(…);
int __ref profile_init(void)
{ … }
static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
{ … }
void profile_hits(int type, void *__pc, unsigned int nr_hits)
{ … }
EXPORT_SYMBOL_GPL(…);
void profile_tick(int type)
{ … }
#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>
static ssize_t
read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{ … }
int __weak setup_profiling_timer(unsigned mult)
{ … }
static ssize_t write_profile(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{ … }
static const struct proc_ops profile_proc_ops = …;
int __ref create_proc_profile(void)
{ … }
subsys_initcall(create_proc_profile);
#endif