]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/profile.c
[POWERPC] PS3: Refactor ps3_repository_find_device()
[linux-2.6-omap-h63xx.git] / kernel / profile.c
index 6f69bf792d964b7e262f7f5c066375d8fdeb8c77..5e95330e51207c48a043b2675b1d015d48d0f488 100644 (file)
@@ -37,7 +37,7 @@ struct profile_hit {
 #define NR_PROFILE_GRP         (NR_PROFILE_HIT/PROFILE_GRPSZ)
 
 /* Oprofile timer tick hook */
-int (*timer_hook)(struct pt_regs *) __read_mostly;
+static int (*timer_hook)(struct pt_regs *) __read_mostly;
 
 static atomic_t *prof_buffer;
 static unsigned long prof_len, prof_shift;
@@ -60,6 +60,7 @@ static int __init profile_setup(char * str)
        int par;
 
        if (!strncmp(str, sleepstr, strlen(sleepstr))) {
+#ifdef CONFIG_SCHEDSTATS
                prof_on = SLEEP_PROFILING;
                if (str[strlen(sleepstr)] == ',')
                        str += strlen(sleepstr) + 1;
@@ -68,6 +69,10 @@ static int __init profile_setup(char * str)
                printk(KERN_INFO
                        "kernel sleep profiling enabled (shift: %ld)\n",
                        prof_shift);
+#else
+               printk(KERN_WARNING
+                       "kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
+#endif /* CONFIG_SCHEDSTATS */
        } else if (!strncmp(str, schedstr, strlen(schedstr))) {
                prof_on = SCHED_PROFILING;
                if (str[strlen(schedstr)] == ',')