Release 4.12 include/linux/profile.h
#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
Person | Tokens | Prop | Commits | CommitProp |
Andrew Morton | 4 | 50.00% | 1 | 33.33% |
Adrian Bunk | 3 | 37.50% | 1 | 33.33% |
Al Viro | 1 | 12.50% | 1 | 33.33% |
Total | 8 | 100.00% | 3 | 100.00% |
static inline int create_proc_profile(void)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Paul Mundt | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Ingo Molnar | 33 | 100.00% | 1 | 100.00% |
Total | 33 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
Adrian Bunk | 8 | 66.67% | 1 | 50.00% |
Dave Hansen | 4 | 33.33% | 1 | 50.00% |
Total | 12 | 100.00% | 2 | 100.00% |
static inline void profile_tick(int type)
{
return;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Adrian Bunk | 11 | 100.00% | 1 | 100.00% |
Total | 11 | 100.00% | 1 | 100.00% |
static inline void profile_hits(int type, void *ip, unsigned int nr_hits)
{
return;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Adrian Bunk | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
static inline void profile_hit(int type, void *ip)
{
return;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Adrian Bunk | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline int task_handoff_register(struct notifier_block * n)
{
return -ENOSYS;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Levon | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
static inline int task_handoff_unregister(struct notifier_block * n)
{
return -ENOSYS;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Levon | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
static inline int profile_event_register(enum profile_type t, struct notifier_block * n)
{
return -ENOSYS;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Levon | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
static inline int profile_event_unregister(enum profile_type t, struct notifier_block * n)
{
return -ENOSYS;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
John Levon | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.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
Person | Tokens | Prop | Commits | CommitProp |
John Levon | 199 | 46.17% | 3 | 18.75% |
Adrian Bunk | 98 | 22.74% | 1 | 6.25% |
Ingo Molnar | 52 | 12.06% | 2 | 12.50% |
William Lee Irwin III | 31 | 7.19% | 3 | 18.75% |
Paul Mundt | 18 | 4.18% | 1 | 6.25% |
Dave Hansen | 13 | 3.02% | 1 | 6.25% |
Sam Ravnborg | 8 | 1.86% | 1 | 6.25% |
Andrew Morton | 7 | 1.62% | 2 | 12.50% |
Jesse Barnes | 3 | 0.70% | 1 | 6.25% |
Al Viro | 2 | 0.46% | 1 | 6.25% |
Total | 431 | 100.00% | 16 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.