summaryrefslogtreecommitdiff
path: root/kernel/profile.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjanv@redhat.com>2004-08-26 20:30:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-26 20:30:55 -0700
commitf0fd8a8d242a6a5a9297712871a99e3b15d56ccf (patch)
tree5e379b44d72fedf9062481b4187b8669d7b5db2b /kernel/profile.c
parente271fc8510eb1b0213aede782d84369304e09127 (diff)
[PATCH] schedule profileing
From: William Lee Irwin III <wli@holomorphy.com> The patch (from Ingo) below is quite interesting, it allows the use of readprofile not for statistical tine sampling, but for seeing where calls to schedule() come from, so it can give some insight to the "where do my context switches come from" question. Boot with `profile=schedul2' to activate this feature. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/profile.c')
-rw-r--r--kernel/profile.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index 5c02ac0fbbda..bfd3d2cabb78 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -18,10 +18,18 @@ int prof_on;
int __init profile_setup(char * str)
{
int par;
+
+ if (!strncmp(str, "schedule", 8)) {
+ prof_on = 2;
+ printk(KERN_INFO "kernel schedule profiling enabled\n");
+ if (str[7] == ',')
+ str += 8;
+ }
if (get_option(&str,&par)) {
prof_shift = par;
prof_on = 1;
- printk(KERN_INFO "kernel profiling enabled\n");
+ printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n",
+ prof_shift);
}
return 1;
}