rcu: Consolidate dumping of ftrace buffer
This commit consolidates a couple definitions and several calls for single-shot ftrace-buffer dumping. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
@@ -1144,4 +1144,17 @@ static inline void rcu_sysidle_force_exit(void)
|
||||
#endif /* #else #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
|
||||
|
||||
|
||||
/*
|
||||
* Dump the ftrace buffer, but only one time per callsite per boot.
|
||||
*/
|
||||
#define rcu_ftrace_dump(oops_dump_mode) \
|
||||
do { \
|
||||
static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
|
||||
\
|
||||
if (!atomic_read(&___rfd_beenhere) && \
|
||||
!atomic_xchg(&___rfd_beenhere, 1)) \
|
||||
ftrace_dump(oops_dump_mode); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#endif /* __LINUX_RCUPDATE_H */
|
||||
|
||||
Reference in New Issue
Block a user