e43535e22c990637ada7906503e7c16d8137b9b0
[lttng-ust.git] / liblttng-ust-dl / ust_dl.h
1 #undef TRACEPOINT_PROVIDER
2 #define TRACEPOINT_PROVIDER lttng_ust_dl
3
4 #if !defined(_TRACEPOINT_UST_DL_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
5 #define _TRACEPOINT_UST_DL_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 *
15 * Permission is hereby granted, free of charge, to any person obtaining a copy
16 * of this software and associated documentation files (the "Software"), to deal
17 * in the Software without restriction, including without limitation the rights
18 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 * copies of the Software, and to permit persons to whom the Software is
20 * furnished to do so, subject to the following conditions:
21 *
22 * The above copyright notice and this permission notice shall be included in
23 * all copies or substantial portions of the Software.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 * SOFTWARE.
32 */
33
34 #include <stddef.h>
35 #include <stdint.h>
36 #include <unistd.h>
37
38 #define LTTNG_UST_DL_PROVIDER
39 #include <lttng/tracepoint.h>
40
41 TRACEPOINT_EVENT(lttng_ust_dl, dlopen,
42 TP_ARGS(void *, ip, void *, baddr, const char *, path,
43 int, flags, 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_integer_hex(int, flags, flags)
49 ctf_string(path, path)
50 ctf_integer(uint8_t, has_build_id, has_build_id)
51 ctf_integer(uint8_t, has_debug_link, has_debug_link)
52 )
53 )
54
55 #ifdef HAVE_DLMOPEN
56 TRACEPOINT_EVENT(lttng_ust_dl, dlmopen,
57 TP_ARGS(void *, ip, void *, baddr, Lmid_t, nsid,
58 const char *, path, int, flags,
59 uint64_t, memsz, uint8_t, has_build_id,
60 uint8_t, has_debug_link),
61 TP_FIELDS(
62 ctf_integer_hex(void *, baddr, baddr)
63 ctf_integer(uint64_t, memsz, memsz)
64 ctf_integer(Lmid_t, nsid, nsid)
65 ctf_integer_hex(int, flags, flags)
66 ctf_string(path, path)
67 ctf_integer(uint8_t, has_build_id, has_build_id)
68 ctf_integer(uint8_t, has_debug_link, has_debug_link)
69 )
70 )
71 #endif
72
73 TRACEPOINT_EVENT(lttng_ust_dl, build_id,
74 TP_ARGS(
75 void *, ip,
76 void *, baddr,
77 uint8_t *, build_id,
78 size_t, build_id_len
79 ),
80 TP_FIELDS(
81 ctf_integer_hex(void *, baddr, baddr)
82 ctf_sequence_hex(uint8_t, build_id, build_id,
83 size_t, build_id_len)
84 )
85 )
86
87 TRACEPOINT_EVENT(lttng_ust_dl, debug_link,
88 TP_ARGS(
89 void *, ip,
90 void *, baddr,
91 char *, filename,
92 uint32_t, crc
93 ),
94 TP_FIELDS(
95 ctf_integer_hex(void *, baddr, baddr)
96 ctf_integer(uint32_t, crc, crc)
97 ctf_string(filename, filename)
98 )
99 )
100
101 TRACEPOINT_EVENT(lttng_ust_dl, dlclose,
102 TP_ARGS(void *, ip, void *, baddr),
103 TP_FIELDS(
104 ctf_integer_hex(void *, baddr, baddr)
105 )
106 )
107
108 #endif /* _TRACEPOINT_UST_DL_H */
109
110 #undef TRACEPOINT_INCLUDE
111 #define TRACEPOINT_INCLUDE "./ust_dl.h"
112
113 /* This part must be outside ifdef protection */
114 #include <lttng/tracepoint-event.h>
115
116 #ifdef __cplusplus
117 }
118 #endif
This page took 0.031076 seconds and 3 git commands to generate.