X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fexamples%2Ftrigger-on-event%2Fperformance%2Fperformance.h;fp=doc%2Fexamples%2Ftrigger-on-event%2Fperformance%2Fperformance.h;h=79e0a36a869ec1af3aa34c6b085df1448b059d53;hp=0000000000000000000000000000000000000000;hb=d3a684eebfe788a7527368d65d7f020bdd1e61d9;hpb=b2081a0f39bce45b3d1cf063308a9b77712f1a9f diff --git a/doc/examples/trigger-on-event/performance/performance.h b/doc/examples/trigger-on-event/performance/performance.h new file mode 100644 index 000000000..79e0a36a8 --- /dev/null +++ b/doc/examples/trigger-on-event/performance/performance.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2020 Jérémie Galarneau + * + * SPDX-License-Identifier: MIT + * + */ + +#undef TRACEPOINT_PROVIDER +#define TRACEPOINT_PROVIDER performance + +#undef TRACEPOINT_INCLUDE +#define TRACEPOINT_INCLUDE "./performance.h" + +#if !defined(_TRACEPOINT_PERFORMANCE_H) || defined(TRACEPOINT_HEADER_MULTI_READ) +#define _TRACEPOINT_PERFORMANCE_H + +#include + +TRACEPOINT_EVENT(performance, hit, + TP_ARGS(int, source, + int, iteration), + TP_FIELDS( + ctf_integer(uint64_t, source, source) + ctf_integer(uint64_t, iteration, iteration) + ) +) + +TRACEPOINT_EVENT(performance, receive, + TP_ARGS(int, source, + int, iteration), + TP_FIELDS( + ctf_integer(uint64_t, source, source) + ctf_integer(uint64_t, iteration, iteration) + ) +) + +#endif /* _TRACEPOINT_PERFORMANCE_H */ + +#include