Lines Matching refs:debug
4 files: arch/s390/kernel/debug.c
5 include/asm-s390/debug.h
9 The goal of this feature is to provide a kernel debug logging API
11 (e.g. device drivers) can have one seperate debug log.
12 One purpose of this is to inspect the debug logs after a production system crash
15 it is possible to look at the debug logs on a live system via the Linux proc
17 The debug feature may also very usefull for kernel and driver development.
21 Kernel components (e.g. device drivers) can register themselves at the debug
23 debug log for the caller. For each debug log exists a number of debug areas
24 where exactly one is active at one time. Each debug area consists of contiguous
25 pages in memory. In the debug areas there are stored debug entries (log records)
28 An event-call writes the specified debug entry to the active debug
30 of the active debug area is reached, a wrap around is done (ring buffer)
31 and the next debug entry will be written at the beginning of the active
32 debug area.
34 An exception-call writes the specified debug entry to the log and
35 switches to the next debug area. This is done in order to be sure
39 The debug areas itselve are also ordered in form of a ring buffer.
40 When an exception is thrown in the last debug area, the following debug
46 Each debug entry contains the following data:
50 - Level of debug entry (0...6)
54 The debug logs can be inspected in a live system through entries in
60 to the debug log. Each component can decide which views should be
66 All debug logs have an an actual debug level (range from 0 to 6).
68 parameter. Only debug entries with a level that is lower or equal
72 The actual debug level can be changed with the help of the proc-filesystem
74 provided for every debug log. Debugging can be switched off completely
88 Parameter: name: Name of debug log (e.g. used for proc entry)
90 nr_areas: number of debug areas
91 buf_size: size of data area in each debug entry
93 Return Value: Handle for generated debug area
96 Description: Allocates memory for a debug log
102 Parameter: id: handle for debug log
106 Description: frees memory for a debug log
112 Parameter: id: handle for debug log
113 new_level: new debug level
117 Description: Sets new actual debug level if new_level is valid.
122 Parameter: id: handle for debug log
123 level: debug level
124 data: pointer to data for debug entry
127 Return Value: Address of written debug entry
129 Description: writes debug entry to active debug area (if level <= actual
130 debug level)
138 Parameter: id: handle for debug log
139 level: debug level
140 data: integer value for debug entry
142 Return Value: Address of written debug entry
144 Description: writes debug entry to active debug area (if level <= actual
145 debug level)
151 Parameter: id: handle for debug log
152 level: debug level
153 data: string for debug entry
155 Return Value: Address of written debug entry
157 Description: writes debug entry in ascii format to active debug area
158 (if level <= actual debug level)
164 Parameter: id: handle for debug log
165 level: debug level
166 string: format string for debug entry
169 Return Value: Address of written debug entry
171 Description: writes debug entry with format string and varargs (longs) to
172 active debug area (if level $<=$ actual debug level).
180 Parameter: id: handle for debug log
181 level: debug level
182 data: pointer to data for debug entry
185 Return Value: Address of written debug entry
187 Description: writes debug entry to active debug area (if level <= actual
188 debug level) and switches to next debug area
196 Parameter: id: handle for debug log
197 level: debug level
198 data: integer value for debug entry
200 Return Value: Address of written debug entry
202 Description: writes debug entry to active debug area (if level <= actual
203 debug level) and switches to next debug area
209 Parameter: id: handle for debug log
210 level: debug level
211 data: string for debug entry
213 Return Value: Address of written debug entry
215 Description: writes debug entry in ascii format to active debug area
216 (if level <= actual debug level) and switches to next debug
223 Parameter: id: handle for debug log
224 level: debug level
225 string: format string for debug entry
228 Return Value: Address of written debug entry
230 Description: writes debug entry with format string and varargs (longs) to
231 active debug area (if level $<=$ actual debug level) and
232 switches to next debug area.
239 Parameter: id: handle for debug log
240 view: pointer to debug view struct
245 Description: registers new debug view and creates proc dir entry
250 Parameter: id: handle for debug log
251 view: pointer to debug view struct
256 Description: unregisters debug view and removes proc dir entry
275 #include <asm/debug.h>
281 /* register 4 debug areas with one page each and 4 byte data field */
306 #include <asm/debug.h>
312 /* register 4 debug areas with one page each and data field for */
319 debug_sprintf_exception(debug_info, 1, "pointer to debug info: %p\n",&debug_info);
333 Views to the debug logs can be investigated through reading the corresponding
354 Changing the debug level
366 Flushing debug areas
369 area (0...n) to the proc file "flush". When using "-" all debug areas
374 1. Flush debug area 0:
377 2. Flush all debug areas:
383 's390dbf' to display all the debug logs. With this tool it will be possible
384 to investigate the debug logs on a live system and with a memory dump after
389 One last possibility to investigate the debug logs at a live
392 It is possible to find the anker of the debug-logs through
395 in debug.h and find the debug-areas in memory.
396 Normally modules which use the debug feature will also have
397 a global variable with the pointer to the debug-logs. Following
398 this pointer it will also be possible to find the debug logs in
403 order to see the debug entries well formatted.
412 The raw view returns a bytestream as the debug areas are stored in memory.
414 The sprintf view formats the debug entries in the same way as the sprintf
416 debug entry a pointer to the format string (size = sizeof(long))
417 and for each vararg a long value. So e.g. for a debug entry with a format
429 - level of debug entry
436 - Header as described in debug.h
483 It is not used by the debug feature itself.
485 The output when reading a debug-proc file is structured like this:
497 existing debug entry.
503 debug_dflt_header_fn() which is defined in in debug.h.
513 #include <asm/debug.h>