summaryrefslogtreecommitdiff
path: root/kernel/profile.c
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-05-27 22:08:07 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-27 22:08:07 -0400
commit51a730d758ae4052e10ca7e06336f10af598c4fc (patch)
treeb76a004c00cd7139659be515ee03398e47067290 /kernel/profile.c
parent6cd15a9daf826115356f9403494c76e5aafa7793 (diff)
parentff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf (diff)
Automatic merge of /spare/repo/netdev-2.6 branch we18-ieee80211
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",