| 1 | /* |
| 2 | * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | * of this software and associated documentation files (the "Software"), to deal |
| 6 | * in the Software without restriction, including without limitation the rights |
| 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 8 | * copies of the Software, and to permit persons to whom the Software is |
| 9 | * furnished to do so, subject to the following conditions: |
| 10 | * |
| 11 | * The above copyright notice and this permission notice shall be included in |
| 12 | * all copies or substantial portions of the Software. |
| 13 | */ |
| 14 | |
| 15 | #ifdef __cplusplus |
| 16 | extern "C" { |
| 17 | #endif |
| 18 | |
| 19 | #ifdef TRACEPOINT_CREATE_PROBES |
| 20 | |
| 21 | #define __tp_stringify1(x) #x |
| 22 | #define __tp_stringify(x) __tp_stringify1(x) |
| 23 | |
| 24 | #undef TRACEPOINT_EVENT_INSTANCE |
| 25 | #define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args) |
| 26 | |
| 27 | #undef TRACEPOINT_EVENT |
| 28 | #define TRACEPOINT_EVENT(_provider, _name, _args, _fields) \ |
| 29 | TRACEPOINT_EVENT_CLASS(_provider, _name, _TP_PARAMS(_args), \ |
| 30 | _TP_PARAMS(_fields)) \ |
| 31 | TRACEPOINT_EVENT_INSTANCE(_provider, _name, _name, \ |
| 32 | _TP_PARAMS(_args)) |
| 33 | |
| 34 | #define TRACEPOINT_INCLUDE __tp_stringify(TRACEPOINT_INCLUDE_FILE) |
| 35 | |
| 36 | #undef TRACEPOINT_CREATE_PROBES |
| 37 | |
| 38 | #define TRACEPOINT_HEADER_MULTI_READ |
| 39 | #include TRACEPOINT_INCLUDE |
| 40 | |
| 41 | #include <lttng/ust-tracepoint-event.h> |
| 42 | |
| 43 | #undef TRACEPOINT_HEADER_MULTI_READ |
| 44 | |
| 45 | #define TRACEPOINT_CREATE_PROBES |
| 46 | |
| 47 | #endif /* TRACEPOINT_CREATE_PROBES */ |
| 48 | |
| 49 | #ifdef __cplusplus |
| 50 | } |
| 51 | #endif |