lttng-test probe: test ctf_enum_auto()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 4 Jul 2016 19:29:11 +0000 (15:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 4 Jul 2016 19:55:59 +0000 (15:55 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/lttng-test.h

index b2461778b1320a6f10bec39be77c9d658ec9e318..05d028ca3952adc0bb10e1e8582438bc89381621 100644 (file)
@@ -8,6 +8,18 @@
 #include <linux/types.h>
 #include <linux/version.h>
 
+LTTNG_TRACEPOINT_ENUM(
+       lttng_test_filter_event_enum,
+       TP_ENUM_VALUES(
+               ctf_enum_auto("AUTO: EXPECT 0")
+               ctf_enum_value("VALUE: 23", 23)
+               ctf_enum_value("VALUE: 27", 27)
+               ctf_enum_auto("AUTO: EXPECT 28")
+               ctf_enum_range("RANGE: 101 TO 303", 101, 303)
+               ctf_enum_auto("AUTO: EXPECT 304")
+       )
+)
+
 LTTNG_TRACEPOINT_EVENT(lttng_test_filter_event,
        TP_PROTO(int anint, int netint, long *values,
                char *text, size_t textlen,
@@ -27,6 +39,12 @@ LTTNG_TRACEPOINT_EVENT(lttng_test_filter_event,
                ctf_string(stringfield2, etext)
                ctf_sequence_bitfield(long, bitfield_seq, values, uint8_t, 3)
                ctf_array_bitfield(long, bitfield_array, values, 3)
+               ctf_enum(lttng_test_filter_event_enum, int, enum0, 0)
+               ctf_enum(lttng_test_filter_event_enum, int, enum23, 23)
+               ctf_enum(lttng_test_filter_event_enum, int, enum27, 27)
+               ctf_enum(lttng_test_filter_event_enum, int, enum28, 28)
+               ctf_enum(lttng_test_filter_event_enum, int, enum202, 202)
+               ctf_enum(lttng_test_filter_event_enum, int, enum304, 304)
        )
 )
 
This page took 0.027804 seconds and 4 git commands to generate.