Add procname to lttng_ust_statedump information
[lttng-ust.git] / liblttng-ust / lttng-ust-statedump-provider.h
CommitLineData
95c25348 1#undef TRACEPOINT_PROVIDER
cf73e0fe 2#define TRACEPOINT_PROVIDER lttng_ust_statedump
95c25348 3
cf73e0fe
AB
4#if !defined(_TRACEPOINT_LTTNG_UST_STATEDUMP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
5#define _TRACEPOINT_LTTNG_UST_STATEDUMP_H
95c25348
PW
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11/*
12 * Copyright (C) 2013 Paul Woegerer <paul_woegerer@mentor.com>
cf73e0fe 13 * Copyright (C) 2015 Antoine Busque <abusque@efficios.com>
95c25348
PW
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>
94be38e8 37#include "compat.h"
95c25348 38
cf73e0fe 39#define LTTNG_UST_STATEDUMP_PROVIDER
95c25348
PW
40#include <lttng/tracepoint.h>
41
cf73e0fe
AB
42TRACEPOINT_EVENT(lttng_ust_statedump, start,
43 TP_ARGS(struct lttng_session *, session),
44 TP_FIELDS()
45)
46
f60e49df 47TRACEPOINT_EVENT(lttng_ust_statedump, bin_info,
cf73e0fe
AB
48 TP_ARGS(
49 struct lttng_session *, session,
50 void *, baddr,
f60e49df 51 const char*, path,
f5eb039d 52 uint64_t, memsz,
c5c4fd82
MD
53 uint8_t, is_pic,
54 uint8_t, has_build_id,
55 uint8_t, has_debug_link
8e2aed3f 56 ),
95c25348
PW
57 TP_FIELDS(
58 ctf_integer_hex(void *, baddr, baddr)
8e2aed3f 59 ctf_integer(uint64_t, memsz, memsz)
f60e49df 60 ctf_string(path, path)
f5eb039d 61 ctf_integer(uint8_t, is_pic, is_pic)
c5c4fd82
MD
62 ctf_integer(uint8_t, has_build_id, has_build_id)
63 ctf_integer(uint8_t, has_debug_link, has_debug_link)
8e2aed3f
AB
64 )
65)
66
67TRACEPOINT_EVENT(lttng_ust_statedump, build_id,
68 TP_ARGS(
69 struct lttng_session *, session,
70 void *, baddr,
71 uint8_t *, build_id,
72 size_t, build_id_len
73 ),
74 TP_FIELDS(
75 ctf_integer_hex(void *, baddr, baddr)
76 ctf_sequence_hex(uint8_t, build_id, build_id,
77 size_t, build_id_len)
78 )
79)
80
81TRACEPOINT_EVENT(lttng_ust_statedump, debug_link,
82 TP_ARGS(
83 struct lttng_session *, session,
84 void *, baddr,
85 char *, filename,
86 uint32_t, crc
87 ),
88 TP_FIELDS(
89 ctf_integer_hex(void *, baddr, baddr)
90 ctf_integer(uint32_t, crc, crc)
91 ctf_string(filename, filename)
95c25348
PW
92 )
93)
94
94be38e8
JR
95TRACEPOINT_EVENT(lttng_ust_statedump, procname,
96 TP_ARGS(
97 struct lttng_session *, session,
98 char *, name
99 ),
100 TP_FIELDS(
101 ctf_array_text(char, procname, name, LTTNG_UST_PROCNAME_LEN)
102 )
103)
104
cf73e0fe
AB
105TRACEPOINT_EVENT(lttng_ust_statedump, end,
106 TP_ARGS(struct lttng_session *, session),
107 TP_FIELDS()
108)
109
110#endif /* _TRACEPOINT_LTTNG_UST_STATEDUMP_H */
95c25348
PW
111
112#undef TRACEPOINT_INCLUDE
cf73e0fe 113#define TRACEPOINT_INCLUDE "./lttng-ust-statedump-provider.h"
95c25348
PW
114
115/* This part must be outside ifdef protection */
116#include <lttng/tracepoint-event.h>
117
118#ifdef __cplusplus
119}
120#endif
This page took 0.031947 seconds and 4 git commands to generate.