fprintf(stderr, "Tracing... ");
for (i = 0; i < 5; i++) {
- tracelog(TRACE_ERR, "Error condition %d", i);
+ tracelog(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR, "Error condition %d", i);
}
fprintf(stderr, " done.\n");
return 0;
va_list ap;
va_start(ap, msg);
- vtracelog(TRACE_ERR, msg, ap);
+ vtracelog(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR, msg, ap);
va_end(ap);
}
ctf_integer(int, value, value)
)
)
-TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, TRACE_CRIT)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
/*
* Dummy model information, just for example. TODO: we should check if
ctf_integer(int, value, value)
)
)
-TRACEPOINT_LOGLEVEL(ust_tests_demo, done, TRACE_CRIT)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done,
"http://example.com/path_to_model?q=ust_tests_demo:done")
ctf_float(double, doublefield, doublearg)
)
)
-TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, TRACE_WARNING)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo2, loop, LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
#endif /* _TRACEPOINT_UST_TESTS_DEMO2_H */
ctf_integer(int, value, value)
)
)
-TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, TRACE_WARNING)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo3, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
#endif /* _TRACEPOINT_UST_TESTS_DEMO3_H */
)
)
/*
- * Trace loglevel, shows the level of the trace event. It can be TRACE_EMERG,
- * TRACE_ALERT, TRACE_CRIT, TRACE_ERR, TRACE_WARNING, TRACE_INFO or others.
- * If this is not set, TRACE_DEFAULT is assumed.
- * The first two arguments identify the tracepoint
- * See details in <lttng/tracepoint.h> line 347
+ * Trace loglevel, shows the level of the trace event. It can be
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG, LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT,
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT, LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR,
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING, LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO or
+ * others. If this is not set, LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT is
+ * assumed. The first two arguments identify the tracepoint See details in
+ * <lttng/tracepoint.h> line 347
*/
-TRACEPOINT_LOGLEVEL(
+LTTNG_UST_TRACEPOINT_LOGLEVEL(
/*
* The provider name, must be the same as the provider name in the
* LTTNG_UST_TRACEPOINT_EVENT and as TRACEPOINT_PROVIDER above.
* The tracepoint loglevel. Warning, some levels are abbreviated and
* others are not, please see <lttng/tracepoint.h>
*/
- TRACE_WARNING)
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
#endif /* _SAMPLE_COMPONENT_PROVIDER_H */
/*
* Longer comments
*/
-TRACEPOINT_LOGLEVEL(
+LTTNG_UST_TRACEPOINT_LOGLEVEL(
sample_tracepoint,
message,
- TRACE_WARNING)
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
ctf_unused(ip)
)
)
-TRACEPOINT_LOGLEVEL(lttng_ust_tracef, event, TRACE_DEBUG)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_tracef, event, LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG)
LTTNG_UST_TP_ARGS(const char *, file, int, line, const char *, func, \
const char *, msg, unsigned int, len, void *, ip) \
) \
- TRACEPOINT_LOGLEVEL(lttng_ust_tracelog, _level_enum, _level_enum)
+ LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_tracelog, _level_enum, _level_enum)
-TP_TRACELOG_TEMPLATE(TRACE_EMERG)
-TP_TRACELOG_TEMPLATE(TRACE_ALERT)
-TP_TRACELOG_TEMPLATE(TRACE_CRIT)
-TP_TRACELOG_TEMPLATE(TRACE_ERR)
-TP_TRACELOG_TEMPLATE(TRACE_WARNING)
-TP_TRACELOG_TEMPLATE(TRACE_NOTICE)
-TP_TRACELOG_TEMPLATE(TRACE_INFO)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_SYSTEM)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROGRAM)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_PROCESS)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_MODULE)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_UNIT)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_FUNCTION)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG_LINE)
-TP_TRACELOG_TEMPLATE(TRACE_DEBUG)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE)
+TP_TRACELOG_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG)
va_list ap) \
__attribute__ ((format(printf, 4, 0)));
-TP_TRACELOG_CB_TEMPLATE(TRACE_EMERG);
-TP_TRACELOG_CB_TEMPLATE(TRACE_ALERT);
-TP_TRACELOG_CB_TEMPLATE(TRACE_CRIT);
-TP_TRACELOG_CB_TEMPLATE(TRACE_ERR);
-TP_TRACELOG_CB_TEMPLATE(TRACE_WARNING);
-TP_TRACELOG_CB_TEMPLATE(TRACE_NOTICE);
-TP_TRACELOG_CB_TEMPLATE(TRACE_INFO);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_SYSTEM);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_PROGRAM);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_PROCESS);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_MODULE);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_UNIT);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_FUNCTION);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG_LINE);
-TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE);
+TP_TRACELOG_CB_TEMPLATE(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG);
#undef TP_TRACELOG_CB_TEMPLATE
LTTNG_UST__DECLARE_TRACEPOINT(provider, name, LTTNG_UST__TP_PARAMS(args)) \
LTTNG_UST__DEFINE_TRACEPOINT(provider, name, LTTNG_UST__TP_PARAMS(args))
-#undef TRACEPOINT_LOGLEVEL
-#define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
+#undef LTTNG_UST_TRACEPOINT_LOGLEVEL
+#define LTTNG_UST_TRACEPOINT_LOGLEVEL(provider, name, loglevel)
#undef TRACEPOINT_MODEL_EMF_URI
#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
#endif /* #ifndef LTTNG_UST_TRACEPOINT_EVENT */
-#ifndef TRACEPOINT_LOGLEVEL
+#ifndef LTTNG_UST_TRACEPOINT_LOGLEVEL
/*
* Tracepoint Loglevels
* semantic. Loglevels 7 through 13 offer more fine-grained selection of
* debug information.
*
- * TRACE_EMERG 0
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG 0
* system is unusable
*
- * TRACE_ALERT 1
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT 1
* action must be taken immediately
*
- * TRACE_CRIT 2
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT 2
* critical conditions
*
- * TRACE_ERR 3
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR 3
* error conditions
*
- * TRACE_WARNING 4
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING 4
* warning conditions
*
- * TRACE_NOTICE 5
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE 5
* normal, but significant, condition
*
- * TRACE_INFO 6
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO 6
* informational message
*
- * TRACE_DEBUG_SYSTEM 7
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM 7
* debug information with system-level scope (set of programs)
*
- * TRACE_DEBUG_PROGRAM 8
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM 8
* debug information with program-level scope (set of processes)
*
- * TRACE_DEBUG_PROCESS 9
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS 9
* debug information with process-level scope (set of modules)
*
- * TRACE_DEBUG_MODULE 10
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE 10
* debug information with module (executable/library) scope (set of units)
*
- * TRACE_DEBUG_UNIT 11
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT 11
* debug information with compilation unit scope (set of functions)
*
- * TRACE_DEBUG_FUNCTION 12
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION 12
* debug information with function-level scope
*
- * TRACE_DEBUG_LINE 13
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE 13
* debug information with line-level scope (LTTNG_UST_TRACEPOINT_EVENT default)
*
- * TRACE_DEBUG 14
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG 14
* debug-level message
*
* Declare tracepoint loglevels for tracepoints. A LTTNG_UST_TRACEPOINT_EVENT
- * should be declared prior to the the TRACEPOINT_LOGLEVEL for a given
+ * should be declared prior to the the LTTNG_UST_TRACEPOINT_LOGLEVEL for a given
* tracepoint name. The first field is the provider name, the second
* field is the name of the tracepoint, the third field is the loglevel
* name.
*
- * TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >,
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >,
* < loglevel_name >)
*
* The TRACEPOINT_PROVIDER must be already declared before declaring a
- * TRACEPOINT_LOGLEVEL.
+ * LTTNG_UST_TRACEPOINT_LOGLEVEL.
*/
enum {
- TRACE_EMERG = 0,
- TRACE_ALERT = 1,
- TRACE_CRIT = 2,
- TRACE_ERR = 3,
- TRACE_WARNING = 4,
- TRACE_NOTICE = 5,
- TRACE_INFO = 6,
- TRACE_DEBUG_SYSTEM = 7,
- TRACE_DEBUG_PROGRAM = 8,
- TRACE_DEBUG_PROCESS = 9,
- TRACE_DEBUG_MODULE = 10,
- TRACE_DEBUG_UNIT = 11,
- TRACE_DEBUG_FUNCTION = 12,
- TRACE_DEBUG_LINE = 13,
- TRACE_DEBUG = 14,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG = 0,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT = 1,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT = 2,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR = 3,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING = 4,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE = 5,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO = 6,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM = 7,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM = 8,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS = 9,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE = 10,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT = 11,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION = 12,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE = 13,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG = 14,
};
-#define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
+#define LTTNG_UST_TRACEPOINT_LOGLEVEL(provider, name, loglevel)
-#endif /* #ifndef TRACEPOINT_LOGLEVEL */
+#if LTTNG_UST_COMPAT_API(0)
+#define TRACEPOINT_LOGLEVEL LTTNG_UST_TRACEPOINT_LOGLEVEL
+
+#define TRACE_EMERG LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG
+#define TRACE_ALERT LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT
+#define TRACE_CRIT LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT
+#define TRACE_ERR LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR
+#define TRACE_WARNING LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING
+#define TRACE_NOTICE LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE
+#define TRACE_INFO LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO
+#define TRACE_DEBUG_SYSTEM LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM
+#define TRACE_DEBUG_PROGRAM LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM
+#define TRACE_DEBUG_PROCESS LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS
+#define TRACE_DEBUG_MODULE LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE
+#define TRACE_DEBUG_UNIT LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT
+#define TRACE_DEBUG_FUNCTION LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION
+#define TRACE_DEBUG_LINE LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE
+#define TRACE_DEBUG LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG
+#endif
+
+#endif /* #ifndef LTTNG_UST_TRACEPOINT_LOGLEVEL */
#ifndef TRACEPOINT_MODEL_EMF_URI
#undef LTTNG_UST_TP_FIELDS
#define LTTNG_UST_TP_FIELDS(...)
-#undef TRACEPOINT_LOGLEVEL_ENUM
-#define TRACEPOINT_LOGLEVEL_ENUM(...)
-
-#undef TRACEPOINT_LOGLEVEL
-#define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
+#undef LTTNG_UST_TRACEPOINT_LOGLEVEL
+#define LTTNG_UST_TRACEPOINT_LOGLEVEL(provider, name, loglevel)
#undef TRACEPOINT_MODEL_EMF_URI
#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
#define LTTNG_UST_TP_EXTERN_C
#endif
-#undef TRACEPOINT_LOGLEVEL
-#define TRACEPOINT_LOGLEVEL(__provider, __name, __loglevel) \
+#undef LTTNG_UST_TRACEPOINT_LOGLEVEL
+#define LTTNG_UST_TRACEPOINT_LOGLEVEL(__provider, __name, __loglevel) \
static const int _loglevel_value___##__provider##___##__name = __loglevel; \
LTTNG_UST_TP_EXTERN_C const int * const _loglevel___##__provider##___##__name \
__attribute__((visibility("hidden"))) = \
#ifndef _UST_COMMON_TRACEPOINT_H
#define _UST_COMMON_TRACEPOINT_H
-#define TRACE_DEFAULT TRACE_DEBUG_LINE
+#define LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE
/*
* These symbols are ABI between liblttng-ust-tracepoint and liblttng-ust,
)
)
-TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_entry,
- TRACE_DEBUG_FUNCTION)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_entry,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
LTTNG_UST_TRACEPOINT_EVENT(lttng_ust_cyg_profile_fast, func_exit,
LTTNG_UST_TP_ARGS(void *, func_addr),
)
)
-TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_exit,
- TRACE_DEBUG_FUNCTION)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile_fast, func_exit,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
#endif /* _TRACEPOINT_LTTNG_UST_CYG_PROFILE_FAST_H */
LTTNG_UST_TP_ARGS(void *, func_addr, void *, call_site)
)
-TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile, func_entry,
- TRACE_DEBUG_FUNCTION)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile, func_entry,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
LTTNG_UST_TRACEPOINT_EVENT_INSTANCE(lttng_ust_cyg_profile, func_class,
func_exit,
LTTNG_UST_TP_ARGS(void *, func_addr, void *, call_site)
)
-TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile, func_exit,
- TRACE_DEBUG_FUNCTION)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(lttng_ust_cyg_profile, func_exit,
+ LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
#endif /* _TRACEPOINT_LTTNG_UST_CYG_PROFILE_H */
int req_loglevel)
{
if (!has_loglevel)
- loglevel = TRACE_DEFAULT;
+ loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
switch (req_type) {
case LTTNG_UST_ABI_LOGLEVEL_RANGE:
if (loglevel <= req_loglevel
- || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
+ || (req_loglevel == -1 && loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG))
return 1;
else
return 0;
case LTTNG_UST_ABI_LOGLEVEL_SINGLE:
if (loglevel == req_loglevel
- || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
+ || (req_loglevel == -1 && loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG))
return 1;
else
return 0;
case LTTNG_UST_ABI_LOGLEVEL_ALL:
default:
- if (loglevel <= TRACE_DEBUG)
+ if (loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG)
return 1;
else
return 0;
if (desc->loglevel)
loglevel = *(*desc->loglevel);
else
- loglevel = TRACE_DEFAULT;
+ loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
if (desc->model_emf_uri)
uri = *(desc->model_emf_uri);
else
cds_list_add(&list_entry->head, &list->head);
lttng_ust_format_event_name(event_desc, list_entry->tp.name);
if (!event_desc->loglevel) {
- list_entry->tp.loglevel = TRACE_DEFAULT;
+ list_entry->tp.loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
} else {
list_entry->tp.loglevel = *(*event_desc->loglevel);
}
list_entry->field.field_name[0] = '\0';
list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
if (!event_desc->loglevel) {
- list_entry->field.loglevel = TRACE_DEFAULT;
+ list_entry->field.loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
} else {
list_entry->field.loglevel = *(*event_desc->loglevel);
}
list_entry->field.type = LTTNG_UST_ABI_FIELD_OTHER;
}
if (!event_desc->loglevel) {
- list_entry->field.loglevel = TRACE_DEFAULT;
+ list_entry->field.loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
} else {
list_entry->field.loglevel = *(*event_desc->loglevel);
}
va_end(ap); \
}
-TRACELOG_CB(TRACE_EMERG)
-TRACELOG_CB(TRACE_ALERT)
-TRACELOG_CB(TRACE_CRIT)
-TRACELOG_CB(TRACE_ERR)
-TRACELOG_CB(TRACE_WARNING)
-TRACELOG_CB(TRACE_NOTICE)
-TRACELOG_CB(TRACE_INFO)
-TRACELOG_CB(TRACE_DEBUG_SYSTEM)
-TRACELOG_CB(TRACE_DEBUG_PROGRAM)
-TRACELOG_CB(TRACE_DEBUG_PROCESS)
-TRACELOG_CB(TRACE_DEBUG_MODULE)
-TRACELOG_CB(TRACE_DEBUG_UNIT)
-TRACELOG_CB(TRACE_DEBUG_FUNCTION)
-TRACELOG_CB(TRACE_DEBUG_LINE)
-TRACELOG_CB(TRACE_DEBUG)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_EMERG)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_ALERT)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_ERR)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_WARNING)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_NOTICE)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_INFO)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_SYSTEM)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROGRAM)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_PROCESS)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_MODULE)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_UNIT)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_FUNCTION)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG_LINE)
+TRACELOG_CB(LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG)
LTTNG_UST_TP_ARGS(),
LTTNG_UST_TP_FIELDS()
)
-TRACEPOINT_LOGLEVEL(ust_tests_sameline, event1, TRACE_CRIT)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event1, TRACE_CRIT)
LTTNG_UST_TRACEPOINT_EVENT(ust_tests_sameline, event2,
LTTNG_UST_TP_ARGS(),
LTTNG_UST_TP_FIELDS()
)
-TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT)
+LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_sameline, event2, TRACE_CRIT)
#endif /* _TRACEPOINT_UST_TESTS_SAMELINE_H */
cleantext = re.sub("\s*", "", nolinecomment)
# Remove multine C style comments
nocomment = re.sub("/\*.*?\*/", "", cleantext)
- entries = re.split("LTTNG_UST_TRACEPOINT_.*?", nocomment)
+ entries = re.split("^LTTNG_UST_TRACEPOINT_.*?", nocomment)
for entry in entries:
if entry != '':
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 LTTNG_UST_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.
"""