Fix: add "has_build_id" and "has_debug_link" fields to debuginfo events
[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 <stdint.h>
35 #include <unistd.h>
36
37 #define LTTNG_UST_DL_PROVIDER
38 #include <lttng/tracepoint.h>
39
40 TRACEPOINT_EVENT(lttng_ust_dl, dlopen,
41 TP_ARGS(void *, ip, void *, baddr, const char*, path,
42 uint64_t, memsz, uint8_t, has_build_id,
43 uint8_t, has_debug_link),
44 TP_FIELDS(
45 ctf_integer_hex(void *, baddr, baddr)
46 ctf_integer(uint64_t, memsz, memsz)
47 ctf_string(path, path)
48 ctf_integer(uint8_t, has_build_id, has_build_id)
49 ctf_integer(uint8_t, has_debug_link, has_debug_link)
50 )
51 )
52
53 TRACEPOINT_EVENT(lttng_ust_dl, build_id,
54 TP_ARGS(
55 void *, ip,
56 void *, baddr,
57 uint8_t *, build_id,
58 size_t, build_id_len
59 ),
60 TP_FIELDS(
61 ctf_integer_hex(void *, baddr, baddr)
62 ctf_sequence_hex(uint8_t, build_id, build_id,
63 size_t, build_id_len)
64 )
65 )
66
67 TRACEPOINT_EVENT(lttng_ust_dl, debug_link,
68 TP_ARGS(
69 void *, ip,
70 void *, baddr,
71 char *, filename,
72 uint32_t, crc
73 ),
74 TP_FIELDS(
75 ctf_integer_hex(void *, baddr, baddr)
76 ctf_integer(uint32_t, crc, crc)
77 ctf_string(filename, filename)
78 )
79 )
80
81 TRACEPOINT_EVENT(lttng_ust_dl, dlclose,
82 TP_ARGS(void *, ip, void *, baddr),
83 TP_FIELDS(
84 ctf_integer_hex(void *, baddr, baddr)
85 )
86 )
87
88 #endif /* _TRACEPOINT_UST_DL_H */
89
90 #undef TRACEPOINT_INCLUDE
91 #define TRACEPOINT_INCLUDE "./ust_dl.h"
92
93 /* This part must be outside ifdef protection */
94 #include <lttng/tracepoint-event.h>
95
96 #ifdef __cplusplus
97 }
98 #endif
This page took 0.040007 seconds and 5 git commands to generate.