Tracepoint API change: rename TRACEPOINT_SYSTEM to TRACEPOINT_PROVIDER
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 11 Nov 2011 17:31:35 +0000 (12:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 11 Nov 2011 17:31:35 +0000 (12:31 -0500)
Eliminates the confusion between the first TRACEPOINT_EVENT "provider"
argument and the "TRACEPOINT_SYSTEM", which need to be the same thing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint-event.h
include/lttng/tracepoint.h
include/lttng/ust-tracepoint-event.h
liblttng-ust-java/lttng_ust_java.h
liblttng-ust/lttng-ust-abi.c
liblttng-ust/probes/lttng-probe-ust.h
tests/fork/ust_tests_fork.h
tests/hello/ust_tests_hello.h

index a102ce74bfa982ae2aec25522581b769de4bc6f0..686db1e34edcc61ebe3e6f71adb947d9cb743bf1 100644 (file)
  * in their file should include this file. The following are macros that the
  * trace file may define:
  *
- * TRACEPOINT_SYSTEM defines the system the tracepoint is for:
+ * TRACEPOINT_PROVIDER defines the provider the tracepoint is for:
  *     < [com_company_]project_[component_] >
  *
  * TRACEPOINT_INCLUDE_FILE if the file name is something other than
- *     TRACEPOINT_SYSTEM.h. This macro may be defined to tell
+ *     TRACEPOINT_PROVIDER.h. This macro may be defined to tell
  *     define_trace.h what file to include.  Note, leave off the ".h".
  *
  * TRACEPOINT_INCLUDE_PATH if the path is something other than within
@@ -71,19 +71,19 @@ extern "C" {
 #undef __TRACEPOINT_INCLUDE
 
 #ifndef TRACEPOINT_INCLUDE_FILE
-# define TRACEPOINT_INCLUDE_FILE TRACEPOINT_SYSTEM
+# define TRACEPOINT_INCLUDE_FILE TRACEPOINT_PROVIDER
 # define UNDEF_TRACEPOINT_INCLUDE_FILE
 #endif
 
 #ifndef TRACEPOINT_INCLUDE_PATH
-# define __TRACEPOINT_INCLUDE(system) <tracepoint/system.h>
+# define __TRACEPOINT_INCLUDE(provider) <tracepoint/provider.h>
 # define UNDEF_TRACEPOINT_INCLUDE_PATH
 #else
-# define __TRACEPOINT_INCLUDE(system)                          \
-       __tp_stringify(TRACEPOINT_INCLUDE_PATH/system.h)
+# define __TRACEPOINT_INCLUDE(provider)                                \
+       __tp_stringify(TRACEPOINT_INCLUDE_PATH/provider.h)
 #endif
 
-# define TRACEPOINT_INCLUDE(system) __TRACEPOINT_INCLUDE(system)
+# define TRACEPOINT_INCLUDE(provider) __TRACEPOINT_INCLUDE(provider)
 
 /* Let the trace headers be reread */
 #define TRACEPOINT_HEADER_MULTI_READ
index e44c0331212158fd255c61056ac2c240c607669d..f4d7d6091b3116c7323b3c4dbebe5c8047a678bc 100644 (file)
@@ -326,7 +326,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * Do _NOT_ add comma (,) nor semicolon (;) after the TRACEPOINT_EVENT
  * declaration.
  *
- * The TRACEPOINT_SYSTEM must be defined when declaring a
+ * The TRACEPOINT_PROVIDER must be defined when declaring a
  * TRACEPOINT_EVENT. See ust/tracepoint-event.h for information about
  * usage of other macros controlling TRACEPOINT_EVENT.
  */
@@ -395,11 +395,11 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  *      TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >,
  *              < loglevel_name >)
  *
- * The TRACEPOINT_SYSTEM must be defined when declaring a
+ * The TRACEPOINT_PROVIDER must be defined when declaring a
  * TRACEPOINT_LOGLEVEL_ENUM and TRACEPOINT_LOGLEVEL. The tracepoint
- * loglevel enumeration apply to the entire TRACEPOINT_SYSTEM. Only one
+ * loglevel enumeration apply to the entire TRACEPOINT_PROVIDER. Only one
  * tracepoint loglevel enumeration should be declared per tracepoint
- * system.
+ * provider.
  */
 
 #define TRACEPOINT_LOGLEVEL_ENUM()
index 901f491716263c294c3a01fdb8f7341dab61f4f9..a60149e05c1c54428787999289c46a9abe3113a9 100644 (file)
@@ -226,10 +226,10 @@ static void __event_probe__##_provider##___##_name(void *__data);
 #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)
+#define TP_ID1(_token, _provider)      _token##_provider
+#define TP_ID(_token, _provider)       TP_ID1(_token, _provider)
 
-static const struct lttng_event_desc TP_ID(__event_desc___, TRACEPOINT_SYSTEM)[] = {
+static const struct lttng_event_desc TP_ID(__event_desc___, TRACEPOINT_PROVIDER)[] = {
 #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)
 };
 
@@ -243,13 +243,13 @@ static const struct lttng_event_desc TP_ID(__event_desc___, TRACEPOINT_SYSTEM)[]
  * Create a toplevel descriptor for the whole probe.
  */
 
-#define TP_ID1(_token, _system)        _token##_system
-#define TP_ID(_token, _system) TP_ID1(_token, _system)
+#define TP_ID1(_token, _provider)      _token##_provider
+#define TP_ID(_token, _provider)       TP_ID1(_token, _provider)
 
 /* non-const because list head will be modified when registered. */
-static struct lttng_probe_desc TP_ID(__probe_desc___, TRACEPOINT_SYSTEM) = {
-       .event_desc = TP_ID(__event_desc___, TRACEPOINT_SYSTEM),
-       .nr_events = _TP_ARRAY_SIZE(TP_ID(__event_desc___, TRACEPOINT_SYSTEM)),
+static struct lttng_probe_desc TP_ID(__probe_desc___, TRACEPOINT_PROVIDER) = {
+       .event_desc = TP_ID(__event_desc___, TRACEPOINT_PROVIDER),
+       .nr_events = _TP_ARRAY_SIZE(TP_ID(__event_desc___, TRACEPOINT_PROVIDER)),
 };
 
 #undef TP_ID1
@@ -498,22 +498,22 @@ static void __event_probe__##_provider##___##_name(void *__data)        \
 /* Reset all macros within TRACEPOINT_EVENT */
 #include <lttng/ust-tracepoint-event-reset.h>
 
-#define TP_ID1(_token, _system)        _token##_system
-#define TP_ID(_token, _system) TP_ID1(_token, _system)
+#define TP_ID1(_token, _provider)      _token##_provider
+#define TP_ID(_token, _provider)       TP_ID1(_token, _provider)
 
 static void __attribute__((constructor))
-TP_ID(__lttng_events_init__, TRACEPOINT_SYSTEM)(void)
+TP_ID(__lttng_events_init__, TRACEPOINT_PROVIDER)(void)
 {
        int ret;
 
-       ret = ltt_probe_register(&TP_ID(__probe_desc___, TRACEPOINT_SYSTEM));
+       ret = ltt_probe_register(&TP_ID(__probe_desc___, TRACEPOINT_PROVIDER));
        assert(!ret);
 }
 
 static void __attribute__((destructor))
-TP_ID(__lttng_events_exit__, TRACEPOINT_SYSTEM)(void)
+TP_ID(__lttng_events_exit__, TRACEPOINT_PROVIDER)(void)
 {
-       ltt_probe_unregister(&TP_ID(__probe_desc___, TRACEPOINT_SYSTEM));
+       ltt_probe_unregister(&TP_ID(__probe_desc___, TRACEPOINT_PROVIDER));
 }
 
 #undef TP_ID1
index 67e8d2d75b4825407d672c02fe8f914d0c35bfb3..3e2eb04516399cc865c33319278d2ef70cc09f1a 100644 (file)
@@ -1,8 +1,8 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM ust_java
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER lttng_ust_java
 
-#if !defined(_TRACEPOINT_UST_JAVA_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_UST_JAVA_H
+#if !defined(_TRACEPOINT_LTTNG_UST_JAVA_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_LTTNG_UST_JAVA_H
 
 /*
  * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
@@ -24,7 +24,7 @@
 
 #include <lttng/tracepoint.h>
 
-TRACEPOINT_EVENT(lttng_ust_java_string,
+TRACEPOINT_EVENT(lttng_ust_javastring,
        TP_PROTO(const char *name, const char *args),
        TP_VARS(name, args),
        TP_FIELDS(
@@ -33,7 +33,7 @@ TRACEPOINT_EVENT(lttng_ust_java_string,
        )
 )
 
-#endif /* _TRACEPOINT_UST_JAVA_H */
+#endif /* _TRACEPOINT_LTTNG_UST_JAVA_H */
 
 #undef TRACEPOINT_INCLUDE_PATH
 #define TRACEPOINT_INCLUDE_PATH .
index ea0a12483940def937212bc152f518cef90e9c81..6a60532daadafa02f466069985c6f86005213d80 100644 (file)
@@ -322,7 +322,7 @@ void lttng_metadata_create_events(int channel_objd)
        struct ltt_channel *channel = objd_private(channel_objd);
        static struct lttng_ust_event metadata_params = {
                .instrumentation = LTTNG_UST_TRACEPOINT,
-               .name = "lttng:metadata",
+               .name = "lttng_ust:metadata",
        };
        struct ltt_event *event;
 
@@ -513,7 +513,8 @@ copy:
        if (!list->iter.tracepoint) {
                tp_list_entry[0] = '\0';        /* end of list */
        } else {
-               if (!strcmp((*list->iter.tracepoint)->name, "lttng:metadata"))
+               if (!strcmp((*list->iter.tracepoint)->name,
+                               "lttng_ust:metadata"))
                        goto next;
                memcpy(tp_list_entry, (*list->iter.tracepoint)->name,
                        LTTNG_UST_SYM_NAME_LEN);
index c8525fd92c3c743e090b8a9e3e2d547723dd63b2..3ae9e02069e48b8ae21064efe890812464f7ddc5 100644 (file)
@@ -1,5 +1,5 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM lttng_ust
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER lttng_ust
 
 #if !defined(_TRACEPOINT_LTTNG_UST_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
 #define _TRACEPOINT_LTTNG_UST_H
@@ -24,7 +24,7 @@
 
 #include <lttng/tracepoint.h>
 
-TRACEPOINT_EVENT(lttng, metadata,
+TRACEPOINT_EVENT(lttng_ust, metadata,
 
        TP_PROTO(const char *str),
 
index f86df70a944d27d8e58bd370c9287fadcdb81b89..4e078911c2bf81ef8ae08960d4f6452658fbca35 100644 (file)
@@ -1,5 +1,5 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM ust_tests_fork
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER ust_tests_fork
 
 #if !defined(_TRACEPOINT_UST_TESTS_FORK_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
 #define _TRACEPOINT_UST_TESTS_FORK_H
index 9f38e983a90a054de2bb9e16aebd03f0ca04cfee..86e4ce7d2d84e6a74d5910f638d0484c07933b0b 100644 (file)
@@ -1,5 +1,5 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM ust_tests_hello
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER ust_tests_hello
 
 #if !defined(_TRACEPOINT_UST_TESTS_HELLO_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
 #define _TRACEPOINT_UST_TESTS_HELLO_H
This page took 0.030803 seconds and 4 git commands to generate.