tracing: optimize trace_printk()
authorIngo Molnar <mingo@elte.hu>
Mon, 9 Mar 2009 09:11:36 +0000 (10:11 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Mar 2009 09:11:36 +0000 (10:11 +0100)
commit7bffc23e56e92c14b787bf4d95249a32085bfed5
tree9c1bbea2f258c82b5a9ff5e30db3a8f0c9cc3faa
parent8a20d84d09ab5d121f989cd99e4fc5f4b49f98ba
tracing: optimize trace_printk()

Impact: micro-optimization

trace_printk() does this unconditionally:

trace_printk_fmt = fmt;

Where trace_printk_fmt is an entry into a global array. This is
very SMP-unfriendly.

So only write it once per bootup.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1236356510-8381-5-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/kernel.h