From: Mathieu Desnoyers Date: Tue, 8 Nov 2011 15:56:28 +0000 (-0500) Subject: Tracepoint API change: add provider field X-Git-Tag: v1.9.1~121 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7083f0fecaa692b819e63f484daf38399f58c905;p=lttng-ust.git Tracepoint API change: add provider field Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/tracepoint-event.h b/include/lttng/tracepoint-event.h index 65120d4b..a102ce74 100644 --- a/include/lttng/tracepoint-event.h +++ b/include/lttng/tracepoint-event.h @@ -52,20 +52,20 @@ extern "C" { #endif #undef TRACEPOINT_EVENT -#define TRACEPOINT_EVENT(name, proto, args, fields) \ - _DEFINE_TRACEPOINT(name) +#define TRACEPOINT_EVENT(provider, name, proto, args, fields) \ + _DEFINE_TRACEPOINT(provider, name) #undef TRACEPOINT_EVENT_INSTANCE -#define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \ - _DEFINE_TRACEPOINT(name) +#define TRACEPOINT_EVENT_INSTANCE(provider, template, name, proto, args) \ + _DEFINE_TRACEPOINT(provider, name) #undef TRACEPOINT_EVENT_NOARGS -#define TRACEPOINT_EVENT_NOARGS(name, fields) \ - _DEFINE_TRACEPOINT(name) +#define TRACEPOINT_EVENT_NOARGS(provider, name, fields) \ + _DEFINE_TRACEPOINT(provider, name) #undef TRACEPOINT_EVENT_INSTANCE_NOARGS -#define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \ - _DEFINE_TRACEPOINT(name) +#define TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, template, name) \ + _DEFINE_TRACEPOINT(provider, name) #undef TRACEPOINT_INCLUDE #undef __TRACEPOINT_INCLUDE diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index e39a3849..dc7d62bd 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -47,7 +47,8 @@ struct tracepoint { * Tracepoints should be added to the instrumented code using the * "tracepoint()" macro. */ -#define tracepoint(name, args...) __trace_##name(args) +#define tracepoint(provider, name, args...) \ + __trace_##provider##___##name(args) /* * it_func[0] is never NULL because there is at least one element in the array @@ -75,10 +76,10 @@ struct tracepoint { #define TP_PROTO(args...) args #define TP_ARGS(args...) args -#define __CHECK_TRACE(name, proto, args) \ +#define __CHECK_TRACE(provider, name, proto, args) \ do { \ - if (caa_unlikely(__tracepoint_##name.state)) \ - __DO_TRACE(&__tracepoint_##name, \ + if (caa_unlikely(__tracepoint_##provider##___##name.state)) \ + __DO_TRACE(&__tracepoint_##provider##___##name, \ TP_PROTO(proto), TP_ARGS(args)); \ } while (0) @@ -87,23 +88,23 @@ struct tracepoint { * not add unwanted padding between the beginning of the section and the * structure. Force alignment to the same alignment as the section start. */ -#define __DECLARE_TRACEPOINT(name, proto, args, data_proto, data_args) \ - extern struct tracepoint __tracepoint_##name; \ - static inline void __trace_##name(proto) \ +#define __DECLARE_TRACEPOINT(provider, name, proto, args, data_proto, data_args) \ + extern struct tracepoint __tracepoint_##provider##___##name; \ + static inline void __trace_##provider##___##name(proto) \ { \ - __CHECK_TRACE(name, TP_PROTO(data_proto), \ + __CHECK_TRACE(provider, name, TP_PROTO(data_proto), \ TP_ARGS(data_args)); \ } \ static inline int \ - __register_trace_##name(void (*probe)(data_proto), void *data) \ + __register_trace_##provider##___##name(void (*probe)(data_proto), void *data) \ { \ - return __tracepoint_probe_register(#name, (void *)probe,\ + return __tracepoint_probe_register(#provider ":" #name, (void *) probe, \ data); \ } \ static inline int \ - __unregister_trace_##name(void (*probe)(data_proto), void *data)\ + __unregister_trace_##provider##___##name(void (*probe)(data_proto), void *data) \ { \ - return __tracepoint_probe_unregister(#name, (void *)probe, \ + return __tracepoint_probe_unregister(#provider ":" #name, (void *) probe, \ data); \ } @@ -121,11 +122,11 @@ struct tracepoint { * DECLARE_TRACEPOINT() passes "proto" as the tracepoint protoype and * "void *__tp_cb_data, proto" as the callback prototype. */ -#define _DECLARE_TRACEPOINT_NOARGS(name) \ - __DECLARE_TRACEPOINT(name, void, , void *__tp_cb_data, __tp_cb_data) +#define _DECLARE_TRACEPOINT_NOARGS(provider, name) \ + __DECLARE_TRACEPOINT(provider, name, void, , void *__tp_cb_data, __tp_cb_data) -#define _DECLARE_TRACEPOINT(name, proto, args) \ - __DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args), \ +#define _DECLARE_TRACEPOINT(provider, name, proto, args) \ + __DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args), \ TP_PARAMS(void *__tp_cb_data, proto), \ TP_PARAMS(__tp_cb_data, args)) @@ -133,21 +134,22 @@ struct tracepoint { * __tracepoints_ptrs section is not const (read-only) to let the linker update * the pointer, allowing PIC code. */ -#define _DEFINE_TRACEPOINT(name) \ - static const char __tpstrtab_##name[] \ - __attribute__((section("__tracepoints_strings"))) = #name; \ - struct tracepoint __tracepoint_##name \ +#define _DEFINE_TRACEPOINT(provider, name) \ + static const char __tpstrtab_##provider##___##name[] \ + __attribute__((section("__tracepoints_strings"))) = \ + #provider ":" #name; \ + struct tracepoint __tracepoint_##provider##___##name \ __attribute__((section("__tracepoints"))) = \ - { __tpstrtab_##name, 0, NULL }; \ - static struct tracepoint * __tracepoint_ptr_##name \ + { __tpstrtab_##provider##___##name, 0, NULL }; \ + static struct tracepoint * __tracepoint_ptr_##provider##___##name \ __attribute__((used, section("__tracepoints_ptrs"))) = \ - &__tracepoint_##name; + &__tracepoint_##provider##___##name; -#define __register_tracepoint(name, probe, data) \ - __register_trace_##name(probe, data) -#define __unregister_tracepoint(name, probe, data) \ - __unregister_trace_##name(probe, data) +#define __register_tracepoint(provider, name, probe, data) \ + __register_trace_##provider##___##name(probe, data) +#define __unregister_tracepoint(provider, name, probe, data) \ + __unregister_trace_##provider##___##name(probe, data) /* * Connect a probe to a tracepoint. @@ -203,7 +205,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * * In short, an example: * - * TRACEPOINT_EVENT(< [com_company_]project_[component_]event >, + * TRACEPOINT_EVENT(< [com_company_]project[_component] >, < event >, * TP_PROTO(int arg0, void *arg1, char *string, size_t strlen, * long *arg4, size_t arg4_len), * TP_ARGS(arg0, arg1, string, strlen, arg4, arg4_len), @@ -233,20 +235,20 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * We define a tracepoint, its arguments, and its 'fast binary record' * layout. * - * Firstly, name your tracepoint via TRACEPOINT_EVENT(name, + * Firstly, name your tracepoint via TRACEPOINT_EVENT(provider, name, * - * The name should be a proper C99 identifier. - * The "name" MUST follow these rules to ensure no namespace clash - * occurs: + * The provider and name should be a proper C99 identifier. + * The "provider" and "name" MUST follow these rules to ensure no + * namespace clash occurs: * * For projects (applications and libraries) for which an entity * specific to the project controls the source code and thus its * tracepoints (typically with a scope larger than a single company): * * either: - * project_component_event + * project_component, event * or: - * project_event + * project, event * * Where "project" is the name of the project, * "component" is the name of the project component (which may @@ -260,9 +262,9 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * "com_" prefix should be used: * * either: - * com_company_project_component_event + * com_company_project_component, event * or: - * com_company_project_event + * com_company_project, event * * Where "company" is the name of the company, * "project" is the name of the project, @@ -272,11 +274,13 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * (optional), * "event" is the name of the tracepoint event. * + * the provider identifier is limited to 127 characters. + * the "event" identifier is limited to 127 characters. * * As an example, let's consider a user-space application "someproject" * that would have an internal thread scheduler: * - * TRACEPOINT_EVENT(someproject_sched_switch, + * TRACEPOINT_EVENT(someproject_sched, switch, * * * * * A function has a regular function arguments @@ -340,22 +344,22 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * usage of other macros controlling TRACEPOINT_EVENT. */ -#define TRACEPOINT_EVENT(name, proto, args, fields) \ - _DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args)) +#define TRACEPOINT_EVENT(provider, name, proto, args, fields) \ + _DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args)) -#define TRACEPOINT_EVENT_CLASS(name, proto, args, fields) -#define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \ - _DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args)) +#define TRACEPOINT_EVENT_CLASS(provider, name, proto, args, fields) +#define TRACEPOINT_EVENT_INSTANCE(provider, template, name, proto, args)\ + _DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args)) /* * Declaration of tracepoints that take 0 argument. */ -#define TRACEPOINT_EVENT_NOARGS(name, fields) \ - _DECLARE_TRACEPOINT_NOARGS(name) +#define TRACEPOINT_EVENT_NOARGS(provider, name, fields) \ + _DECLARE_TRACEPOINT_NOARGS(provider, name) -#define TRACEPOINT_EVENT_CLASS_NOARGS(name, fields) -#define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name) \ - _DECLARE_TRACEPOINT_NOARGS(name) +#define TRACEPOINT_EVENT_CLASS_NOARGS(provider, name, fields) +#define TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, template, name) \ + _DECLARE_TRACEPOINT_NOARGS(provider, name) #endif /* #ifndef TRACEPOINT_EVENT */ @@ -401,7 +405,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void) * is the name of the tracepoint, the second field is the loglevel * name. * - * TRACEPOINT_LOGLEVEL(< [com_company_]project_[component_]event >, + * TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >, * < loglevel_name >) * * The TRACEPOINT_SYSTEM must be defined when declaring a diff --git a/include/lttng/ust-tracepoint-event-reset.h b/include/lttng/ust-tracepoint-event-reset.h index 9485ee0e..43044ac9 100644 --- a/include/lttng/ust-tracepoint-event-reset.h +++ b/include/lttng/ust-tracepoint-event-reset.h @@ -34,13 +34,13 @@ #define TP_FIELDS(args...) #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) #undef TRACEPOINT_EVENT_CLASS_NOARGS -#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) +#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields) #undef TRACEPOINT_EVENT_INSTANCE -#define TRACEPOINT_EVENT_INSTANCE(_template, _name, _proto, _args) +#define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _proto, _args) #undef TRACEPOINT_EVENT_INSTANCE_NOARGS -#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) +#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name) diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index b9abbd31..90e58e09 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -77,18 +77,18 @@ */ #undef TRACEPOINT_EVENT -#define TRACEPOINT_EVENT(name, proto, args, fields) \ - TRACEPOINT_EVENT_CLASS(name, \ +#define TRACEPOINT_EVENT(provider, name, proto, args, fields) \ + TRACEPOINT_EVENT_CLASS(provider, name, \ TP_PARAMS(proto), \ TP_PARAMS(args), \ TP_PARAMS(fields)) \ - TRACEPOINT_EVENT_INSTANCE(name, name, TP_PARAMS(proto), TP_PARAMS(args)) + TRACEPOINT_EVENT_INSTANCE(provider, name, name, TP_PARAMS(proto), TP_PARAMS(args)) #undef TRACEPOINT_EVENT_NOARGS -#define TRACEPOINT_EVENT_NOARGS(name, fields) \ - TRACEPOINT_EVENT_CLASS_NOARGS(name, \ +#define TRACEPOINT_EVENT_NOARGS(provider, name, fields) \ + TRACEPOINT_EVENT_CLASS_NOARGS(provider, name, \ TP_PARAMS(fields)) \ - TRACEPOINT_EVENT_INSTANCE_NOARGS(name, name) + TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, name, name) /* Helpers */ #define _TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) @@ -171,14 +171,14 @@ #define TP_FIELDS(args...) args /* Only one used in this phase */ #undef TRACEPOINT_EVENT_CLASS_NOARGS -#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ - static const struct lttng_event_field __event_fields___##_name[] = { \ +#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields) \ + static const struct lttng_event_field __event_fields___##_provider##___##_name[] = { \ _fields \ }; #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ - TRACEPOINT_EVENT_CLASS_NOARGS(_name, TP_PARAMS(_fields)) +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) \ + TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, TP_PARAMS(_fields)) #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE) @@ -195,12 +195,12 @@ #define TP_PROTO(args...) args #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ -static void __event_probe__##_name(void *__data, _proto); +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) \ +static void __event_probe__##_provider##___##_name(void *__data, _proto); #undef TRACEPOINT_EVENT_CLASS_NOARGS -#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ -static void __event_probe__##_name(void *__data); +#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields) \ +static void __event_probe__##_provider##___##_name(void *__data); #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE) @@ -214,17 +214,17 @@ static void __event_probe__##_name(void *__data); #include #undef TRACEPOINT_EVENT_INSTANCE_NOARGS -#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) \ +#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name) \ { \ - .fields = __event_fields___##_template, \ - .name = #_name, \ - .probe_callback = (void *) &__event_probe__##_template,\ - .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_template), \ + .fields = __event_fields___##_provider##___##_template,\ + .name = #_provider ":" #_name, \ + .probe_callback = (void *) &__event_probe__##_provider##___##_template,\ + .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template), \ }, #undef TRACEPOINT_EVENT_INSTANCE -#define TRACEPOINT_EVENT_INSTANCE(_template, _name, _proto, _args) \ - TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name) +#define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _proto, _args) \ + TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name) #define TP_ID1(_token, _system) _token##_system #define TP_ID(_token, _system) TP_ID1(_token, _system) @@ -300,8 +300,8 @@ static struct lttng_probe_desc TP_ID(__probe_desc___, TRACEPOINT_SYSTEM) = { #define TP_FIELDS(args...) args #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ -static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) \ +static inline size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _proto) \ { \ size_t __event_len = 0; \ unsigned int __dynamic_len_idx = 0; \ @@ -351,8 +351,8 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \ #define TP_FIELDS(args...) args #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ -static inline size_t __event_get_align__##_name(_proto) \ +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) \ +static inline size_t __event_get_align__##_provider##___##_name(_proto) \ { \ size_t __event_align = 1; \ _fields \ @@ -428,15 +428,15 @@ static inline size_t __event_get_align__##_name(_proto) \ #define TP_FIELDS(args...) args #undef TRACEPOINT_EVENT_CLASS -#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields) \ -static void __event_probe__##_name(void *__data, _proto) \ +#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields) \ +static void __event_probe__##_provider##___##_name(void *__data, _proto) \ { \ struct ltt_event *__event = __data; \ struct ltt_channel *__chan = __event->chan; \ struct lttng_ust_lib_ring_buffer_ctx __ctx; \ size_t __event_len, __event_align; \ size_t __dynamic_len_idx = 0; \ - size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_name)]; \ + size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_provider##___##_name)]; \ int __ret; \ \ if (0) \ @@ -447,8 +447,8 @@ static void __event_probe__##_name(void *__data, _proto) \ return; \ if (caa_unlikely(!CMM_ACCESS_ONCE(__event->enabled))) \ return; \ - __event_len = __event_get_size__##_name(__dynamic_len, _args); \ - __event_align = __event_get_align__##_name(_args); \ + __event_len = __event_get_size__##_provider##___##_name(__dynamic_len, _args); \ + __event_align = __event_get_align__##_provider##___##_name(_args); \ lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len, \ __event_align, -1, __chan->handle); \ __ret = __chan->ops->event_reserve(&__ctx, __event->id); \ @@ -459,8 +459,8 @@ static void __event_probe__##_name(void *__data, _proto) \ } #undef TRACEPOINT_EVENT_CLASS_NOARGS -#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields) \ -static void __event_probe__##_name(void *__data) \ +#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields) \ +static void __event_probe__##_provider##___##_name(void *__data) \ { \ struct ltt_event *__event = __data; \ struct ltt_channel *__chan = __event->chan; \ diff --git a/liblttng-ust/ltt-events.c b/liblttng-ust/ltt-events.c index 4c41531a..18b257b3 100644 --- a/liblttng-ust/ltt-events.c +++ b/liblttng-ust/ltt-events.c @@ -718,7 +718,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session, ret = lttng_metadata_printf(session, "event {\n" - " name = %s;\n" + " name = \"%s\";\n" " id = %u;\n" " stream_id = %u;\n", event->desc->name, diff --git a/liblttng-ust/probes/lttng-probe-ust.h b/liblttng-ust/probes/lttng-probe-ust.h index 3394d086..8835dba6 100644 --- a/liblttng-ust/probes/lttng-probe-ust.h +++ b/liblttng-ust/probes/lttng-probe-ust.h @@ -24,7 +24,7 @@ #include -TRACEPOINT_EVENT(lttng_metadata, +TRACEPOINT_EVENT(lttng, metadata, TP_PROTO(const char *str), diff --git a/tests/fork/fork.c b/tests/fork/fork.c index 17162574..f15a6925 100644 --- a/tests/fork/fork.c +++ b/tests/fork/fork.c @@ -35,7 +35,7 @@ int main(int argc, char **argv, char *env[]) } printf("Fork test program, parent pid is %d\n", getpid()); - tracepoint(ust_tests_fork_before_fork); + tracepoint(ust_tests_fork, before_fork); result = fork(); if (result == -1) { @@ -47,7 +47,7 @@ int main(int argc, char **argv, char *env[]) printf("Child pid is %d\n", getpid()); - tracepoint(ust_tests_fork_after_fork_child, getpid()); + tracepoint(ust_tests_fork, after_fork_child, getpid()); result = execve(argv[1], args, env); if (result == -1) { @@ -55,7 +55,7 @@ int main(int argc, char **argv, char *env[]) return 1; } } else { - tracepoint(ust_tests_fork_after_fork_parent); + tracepoint(ust_tests_fork, after_fork_parent); } return 0; diff --git a/tests/fork/fork2.c b/tests/fork/fork2.c index 187b7a1c..5727f3f4 100644 --- a/tests/fork/fork2.c +++ b/tests/fork/fork2.c @@ -25,7 +25,7 @@ int main() { printf("IN FORK2\n"); - tracepoint(ust_tests_fork_after_exec); + tracepoint(ust_tests_fork, after_exec); return 0; } diff --git a/tests/fork/ust_tests_fork.h b/tests/fork/ust_tests_fork.h index 27e6b47e..4bd105bd 100644 --- a/tests/fork/ust_tests_fork.h +++ b/tests/fork/ust_tests_fork.h @@ -25,11 +25,11 @@ #include #include -TRACEPOINT_EVENT_NOARGS(ust_tests_fork_before_fork, +TRACEPOINT_EVENT_NOARGS(ust_tests_fork, before_fork, TP_FIELDS() ) -TRACEPOINT_EVENT(ust_tests_fork_after_fork_child, +TRACEPOINT_EVENT(ust_tests_fork, after_fork_child, TP_PROTO(pid_t pid), TP_ARGS(pid), TP_FIELDS( @@ -37,11 +37,11 @@ TRACEPOINT_EVENT(ust_tests_fork_after_fork_child, ) ) -TRACEPOINT_EVENT_NOARGS(ust_tests_fork_after_fork_parent, +TRACEPOINT_EVENT_NOARGS(ust_tests_fork, after_fork_parent, TP_FIELDS() ) -TRACEPOINT_EVENT_NOARGS(ust_tests_fork_after_exec, +TRACEPOINT_EVENT_NOARGS(ust_tests_fork, after_exec, TP_FIELDS() ) diff --git a/tests/hello/hello.c b/tests/hello/hello.c index 661ed408..cc23a577 100644 --- a/tests/hello/hello.c +++ b/tests/hello/hello.c @@ -33,7 +33,7 @@ void inthandler(int sig) { printf("in SIGUSR1 handler\n"); - tracepoint(ust_tests_hello_tptest_sighandler); + tracepoint(ust_tests_hello, tptest_sighandler); } int init_int_handler(void) @@ -80,7 +80,7 @@ int main(int argc, char **argv) //for (i = 0; i < 50; i++) { for (i = 0; i < 1000000; i++) { netint = htonl(i); - tracepoint(ust_tests_hello_tptest, i, netint, values, + tracepoint(ust_tests_hello, tptest, i, netint, values, text, strlen(text), dbl, flt); //usleep(100000); } diff --git a/tests/hello/ust_tests_hello.h b/tests/hello/ust_tests_hello.h index 5ad67f48..40f2cc19 100644 --- a/tests/hello/ust_tests_hello.h +++ b/tests/hello/ust_tests_hello.h @@ -28,7 +28,7 @@ extern "C" { #include -TRACEPOINT_EVENT(ust_tests_hello_tptest, +TRACEPOINT_EVENT(ust_tests_hello, tptest, TP_PROTO(int anint, int netint, long *values, char *text, size_t textlen, double doublearg, float floatarg), @@ -52,7 +52,7 @@ TRACEPOINT_EVENT(ust_tests_hello_tptest, ) ) -TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler, +TRACEPOINT_EVENT_NOARGS(ust_tests_hello, tptest_sighandler, TP_FIELDS() )