SoW-2020-0003: Trace Hit Counters
[lttng-tools.git] / doc / examples / map / tracepoint-incr-value-example.h
diff --git a/doc/examples/map/tracepoint-incr-value-example.h b/doc/examples/map/tracepoint-incr-value-example.h
new file mode 100644 (file)
index 0000000..2b6b65e
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ */
+
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER incr_value_ex
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tracepoint-incr-value-example.h"
+
+#if !defined(_TRACEPOINT_TRIGGER_EXAMPLE_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_TRIGGER_EXAMPLE_H
+
+#include <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(incr_value_ex, event1,
+       TP_ARGS(int, iteration),
+       TP_FIELDS(
+               ctf_integer(uint64_t, iteration, iteration)
+       )
+)
+
+TRACEPOINT_EVENT(incr_value_ex, event2,
+       TP_ARGS(int, iteration),
+       TP_FIELDS(
+               ctf_integer(uint64_t, iteration, iteration)
+       )
+)
+
+TRACEPOINT_EVENT(incr_value_ex, event3,
+       TP_ARGS(int, iteration),
+       TP_FIELDS(
+               ctf_integer(uint64_t, iteration, iteration)
+       )
+)
+
+#endif /* _TRACEPOINT_TRIGGER_EXAMPLE_H */
+
+#include <lttng/tracepoint-event.h>
This page took 0.024324 seconds and 5 git commands to generate.