RTEMS 6.1-rc4
Loading...
Searching...
No Matches
rtems-trace-buffer-vars.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
10/*
11 * Copyright (c) 2015 Chris Johns <chrisj@rtems.org>
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#if !defined (_RTEMS_TRACE_BUFFER_VARS_H_)
36#define _RTEMS_TRACE_BUFFER_VARS_H_
37
38#include <stdbool.h>
39#include <stdint.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif /* __cplusplus */
44
54typedef struct
55{
56 uint32_t size;
57 const char* const type;
59
60 typedef struct {
61 uint32_t argc;
62 const __rtld_trace_sig_arg* args;
64
67
68/*
69 * Trace linker data.
70 */
71extern uint32_t __rtld_trace_names_size;
72extern const char *const __rtld_trace_names[];
73extern uint32_t __rtld_trace_enables_size;
74extern const uint32_t __rtld_trace_enables[];
75extern uint32_t __rtld_trace_triggers_size;
76extern const uint32_t __rtld_trace_triggers[];
77extern const __rtld_trace_sig __rtld_trace_signatures[];
78
79/*
80 * Trace buffer generator data.
81 */
82extern const bool __rtld_tbg_present;
83extern const uint32_t __rtld_tbg_mode;
84extern const uint32_t __rtld_tbg_buffer_size;
85extern uint32_t __rtld_tbg_buffer[];
86extern volatile uint32_t __rtld_tbg_buffer_in;
87extern volatile bool __rtld_tbg_finished;
88extern volatile bool __rtld_tbg_triggered;
89
93uint32_t rtems_trace_names_size (void);
94
98const char* rtems_trace_names (const uint32_t index);
99
103uint32_t rtems_trace_enables_size (void);
104
109uint32_t rtems_trace_enables (const uint32_t index);
110
114uint32_t rtems_trace_triggers_size (void);
115
120uint32_t rtems_trace_triggers (const uint32_t index);
121
125const rtems_trace_sig* rtems_trace_signatures (const uint32_t index);
126
130bool rtems_trace_enable_set(const uint32_t index);
131
135bool rtems_trace_trigger_set(const uint32_t index);
136
141
145uint32_t rtems_trace_buffering_mode (void);
146
151
155uint32_t* rtems_trace_buffering_buffer (void);
156
160uint32_t rtems_trace_buffering_buffer_in (void);
161
166
171
177
182
187
188#ifdef __cplusplus
189}
190#endif /* __cplusplus */
191
192#endif
bool rtems_trace_buffering_present(void)
Definition: rtems-trace-buffer-vars.c:91
uint32_t rtems_trace_buffering_mode(void)
Definition: rtems-trace-buffer-vars.c:97
uint32_t * rtems_trace_buffering_buffer(void)
Definition: rtems-trace-buffer-vars.c:109
uint32_t rtems_trace_enables(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:55
bool rtems_trace_enable_set(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:79
uint32_t rtems_trace_enables_size(void)
Definition: rtems-trace-buffer-vars.c:49
uint32_t rtems_trace_triggers(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:67
bool rtems_trace_trigger_set(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:85
uint32_t rtems_trace_names_size(void)
Definition: rtems-trace-buffer-vars.c:37
uint32_t rtems_trace_buffering_buffer_in(void)
Definition: rtems-trace-buffer-vars.c:115
uint32_t rtems_trace_buffering_buffer_size(void)
Definition: rtems-trace-buffer-vars.c:103
void rtems_trace_buffering_stop(void)
Definition: rtems-trace-buffer-vars.c:159
void rtems_trace_buffering_start(void)
Definition: rtems-trace-buffer-vars.c:148
bool rtems_trace_buffering_triggered(void)
Definition: rtems-trace-buffer-vars.c:137
void rtems_trace_buffering_resume(void)
Definition: rtems-trace-buffer-vars.c:168
const rtems_trace_sig * rtems_trace_signatures(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:73
uint32_t rtems_trace_triggers_size(void)
Definition: rtems-trace-buffer-vars.c:61
bool rtems_trace_buffering_finished(void)
Definition: rtems-trace-buffer-vars.c:126
const char * rtems_trace_names(const uint32_t index)
Definition: rtems-trace-buffer-vars.c:43
Definition: rtems-trace-buffer-vars.h:55
Definition: rtems-trace-buffer-vars.h:60