Tracepoint API namespacing 'TRACEPOINT_INCLUDE'
[lttng-ust.git] / tools / lttng-gen-tp
index a62107f7b2006fcd876901f85aed5df2d7d9cb8f..4e74de0d039107e66f5fcc6f5cd5a7a6c0351560 100755 (executable)
@@ -22,10 +22,10 @@ class HeaderFile:
 #undef TRACEPOINT_PROVIDER
 #define TRACEPOINT_PROVIDER {providerName}
 
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./{headerFilename}"
+#undef LTTNG_UST_TRACEPOINT_INCLUDE
+#define LTTNG_UST_TRACEPOINT_INCLUDE "./{headerFilename}"
 
-#if !defined({includeGuard}) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#if !defined({includeGuard}) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ)
 #define {includeGuard}
 
 #include <lttng/tracepoint.h>
@@ -57,11 +57,11 @@ class HeaderFile:
 
 class CFile:
     FILE_TPL = """
-#define TRACEPOINT_CREATE_PROBES
+#define LTTNG_UST_TRACEPOINT_CREATE_PROBES
 /*
- * The header containing our TRACEPOINT_EVENTs.
+ * The header containing our LTTNG_UST_TRACEPOINT_EVENTs.
  */
-#define TRACEPOINT_DEFINE
+#define LTTNG_UST_TRACEPOINT_DEFINE
 #include "{headerFilename}"
 """
 
@@ -170,7 +170,7 @@ class TemplateFile:
         cleantext = re.sub("\s*", "", nolinecomment)
         # Remove multine C style comments
         nocomment = re.sub("/\*.*?\*/", "", cleantext)
-        entries = re.split("TRACEPOINT_.*?", nocomment)
+        entries = re.split("^LTTNG_UST_TRACEPOINT_.*?", nocomment)
 
         for entry in entries:
             if entry != '':
@@ -200,7 +200,7 @@ usage = """
  When using the -o option, the OUTPUT_FILE must end with either .h, .c or .o
  The -o option can be repeated multiple times.
 
- The template file must contains TRACEPOINT_EVENT and TRACEPOINT_LOGLEVEL
+ The template file must contains LTTNG_UST_TRACEPOINT_EVENT and LTTNG_UST_TRACEPOINT_LOGLEVEL
  as per defined in the lttng/tracepoint.h file.
  See the lttng-ust(3) man page for more details on the format.
 """
This page took 0.023988 seconds and 4 git commands to generate.