From 6d10d203c1ca5e1eb25f759ae6093443b6ea2cdd Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Mon, 16 May 2005 21:53:58 -0700 Subject: [PATCH] --- yaml --- r: 1173 b: refs/heads/master c: dfaa9c94b13071c9b5f8578d0ae99acc76c60139 h: refs/heads/master i: 1171: 992aa280cd18c255b5dbc6388f01a6ca41086718 v: v3 --- [refs] | 2 +- trunk/kernel/profile.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index d8c9a7191fc1..e4c8748169fc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5418b6925c353c8286651b67fdb8559dd9e54e46 +refs/heads/master: dfaa9c94b13071c9b5f8578d0ae99acc76c60139 diff --git a/trunk/kernel/profile.c b/trunk/kernel/profile.c index 0221a50ca867..ad8cbb75ffa2 100644 --- a/trunk/kernel/profile.c +++ b/trunk/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",