aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/kmemtrace.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/mm/kmemtrace.c b/mm/kmemtrace.c
index 83ad1cc71a9..f7a49c077df 100644
--- a/mm/kmemtrace.c
+++ b/mm/kmemtrace.c
@@ -307,29 +307,29 @@ early_param("kmemtrace.subbufs", kmemtrace_set_subbufs);
307 307
308void kmemtrace_init(void) 308void kmemtrace_init(void)
309{ 309{
310 if (!kmemtrace_enabled)
311 return;
312
313 if (!kmemtrace_n_subbufs) 310 if (!kmemtrace_n_subbufs)
314 kmemtrace_n_subbufs = KMEMTRACE_DEF_N_SUBBUFS; 311 kmemtrace_n_subbufs = KMEMTRACE_DEF_N_SUBBUFS;
315 312
316 kmemtrace_chan = relay_open(NULL, NULL, KMEMTRACE_SUBBUF_SIZE, 313 kmemtrace_chan = relay_open(NULL, NULL, KMEMTRACE_SUBBUF_SIZE,
317 kmemtrace_n_subbufs, &relay_callbacks, 314 kmemtrace_n_subbufs, &relay_callbacks,
318 NULL); 315 NULL);
319 if (unlikely(!kmemtrace_chan)) { 316 if (!kmemtrace_chan) {
320 printk(KERN_ERR "kmemtrace: could not open relay channel.\n"); 317 printk(KERN_ERR "kmemtrace: could not open relay channel.\n");
321 return; 318 return;
322 } 319 }
323 320
324 if (unlikely(kmemtrace_start_probes())) 321 if (!kmemtrace_enabled) {
325 goto probe_fail; 322 printk(KERN_INFO "kmemtrace: disabled. Pass "
326 323 "kemtrace.enable=yes as kernel parameter for "
327 printk(KERN_INFO "kmemtrace: early init successful.\n"); 324 "boot-time tracing.");
328 325 return;
329 return; 326 }
327 if (kmemtrace_start_probes()) {
328 printk(KERN_ERR "kmemtrace: could not register marker probes!\n");
329 kmemtrace_cleanup();
330 return;
331 }
330 332
331probe_fail: 333 printk(KERN_INFO "kmemtrace: enabled.\n");
332 printk(KERN_ERR "kmemtrace: could not register marker probes!\n");
333 kmemtrace_cleanup();
334} 334}
335 335