X-Git-Url: http://git.lttng.org/?p=ust.git;a=blobdiff_plain;f=include%2Fust%2Ftracepoint.h;fp=include%2Fust%2Ftracepoint.h;h=9463e4072fa6411d054a2c0f74bd7f6b3f9631f2;hp=3d61f72883c762cc44ad64fb5c4c005d281d2084;hb=2874fee50444405591974a7166313063b315efe1;hpb=0a2aba1397f90fa65c293ab856d18579ae14b77f diff --git a/include/ust/tracepoint.h b/include/ust/tracepoint.h index 3d61f72..9463e40 100644 --- a/include/ust/tracepoint.h +++ b/include/ust/tracepoint.h @@ -124,6 +124,29 @@ struct tracepoint { { \ return __tracepoint_probe_unregister(#name, (void *)probe, \ data); \ + } \ + /* \ + * Backward-compatibility API (will be deprecated): \ + * trace_* \ + * register_trace_* \ + * unregister_trace_* \ + */ \ + static inline void trace_##name(proto) \ + { \ + __CHECK_TRACE(name, TP_PROTO(proto), \ + TP_ARGS(args)); \ + } \ + static inline int \ + register_trace_##name(void (*probe)(proto)) \ + { \ + return __tracepoint_probe_register(#name, (void *)probe,\ + NULL); \ + } \ + static inline int \ + unregister_trace_##name(void (*probe)(proto)) \ + { \ + return __tracepoint_probe_unregister(#name, (void *)probe, \ + NULL); \ } /* @@ -194,6 +217,16 @@ int tracepoint_register_lib(struct tracepoint * const *tracepoints_start, extern int tracepoint_unregister_lib(struct tracepoint * const *tracepoints_start); +/* + * Backward-compatibility API (will be deprecated): + * DEFINE_TRACE + * DECLARE_TRACE + * register_tracepoint + * unregister_tracepoint + */ +#define DEFINE_TRACE _DEFINE_TRACEPOINT +#define DECLARE_TRACE(name, proto, args) \ + _DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args)) #ifndef TRACEPOINT_EVENT /*