aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/profile.c')
-rw-r--r--kernel/profile.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index cb980f0c731b..54bf5ba26420 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -52,9 +52,9 @@ static DEFINE_MUTEX(profile_flip_mutex);
52 52
53int profile_setup(char *str) 53int profile_setup(char *str)
54{ 54{
55 static char schedstr[] = "schedule"; 55 static const char schedstr[] = "schedule";
56 static char sleepstr[] = "sleep"; 56 static const char sleepstr[] = "sleep";
57 static char kvmstr[] = "kvm"; 57 static const char kvmstr[] = "kvm";
58 int par; 58 int par;
59 59
60 if (!strncmp(str, sleepstr, strlen(sleepstr))) { 60 if (!strncmp(str, sleepstr, strlen(sleepstr))) {
@@ -64,12 +64,10 @@ int profile_setup(char *str)
64 str += strlen(sleepstr) + 1; 64 str += strlen(sleepstr) + 1;
65 if (get_option(&str, &par)) 65 if (get_option(&str, &par))
66 prof_shift = par; 66 prof_shift = par;
67 printk(KERN_INFO 67 pr_info("kernel sleep profiling enabled (shift: %ld)\n",
68 "kernel sleep profiling enabled (shift: %ld)\n",
69 prof_shift); 68 prof_shift);
70#else 69#else
71 printk(KERN_WARNING 70 pr_warn("kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
72 "kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
73#endif /* CONFIG_SCHEDSTATS */ 71#endif /* CONFIG_SCHEDSTATS */
74 } else if (!strncmp(str, schedstr, strlen(schedstr))) { 72 } else if (!strncmp(str, schedstr, strlen(schedstr))) {
75 prof_on = SCHED_PROFILING; 73 prof_on = SCHED_PROFILING;
@@ -77,8 +75,7 @@ int profile_setup(char *str)
77 str += strlen(schedstr) + 1; 75 str += strlen(schedstr) + 1;
78 if (get_option(&str, &par)) 76 if (get_option(&str, &par))
79 prof_shift = par; 77 prof_shift = par;
80 printk(KERN_INFO 78 pr_info("kernel schedule profiling enabled (shift: %ld)\n",
81 "kernel schedule profiling enabled (shift: %ld)\n",
82 prof_shift); 79 prof_shift);
83 } else if (!strncmp(str, kvmstr, strlen(kvmstr))) { 80 } else if (!strncmp(str, kvmstr, strlen(kvmstr))) {
84 prof_on = KVM_PROFILING; 81 prof_on = KVM_PROFILING;
@@ -86,13 +83,12 @@ int profile_setup(char *str)
86 str += strlen(kvmstr) + 1; 83 str += strlen(kvmstr) + 1;
87 if (get_option(&str, &par)) 84 if (get_option(&str, &par))
88 prof_shift = par; 85 prof_shift = par;
89 printk(KERN_INFO 86 pr_info("kernel KVM profiling enabled (shift: %ld)\n",
90 "kernel KVM profiling enabled (shift: %ld)\n",
91 prof_shift); 87 prof_shift);
92 } else if (get_option(&str, &par)) { 88 } else if (get_option(&str, &par)) {
93 prof_shift = par; 89 prof_shift = par;
94 prof_on = CPU_PROFILING; 90 prof_on = CPU_PROFILING;
95 printk(KERN_INFO "kernel profiling enabled (shift: %ld)\n", 91 pr_info("kernel profiling enabled (shift: %ld)\n",
96 prof_shift); 92 prof_shift);
97 } 93 }
98 return 1; 94 return 1;