cregit-Linux how code gets into the kernel

Release 4.7 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 mortonandrew morton450.00%133.33%
adrian bunkadrian bunk337.50%133.33%
al viroal viro112.50%133.33%
Total8100.00%3100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
paul mundtpaul 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 molnaringo 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 bunkadrian bunk866.67%150.00%
dave hansendave hansen433.33%150.00%
Total12100.00%2100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
adrian bunkadrian 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 bunkadrian bunk19100.00%1100.00%
Total19100.00%1100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
adrian bunkadrian bunk15100.00%1100.00%
Total15100.00%1100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
john levonjohn levon16100.00%1100.00%
Total16100.00%1100.00%


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

Contributors

PersonTokensPropCommitsCommitProp
john levonjohn 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 levonjohn 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 levonjohn 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 levonjohn levon19946.17%318.75%
adrian bunkadrian bunk9822.74%16.25%
ingo molnaringo molnar5212.06%212.50%
william lee irwin iiiwilliam lee irwin iii317.19%318.75%
paul mundtpaul mundt184.18%16.25%
dave hansendave hansen133.02%16.25%
sam ravnborgsam ravnborg81.86%16.25%
andrew mortonandrew morton71.62%212.50%
jesse barnesjesse barnes30.70%16.25%
al viroal 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.
{% endraw %}