1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# instrument.cdl
|
4 |
|
|
#
|
5 |
|
|
# configuration data related to the kernel instrumentation
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009, 2010 Free Software Foundation, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): jskov
|
43 |
|
|
# Original data: nickg
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 1999-07-05
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_option CYGVAR_KERNEL_INSTRUMENT_EXTERNAL_BUFFER {
|
52 |
|
|
display "Use buffer provided by the application"
|
53 |
|
|
flavor bool
|
54 |
|
|
default_value 0
|
55 |
|
|
description "
|
56 |
|
|
In most circumstances the kernel should provide the
|
57 |
|
|
instrumentation circular buffer itself. Occasionally
|
58 |
|
|
application code may wish to provide the buffer instead,
|
59 |
|
|
giving the application code more convenient access to the
|
60 |
|
|
buffer. This also makes it possible to put the circular
|
61 |
|
|
buffer in special areas of memory, for example a region that
|
62 |
|
|
is shared with the host."
|
63 |
|
|
}
|
64 |
|
|
|
65 |
|
|
cdl_option CYGNUM_KERNEL_INSTRUMENT_BUFFER_SIZE {
|
66 |
|
|
display "Instrumentation buffer size"
|
67 |
|
|
flavor data
|
68 |
|
|
legal_values 16 to 0x100000
|
69 |
|
|
default_value 256
|
70 |
|
|
description "
|
71 |
|
|
If kernel instrumentation is enabled then the instrumentation
|
72 |
|
|
data goes into a circular buffer. A larger buffer allows
|
73 |
|
|
more data to be stored, but at a significant cost in memory.
|
74 |
|
|
The value of this option corresponds to the number of entries
|
75 |
|
|
in the table, and typically each entry will require 16 bytes
|
76 |
|
|
of memory."
|
77 |
|
|
}
|
78 |
|
|
|
79 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_BUFFER_WRAP {
|
80 |
|
|
display "Wrap instrumentation buffer"
|
81 |
|
|
default_value 1
|
82 |
|
|
description "
|
83 |
|
|
When the instrumentation buffer is full it can either be restarted
|
84 |
|
|
from the beginning, overwriting older data, or it can stop at the
|
85 |
|
|
end. The former is useful if you want to look at the last entries
|
86 |
|
|
made while the latter is useful if you want to look at the first
|
87 |
|
|
few."
|
88 |
|
|
}
|
89 |
|
|
|
90 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAGS {
|
91 |
|
|
display "Perform selective instrumentation"
|
92 |
|
|
default_value 1
|
93 |
|
|
description "
|
94 |
|
|
The kernel can either collect all instrumentation events, or
|
95 |
|
|
it can filter out events at runtime based on a set of flags.
|
96 |
|
|
For example it would be possible to decide at runtime that
|
97 |
|
|
only scheduler and interrupt instrumentation flags are of
|
98 |
|
|
interest and that all other flags should be ignored. This
|
99 |
|
|
flag mechanism involves extra code and processor cycle
|
100 |
|
|
overhead in the instrumentation code, so it can be disabled
|
101 |
|
|
if the application developer is interested in all
|
102 |
|
|
instrumentation events."
|
103 |
|
|
}
|
104 |
|
|
|
105 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_SCHED {
|
106 |
|
|
display "Instrument common scheduler operations"
|
107 |
|
|
default_value 1
|
108 |
|
|
active_if CYGPKG_KERNEL_SCHED
|
109 |
|
|
description "
|
110 |
|
|
It is possible to perform selective instrumentation at
|
111 |
|
|
run-time. It is also possible to disable instrumentation
|
112 |
|
|
in various kernel components at compile-time, thus
|
113 |
|
|
reducing the code size overheads. This option controls
|
114 |
|
|
whether or not instrumentation support is compiled into
|
115 |
|
|
the scheduling code."
|
116 |
|
|
}
|
117 |
|
|
|
118 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_THREAD {
|
119 |
|
|
display "Instrument thread operations"
|
120 |
|
|
default_value 1
|
121 |
|
|
active_if CYGPKG_KERNEL_THREADS
|
122 |
|
|
description "
|
123 |
|
|
It is possible to perform selective instrumentation at
|
124 |
|
|
run-time. It is also possible to disable instrumentation
|
125 |
|
|
in various kernel components at compile-time, thus
|
126 |
|
|
reducing the code size overheads. This option controls
|
127 |
|
|
whether or not instrumentation support is compiled into
|
128 |
|
|
the code that manipulates threads."
|
129 |
|
|
}
|
130 |
|
|
|
131 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_INTR {
|
132 |
|
|
display "Instrument interrupt-related operations"
|
133 |
|
|
default_value 1
|
134 |
|
|
active_if CYGPKG_KERNEL_INTERRUPTS
|
135 |
|
|
description "
|
136 |
|
|
It is possible to perform selective instrumentation at
|
137 |
|
|
run-time. It is also possible to disable instrumentation
|
138 |
|
|
in various kernel components at compile-time, thus
|
139 |
|
|
reducing the code size overheads. This option controls
|
140 |
|
|
whether or not instrumentation support is compiled into
|
141 |
|
|
the interrupt handling code."
|
142 |
|
|
}
|
143 |
|
|
|
144 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_MUTEX {
|
145 |
|
|
display "Instrument mutex operations"
|
146 |
|
|
default_value 1
|
147 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
148 |
|
|
description "
|
149 |
|
|
It is possible to perform selective instrumentation at
|
150 |
|
|
run-time. It is also possible to disable instrumentation
|
151 |
|
|
in various kernel components at compile-time, thus
|
152 |
|
|
reducing the code size overheads. This option controls
|
153 |
|
|
whether or not instrumentation support is compiled into
|
154 |
|
|
the mutex code."
|
155 |
|
|
}
|
156 |
|
|
|
157 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_CONDVAR {
|
158 |
|
|
display "Instrument condition variable operations"
|
159 |
|
|
default_value 1
|
160 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
161 |
|
|
description "
|
162 |
|
|
It is possible to perform selective instrumentation at
|
163 |
|
|
run-time. It is also possible to disable instrumentation
|
164 |
|
|
in various kernel components at compile-time, thus
|
165 |
|
|
reducing the code size overheads. This option controls
|
166 |
|
|
whether or not instrumentation support is compiled into
|
167 |
|
|
the condition variable code."
|
168 |
|
|
}
|
169 |
|
|
|
170 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_BINSEM {
|
171 |
|
|
display "Instrument binary semaphore operations"
|
172 |
|
|
default_value 1
|
173 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
174 |
|
|
description "
|
175 |
|
|
It is possible to perform selective instrumentation at
|
176 |
|
|
run-time. It is also possible to disable instrumentation
|
177 |
|
|
in various kernel components at compile-time, thus
|
178 |
|
|
reducing the code size overheads. This option controls
|
179 |
|
|
whether or not instrumentation support is compiled into
|
180 |
|
|
the binary semaphore code."
|
181 |
|
|
}
|
182 |
|
|
|
183 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_CNTSEM {
|
184 |
|
|
display "Instrument counting semaphore operations"
|
185 |
|
|
default_value 1
|
186 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
187 |
|
|
description "
|
188 |
|
|
It is possible to perform selective instrumentation at
|
189 |
|
|
run-time. It is also possible to disable instrumentation
|
190 |
|
|
in various kernel components at compile-time, thus
|
191 |
|
|
reducing the code size overheads. This option controls
|
192 |
|
|
whether or not instrumentation support is compiled into
|
193 |
|
|
the counting semaphore code."
|
194 |
|
|
}
|
195 |
|
|
|
196 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_MBOXT {
|
197 |
|
|
display "Instrument message box operations"
|
198 |
|
|
default_value 1
|
199 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
200 |
|
|
description "
|
201 |
|
|
It is possible to perform selective instrumentation at
|
202 |
|
|
run-time. It is also possible to disable instrumentation
|
203 |
|
|
in various kernel components at compile-time, thus
|
204 |
|
|
reducing the code size overheads. This option controls
|
205 |
|
|
whether or not instrumentation support is compiled into
|
206 |
|
|
the message box code."
|
207 |
|
|
}
|
208 |
|
|
|
209 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_FLAG {
|
210 |
|
|
display "Instrument event flag operations"
|
211 |
|
|
default_value 1
|
212 |
|
|
active_if CYGPKG_KERNEL_SYNCH
|
213 |
|
|
description "
|
214 |
|
|
It is possible to perform selective instrumentation at
|
215 |
|
|
run-time. It is also possible to disable instrumentation
|
216 |
|
|
in various kernel components at compile-time, thus
|
217 |
|
|
reducing the code size overheads. This option controls
|
218 |
|
|
whether or not instrumentation support is compiled into
|
219 |
|
|
the event flag code."
|
220 |
|
|
}
|
221 |
|
|
|
222 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_CLOCK {
|
223 |
|
|
display "Instrument clock operations"
|
224 |
|
|
default_value 1
|
225 |
|
|
active_if CYGVAR_KERNEL_COUNTERS_CLOCK
|
226 |
|
|
description "
|
227 |
|
|
It is possible to perform selective instrumentation at
|
228 |
|
|
run-time. It is also possible to disable instrumentation
|
229 |
|
|
in various kernel components at compile-time, thus
|
230 |
|
|
reducing the code size overheads. This option controls
|
231 |
|
|
whether or not instrumentation support is compiled into
|
232 |
|
|
the real-time clock code."
|
233 |
|
|
}
|
234 |
|
|
|
235 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_ALARM {
|
236 |
|
|
display "Instrument alarm-related operations"
|
237 |
|
|
default_value 1
|
238 |
|
|
active_if CYGVAR_KERNEL_COUNTERS_CLOCK
|
239 |
|
|
description "
|
240 |
|
|
It is possible to perform selective instrumentation at
|
241 |
|
|
run-time. It is also possible to disable instrumentation
|
242 |
|
|
in various kernel components at compile-time, thus
|
243 |
|
|
reducing the code size overheads. This option controls
|
244 |
|
|
whether or not instrumentation support is compiled into
|
245 |
|
|
the code related to alarm operations."
|
246 |
|
|
}
|
247 |
|
|
|
248 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_SMP {
|
249 |
|
|
display "Instrument SMP-related operations"
|
250 |
|
|
default_value 1
|
251 |
|
|
active_if CYGVAR_KERNEL_COUNTERS_CLOCK
|
252 |
|
|
description "
|
253 |
|
|
It is possible to perform selective instrumentation at
|
254 |
|
|
run-time. It is also possible to disable instrumentation
|
255 |
|
|
in various kernel components at compile-time, thus
|
256 |
|
|
reducing the code size overheads. This option controls
|
257 |
|
|
whether or not instrumentation support is compiled into
|
258 |
|
|
the code related to SMP operations."
|
259 |
|
|
}
|
260 |
|
|
|
261 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_MLQ {
|
262 |
|
|
display "Instrument multi-level queue scheduler operations"
|
263 |
|
|
default_value 1
|
264 |
|
|
active_if CYGSEM_KERNEL_SCHED_MLQUEUE
|
265 |
|
|
description "
|
266 |
|
|
It is possible to perform selective instrumentation at
|
267 |
|
|
run-time. It is also possible to disable instrumentation
|
268 |
|
|
in various kernel components at compile-time, thus
|
269 |
|
|
reducing the code size overheads. This option controls
|
270 |
|
|
whether or not instrumentation support is compiled into
|
271 |
|
|
the code for the multi-level queue scheduler."
|
272 |
|
|
}
|
273 |
|
|
|
274 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_BITMAP {
|
275 |
|
|
display "Instrument bitmap scheduler operations"
|
276 |
|
|
default_value 1
|
277 |
|
|
active_if CYGSEM_KERNEL_SCHED_BITMAP
|
278 |
|
|
description "
|
279 |
|
|
It is possible to perform selective instrumentation at
|
280 |
|
|
run-time. It is also possible to disable instrumentation
|
281 |
|
|
in various kernel components at compile-time, thus
|
282 |
|
|
reducing the code size overheads. This option controls
|
283 |
|
|
whether or not instrumentation support is compiled into
|
284 |
|
|
the code for the bitmap scheduler."
|
285 |
|
|
}
|
286 |
|
|
|
287 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_USER {
|
288 |
|
|
display "Support application-level instrumentation"
|
289 |
|
|
default_value 1
|
290 |
|
|
description "
|
291 |
|
|
It is possible to perform selective instrumentation at
|
292 |
|
|
run-time. It is also possible to disable instrumentation
|
293 |
|
|
in various kernel components at compile-time, thus
|
294 |
|
|
reducing the code size overheads. This option controls
|
295 |
|
|
whether or not application-level instrumentation gets
|
296 |
|
|
compiled in."
|
297 |
|
|
}
|
298 |
|
|
|
299 |
|
|
cdl_component CYGDBG_KERNEL_INSTRUMENT_MSGS {
|
300 |
|
|
display "Provide user-friendly instrumentation messages"
|
301 |
|
|
default_value 1
|
302 |
|
|
description "
|
303 |
|
|
Include code which will convert the instrument type field
|
304 |
|
|
into a more human understandable string"
|
305 |
|
|
|
306 |
|
|
cdl_option CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE {
|
307 |
|
|
display "Rebuild the header file"
|
308 |
|
|
default_value 0
|
309 |
|
|
description "
|
310 |
|
|
|
311 |
|
|
Make (using a shell script) include/cyg/kernel/instrument_desc.h in
|
312 |
|
|
your build tree; this is normally simply copied from the repository.
|
313 |
|
|
If you make a permanent change to include/instrmnt.h, such that
|
314 |
|
|
instrument_desc.h needs updating, it's up to you to first delete the
|
315 |
|
|
master file
|
316 |
|
|
ECOS_REPOSITORY/kernel/VERSION/include/instrument_desc.h
|
317 |
|
|
in your source repository, make the new version by enabling this
|
318 |
|
|
option then copy the new file
|
319 |
|
|
back from your build place to its source in
|
320 |
|
|
ECOS_REPOSITORY/kernel/VERSION/include/instrument_desc.h
|
321 |
|
|
and/or commit this to any version control system that you use."
|
322 |
|
|
|
323 |
|
|
make -priority 50 {
|
324 |
|
|
/include/cyg/kernel/instrument_desc.h: /include/instrmnt.h /cdl/instrument.cdl
|
325 |
|
|
sh $(REPOSITORY)/$(PACKAGE)/host/instr/instrument.sh $< > $@
|
326 |
|
|
}
|
327 |
|
|
}
|
328 |
|
|
|
329 |
|
|
cdl_component CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP {
|
330 |
|
|
display "Build the host tool to print out a dump"
|
331 |
|
|
default_value 0
|
332 |
|
|
description "
|
333 |
|
|
Generate a host program which can dump the instrumentation
|
334 |
|
|
data in a human readable format. You have to somehow get the
|
335 |
|
|
instrumentation buffer into a file on the host. 'Exercise for
|
336 |
|
|
the reader' as university lecturers tend to say."
|
337 |
|
|
|
338 |
|
|
make -priority 51 {
|
339 |
|
|
/bin/dump_instr: /include/cyg/kernel/instrument_desc.h /cdl/instrument.cdl
|
340 |
|
|
@mkdir -p $(dir $@)
|
341 |
|
|
@mkdir -p tempinc
|
342 |
|
|
@cp -r $(PREFIX)/include/cyg tempinc
|
343 |
|
|
@cp -r $(PREFIX)/include/pkgconf tempinc
|
344 |
|
|
cc -I./tempinc $(REPOSITORY)/$(PACKAGE)/host/instr/dump_instr.c -o $(PREFIX)/bin/dump_instr
|
345 |
|
|
@rm -rf tempinc
|
346 |
|
|
}
|
347 |
|
|
}
|
348 |
|
|
}
|
349 |
|
|
|
350 |
|
|
# EOF instrument.cdl
|