Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /kernel/profile.c

Filename:/kernel/profile.c
Lines Added:8
Lines Deleted:3
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.24-git2  2.6.24-git3  2.6.24-git4  2.6.24-git5  2.6.24-git6  2.6.24-git7 

Location
[  2.6.24
  [  kernel
     o  profile.c

Patch

diff --git a/kernel/profile.c b/kernel/profile.c
index cb1e37d..5e95330 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -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)] == ',')
@@ -346,7 +351,7 @@ static int __devinit profile_cpu_callback(struct notifier_block *info,
       per_cpu(cpu_profile_flip, cpu) = 0;
       if (!per_cpu(cpu_profile_hits, cpu)[1]) {
          page = alloc_pages_node(node,
-               GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+               GFP_KERNEL | __GFP_ZERO,
                0);
          if (!page)
             return NOTIFY_BAD;
@@ -354,7 +359,7 @@ static int __devinit profile_cpu_callback(struct notifier_block *info,
       }
       if (!per_cpu(cpu_profile_hits, cpu)[0]) {
          page = alloc_pages_node(node,
-               GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+               GFP_KERNEL | __GFP_ZERO,
                0);
          if (!page)
             goto out_free;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.