Add memory size, build id, and debug link info to statedump and dl
[lttng-ust.git] / liblttng-ust / lttng-ust-statedump-provider.h
1 #undef TRACEPOINT_PROVIDER
2 #define TRACEPOINT_PROVIDER lttng_ust_statedump
3
4 #if !defined(_TRACEPOINT_LTTNG_UST_STATEDUMP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
5 #define _TRACEPOINT_LTTNG_UST_STATEDUMP_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 #include <lttng/ust-events.h>
37
38 #define LTTNG_UST_STATEDUMP_PROVIDER
39 #include <lttng/tracepoint.h>
40
41 TRACEPOINT_EVENT(lttng_ust_statedump, start,
42 TP_ARGS(struct lttng_session *, session),
43 TP_FIELDS()
44 )
45
46 TRACEPOINT_EVENT(lttng_ust_statedump, soinfo,
47 TP_ARGS(
48 struct lttng_session *, session,
49 void *, baddr,
50 const char*, sopath,
51 uint64_t, memsz
52 ),
53 TP_FIELDS(
54 ctf_integer_hex(void *, baddr, baddr)
55 ctf_integer(uint64_t, memsz, memsz)
56 ctf_string(sopath, sopath)
57 )
58 )
59
60 TRACEPOINT_EVENT(lttng_ust_statedump, build_id,
61 TP_ARGS(
62 struct lttng_session *, session,
63 void *, baddr,
64 uint8_t *, build_id,
65 size_t, build_id_len
66 ),
67 TP_FIELDS(
68 ctf_integer_hex(void *, baddr, baddr)
69 ctf_sequence_hex(uint8_t, build_id, build_id,
70 size_t, build_id_len)
71 )
72 )
73
74 TRACEPOINT_EVENT(lttng_ust_statedump, debug_link,
75 TP_ARGS(
76 struct lttng_session *, session,
77 void *, baddr,
78 char *, filename,
79 uint32_t, crc
80 ),
81 TP_FIELDS(
82 ctf_integer_hex(void *, baddr, baddr)
83 ctf_integer(uint32_t, crc, crc)
84 ctf_string(filename, filename)
85 )
86 )
87
88 TRACEPOINT_EVENT(lttng_ust_statedump, end,
89 TP_ARGS(struct lttng_session *, session),
90 TP_FIELDS()
91 )
92
93 #endif /* _TRACEPOINT_LTTNG_UST_STATEDUMP_H */
94
95 #undef TRACEPOINT_INCLUDE
96 #define TRACEPOINT_INCLUDE "./lttng-ust-statedump-provider.h"
97
98 /* This part must be outside ifdef protection */
99 #include <lttng/tracepoint-event.h>
100
101 #ifdef __cplusplus
102 }
103 #endif
This page took 0.03286 seconds and 5 git commands to generate.