History

tracing: Make tracepoint_printk a static_key

Currently, when tracepoint_printk is set (enabled by the "tp_printk" kernel command line), it causes trace events to print via printk(). This is a very dangerous operation, but is useful for debugging. The issue is, it's seldom used, but it is always checked even if it's not enabled by the kernel command line. Instead of having this feature called by a branch against a variable, turn that variable into a static key, and this will remove the test and jump. To simplify things, the functions output_printk() and trace_event_buffer_commit() were moved from trace_events.c to trace.c.

Steven Rostedt (Red Hat) committed 9 years ago

Commit 42391741 parent 929ddbf4 files · +83 −41Browse files

Showing the changes to kernel/sysctl.c (1 of 4 files). Show all

Unified · Split

kernel/sysctl.c+1−1
@@ -634,7 +634,7 @@ static struct ctl_table kern_table[] = { · 633 unmodified lines
634 .data = &tracepoint_printk,634 .data = &tracepoint_printk,
635 .maxlen = sizeof(tracepoint_printk),635 .maxlen = sizeof(tracepoint_printk),
636 .mode = 0644,636 .mode = 0644,
637 .proc_handler = proc_dointvec,637 .proc_handler = tracepoint_printk_sysctl,
638 },638 },
639#endif639#endif
640#ifdef CONFIG_KEXEC_CORE640#ifdef CONFIG_KEXEC_CORE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t