aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/profile.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-06-15 14:06:48 -0700
committerTony Luck <tony.luck@intel.com>2005-06-15 14:06:48 -0700
commitf2cbb4f01936a3e4225692e03b084b78c56d386d (patch)
treef89f3d8baa250589a38a4dd2df56f84cddae3c76 /kernel/profile.c
parentMerge with temp tree to get David's gdb inferior calls patch (diff)
parent[PATCH] update ppc64 defconfig (diff)
downloadlinux-dev-f2cbb4f01936a3e4225692e03b084b78c56d386d.tar.xz
linux-dev-f2cbb4f01936a3e4225692e03b084b78c56d386d.zip
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'kernel/profile.c')
-rw-r--r--kernel/profile.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index 0221a50ca867..ad8cbb75ffa2 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -49,15 +49,19 @@ static DECLARE_MUTEX(profile_flip_mutex);
static int __init profile_setup(char * str)
{
+ static char __initdata schedstr[] = "schedule";
int par;
- if (!strncmp(str, "schedule", 8)) {
+ if (!strncmp(str, schedstr, strlen(schedstr))) {
prof_on = SCHED_PROFILING;
- printk(KERN_INFO "kernel schedule profiling enabled\n");
- if (str[7] == ',')
- str += 8;
- }
- if (get_option(&str,&par)) {
+ if (str[strlen(schedstr)] == ',')
+ str += strlen(schedstr) + 1;
+ if (get_option(&str, &par))
+ prof_shift = par;
+ printk(KERN_INFO
+ "kernel schedule profiling enabled (shift: %ld)\n",
+ prof_shift);
+ } else if (get_option(&str, &par)) {
prof_shift = par;
prof_on = CPU_PROFILING;
printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n",