aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/profile.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/profile.h b/include/linux/profile.h
index acce53fd38b6..5670b340c4ef 100644
--- a/include/linux/profile.h
+++ b/include/linux/profile.h
@@ -6,10 +6,15 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/cpumask.h> 8#include <linux/cpumask.h>
9#include <linux/cache.h>
10
9#include <asm/errno.h> 11#include <asm/errno.h>
10 12
13extern int prof_on __read_mostly;
14
11#define CPU_PROFILING 1 15#define CPU_PROFILING 1
12#define SCHED_PROFILING 2 16#define SCHED_PROFILING 2
17#define SLEEP_PROFILING 3
13 18
14struct proc_dir_entry; 19struct proc_dir_entry;
15struct pt_regs; 20struct pt_regs;
@@ -18,7 +23,24 @@ struct notifier_block;
18/* init basic kernel profiler */ 23/* init basic kernel profiler */
19void __init profile_init(void); 24void __init profile_init(void);
20void profile_tick(int); 25void profile_tick(int);
21void profile_hit(int, void *); 26
27/*
28 * Add multiple profiler hits to a given address:
29 */
30void profile_hits(int, void *ip, unsigned int nr_hits);
31
32/*
33 * Single profiler hit:
34 */
35static inline void profile_hit(int type, void *ip)
36{
37 /*
38 * Speedup for the common (no profiling enabled) case:
39 */
40 if (unlikely(prof_on == type))
41 profile_hits(type, ip, 1);
42}
43
22#ifdef CONFIG_PROC_FS 44#ifdef CONFIG_PROC_FS
23void create_prof_cpu_mask(struct proc_dir_entry *); 45void create_prof_cpu_mask(struct proc_dir_entry *);
24#else 46#else