source: rtems/cpukit/include/rtems/captureimpl.h @ 2afb22b

Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 4.8 KB
Line 
1/**
2 * @file rtems/captureimpl.h
3 *
4 * @brief Capture Implementation file
5 *
6 * This file contains an interface between the capture engine and
7 * capture user extension methods.
8 */
9
10/*
11  ------------------------------------------------------------------------
12
13  Copyright 2002, 2016 Chris Johns <chrisj@rtems.org>.
14  All rights reserved.
15
16  COPYRIGHT (c) 1989-2014.
17  On-Line Applications Research Corporation (OAR).
18
19  The license and distribution terms for this file may be
20  found in the file LICENSE in this distribution.
21
22  This software with is provided ``as is'' and with NO WARRANTY.
23
24  ------------------------------------------------------------------------
25
26  RTEMS Performance Monitoring and Measurement Framework.
27  This is the Capture Engine component.
28
29*/
30
31#ifndef __CAPTUREIMPL_H_
32#define __CAPTUREIMPL_H_
33
34#include "capture.h"
35
36/**@{*/
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41/**
42 * @brief Capture set extension index.
43 *
44 * This function is used to set the extension index
45 * for the capture engine.
46 *
47 * @param[in] index specifies the extension index to be
48 * used for capture engine data.
49 */
50void rtems_capture_set_extension_index(int index);
51
52/**
53 * @brief Capture get extension index.
54 *
55 * This function rturns the extension index for the
56 * capture engine.
57 *
58 * @retval This method returns the extension index.
59 */
60int  rtems_capture_get_extension_index(void);
61
62/**
63 * @brief Capture get flags.
64 *
65 * This function gets the current flag settings
66 * for the capture engine.
67 *
68 * @retval This method returns the global capture
69 * flags.
70 *
71 */
72uint32_t rtems_capture_get_flags(void);
73
74/**
75 * @brief Capture set flags.
76 *
77 * This function sets a flag in the capture engine
78 *
79 * @param[in] mask specifies the flag to set
80 */
81void rtems_capture_set_flags(uint32_t mask);
82
83/**
84 * @brief Capture user extension open.
85 *
86 * This function creates the capture user extensions.
87 *
88 *
89 * @retval This method returns RTEMS_SUCCESSFUL upon successful
90 * creation of the user extensions.
91 */
92rtems_status_code rtems_capture_user_extension_open(void);
93
94/**
95 * @brief Capture user extension close.
96 *
97 * This function closes the capture user extensions.
98 *
99 * @retval This method returns RTEMS_SUCCESSFUL upon a successful
100 * delete of the user extensions.
101 */
102rtems_status_code rtems_capture_user_extension_close(void);
103
104/**
105 * @brief Capture check trigger.
106 *
107 * This function checks if we have triggered or if this event is a
108 * cause of a trigger.
109 *
110 * @param[in] ft specifies specifices the capture from task
111 * @param[in] tt specifies specifices the capture to task
112 * @param[in] events specifies the events
113 *
114 * @retval This method returns true if we have triggered or
115 * if the event is a cause of a trigger.
116 */
117bool rtems_capture_trigger_fired (rtems_tcb* ft,
118                                  rtems_tcb* tt,
119                                  uint32_t   events);
120
121/**
122 * @brief Capture print trace records.
123 *
124 * This function reads, prints and releases up to
125 * total trace records in either a csv format or an
126 * ascii table format.
127 *
128 * @param[in] total specifies the number of records to print
129 * @param[in] csv specifies a comma seperated value format
130 */
131void rtems_capture_print_trace_records ( int total, bool csv );
132
133/**
134 * @brief Capture print timestamp.
135 *
136 * This function prints uptime in a timestamp format.
137 *
138 * @param[in] uptime specifies the timestamp to print
139 */
140void rtems_capture_print_timestamp (uint64_t uptime);
141
142/**
143 * @brief Capture print record task.
144 *
145 * This function  prints a capture record task.  This
146 * record contains information to identify a task.  It
147 * is refrenced in other records by the task id.
148 *
149 * @param[in] cpu specifies the cpu the cpu the record was logged on.
150 * @param[in] rec specifies the task record.
151 */
152void rtems_capture_print_record_task(int                              cpu,
153                                     const rtems_capture_record*      rec,
154                                     const rtems_capture_task_record* task_rec);
155
156/**
157 * @brief Capture print capture record.
158 *
159 * This function prints a user extension
160 * capture record.
161 *
162 * @param[in] cpu specifies the cpu the cpu the record was logged on.
163 * @param[in] rec specifies the record.
164 * @param[in] diff specifies the time between this and the last capture record.
165 * @param[in] name specifies the name of the task, NULL if none.
166 * @param[in] task_count number of tasks to search for.
167 */
168void rtems_capture_print_record_capture(int                         cpu,
169                                        const rtems_capture_record* rec,
170                                        uint64_t                    diff,
171                                        const rtems_name*           name);
172
173/**
174 * @brief Capture print watch list
175 *
176 * This function  prints a capture watch list
177 */
178void rtems_capture_print_watch_list (void);
179
180#ifdef __cplusplus
181}
182#endif
183/**@}*/
184
185#endif
Note: See TracBrowser for help on using the repository browser.