Tracepoint API namespacing ctf_integer
[lttng-ust.git] / doc / examples / demo / ust_tests_demo.h
CommitLineData
c0c0989a
MJ
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
5b393d64
MJ
7#undef LTTNG_UST_TRACEPOINT_PROVIDER
8#define LTTNG_UST_TRACEPOINT_PROVIDER ust_tests_demo
60302adc 9
c2c72dde 10#if !defined(_TRACEPOINT_UST_TESTS_DEMO_H) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ)
60302adc
JG
11#define _TRACEPOINT_UST_TESTS_DEMO_H
12
60302adc
JG
13#include <lttng/tracepoint.h>
14
7f2f82c3 15LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, starting,
cadfcbfc 16 LTTNG_UST_TP_ARGS(int, value),
efa14d16 17 LTTNG_UST_TP_FIELDS(
b4064f28 18 lttng_ust_field_integer(int, value, value)
60302adc
JG
19 )
20)
612e9ce4 21LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, starting, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
60302adc
JG
22
23/*
24 * Dummy model information, just for example. TODO: we should check if
25 * EMF model URI have some standard format we should follow.
26 */
dbcc2f92 27LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, starting,
60302adc
JG
28 "http://example.com/path_to_model?q=ust_tests_demo:starting")
29
7f2f82c3 30LTTNG_UST_TRACEPOINT_EVENT(ust_tests_demo, done,
cadfcbfc 31 LTTNG_UST_TP_ARGS(int, value),
efa14d16 32 LTTNG_UST_TP_FIELDS(
b4064f28 33 lttng_ust_field_integer(int, value, value)
60302adc
JG
34 )
35)
612e9ce4 36LTTNG_UST_TRACEPOINT_LOGLEVEL(ust_tests_demo, done, LTTNG_UST_TRACEPOINT_LOGLEVEL_CRIT)
60302adc 37
dbcc2f92 38LTTNG_UST_TRACEPOINT_MODEL_EMF_URI(ust_tests_demo, done,
60302adc
JG
39 "http://example.com/path_to_model?q=ust_tests_demo:done")
40
41#endif /* _TRACEPOINT_UST_TESTS_DEMO_H */
42
bb71a8ea
MJ
43#undef LTTNG_UST_TRACEPOINT_INCLUDE
44#define LTTNG_UST_TRACEPOINT_INCLUDE "./ust_tests_demo.h"
60302adc
JG
45
46/* This part must be outside ifdef protection */
47#include <lttng/tracepoint-event.h>
This page took 0.029495 seconds and 4 git commands to generate.