]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Use tracepoint_enabled() for msr tracepoints instead of open coding it
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 25 Sep 2020 19:31:44 +0000 (15:31 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 28 Sep 2020 14:36:02 +0000 (10:36 -0400)
commit962642de0b57c14a35897fcc1619afbc572e80cb
treed61d366671a945bfd54d1d3aca6f053744cd9b79
parent2db9b5f572d8b830988a021f2d29b4b12991095a
x86: Use tracepoint_enabled() for msr tracepoints instead of open coding it

f5d450200462 ("x86, tracing, perf: Add trace point for MSR accesses") added
tracing of msr read and write, but because of complexity in having
tracepoints in headers, and even more so for a core header like msr.h, not
to mention the bloat a tracepoint adds to inline functions, a helper
function is needed to be called from the header.

Use the new tracepoint_enabled() macro in tracepoint-defs.h to test if the
tracepoint is active before calling the helper function, instead of open
coding the same logic, which requires knowing the internals of a tracepoint.

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/x86/include/asm/msr.h