Commit | Line | Data |
---|---|---|
c7bdf2d8 MD |
1 | #undef TRACEPOINT_PROVIDER |
2 | #define TRACEPOINT_PROVIDER lttng_ust_lib | |
3 | ||
4 | #if !defined(_TRACEPOINT_UST_LIB_H) || defined(TRACEPOINT_HEADER_MULTI_READ) | |
5 | #define _TRACEPOINT_UST_LIB_H | |
6 | ||
7 | #ifdef __cplusplus | |
8 | extern "C" { | |
9 | #endif | |
10 | ||
11 | /* | |
12 | * Copyright (C) 2013 Paul Woegerer <paul_woegerer@mentor.com> | |
13 | * Copyright (C) 2015 Antoine Busque <abusque@efficios.com> | |
14 | * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
15 | * | |
16 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
17 | * of this software and associated documentation files (the "Software"), to deal | |
18 | * in the Software without restriction, including without limitation the rights | |
19 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
20 | * copies of the Software, and to permit persons to whom the Software is | |
21 | * furnished to do so, subject to the following conditions: | |
22 | * | |
23 | * The above copyright notice and this permission notice shall be included in | |
24 | * all copies or substantial portions of the Software. | |
25 | * | |
26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
27 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
28 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
29 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
30 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
31 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
32 | * SOFTWARE. | |
33 | */ | |
34 | ||
35 | #include <stdint.h> | |
36 | #include <unistd.h> | |
37 | ||
38 | #define LTTNG_UST_LIB_PROVIDER | |
39 | #include <lttng/tracepoint.h> | |
40 | ||
41 | TRACEPOINT_EVENT(lttng_ust_lib, load, | |
42 | TP_ARGS(void *, ip, void *, baddr, const char*, path, | |
43 | uint64_t, memsz, uint8_t, has_build_id, | |
44 | uint8_t, has_debug_link), | |
45 | TP_FIELDS( | |
46 | ctf_integer_hex(void *, baddr, baddr) | |
47 | ctf_integer(uint64_t, memsz, memsz) | |
48 | ctf_string(path, path) | |
49 | ctf_integer(uint8_t, has_build_id, has_build_id) | |
50 | ctf_integer(uint8_t, has_debug_link, has_debug_link) | |
51 | ) | |
52 | ) | |
53 | ||
54 | TRACEPOINT_EVENT(lttng_ust_lib, build_id, | |
55 | TP_ARGS( | |
56 | void *, ip, | |
57 | void *, baddr, | |
58 | uint8_t *, build_id, | |
59 | size_t, build_id_len | |
60 | ), | |
61 | TP_FIELDS( | |
62 | ctf_integer_hex(void *, baddr, baddr) | |
63 | ctf_sequence_hex(uint8_t, build_id, build_id, | |
64 | size_t, build_id_len) | |
65 | ) | |
66 | ) | |
67 | ||
68 | TRACEPOINT_EVENT(lttng_ust_lib, debug_link, | |
69 | TP_ARGS( | |
70 | void *, ip, | |
71 | void *, baddr, | |
72 | char *, filename, | |
73 | uint32_t, crc | |
74 | ), | |
75 | TP_FIELDS( | |
76 | ctf_integer_hex(void *, baddr, baddr) | |
77 | ctf_integer(uint32_t, crc, crc) | |
78 | ctf_string(filename, filename) | |
79 | ) | |
80 | ) | |
81 | ||
82 | TRACEPOINT_EVENT(lttng_ust_lib, unload, | |
83 | TP_ARGS(void *, ip, void *, baddr), | |
84 | TP_FIELDS( | |
85 | ctf_integer_hex(void *, baddr, baddr) | |
86 | ) | |
87 | ) | |
88 | ||
89 | #endif /* _TRACEPOINT_UST_LIB_H */ | |
90 | ||
91 | #undef TRACEPOINT_INCLUDE | |
92 | #define TRACEPOINT_INCLUDE "./ust_lib.h" | |
93 | ||
94 | /* This part must be outside ifdef protection */ | |
95 | #include <lttng/tracepoint-event.h> | |
96 | ||
97 | #ifdef __cplusplus | |
98 | } | |
99 | #endif |