Fix: pass private data to context callbacks
[lttng-ust.git] / liblttng-ust / lttng-ust-statedump-provider.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2013 Paul Woegerer <paul_woegerer@mentor.com>
5 * Copyright (C) 2015 Antoine Busque <abusque@efficios.com>
6 */
7
8 #undef TRACEPOINT_PROVIDER
9 #define TRACEPOINT_PROVIDER lttng_ust_statedump
10
11 #if !defined(_TRACEPOINT_LTTNG_UST_STATEDUMP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
12 #define _TRACEPOINT_LTTNG_UST_STATEDUMP_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #include <stddef.h>
19 #include <stdint.h>
20 #include <unistd.h>
21 #include <lttng/ust-events.h>
22 #include "compat.h"
23
24 #define LTTNG_UST_STATEDUMP_PROVIDER
25 #include <lttng/tracepoint.h>
26
27 TRACEPOINT_EVENT(lttng_ust_statedump, start,
28 TP_ARGS(struct lttng_ust_session *, session),
29 TP_FIELDS(
30 ctf_unused(session)
31 )
32 )
33
34 TRACEPOINT_EVENT(lttng_ust_statedump, bin_info,
35 TP_ARGS(
36 struct lttng_ust_session *, session,
37 void *, baddr,
38 const char*, path,
39 uint64_t, memsz,
40 uint8_t, is_pic,
41 uint8_t, has_build_id,
42 uint8_t, has_debug_link
43 ),
44 TP_FIELDS(
45 ctf_unused(session)
46 ctf_integer_hex(void *, baddr, baddr)
47 ctf_integer(uint64_t, memsz, memsz)
48 ctf_string(path, path)
49 ctf_integer(uint8_t, is_pic, is_pic)
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 TRACEPOINT_EVENT(lttng_ust_statedump, build_id,
56 TP_ARGS(
57 struct lttng_ust_session *, session,
58 void *, baddr,
59 uint8_t *, build_id,
60 size_t, build_id_len
61 ),
62 TP_FIELDS(
63 ctf_unused(session)
64 ctf_integer_hex(void *, baddr, baddr)
65 ctf_sequence_hex(uint8_t, build_id, build_id,
66 size_t, build_id_len)
67 )
68 )
69
70 TRACEPOINT_EVENT(lttng_ust_statedump, debug_link,
71 TP_ARGS(
72 struct lttng_ust_session *, session,
73 void *, baddr,
74 char *, filename,
75 uint32_t, crc
76 ),
77 TP_FIELDS(
78 ctf_unused(session)
79 ctf_integer_hex(void *, baddr, baddr)
80 ctf_integer(uint32_t, crc, crc)
81 ctf_string(filename, filename)
82 )
83 )
84
85 TRACEPOINT_EVENT(lttng_ust_statedump, procname,
86 TP_ARGS(
87 struct lttng_ust_session *, session,
88 char *, name
89 ),
90 TP_FIELDS(
91 ctf_unused(session)
92 ctf_array_text(char, procname, name, LTTNG_UST_ABI_PROCNAME_LEN)
93 )
94 )
95
96 TRACEPOINT_EVENT(lttng_ust_statedump, end,
97 TP_ARGS(struct lttng_ust_session *, session),
98 TP_FIELDS(
99 ctf_unused(session)
100 )
101 )
102
103 #endif /* _TRACEPOINT_LTTNG_UST_STATEDUMP_H */
104
105 #undef TRACEPOINT_INCLUDE
106 #define TRACEPOINT_INCLUDE "./lttng-ust-statedump-provider.h"
107
108 /* This part must be outside ifdef protection */
109 #include <lttng/tracepoint-event.h>
110
111 #ifdef __cplusplus
112 }
113 #endif
This page took 0.031119 seconds and 4 git commands to generate.