if (register_ftrace_function_probe_sym) {
return register_ftrace_function_probe_sym(glob, ops, data);
} else {
- printk(KERN_WARNING "LTTng: register_ftrace_function_probe symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: register_ftrace_function_probe symbol lookup failed.\n");
return -EINVAL;
}
}
if (unregister_ftrace_function_probe_sym) {
unregister_ftrace_function_probe_sym(glob, ops, data);
} else {
- printk(KERN_WARNING "LTTng: unregister_ftrace_function_probe symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: unregister_ftrace_function_probe symbol lookup failed.\n");
WARN_ON(1);
}
}
if (disk_name_sym) {
return disk_name_sym(hd, partno, buf);
} else {
- printk(KERN_WARNING "LTTng: disk_name symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: disk_name symbol lookup failed.\n");
return NULL;
}
}
ptr_block_class = (struct class *) kallsyms_lookup_dataptr("block_class");
if (!ptr_block_class) {
- printk(KERN_WARNING "LTTng: block_class symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: block_class symbol lookup failed.\n");
return NULL;
}
return ptr_block_class;
ptr_disk_type = (struct device_type *) kallsyms_lookup_dataptr("disk_type");
if (!ptr_disk_type) {
- printk(KERN_WARNING "LTTng: disk_type symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: disk_type symbol lookup failed.\n");
return NULL;
}
return ptr_disk_type;
if (irq_to_desc_sym) {
return irq_to_desc_sym(irq);
} else {
- printk(KERN_WARNING "LTTng: irq_to_desc symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: irq_to_desc symbol lookup failed.\n");
return NULL;
}
}
if (splice_to_pipe_sym) {
return splice_to_pipe_sym(pipe, spd);
} else {
- printk(KERN_WARNING "LTTng: splice_to_pipe symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: splice_to_pipe symbol lookup failed.\n");
return -ENOSYS;
}
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0))
static inline int get_trace_clock(void)
{
- printk(KERN_WARNING "LTTng: Using mainline kernel monotonic fast clock, which is NMI-safe.\n");
+ printk_once(KERN_WARNING "LTTng: Using mainline kernel monotonic fast clock, which is NMI-safe.\n");
return 0;
}
#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */
static inline int get_trace_clock(void)
{
- printk(KERN_WARNING "LTTng: Using mainline kernel monotonic clock. NMIs will not be traced.\n");
+ printk_once(KERN_WARNING "LTTng: Using mainline kernel monotonic clock. NMIs will not be traced.\n");
return 0;
}
#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)) */
if (tracepoint_module_notify_sym) {
return tracepoint_module_notify_sym(nb, val, mod);
} else {
- printk(KERN_WARNING "LTTng: tracepoint_module_notify symbol lookup failed. It probably means you kernel don't need this work-around. Please consider upgrading LTTng modules to make this warning go away.\n");
+ printk_once(KERN_WARNING "LTTng: tracepoint_module_notify symbol lookup failed. It probably means you kernel don't need this work-around. Please consider upgrading LTTng modules to make this warning go away.\n");
return -ENOSYS;
}
}
* Only x86 needs vmalloc_sync_all to make sure LTTng does not
* trigger recursive page faults.
*/
- printk(KERN_WARNING "LTTng: vmalloc_sync_all symbol lookup failed.\n");
- printk(KERN_WARNING "Page fault handler and NMI tracing might trigger faults.\n");
+ printk_once(KERN_WARNING "LTTng: vmalloc_sync_all symbol lookup failed.\n");
+ printk_once(KERN_WARNING "Page fault handler and NMI tracing might trigger faults.\n");
#endif
}
}
if (global_dirty_limit_sym) {
return *global_dirty_limit_sym;
} else {
- printk(KERN_WARNING "LTTng: global_dirty_limit symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: global_dirty_limit symbol lookup failed.\n");
return 0;
}
}