cregit-Linux how code gets into the kernel

Release 4.12 include/linux/profile.h

Directory: include/linux
#ifndef _LINUX_PROFILE_H

#define _LINUX_PROFILE_H

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/cpumask.h>
#include <linux/cache.h>

#include <asm/errno.h>


#define CPU_PROFILING	1

#define SCHED_PROFILING	2

#define SLEEP_PROFILING	3

#define KVM_PROFILING	4

struct proc_dir_entry;
struct pt_regs;
struct notifier_block;

#if defined(CONFIG_PROFILING) && defined(CONFIG_PROC_FS)
void create_prof_cpu_mask(void);
int create_proc_profile(void);
#else

static inline void create_prof_cpu_mask(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Andrew Morton450.00%133.33%
Adrian Bunk337.50%133.33%
Al Viro112.50%133.33%
Total8100.00%3100.00%


static inline int create_proc_profile(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt12100.00%1100.00%
Total12100.00%1100.00%

#endif enum profile_type { PROFILE_TASK_EXIT, PROFILE_MUNMAP }; #ifdef CONFIG_PROFILING extern int prof_on __read_mostly; /* init basic kernel profiler */ int profile_init(void); int profile_setup(char *str); void profile_tick(int type); int setup_profiling_timer(unsigned int multiplier); /* * Add multiple profiler hits to a given address: */ void profile_hits(int type, void *ip, unsigned int nr_hits); /* * Single profiler hit: */
static inline void profile_hit(int type, void *ip) { /* * Speedup for the common (no profiling enabled) case: */ if (unlikely(prof_on == type)) profile_hits(type, ip, 1); }

Contributors

PersonTokensPropCommitsCommitProp
Ingo Molnar33100.00%1100.00%
Total33100.00%1100.00%

struct task_struct; struct mm_struct; /* task is in do_exit() */ void profile_task_exit(struct task_struct * task); /* task is dead, free task struct ? Returns 1 if * the task was taken, 0 if the task should be freed. */ int profile_handoff_task(struct task_struct * task); /* sys_munmap */ void profile_munmap(unsigned long addr); int task_handoff_register(struct notifier_block * n); int task_handoff_unregister(struct notifier_block * n); int profile_event_register(enum profile_type, struct notifier_block * n); int profile_event_unregister(enum profile_type, struct notifier_block * n); struct pt_regs; #else #define prof_on 0
static inline int profile_init(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Adrian Bunk866.67%150.00%
Dave Hansen433.33%150.00%
Total12100.00%2100.00%


static inline void profile_tick(int type) { return; }

Contributors

PersonTokensPropCommitsCommitProp
Adrian Bunk11100.00%1100.00%
Total11100.00%1100.00%


static inline void profile_hits(int type, void *ip, unsigned int nr_hits) { return; }

Contributors

PersonTokensPropCommitsCommitProp
Adrian Bunk19100.00%1100.00%
Total19100.00%1100.00%


static inline void profile_hit(int type, void *ip) { return; }

Contributors

PersonTokensPropCommitsCommitProp
Adrian Bunk15100.00%1100.00%
Total15100.00%1100.00%


static inline int task_handoff_register(struct notifier_block * n) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
John Levon16100.00%1100.00%
Total16100.00%1100.00%


static inline int task_handoff_unregister(struct notifier_block * n) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
John Levon16100.00%1100.00%
Total16100.00%1100.00%


static inline int profile_event_register(enum profile_type t, struct notifier_block * n) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
John Levon20100.00%1100.00%
Total20100.00%1100.00%


static inline int profile_event_unregister(enum profile_type t, struct notifier_block * n) { return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
John Levon20100.00%1100.00%
Total20100.00%1100.00%

#define profile_task_exit(a) do { } while (0) #define profile_handoff_task(a) (0) #define profile_munmap(a) do { } while (0) #endif /* CONFIG_PROFILING */ #endif /* _LINUX_PROFILE_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
John Levon19946.17%318.75%
Adrian Bunk9822.74%16.25%
Ingo Molnar5212.06%212.50%
William Lee Irwin III317.19%318.75%
Paul Mundt184.18%16.25%
Dave Hansen133.02%16.25%
Sam Ravnborg81.86%16.25%
Andrew Morton71.62%212.50%
Jesse Barnes30.70%16.25%
Al Viro20.46%16.25%
Total431100.00%16100.00%
Directory: include/linux
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.