Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_FTRACE_IRQ_H
0003 #define _LINUX_FTRACE_IRQ_H
0004 
0005 #ifdef CONFIG_HWLAT_TRACER
0006 extern bool trace_hwlat_callback_enabled;
0007 extern void trace_hwlat_callback(bool enter);
0008 #endif
0009 
0010 #ifdef CONFIG_OSNOISE_TRACER
0011 extern bool trace_osnoise_callback_enabled;
0012 extern void trace_osnoise_callback(bool enter);
0013 #endif
0014 
0015 static inline void ftrace_nmi_enter(void)
0016 {
0017 #ifdef CONFIG_HWLAT_TRACER
0018     if (trace_hwlat_callback_enabled)
0019         trace_hwlat_callback(true);
0020 #endif
0021 #ifdef CONFIG_OSNOISE_TRACER
0022     if (trace_osnoise_callback_enabled)
0023         trace_osnoise_callback(true);
0024 #endif
0025 }
0026 
0027 static inline void ftrace_nmi_exit(void)
0028 {
0029 #ifdef CONFIG_HWLAT_TRACER
0030     if (trace_hwlat_callback_enabled)
0031         trace_hwlat_callback(false);
0032 #endif
0033 #ifdef CONFIG_OSNOISE_TRACER
0034     if (trace_osnoise_callback_enabled)
0035         trace_osnoise_callback(false);
0036 #endif
0037 }
0038 
0039 #endif /* _LINUX_FTRACE_IRQ_H */