aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-09 22:01:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-09 22:01:58 -0500
commit8205ff1dc84e0298cd4bc15aa7aeccc35634582c (patch)
treeceb532ee3ebc75fd2a3cca87c6b898c9517a06a9
parent380173ff56c7faea02d1278e8d9783093fc776f6 (diff)
parentdc17147de328a74bbdee67c1bf37d2f1992de756 (diff)
Merge tag 'trace-fixes-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "I previously sent a fix that prevents all trace events from being called if the current cpu is offline. But I forgot that in 3.18, we added lockdep checks to test RCU usage even when the event is disabled. Although there cannot be any bug when a cpu is going offline, we now get false warnings triggered by the added checks of the event being disabled. I removed the check from the tracepoint code itself, and added it to the condition section (which is "1" for 'no condition'). This way the online cpu check will get checked in all the right locations" * tag 'trace-fixes-v4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix check for cpu online when event is disabled
-rw-r--r--include/linux/tracepoint.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index acfdbf353a0b..be586c632a0c 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -134,9 +134,6 @@ extern void syscall_unregfunc(void);
134 void *it_func; \ 134 void *it_func; \
135 void *__data; \ 135 void *__data; \
136 \ 136 \
137 if (!cpu_online(raw_smp_processor_id())) \
138 return; \
139 \
140 if (!(cond)) \ 137 if (!(cond)) \
141 return; \ 138 return; \
142 prercu; \ 139 prercu; \
@@ -343,15 +340,19 @@ extern void syscall_unregfunc(void);
343 * "void *__data, proto" as the callback prototype. 340 * "void *__data, proto" as the callback prototype.
344 */ 341 */
345#define DECLARE_TRACE_NOARGS(name) \ 342#define DECLARE_TRACE_NOARGS(name) \
346 __DECLARE_TRACE(name, void, , 1, void *__data, __data) 343 __DECLARE_TRACE(name, void, , \
344 cpu_online(raw_smp_processor_id()), \
345 void *__data, __data)
347 346
348#define DECLARE_TRACE(name, proto, args) \ 347#define DECLARE_TRACE(name, proto, args) \
349 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \ 348 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
350 PARAMS(void *__data, proto), \ 349 cpu_online(raw_smp_processor_id()), \
351 PARAMS(__data, args)) 350 PARAMS(void *__data, proto), \
351 PARAMS(__data, args))
352 352
353#define DECLARE_TRACE_CONDITION(name, proto, args, cond) \ 353#define DECLARE_TRACE_CONDITION(name, proto, args, cond) \
354 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), PARAMS(cond), \ 354 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
355 cpu_online(raw_smp_processor_id()) && (PARAMS(cond)), \
355 PARAMS(void *__data, proto), \ 356 PARAMS(void *__data, proto), \
356 PARAMS(__data, args)) 357 PARAMS(__data, args))
357 358