Set probe descriptor field in event descriptor
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 5 May 2021 20:01:19 +0000 (16:01 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 May 2021 17:45:26 +0000 (13:45 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8afd12cae160fbd7637fb2f9528309f5245f77cf

include/lttng/tracepoint-event-impl.h

index 32ecf29d81765c24bd65ead03a6e03871e9d3bce..a1eff6c242f672576cddbd0f401467572a103b17 100644 (file)
@@ -1164,7 +1164,21 @@ __post:                                                                                  \
 #undef __get_dynamic_len
 
 /*
- * Stage 7 of the trace events.
+ * Stage 7.0 of tracepoint event generation.
+ *
+ * Declare toplevel descriptor for the whole probe.
+ */
+
+#define TP_ID1(_token, _system)        _token##_system
+#define TP_ID(_token, _system) TP_ID1(_token, _system)
+
+static __used struct lttng_kernel_probe_desc TP_ID(__probe_desc___, TRACE_SYSTEM);
+
+#undef TP_ID1
+#undef TP_ID
+
+/*
+ * Stage 7.1 of the trace events.
  *
  * Create event descriptions.
  */
@@ -1182,6 +1196,7 @@ __post:                                                                                   \
 static const struct lttng_kernel_event_desc __event_desc___##_map = {  \
        .event_name = #_map,                                            \
        .event_kname = #_name,                                          \
+       .probe_desc = &TP_ID(__probe_desc___, TRACE_SYSTEM),            \
        .probe_callback = (void (*)(void)) TP_PROBE_CB(_template),      \
        .fields = __event_fields___##_template,                         \
        .nr_fields = ARRAY_SIZE(__event_fields___##_template),          \
@@ -1192,8 +1207,14 @@ static const struct lttng_kernel_event_desc __event_desc___##_map = {    \
 #define LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(_template, _name, _map, _proto, _args) \
        LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP_NOARGS(_template, _name, _map)
 
+#define TP_ID1(_token, _system)        _token##_system
+#define TP_ID(_token, _system) TP_ID1(_token, _system)
+
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
 
+#undef TP_ID1
+#undef TP_ID
+
 /*
  * Stage 8 of the trace events.
  *
This page took 0.027057 seconds and 4 git commands to generate.