diff options
Diffstat (limited to 'include/linux/tracepoint.h')
-rw-r--r-- | include/linux/tracepoint.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index ba605015c4d8..32335bec6ebd 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -190,6 +190,11 @@ static inline void tracepoint_synchronize_unregister(void) static inline void \ check_trace_callback_type_##name(void (*cb)(data_proto)) \ { \ + } \ + static inline bool \ + trace_##name##_enabled(void) \ + { \ + return static_key_false(&__tracepoint_##name.key); \ } /* @@ -235,6 +240,11 @@ static inline void tracepoint_synchronize_unregister(void) } \ static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \ { \ + } \ + static inline bool \ + trace_##name##_enabled(void) \ + { \ + return false; \ } #define DEFINE_TRACE_FN(name, reg, unreg) |