summaryrefslogtreecommitdiffstats
path: root/kernel/rcu.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu.h')
-rw-r--r--kernel/rcu.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/rcu.h b/kernel/rcu.h
index 7bc16436aba0..d7f00ec8b47b 100644
--- a/kernel/rcu.h
+++ b/kernel/rcu.h
@@ -23,6 +23,12 @@
#ifndef __LINUX_RCU_H
#define __LINUX_RCU_H
+#ifdef CONFIG_RCU_TRACE
+#define RCU_TRACE(stmt) stmt
+#else /* #ifdef CONFIG_RCU_TRACE */
+#define RCU_TRACE(stmt)
+#endif /* #else #ifdef CONFIG_RCU_TRACE */
+
/*
* debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
* by call_rcu() and rcu callback execution, and are therefore not part of the
@@ -68,10 +74,10 @@ static inline void __rcu_reclaim(struct rcu_head *head)
unsigned long offset = (unsigned long)head->func;
if (__is_kfree_rcu_offset(offset)) {
- trace_rcu_invoke_kfree_callback(head, offset);
+ RCU_TRACE(trace_rcu_invoke_kfree_callback(head, offset));
kfree((void *)head - offset);
} else {
- trace_rcu_invoke_callback(head);
+ RCU_TRACE(trace_rcu_invoke_callback(head));
head->func(head);
}
}