Commit 0105467f authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] fix the prof=schedule feature

Fix mismerge of the "prof=schedule" feature.  Without this patch the output
is a boring empty profile.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5f50cce9
......@@ -22,14 +22,14 @@ static int __init profile_setup(char * str)
int par;
if (!strncmp(str, "schedule", 8)) {
prof_on = 2;
prof_on = SCHED_PROFILING;
printk(KERN_INFO "kernel schedule profiling enabled\n");
if (str[7] == ',')
str += 8;
}
if (get_option(&str,&par)) {
prof_shift = par;
prof_on = 1;
prof_on = CPU_PROFILING;
printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n",
prof_shift);
}
......
......@@ -2647,6 +2647,7 @@ asmlinkage void __sched schedule(void)
dump_stack();
}
}
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
need_resched:
preempt_disable();
......@@ -3223,7 +3224,6 @@ static int setscheduler(pid_t pid, int policy, struct sched_param __user *param)
policy != SCHED_NORMAL)
goto out_unlock;
}
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
/*
* Valid priorities for SCHED_FIFO and SCHED_RR are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment