#define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
#endif /* #ifndef TRACEPOINT_LOGLEVEL */
+
+#ifndef TRACEPOINT_MODEL_EMF_URI
+
+#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
+
+#endif /* #ifndef TRACEPOINT_MODEL_EMF_URI */
unsigned int nr_fields;
const int **loglevel;
const char *signature; /* Argument types/names received */
- char padding[LTTNG_UST_EVENT_DESC_PADDING];
+ union {
+ struct {
+ const char **model_emf_uri;
+ } ext;
+ char padding[LTTNG_UST_EVENT_DESC_PADDING];
+ } u;
};
#define LTTNG_UST_PROBE_DESC_PADDING 40
#undef TRACEPOINT_LOGLEVEL
#define TRACEPOINT_LOGLEVEL(provider, name, loglevel)
+#undef TRACEPOINT_MODEL_EMF_URI
+#define TRACEPOINT_MODEL_EMF_URI(provider, name, uri)
+
#undef _ctf_integer_ext
#define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, \
_nowrite)
#include TRACEPOINT_INCLUDE
+/*
+ * Stage 6.1 of tracepoint event generation.
+ *
+ * Tracepoint UML URI info.
+ */
+
+/* Reset all macros within TRACEPOINT_EVENT */
+#include <lttng/ust-tracepoint-event-reset.h>
+
+#undef TRACEPOINT_MODEL_EMF_URI
+#define TRACEPOINT_MODEL_EMF_URI(__provider, __name, __uri) \
+static const char *_model_emf_uri___##__provider##___##__name = __uri;
+
+#include TRACEPOINT_INCLUDE
+
/*
* Stage 7.1 of tracepoint event generation.
*
static const int * \
__ref_loglevel___##_provider##___##_name \
__attribute__((weakref ("_loglevel___" #_provider "___" #_name))); \
+static const char * \
+ __ref_model_emf_uri___##_provider##___##_name \
+ __attribute__((weakref ("_model_emf_uri___" #_provider "___" #_name)));\
const struct lttng_event_desc __event_desc___##_provider##_##_name = { \
.fields = __event_fields___##_provider##___##_template, \
.name = #_provider ":" #_name, \
.nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template), \
.loglevel = &__ref_loglevel___##_provider##___##_name, \
.signature = __tp_event_signature___##_provider##___##_template, \
+ .u.ext.model_emf_uri = &__ref_model_emf_uri___##_provider##___##_name, \
};
#include TRACEPOINT_INCLUDE
if (ret)
goto end;
+ if (event->desc->u.ext.model_emf_uri) {
+ ret = lttng_metadata_printf(session,
+ " model.emf.uri = \"%s\";\n",
+ *(event->desc->u.ext.model_emf_uri));
+ if (ret)
+ goto end;
+ }
+
if (event->ctx) {
ret = lttng_metadata_printf(session,
" context := struct {\n");
)
TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, TRACE_CRIT)
+/*
+ * Dummy model information, just for example. TODO: we should check if
+ * EMF model URI have some standard format we should follow.
+ */
+TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting,
+ "http://example.com/path_to_model?q=ust_tests_demo:starting")
+
TRACEPOINT_EVENT(ust_tests_demo, done,
TP_ARGS(int, value),
TP_FIELDS(
)
TRACEPOINT_LOGLEVEL(ust_tests_demo, done, TRACE_CRIT)
+TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done,
+ "http://example.com/path_to_model?q=ust_tests_demo:done")
+
#endif /* _TRACEPOINT_UST_TESTS_DEMO_H */
#undef TRACEPOINT_INCLUDE_FILE