Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / include / linux / tracepoint.h
index 9d30ee469c2aed19e9444de08ba37b0978bd1a27..2e2a5f7717e5e56870c58f6ec97021dadf4f72ca 100644 (file)
@@ -185,6 +185,11 @@ extern void syscall_unregfunc(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);      \
        }
 
 /*
@@ -230,6 +235,11 @@ extern void syscall_unregfunc(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)