tracepoints: use modules notifiers
[deliverable/linux.git] / include / linux / tracepoint.h
index c5bb39c7a7703cdb7db04faf0e2b0ce2086aa19d..7e9b42aeae0e1c8fc72d6bb21f1d2084cacf8889 100644 (file)
@@ -40,14 +40,14 @@ struct tracepoint {
        do {                                                            \
                void **it_func;                                         \
                                                                        \
-               rcu_read_lock_sched();                                  \
+               rcu_read_lock_sched_notrace();                          \
                it_func = rcu_dereference((tp)->funcs);                 \
                if (it_func) {                                          \
                        do {                                            \
                                ((void(*)(proto))(*it_func))(args);     \
                        } while (*(++it_func));                         \
                }                                                       \
-               rcu_read_unlock_sched();                                \
+               rcu_read_unlock_sched_notrace();                        \
        } while (0)
 
 /*
@@ -60,7 +60,7 @@ struct tracepoint {
        {                                                               \
                static const char __tpstrtab_##name[]                   \
                __attribute__((section("__tracepoints_strings")))       \
-               = #name ":" #proto;                                     \
+               = #name;                                                \
                static struct tracepoint __tracepoint_##name            \
                __attribute__((section("__tracepoints"), aligned(8))) = \
                { __tpstrtab_##name, 0, NULL };                         \
@@ -70,13 +70,11 @@ struct tracepoint {
        }                                                               \
        static inline int register_trace_##name(void (*probe)(proto))   \
        {                                                               \
-               return tracepoint_probe_register(#name ":" #proto,      \
-                       (void *)probe);                                 \
+               return tracepoint_probe_register(#name, (void *)probe); \
        }                                                               \
-       static inline void unregister_trace_##name(void (*probe)(proto))\
+       static inline int unregister_trace_##name(void (*probe)(proto)) \
        {                                                               \
-               tracepoint_probe_unregister(#name ":" #proto,           \
-                       (void *)probe);                                 \
+               return tracepoint_probe_unregister(#name, (void *)probe);\
        }
 
 extern void tracepoint_update_probe_range(struct tracepoint *begin,
@@ -92,8 +90,10 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
        {                                                               \
                return -ENOSYS;                                         \
        }                                                               \
-       static inline void unregister_trace_##name(void (*probe)(proto))\
-       { }
+       static inline int unregister_trace_##name(void (*probe)(proto)) \
+       {                                                               \
+               return -ENOSYS;                                         \
+       }
 
 static inline void tracepoint_update_probe_range(struct tracepoint *begin,
        struct tracepoint *end)
@@ -112,6 +112,10 @@ extern int tracepoint_probe_register(const char *name, void *probe);
  */
 extern int tracepoint_probe_unregister(const char *name, void *probe);
 
+extern int tracepoint_probe_register_noupdate(const char *name, void *probe);
+extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe);
+extern void tracepoint_probe_update_all(void);
+
 struct tracepoint_iter {
        struct module *module;
        struct tracepoint *tracepoint;
This page took 0.035358 seconds and 5 git commands to generate.