ea8d5ed3702b1c21045d4feea88e3a8ed6316116
[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 <stddef.h>
35 #include <stdint.h>
36 #include <unistd.h>
37 #include <lttng/ust-events.h>
38 #include "compat.h"
39
40 #define LTTNG_UST_STATEDUMP_PROVIDER
41 #include <lttng/tracepoint.h>
42
43 TRACEPOINT_EVENT(lttng_ust_statedump, start,
44 TP_ARGS(struct lttng_session *, session),
45 TP_FIELDS()
46 )
47
48 TRACEPOINT_EVENT(lttng_ust_statedump, bin_info,
49 TP_ARGS(
50 struct lttng_session *, session,
51 void *, baddr,
52 const char*, path,
53 uint64_t, memsz,
54 uint8_t, is_pic,
55 uint8_t, has_build_id,
56 uint8_t, has_debug_link
57 ),
58 TP_FIELDS(
59 ctf_integer_hex(void *, baddr, baddr)
60 ctf_integer(uint64_t, memsz, memsz)
61 ctf_string(path, path)
62 ctf_integer(uint8_t, is_pic, is_pic)
63 ctf_integer(uint8_t, has_build_id, has_build_id)
64 ctf_integer(uint8_t, has_debug_link, has_debug_link)
65 )
66 )
67
68 TRACEPOINT_EVENT(lttng_ust_statedump, build_id,
69 TP_ARGS(
70 struct lttng_session *, session,
71 void *, baddr,
72 uint8_t *, build_id,
73 size_t, build_id_len
74 ),
75 TP_FIELDS(
76 ctf_integer_hex(void *, baddr, baddr)
77 ctf_sequence_hex(uint8_t, build_id, build_id,
78 size_t, build_id_len)
79 )
80 )
81
82 TRACEPOINT_EVENT(lttng_ust_statedump, debug_link,
83 TP_ARGS(
84 struct lttng_session *, session,
85 void *, baddr,
86 char *, filename,
87 uint32_t, crc
88 ),
89 TP_FIELDS(
90 ctf_integer_hex(void *, baddr, baddr)
91 ctf_integer(uint32_t, crc, crc)
92 ctf_string(filename, filename)
93 )
94 )
95
96 TRACEPOINT_EVENT(lttng_ust_statedump, procname,
97 TP_ARGS(
98 struct lttng_session *, session,
99 char *, name
100 ),
101 TP_FIELDS(
102 ctf_array_text(char, procname, name, LTTNG_UST_ABI_PROCNAME_LEN)
103 )
104 )
105
106 TRACEPOINT_EVENT(lttng_ust_statedump, end,
107 TP_ARGS(struct lttng_session *, session),
108 TP_FIELDS()
109 )
110
111 #endif /* _TRACEPOINT_LTTNG_UST_STATEDUMP_H */
112
113 #undef TRACEPOINT_INCLUDE
114 #define TRACEPOINT_INCLUDE "./lttng-ust-statedump-provider.h"
115
116 /* This part must be outside ifdef protection */
117 #include <lttng/tracepoint-event.h>
118
119 #ifdef __cplusplus
120 }
121 #endif
This page took 0.030752 seconds and 3 git commands to generate.