diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-11-25 17:56:43 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-25 17:56:43 -0800 |
| commit | 832eb7cf7140fc2037cf248ee050453b55892e46 (patch) | |
| tree | a61a472b63cbb1d18c347ceed20453300a19f158 /kernel/profile.c | |
| parent | 3b99bbbf56153b9146745ff96dafeef9a94d94ef (diff) | |
[PATCH] Allow for profile_buf size = kernel text size
Patch from Ravikiran G Thirumalai <kiran@in.ibm.com>
Allows the kernel profiler to use a shift value of zero for
high-resolution profiling.
So instead of overloading a shift of zero to mean "not profiling", use
a separate flag for that.
This means that anyone who is currently using "profile=0" to disable
profiling has accidentally turned profiling on, so I added a printk.
Diffstat (limited to 'kernel/profile.c')
| -rw-r--r-- | kernel/profile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index 756f142b1f35..9f12f1d4013f 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -14,12 +14,16 @@ extern char _stext, _etext; unsigned int * prof_buffer; unsigned long prof_len; unsigned long prof_shift; +int prof_on; int __init profile_setup(char * str) { int par; - if (get_option(&str,&par)) + if (get_option(&str,&par)) { prof_shift = par; + prof_on = 1; + printk(KERN_INFO "kernel profiling enabled\n"); + } return 1; } @@ -28,7 +32,7 @@ void __init profile_init(void) { unsigned int size; - if (!prof_shift) + if (!prof_on) return; /* only text is profiled */ |
