author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 11 May 2010 17:28:22 +0300 | |
branch | RCL_3 |
changeset 110 | c734af59ce98 |
parent 31 | 56f325a607ea |
child 90 | 947f0dc9f7a8 |
child 256 | c1f20ce4abcf |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// e32\include\e32btrace.h |
|
15 |
// |
|
16 |
// WARNING: This file contains some APIs which are internal and are subject |
|
17 |
// to change without notice. Such APIs should therefore not be used |
|
18 |
// outside the Kernel and Hardware Services package. |
|
19 |
// |
|
20 |
||
21 |
#ifndef E32BTRACE_H |
|
22 |
#define E32BTRACE_H |
|
23 |
||
24 |
#ifdef __KERNEL_MODE__ |
|
25 |
class TSpinLock; |
|
26 |
#endif |
|
27 |
||
28 |
/** |
|
29 |
Class for handling fast tracing. |
|
30 |
||
31 |
A trace record consists of three parts: a header, header extensions, |
|
32 |
and the trace data itself. |
|
33 |
||
34 |
The header consists of four bytes containing: |
|
35 |
||
36 |
-# Size of the record in bytes. (Maximum value is KMaxBTraceRecordSize.) |
|
37 |
-# Flags. See enum TFlags. |
|
38 |
-# Category. Category value from enum BTrace::TCategory. |
|
39 |
-# Sub-category. The meaning of this is dependent on the value of Category. |
|
40 |
||
41 |
When trace records are stored in memory they are stored word (32 bit) aligned. |
|
42 |
Therefore the size must be rounded up to a multiple of four when calculating |
|
43 |
the address of the next record. E.g. |
|
44 |
@code |
|
45 |
TUint8* record; // pointer to trace record |
|
46 |
TInt size = record[BTrace::ESizeIndex]; |
|
47 |
record += (size+3)&~3; // move record pointer on to next record. |
|
48 |
@endcode |
|
49 |
The NextRecord() method is provided to do this operation. |
|
50 |
||
51 |
Following the header are optionally a number of 32 bit 'header extension' values. |
|
52 |
These are present in the order shown below but only exist if the appropriate flag bit |
|
53 |
is set in the Header. |
|
54 |
||
55 |
-# Header2. Contains flag values from enum Flags2. |
|
56 |
This value is only present if the EHeader2Present flag is set. |
|
57 |
-# Timestamp. A timestamp value indicating when the trace was generated. |
|
58 |
The format and resolution of this value are platform-dependent, but |
|
59 |
typically will contain the same values as would be returned by |
|
60 |
User::FastCounter() or NKern::FastCounter(). |
|
61 |
This value is only present if the ETimestampPresent flag is set. |
|
62 |
-# Timestamp2. Additional timestamp information. E.g. the most significant |
|
63 |
half of a 64bit timestamp value. Note, it is valid for a Timestamp2 value |
|
64 |
to be present even if the previous Timestamp is absent. |
|
65 |
This value is only present if the ETimestamp2Present flag is set. |
|
66 |
-# Context ID. This value indicates the context in which the trace was generated. |
|
67 |
The meaning of the id is dependent on the contents of the two |
|
68 |
least significant bits: |
|
69 |
- 00 indicates the value is the address of the NThread object for |
|
70 |
the currently executing thread. |
|
71 |
- 01 indicates Fast Interrupt (FIQ) context. |
|
72 |
Other bits of the value are currently reserved for future use. |
|
73 |
- 10 indicates Interrupt (IRQ) context. Other bits of the value |
|
74 |
are currently reserved for future use. |
|
75 |
- 11 indicates Immediate Delayed Function Call (IDFC) context. |
|
76 |
Other bits of the value are currently reserved for future use. |
|
77 |
. |
|
78 |
This value is only present if the EContextIdPresent flag is set. |
|
79 |
-# Program Counter. This is the memory address of the instruction after the location |
|
80 |
the trace was output. |
|
81 |
This value is only present if the EPcPresent flag is set. |
|
82 |
-# Extra. An extra value used for different purposes depending on the trace type. |
|
83 |
This value is only present if the EExtraPresent flag is set. |
|
84 |
||
85 |
Following the header extensions are 0 or more bytes of trace data specified when the trace |
|
86 |
was output. |
|
87 |
||
88 |
To output a trace, the following macros can be used: |
|
89 |
- BTrace0 |
|
90 |
- BTrace4 |
|
91 |
- BTrace8 |
|
92 |
- BTrace12 |
|
93 |
- BTraceN |
|
94 |
- BTraceBig |
|
95 |
- BTracePc0 |
|
96 |
- BTracePc4 |
|
97 |
- BTracePc8 |
|
98 |
- BTracePc12 |
|
99 |
- BTracePcN |
|
100 |
- BTracePcBig |
|
101 |
- BTraceContext0 |
|
102 |
- BTraceContext4 |
|
103 |
- BTraceContext8 |
|
104 |
- BTraceContext12 |
|
105 |
- BTraceContextN |
|
106 |
- BTraceContextBig |
|
107 |
- BTraceContextPc0 |
|
108 |
- BTraceContextPc4 |
|
109 |
- BTraceContextPc8 |
|
110 |
- BTraceContextPc12 |
|
111 |
- BTraceContextPcN |
|
112 |
- BTraceContextPcBig |
|
113 |
||
114 |
Whenever a trace is output, the trace handler is called with the arguments specified. |
|
115 |
See typedef THandler and SetHandler(). |
|
116 |
||
117 |
Each tracing category has a filter bit, which if set to zero means that traces in that category |
|
118 |
are discarded, see SetFilter(). This filtering is performed before the trace handler is |
|
119 |
called. This filter may also be initialised from boot time by using the 'btrace' keyword in |
|
120 |
an OBY file used to build a ROM image. |
|
121 |
||
122 |
Traces may also be additionally sent through a second level of filtering. This examines the |
|
123 |
first 32 bits of data in the trace and if this value isn't present in the list maintained |
|
124 |
in the secondary filter, the trace is discarded. The contents of the secondary filter are |
|
125 |
set using the SetFilter2 methods. |
|
126 |
||
127 |
Values used for secondary filtering must be Symbian Unique Identifiers (UIDs) allocated |
|
128 |
using the normal UID allocation process. Note, the following non-valid UID value ranges |
|
129 |
are reserved. |
|
130 |
- 0x00000000..0x007fffff Reserved for platform specific use. |
|
131 |
- 0x00800000..0x00ffffff Reserved for use by Symbian. |
|
132 |
||
133 |
To generate traces which are to be processed by the secondary filter, the following |
|
134 |
macros can be used: |
|
135 |
||
136 |
- BTraceFiltered4 |
|
137 |
- BTraceFiltered8 |
|
138 |
- BTraceFiltered12 |
|
139 |
- BTraceFilteredN |
|
140 |
- BTraceFilteredBig |
|
141 |
- BTraceFilteredPc4 |
|
142 |
- BTraceFilteredPc8 |
|
143 |
- BTraceFilteredPc12 |
|
144 |
- BTraceFilteredPcN |
|
145 |
- BTraceFilteredPcBig |
|
146 |
- BTraceFilteredContext4 |
|
147 |
- BTraceFilteredContext8 |
|
148 |
- BTraceFilteredContext12 |
|
149 |
- BTraceFilteredContextN |
|
150 |
- BTraceFilteredContextBig |
|
151 |
- BTraceFilteredContextPc4 |
|
152 |
- BTraceFilteredContextPc8 |
|
153 |
- BTraceFilteredContextPc12 |
|
154 |
- BTraceFilteredContextPcN |
|
155 |
- BTraceFilteredContextPcBig |
|
156 |
||
157 |
Traces generated using the above methods will be filtered twice; once using the primary |
|
158 |
filter which checks the trace's category, and once using the secondary filter which checks |
|
159 |
the 32 bit UID value at the start of the trace data. Therefore the trace must pass both filter |
|
160 |
checks for it to be sent to the trace handler for output. |
|
161 |
||
162 |
@publishedPartner |
|
163 |
@released |
|
164 |
*/ |
|
165 |
class BTrace |
|
166 |
{ |
|
167 |
public: |
|
168 |
/** |
|
169 |
Byte indices into the trace header for specific fields. |
|
170 |
*/ |
|
171 |
enum THeaderStructure |
|
172 |
{ |
|
173 |
/** |
|
174 |
Size of record in bytes. |
|
175 |
*/ |
|
176 |
ESizeIndex = 0, |
|
177 |
||
178 |
/** |
|
179 |
Bitfield of flags from enum TFlags. E.g. to detect if a timestamp is present in |
|
180 |
the record, code like this could be used. |
|
181 |
@code |
|
182 |
TUint8* record; // pointer to trace record |
|
183 |
if(record[BTrace::EFlagsIndex]&BTrace::ETimestampPresent) |
|
184 |
TimestampPresent(); |
|
185 |
else |
|
186 |
TimestampNotPresent(); |
|
187 |
@endcode |
|
188 |
*/ |
|
189 |
EFlagsIndex = 1, |
|
190 |
||
191 |
/** |
|
192 |
Category value from enum BTrace::TCategory. |
|
193 |
*/ |
|
194 |
ECategoryIndex = 2, |
|
195 |
||
196 |
/** |
|
197 |
Sub-category value. The meaning of this is dependent on the Category. |
|
198 |
*/ |
|
199 |
ESubCategoryIndex = 3, |
|
200 |
}; |
|
201 |
||
202 |
/** |
|
203 |
Bit flags which indicate state of a trace record. |
|
204 |
*/ |
|
205 |
enum TFlags |
|
206 |
{ |
|
207 |
/** |
|
208 |
Header2 is present in the trace record. |
|
209 |
*/ |
|
210 |
EHeader2Present = 1<<0, |
|
211 |
||
212 |
/** |
|
213 |
A timestamp value is present in the trace record. |
|
214 |
*/ |
|
215 |
ETimestampPresent = 1<<1, |
|
216 |
||
217 |
/** |
|
218 |
A second timestamp value is present in the trace record. |
|
219 |
*/ |
|
220 |
ETimestamp2Present = 1<<2, |
|
221 |
||
222 |
/** |
|
223 |
A context ID is present in the trace record. |
|
224 |
*/ |
|
225 |
EContextIdPresent = 1<<3, |
|
226 |
||
227 |
/** |
|
228 |
A CPU program counter (PC) value is present in the trace record. |
|
229 |
*/ |
|
230 |
EPcPresent = 1<<4, |
|
231 |
||
232 |
/** |
|
233 |
An 'extra' value is present in the trace record. |
|
234 |
*/ |
|
235 |
EExtraPresent = 1<<5, |
|
236 |
||
237 |
/** |
|
238 |
Indicates that the data in this trace record was truncated to keep the size |
|
239 |
within the maximum permissible. |
|
240 |
*/ |
|
241 |
ERecordTruncated = 1<<6, |
|
242 |
||
243 |
/** |
|
244 |
Indicates that trace record(s) before this one are missing. |
|
245 |
This can happen if the trace buffer was full when a trace output was attempted. |
|
246 |
*/ |
|
247 |
EMissingRecord = 1<<7 |
|
248 |
}; |
|
249 |
||
250 |
/** |
|
251 |
Bit flags present in the Flags2 value of the header extension. |
|
252 |
*/ |
|
253 |
enum TFlags2 |
|
254 |
{ |
|
255 |
/** |
|
256 |
Masks out the bits for the multipart trace type. (See enum TMultiPart.) |
|
257 |
*/ |
|
258 |
EMultipartFlagMask = 3<<0, |
|
259 |
||
260 |
/** |
|
261 |
Masks out the bits for the CPU ID for SMP systems (zero if present on non SMP systems) |
|
262 |
*/ |
|
263 |
ECpuIdMask = 0xfff<<20, |
|
264 |
}; |
|
265 |
||
266 |
/** |
|
267 |
Values for multipart trace indicator. These values are stored in Flags2 an |
|
268 |
are obtained by ANDing with the value EMultipartFlagMask. |
|
269 |
||
270 |
If a 'Big' trace is generated which doesn't fit into a single trace record |
|
271 |
then its data is split into several separate trace records; a multipart trace. |
|
272 |
||
273 |
In multipart traces the 'extra' trace value is present in the header extension. |
|
274 |
(EExtraPresent is set.) This extra value contains a unique trace identifier |
|
275 |
which is the same is all parts of the trace. |
|
276 |
||
277 |
The structure of the data part of each trace record in a multipart trace is described |
|
278 |
below. In this description, the following labels are used. |
|
279 |
- A is the initial 4 bytes of data; the a1 argument of BTraceBig. |
|
280 |
- D is the array of bytes of additional data; the aData argument of BTraceBig. |
|
281 |
- N is the size of D; the aDataSize argument of BTraceBig |
|
282 |
- X is the maximum number of additional bytes which will fit into a trace record. |
|
283 |
This is usually KMaxBTraceDataArray but this should not be assumed, instead |
|
284 |
the size and other information present in each trace record should be examined. |
|
285 |
||
286 |
For the first part of a multipart trace, the data in a trace record has the following |
|
287 |
structure: |
|
288 |
||
289 |
- 4 bytes containing N. |
|
290 |
- 4 bytes containing A. |
|
291 |
- X bytes containing D[0..X-1] |
|
292 |
||
293 |
If the parts are numbered 0 through to 'j', then a middle part of a multipart trace |
|
294 |
is numbered 'i' where 0<i<j. The data in these parts has the structure: |
|
295 |
||
296 |
- 4 bytes containing N. |
|
297 |
- 4 bytes containing X*i. I.e. the offset within D for the data in this trace record. |
|
298 |
- X bytes containing D[X*i..X*i+X-1] |
|
299 |
||
300 |
For the last part of a multipart trace, the data has the structure: |
|
301 |
||
302 |
- 4 bytes containing N. |
|
303 |
- 4 bytes containing X*j. I.e. the offset within D for the data in this trace record. |
|
304 |
- N modulo X bytes containing D[X*j..N-1]. I.e. the final bytes of the trace data. |
|
305 |
*/ |
|
306 |
enum TMultiPart |
|
307 |
{ |
|
308 |
/** |
|
309 |
Indicates that this trace is the first part of a multipart trace. |
|
310 |
*/ |
|
311 |
EMultipartFirst = 1, |
|
312 |
||
313 |
/** |
|
314 |
Indicates that this trace is a middle part of a multipart trace. |
|
315 |
I.e. it is not the first or last part. |
|
316 |
*/ |
|
317 |
EMultipartMiddle = 2, |
|
318 |
||
319 |
/** |
|
320 |
Indicates that this trace is the last part of a multipart trace. |
|
321 |
*/ |
|
322 |
EMultipartLast = 3, |
|
323 |
}; |
|
324 |
||
325 |
/** |
|
326 |
Enumeration of trace categories. |
|
327 |
*/ |
|
328 |
enum TCategory |
|
329 |
{ |
|
330 |
/** |
|
331 |
Trace generated by all calls to RDebug::Printf. |
|
332 |
||
333 |
The first 4 bytes of trace data contain the thread ID, RThread::Id(), for the |
|
334 |
thread which caused this trace to be emitted. If the trace wasn't generated in |
|
335 |
thread context, this id has the value KNullThreadId. |
|
336 |
||
337 |
Subsequent bytes of data contain the ASCII text for the formatted string |
|
338 |
generated by Kern::Printf. |
|
339 |
||
340 |
These traces also contain a context ID, i.e. the EContextIdPresent flag is |
|
341 |
set and a context ID value is present in the extended header. |
|
342 |
||
343 |
If the trace text doesn't fit completely into one trace record, then |
|
344 |
a multipart trace is generated. See enum TMultiPart. |
|
345 |
*/ |
|
346 |
ERDebugPrintf = 0, |
|
347 |
||
348 |
/** |
|
349 |
Trace generated by all calls to Kern::Printf. |
|
350 |
Trace records in this category have the same structure as ERDebugPrintf. |
|
351 |
*/ |
|
352 |
EKernPrintf = 1, |
|
353 |
||
354 |
/** |
|
355 |
Trace generated by platform security diagnostic messages. |
|
356 |
Trace records in this category have the same structure as ERDebugPrintf. |
|
357 |
*/ |
|
358 |
EPlatsecPrintf = 2, |
|
359 |
||
360 |
/** |
|
361 |
Trace generated for the purpose of associating thread context ids with |
|
362 |
the textual names of threads. These traces are usually generated when a |
|
363 |
thread is created, renamed or destroyed. |
|
364 |
||
365 |
If #Prime is called with this category, traces will be generated for all |
|
366 |
threads currently extant. |
|
367 |
||
368 |
@see enum TThreadIdentification |
|
369 |
*/ |
|
370 |
EThreadIdentification = 3, |
|
371 |
||
372 |
/** |
|
373 |
Trace generated when the CPU usage changes state, e.g. at thread context switch |
|
374 |
or during interrupt and DFC processing. |
|
375 |
||
376 |
The purpose of this trace category is to profile CPU usage. |
|
377 |
||
378 |
@see enum TCpuUsage |
|
379 |
*/ |
|
380 |
ECpuUsage = 4, |
|
381 |
||
382 |
/** |
|
383 |
Category used for profiling device drivers, kernel extensions etc. |
|
384 |
Used by PERF_LOG macro. |
|
385 |
@prototype 9.3 |
|
386 |
*/ |
|
387 |
EKernPerfLog = 5, |
|
388 |
||
389 |
/** |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
390 |
Trace generated when client-server activity takes place such as server creation, |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
391 |
session management, message handling, etc. |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
392 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
393 |
If #Prime is called with this category, traces will be generated for all |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
394 |
servers currently running and their sessions. |
0 | 395 |
*/ |
396 |
EClientServer = 6, |
|
397 |
||
398 |
/** |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
399 |
Trace generated on thread request completion. |
0 | 400 |
*/ |
401 |
ERequests = 7, |
|
402 |
||
403 |
/** |
|
404 |
Trace generated when chunks are created and destroyed, and when memory |
|
405 |
is committed and decommitted to and from chunks. |
|
406 |
||
407 |
If #Prime is called with this category, traces will be generated for all |
|
408 |
chunks currently extant. |
|
409 |
||
410 |
@see TChunks |
|
411 |
*/ |
|
412 |
EChunks = 8, |
|
413 |
||
414 |
/** |
|
415 |
Trace generated when code segments are created and destroyed, mapped |
|
416 |
into out of processes, and when memory is committed and decommitted to |
|
417 |
and from them. |
|
418 |
||
419 |
If #Prime is called with this category, traces will be generated for all |
|
420 |
code segments currently extant. |
|
421 |
||
422 |
@see TCodeSegs |
|
423 |
*/ |
|
424 |
ECodeSegs = 9, |
|
425 |
||
426 |
/** |
|
427 |
Trace generated by Demand Paging. |
|
428 |
@prototype 9.3 |
|
429 |
*/ |
|
430 |
EPaging = 10, |
|
431 |
||
432 |
/** |
|
433 |
Trace generated when thread and process priorities are modified, whether |
|
434 |
directly or through priority inheritance, aging or other mechanisms used |
|
435 |
by the kernel. |
|
436 |
||
437 |
The purpose of this category is to enable system-wide study of thread |
|
438 |
priority usage. |
|
439 |
||
440 |
If #Prime is called with this category, traces will be generated for all |
|
441 |
threads currently extant. |
|
442 |
||
443 |
@see enum TThreadPriority |
|
444 |
@internalTechnology |
|
445 |
@prototype 9.3 |
|
446 |
*/ |
|
447 |
EThreadPriority = 11, |
|
448 |
||
449 |
/** |
|
450 |
Trace generated by processing Paging requests in the Media subsystem and Media drivers. |
|
451 |
@prototype 9.3 |
|
452 |
*/ |
|
453 |
EPagingMedia = 12, |
|
454 |
||
455 |
/** |
|
456 |
Trace generated by the kernel for memory regions which don't belong to any chunk. |
|
457 |
@see enum TKernelMemory |
|
458 |
@prototype 9.4 |
|
459 |
*/ |
|
460 |
EKernelMemory = 13, |
|
461 |
||
462 |
/** |
|
463 |
Trace generated by user-mode heap usage. |
|
464 |
||
465 |
Unlike other trace categories, capturing heap trace involves an additional step |
|
466 |
depending on how much trace is required. To enable heap trace for a single process |
|
467 |
from the moment it starts, add the following line to the .exe's project (.mmp) file: |
|
468 |
||
469 |
firstlib eexe_instrumented_heap.lib |
|
470 |
||
471 |
This overrides the build tools default implicit link (for .exe projects) against eexe.lib. |
|
472 |
||
473 |
Alternatively, to enable heap trace for all processes at once you can enable the |
|
474 |
KUSERHEAPTRACE bit (#96) of the kernel trace flags. You can set this flag either at |
|
475 |
ROM-building time (look for the 'kerneltrace' line generally in \epoc32\rom\<platform>\header.iby) |
|
476 |
or at runtime by running the following at the Eshell command prompt: |
|
477 |
||
478 |
trace 0 0 1 |
|
479 |
||
480 |
Note that changing this flag at runtime only affects processes created after the flag |
|
481 |
is set or unset. It will not affect running processes. |
|
482 |
||
483 |
@see enum THeap |
|
484 |
@prototype 9.4 |
|
485 |
*/ |
|
486 |
EHeap = 14, |
|
487 |
||
488 |
/** |
|
489 |
Meta trace. Trace that is only useful to programs which use or display BTrace-based data. |
|
490 |
@see enum TMetaTrace |
|
491 |
@prototype 9.4 |
|
492 |
*/ |
|
493 |
EMetaTrace = 15, |
|
494 |
||
495 |
/** |
|
496 |
Trace generated by the ram allocator to allow the physical layout of RAM |
|
497 |
to be tracked. |
|
498 |
@internalTechnology |
|
499 |
*/ |
|
500 |
ERamAllocator = 16, |
|
501 |
||
502 |
/** |
|
503 |
Trace generated by the Fast Mutex in the Nkern. |
|
504 |
*/ |
|
505 |
EFastMutex = 17, |
|
506 |
||
507 |
||
508 |
/** |
|
509 |
Trace generated by any sampling profiler. |
|
510 |
@see enum TProfiling |
|
511 |
*/ |
|
512 |
EProfiling = 18, |
|
513 |
||
514 |
/** |
|
515 |
Trace generated by Power Resource Manager. |
|
516 |
@prototype 9.5 |
|
517 |
*/ |
|
518 |
EResourceManager = 19, |
|
519 |
||
520 |
||
521 |
/** |
|
522 |
Trace generated by Power Resource Manager User-Side API. |
|
523 |
@prototype 9.5 |
|
524 |
*/ |
|
525 |
EResourceManagerUs = 20, |
|
526 |
||
527 |
/** |
|
528 |
Trace generated by Raw Event subsystem APIs |
|
529 |
@see enum TRawEventTrace |
|
530 |
@prototype 9.5 |
|
531 |
*/ |
|
532 |
ERawEvent =21, |
|
533 |
||
534 |
/** |
|
535 |
Trace generated by USB communications (Client, Host and OTG) where use |
|
536 |
of standard logging (conditional Kern::Printf() calls) is sufficiently |
|
537 |
time-consuming that the required device timings mandated by the core |
|
538 |
USB standards cannot be achieved |
|
539 |
@prototype 9.5 |
|
540 |
*/ |
|
541 |
EUsb = 22, |
|
542 |
||
543 |
/** |
|
544 |
Trace generated by Symbian OS kernel synchronization objects. |
|
545 |
@prototype 9.5 |
|
546 |
*/ |
|
547 |
ESymbianKernelSync = 23, |
|
548 |
||
549 |
/** |
|
550 |
Trace generated by the flexible memory model. |
|
551 |
*/ |
|
552 |
EFlexibleMemModel = 24, |
|
553 |
||
554 |
/** |
|
555 |
Trace generated by IIC bus. |
|
556 |
@prototype 9.6 |
|
557 |
*/ |
|
558 |
EIic = 25, |
|
559 |
||
560 |
/** |
|
561 |
First category value in the range reserved for platform specific use; |
|
562 |
the end of this range is #EPlatformSpecificLast. |
|
563 |
Symbian's code will not generate any traces with categories in this range. |
|
564 |
||
565 |
It is strongly recommended that platforms reserve the first half of this range |
|
566 |
(128..143) for definition and use by base-port (kernel-side) code. Any general |
|
567 |
trace framework built on top of BTrace APIs should use the second half of the range. |
|
568 |
This allows fast (primary filtered only) BTrace categories to be used in device drivers |
|
569 |
and other base-port code, without clashing with more general trace frameworks implemented |
|
570 |
for application layer code. |
|
571 |
*/ |
|
572 |
EPlatformSpecificFirst = 128, |
|
573 |
||
574 |
/** |
|
575 |
Last category value in the range reserved for platform specific use. |
|
576 |
@see EPlatformSpecificFirst |
|
577 |
*/ |
|
578 |
EPlatformSpecificLast = 191, |
|
579 |
||
580 |
/** |
|
581 |
First category value in the range reserved for Symbian tools and future trace framework |
|
582 |
implementations; the end of this range is #ESymbianExtentionsLast. |
|
583 |
*/ |
|
584 |
ESymbianExtentionsFirst = 192, |
|
585 |
||
586 |
/** |
|
587 |
Last category value in the range reserved for Symbian tools and future trace framework |
|
588 |
implementations. |
|
589 |
@see ESymbianExtentionsFirst |
|
590 |
*/ |
|
591 |
ESymbianExtentionsLast = 253, |
|
592 |
||
593 |
/** |
|
594 |
Used for testing purposes. |
|
595 |
||
596 |
This may be used for ad-hoc testing purposes, e.g. special builds of components |
|
597 |
with tracing enabled for diagnostic purposes. |
|
598 |
||
599 |
This category is also used by the E32 BTrace unit tests. |
|
600 |
@test |
|
601 |
*/ |
|
602 |
ETest1 = 254, |
|
603 |
||
604 |
/** |
|
605 |
Used for testing purposes. |
|
606 |
||
607 |
This may be used for ad-hoc testing purposes, e.g. special builds of components |
|
608 |
with tracing enabled for diagnostic purposes. |
|
609 |
||
610 |
This category is also used by the E32 BTrace unit tests. |
|
611 |
@test |
|
612 |
*/ |
|
613 |
ETest2 = 255 |
|
614 |
}; |
|
615 |
||
616 |
/** |
|
617 |
Enumeration of sub-category values for trace category EThreadIdentification. |
|
618 |
@see EThreadIdentification |
|
619 |
*/ |
|
620 |
enum TThreadIdentification |
|
621 |
{ |
|
622 |
/** |
|
623 |
A nano-kernel thread (NThread) has been created. |
|
624 |
||
625 |
Trace data format: |
|
626 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
627 |
*/ |
|
628 |
ENanoThreadCreate, |
|
629 |
||
630 |
/** |
|
631 |
A nano-kernel thread (NThread) has been destroyed. |
|
632 |
||
633 |
Trace data format: |
|
634 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
635 |
*/ |
|
636 |
ENanoThreadDestroy, |
|
637 |
||
638 |
/** |
|
639 |
A thread (DThread) has been created. |
|
640 |
||
641 |
Trace data format: |
|
642 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
643 |
- 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. |
|
644 |
- Remaining data is the ASCII name of the thread. |
|
645 |
*/ |
|
646 |
EThreadCreate, |
|
647 |
||
648 |
/** |
|
649 |
A thread (DThread) has been destroyed. |
|
650 |
||
651 |
Trace data format: |
|
652 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
653 |
- 4 bytes containing trace id for the process to which this thread belongs. |
|
654 |
- 4 bytes containing thread ID, as returned by RThread::Id(). |
|
655 |
*/ |
|
656 |
EThreadDestroy, |
|
657 |
||
658 |
/** |
|
659 |
A thread (DThread) has been renamed. |
|
660 |
This trace may also be output by the tracing system at initialisation |
|
661 |
in order to identify threads already in existence. |
|
662 |
||
663 |
Trace data format: |
|
664 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
665 |
- 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. |
|
666 |
- Remaining data is the ASCII name of the thread. |
|
667 |
*/ |
|
668 |
EThreadName, |
|
669 |
||
670 |
/** |
|
671 |
A process has been renamed. |
|
672 |
This trace may also be output together with EThreadCreate or EThreadName traces |
|
673 |
to help identify the name of the process to which the thread belongs. |
|
674 |
||
675 |
Trace data format: |
|
676 |
- 4 bytes containing zero, or if this trace is generated together with EThreadName |
|
677 |
or EThreadCreate, this contains the context id (an NThread*) for the thread. |
|
678 |
- 4 bytes containing trace id (a DProcess*) for process. |
|
679 |
- Remaining data is the ASCII name of the process. |
|
680 |
*/ |
|
681 |
EProcessName, |
|
682 |
||
683 |
/** |
|
684 |
Informational trace giving a threads ID, as returned by RThread::Id(). |
|
685 |
Trace data format: |
|
686 |
- 4 bytes containing the context id (an NThread*) for this thread. |
|
687 |
- 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. |
|
688 |
- 4 bytes containing thread ID, as returned by RThread::Id(). |
|
689 |
*/ |
|
690 |
EThreadId, |
|
691 |
||
692 |
/** |
|
693 |
A process has been created. |
|
694 |
||
695 |
Trace data format: |
|
696 |
- 4 bytes containing trace id (a DProcess*) for the process. |
|
697 |
*/ |
|
698 |
EProcessCreate, |
|
699 |
||
700 |
/** |
|
701 |
A process has been destroyed. |
|
702 |
||
703 |
Trace data format: |
|
704 |
- 4 bytes containing trace id (a DProcess*) for the process. |
|
705 |
*/ |
|
706 |
EProcessDestroy |
|
707 |
||
708 |
}; |
|
709 |
||
710 |
/** |
|
711 |
Enumeration of sub-category values for trace category ECpuUsage. |
|
712 |
@see ECpuUsage |
|
713 |
*/ |
|
714 |
enum TCpuUsage |
|
715 |
{ |
|
716 |
/** |
|
717 |
Trace output at start of Interrupt (IRQ) dispatch. |
|
718 |
||
719 |
On platforms which support nested interrupts, traces for these will also |
|
720 |
be nested. |
|
721 |
*/ |
|
722 |
EIrqStart, |
|
723 |
||
724 |
/** |
|
725 |
Trace output at end of Interrupt (IRQ) dispatch. |
|
726 |
||
727 |
Note, this trace isn't generated if an Interrupt Service Routine queues |
|
728 |
a DFC or causes a thread to be scheduled. In these cases, the traces for |
|
729 |
these events (EIDFCStart or ENewThreadContext) should be taken to indicate |
|
730 |
that interrupt servicing has ended. |
|
731 |
*/ |
|
732 |
EIrqEnd, |
|
733 |
||
734 |
/** |
|
735 |
Trace output at start of Fast Interrupt (FIQ) dispatch. |
|
736 |
||
737 |
On platforms which support nested interrupts, traces for these will also |
|
738 |
be nested. |
|
739 |
*/ |
|
740 |
EFiqStart, |
|
741 |
||
742 |
/** |
|
743 |
Trace output at end of Fast Interrupt (FIQ) dispatch. |
|
744 |
||
745 |
Note, this trace isn't generated if an Interrupt Service Routine queues |
|
746 |
a DFC or causes a thread to be scheduled. In these cases, the traces for |
|
747 |
these events (EIDFCStart or ENewThreadContext) should be taken to indicate |
|
748 |
that interrupt servicing has ended. |
|
749 |
*/ |
|
750 |
EFiqEnd, |
|
751 |
||
752 |
/** |
|
753 |
Trace output at start of Immediate Delayed Function Call (IDFC) processing. |
|
754 |
This processing also includes moving DFCs to their final queue, so the trace |
|
755 |
does not necessarily indicate that any IDFCs have been executed. |
|
756 |
*/ |
|
757 |
EIDFCStart, |
|
758 |
||
759 |
/** |
|
760 |
Trace output at end of Immediate Delayed Function Call (IDFC) processing. |
|
761 |
*/ |
|
762 |
EIDFCEnd, |
|
763 |
||
764 |
/** |
|
765 |
Trace output when a thread is scheduled to run. |
|
766 |
The context id (NThread*) in this trace is that of the thread being scheduled. |
|
767 |
*/ |
|
768 |
ENewThreadContext |
|
769 |
}; |
|
770 |
||
771 |
/** |
|
772 |
@internalTechnology |
|
773 |
@prototype 9.3 |
|
774 |
*/ |
|
775 |
enum TClientServer |
|
776 |
{ |
|
777 |
/** |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
778 |
Trace generated whenever a server is created and during prime. |
0 | 779 |
|
780 |
Trace data format: |
|
781 |
- 4 bytes containing the server id (a DServer*). |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
782 |
- 4 bytes containing the owning thread pointer (a DThread*). |
0 | 783 |
- Remaining data is the ASCII name of the server. |
784 |
||
785 |
*/ |
|
786 |
EServerCreate, |
|
787 |
||
788 |
/** |
|
789 |
Trace generated whenever a server is destroyed. |
|
790 |
||
791 |
Trace data format: |
|
792 |
- 4 bytes containing the server id (a DServer*). |
|
793 |
||
794 |
*/ |
|
795 |
EServerDestroy, |
|
796 |
||
797 |
/** |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
798 |
Trace generated whenever a new session is attached to a server and during prime. |
0 | 799 |
I.e. a new session has been created. |
800 |
||
801 |
Trace data format: |
|
802 |
- 4 bytes containing the session id (a DSession*). |
|
803 |
- 4 bytes containing the server id (a DServer*). |
|
31
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
804 |
- 4 bytes containing the owner id (a DObject*). |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
805 |
|
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
806 |
The context id (NThread*) in this trace is that of the thread creating the session |
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
807 |
(apart from during prime when it is NULL). |
0 | 808 |
*/ |
809 |
ESessionAttach, |
|
810 |
||
811 |
/** |
|
812 |
Trace generated whenever a server session is detached from a server. |
|
813 |
I.e. a session has been closed. |
|
814 |
||
815 |
Trace data format: |
|
816 |
- 4 bytes containing the session id (a DSession*). |
|
817 |
- 4 bytes containing the reasons (error code) for the session being closed. |
|
818 |
||
819 |
*/ |
|
820 |
ESessionDetach, |
|
821 |
||
822 |
/** |
|
823 |
Trace generated whenever a new message is sent to a server. |
|
824 |
||
825 |
Trace data format: |
|
826 |
- 4 bytes containing the message handle. |
|
827 |
- 4 bytes containing the iFunction value for the message. |
|
828 |
- 4 bytes containing the session id (a DSession*). |
|
829 |
||
830 |
The context id (NThread*) in this trace is that of the thread which sent the message. |
|
831 |
*/ |
|
832 |
EMessageSend, |
|
833 |
||
834 |
/** |
|
835 |
Trace generated when a server receives a new message. |
|
836 |
||
837 |
Trace data format: |
|
838 |
- 4 bytes containing the message handle. |
|
839 |
*/ |
|
840 |
EMessageReceive, |
|
841 |
||
842 |
/** |
|
843 |
Trace generated whenever a message is completed using RMessagePtr2::Complete. |
|
844 |
||
845 |
Trace data format: |
|
846 |
- 4 bytes containing the message handle. |
|
847 |
- 4 bytes containing the completion reason, or object handle, value. |
|
848 |
(The object handle value is that which is delivered to the sender of the |
|
849 |
message, not that supplied by the server actually completing the request.) |
|
850 |
||
851 |
The context id (NThread*) in this trace is that of the thread which completed the message. |
|
852 |
*/ |
|
853 |
EMessageComplete |
|
854 |
}; |
|
855 |
||
856 |
||
857 |
/** |
|
858 |
@internalTechnology |
|
859 |
@prototype 9.3 |
|
860 |
*/ |
|
861 |
enum TRequests |
|
862 |
{ |
|
863 |
/** |
|
864 |
Trace generated whenever a request status is completed. |
|
865 |
||
866 |
Trace data format: |
|
867 |
- 4 bytes containing the thread id (NThread*) of the thread being signalled. |
|
868 |
- 4 bytes containing the address of the TRequestStatus object. |
|
869 |
- 4 bytes containing the completion reason. |
|
870 |
||
871 |
The context id (NThread*) in this trace is that of the thread which completed the request. |
|
872 |
*/ |
|
873 |
ERequestComplete |
|
874 |
}; |
|
875 |
||
876 |
||
877 |
/** |
|
878 |
Enumeration of sub-category values for trace category EChunks. |
|
879 |
@see EChunks |
|
880 |
*/ |
|
881 |
enum TChunks |
|
882 |
{ |
|
883 |
/** |
|
884 |
Trace output when a chunk is created. |
|
885 |
||
886 |
Trace data format: |
|
887 |
- 4 bytes containing the chunk id (a DChunk*). |
|
888 |
- 4 bytes containing the maximum size of the chunk. |
|
889 |
- The ASCII name of the chunk. |
|
890 |
*/ |
|
891 |
EChunkCreated, |
|
892 |
||
893 |
/** |
|
894 |
@internalTechnology |
|
895 |
||
896 |
Trace output when a chunk is created containing extra chunk information. |
|
897 |
||
898 |
Note that the meaning of the data in this trace is different between |
|
899 |
memory models, and may change without warning. |
|
900 |
||
901 |
Trace data format: |
|
902 |
- 4 bytes containing the chunk id (a DChunk*). |
|
903 |
- 4 bytes containing the chunk type. |
|
904 |
- 4 bytes containing the chunk's attributes. |
|
905 |
*/ |
|
906 |
EChunkInfo, |
|
907 |
||
908 |
/** |
|
909 |
Trace output when a chunk is destroyed. |
|
910 |
||
911 |
Trace data format: |
|
912 |
- 4 bytes containing the chunk id (a DChunk*) |
|
913 |
*/ |
|
914 |
EChunkDestroyed, |
|
915 |
||
916 |
/** |
|
917 |
Trace output when memory is allocated and committed to a chunk. |
|
918 |
||
919 |
Trace data format: |
|
920 |
- 4 bytes containing the chunk id (a DChunk*). |
|
921 |
- 4 bytes containing the offset into the chunk. |
|
922 |
- 4 bytes containing the size of the memory committed. |
|
923 |
*/ |
|
924 |
EChunkMemoryAllocated, |
|
925 |
||
926 |
/** |
|
927 |
Trace output when memory is decommitted from a chunk and deallocated. |
|
928 |
||
929 |
Trace data format: |
|
930 |
- 4 bytes containing the chunk id (a DChunk*). |
|
931 |
- 4 bytes containing the offset into the chunk. |
|
932 |
- 4 bytes containing the size of the memory decommitted. |
|
933 |
*/ |
|
934 |
EChunkMemoryDeallocated, |
|
935 |
||
936 |
/** |
|
937 |
Trace output when un-owned memory is committed to a chunk. |
|
938 |
||
939 |
Trace data format: |
|
940 |
- 4 bytes containing the chunk id (a DChunk*). |
|
941 |
- 4 bytes containing the offset into the chunk. |
|
942 |
- 4 bytes containing the size of the memory committed. |
|
943 |
*/ |
|
944 |
EChunkMemoryAdded, |
|
945 |
||
946 |
/** |
|
947 |
Trace output when un-owned memory is decommitted to a chunk. |
|
948 |
||
949 |
Trace data format: |
|
950 |
- 4 bytes containing the chunk id (a DChunk*). |
|
951 |
- 4 bytes containing the offset into the chunk. |
|
952 |
- 4 bytes containing the size of the memory decommitted. |
|
953 |
*/ |
|
954 |
EChunkMemoryRemoved, |
|
955 |
||
956 |
/** |
|
957 |
Trace to indicate the owning process of a chunk - only for local (private) chunks. |
|
958 |
||
959 |
Trace data format: |
|
960 |
- 4 bytes containing the chunk id (a DChunk*). |
|
961 |
- 4 bytes containing the process id of the owner (a DProcess*). |
|
962 |
*/ |
|
963 |
EChunkOwner |
|
964 |
}; |
|
965 |
||
966 |
/** |
|
967 |
Enumeration of sub-category values for trace category ECodeSegs. |
|
968 |
@see ECodeSegs |
|
969 |
*/ |
|
970 |
enum TCodeSegs |
|
971 |
{ |
|
972 |
/** |
|
973 |
Trace output when a code segment is created to associate a code segment |
|
974 |
id with a filename. |
|
975 |
||
976 |
Trace data format: |
|
977 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
978 |
- The ASCII filename. |
|
979 |
*/ |
|
980 |
ECodeSegCreated, |
|
981 |
||
982 |
/** |
|
983 |
Trace output when a code segment is created. |
|
984 |
||
985 |
Trace data format: |
|
986 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
987 |
- 4 bytes containing the attributes. |
|
988 |
- 4 bytes containing the code base address (.text). |
|
989 |
- 4 bytes containing the size of the code section (.text). |
|
990 |
- 4 bytes containing the base address of the constant data section (.rodata). |
|
991 |
- 4 bytes containing the size of the constant data section (.rodata). |
|
992 |
- 4 bytes containing the base address of the initialised data section (.data). |
|
993 |
- 4 bytes containing the size of the initialised data section (.data). |
|
994 |
- 4 bytes containing the base address of the uninitialised data section (.bss). |
|
995 |
- 4 bytes containing the size of the uninitialised data section (.bss). |
|
996 |
*/ |
|
997 |
ECodeSegInfo, |
|
998 |
||
999 |
/** |
|
1000 |
Trace output when a code segment is destroyed. |
|
1001 |
||
1002 |
Trace data format: |
|
1003 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
1004 |
*/ |
|
1005 |
ECodeSegDestroyed, |
|
1006 |
||
1007 |
/** |
|
1008 |
Trace output when a code segment is mapped into a process. |
|
1009 |
||
1010 |
Trace data format: |
|
1011 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
1012 |
- 4 bytes containing the process id (a DProcess*). |
|
1013 |
*/ |
|
1014 |
ECodeSegMapped, |
|
1015 |
||
1016 |
/** |
|
1017 |
Trace output when a code segment is unmapped from a process. |
|
1018 |
||
1019 |
Trace data format: |
|
1020 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
1021 |
- 4 bytes containing the process id (a DProcess*). |
|
1022 |
*/ |
|
1023 |
ECodeSegUnmapped, |
|
1024 |
||
1025 |
/** |
|
1026 |
Trace output when memory is allocated to a code segment. |
|
1027 |
||
1028 |
Under the multiple memory model, code segments for RAM-loaded user code |
|
1029 |
own the RAM pages the code occupies. The pages are not owned by any |
|
1030 |
chunk, but are mapped into the code chunk of each process that uses the |
|
1031 |
code segment. |
|
1032 |
||
1033 |
Trace data format: |
|
1034 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
1035 |
- 4 bytes containing the size of the memory allocated. |
|
1036 |
*/ |
|
1037 |
ECodeSegMemoryAllocated, |
|
1038 |
||
1039 |
/** |
|
1040 |
Trace output when memory is deallocated from a code segment. |
|
1041 |
||
1042 |
Under the multiple memory model, code segments for RAM-loaded user code |
|
1043 |
own the RAM pages the code occupies. The pages are not owned by any |
|
1044 |
chunk, but are mapped into the code chunk of each process that uses the |
|
1045 |
code segment. |
|
1046 |
||
1047 |
Trace data format: |
|
1048 |
- 4 bytes containing the code segment id (a DCodeSeg*). |
|
1049 |
- 4 bytes containing the size of the memory deallocated. |
|
1050 |
*/ |
|
1051 |
ECodeSegMemoryDeallocated |
|
1052 |
}; |
|
1053 |
||
1054 |
||
1055 |
/** |
|
1056 |
Enumeration of sub-category values for trace category EPaging. |
|
1057 |
@see EPaging |
|
1058 |
*/ |
|
1059 |
enum TPaging |
|
1060 |
{ |
|
1061 |
/** |
|
1062 |
This event indicates the beginning of the 'page in' activity. |
|
1063 |
The end of this activity is indicated by one of the following events: |
|
1064 |
- EPagingPageInUnneeded |
|
1065 |
- EPagingPageInROM |
|
1066 |
- EPagingPageInCode |
|
1067 |
- EPagingPageIn (flexible memory model) |
|
1068 |
||
1069 |
Trace data format: |
|
1070 |
- 4 bytes containing the virtual address which was accessed, causing this paging event. |
|
1071 |
- 4 bytes containing the virtual address of the instruction which caused this paging event. |
|
1072 |
(The PC value.) |
|
1073 |
||
1074 |
On the flexible memory model, the following addition trace data is also present: |
|
1075 |
- 1 byte containing the required access permissions, as defined by TMappingPermissions. |
|
1076 |
- 3 spare bytes, currently zero |
|
1077 |
||
1078 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1079 |
*/ |
|
1080 |
EPagingPageInBegin, |
|
1081 |
||
1082 |
/** |
|
1083 |
Event which terminates the 'page in' activity when the required page was found to have been |
|
1084 |
paged in by another thread while the current thread was processing the fault (see |
|
1085 |
EPagingPageInBegin). |
|
1086 |
||
1087 |
Trace data format: |
|
1088 |
- 0 bytes. (No extra data.) |
|
1089 |
||
1090 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1091 |
*/ |
|
1092 |
EPagingPageInUnneeded, |
|
1093 |
||
1094 |
/** |
|
1095 |
A ROM page has been paged in. |
|
1096 |
This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) |
|
1097 |
||
1098 |
Trace data format: |
|
1099 |
- 4 bytes containing the physical address of the page 'paged in'. |
|
1100 |
- 4 bytes containing the virtual address of the page 'paged in'. |
|
1101 |
||
1102 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1103 |
||
1104 |
This trace is not emitted on the flexible memory model - EPagingPageIn is used instead. |
|
1105 |
*/ |
|
1106 |
EPagingPageInROM, |
|
1107 |
||
1108 |
/** |
|
1109 |
A ROM page has been 'paged out'. I.e. removed from the live list to be either |
|
1110 |
reused or returned to free pool. |
|
1111 |
||
1112 |
Trace data format: |
|
1113 |
- 4 bytes containing the physical address of the page being 'paged out'. |
|
1114 |
- 4 bytes containing the virtual address of the page being 'paged out'. |
|
1115 |
||
1116 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1117 |
||
1118 |
This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. |
|
1119 |
*/ |
|
1120 |
EPagingPageOutROM, |
|
1121 |
||
1122 |
/** |
|
1123 |
A Free page has been 'paged in'. I.e. added to the live list. |
|
1124 |
||
1125 |
Trace data format: |
|
1126 |
- 4 bytes containing the physical address of the page being 'paged in'. |
|
1127 |
||
1128 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1129 |
*/ |
|
1130 |
EPagingPageInFree, |
|
1131 |
||
1132 |
/** |
|
1133 |
A Free page has been 'paged out'. I.e. removed from the live list to be either |
|
1134 |
reused or returned to free pool. |
|
1135 |
||
1136 |
Trace data format: |
|
1137 |
- 4 bytes containing the physical address of the page being 'paged out'. |
|
1138 |
||
1139 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1140 |
||
1141 |
This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. |
|
1142 |
*/ |
|
1143 |
EPagingPageOutFree, |
|
1144 |
||
1145 |
/** |
|
1146 |
A page has been made 'young' again because it was accessed. |
|
1147 |
||
1148 |
Trace data format: |
|
1149 |
- 4 bytes containing the physical address of the page being rejuvenated, (made young). |
|
1150 |
- 4 bytes containing the virtual address which was accessed, causing this paging event. |
|
1151 |
- 4 bytes containing the virtual address of the instruction which caused this paging event. |
|
1152 |
(The PC value.) |
|
1153 |
||
1154 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1155 |
*/ |
|
1156 |
EPagingRejuvenate, |
|
1157 |
||
1158 |
/** |
|
1159 |
A page fault was found to have already been previously serviced. |
|
1160 |
||
1161 |
Trace data format: |
|
1162 |
- 4 bytes containing the physical address of the page accessed. |
|
1163 |
- 4 bytes containing the virtual address which was accessed, causing this paging event. |
|
1164 |
- 4 bytes containing the virtual address of the instruction which caused this paging event. |
|
1165 |
(The PC value.) |
|
1166 |
||
1167 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1168 |
||
1169 |
This trace is not emitted on the flexible memory model. |
|
1170 |
*/ |
|
1171 |
EPagingPageNop, |
|
1172 |
||
1173 |
/** |
|
1174 |
A page has been locked. |
|
1175 |
||
1176 |
Trace data format: |
|
1177 |
- 4 bytes containing the physical address of the page being locked. |
|
1178 |
- 4 bytes containing the value of the lock count after the paged was locked. |
|
1179 |
||
1180 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1181 |
*/ |
|
1182 |
EPagingPageLock, |
|
1183 |
||
1184 |
/** |
|
1185 |
A page has been unlocked. |
|
1186 |
||
1187 |
Trace data format: |
|
1188 |
- 4 bytes containing the physical address of the page being unlocked. |
|
1189 |
- 4 bytes containing the value of the lock count before the paged was unlocked. |
|
1190 |
||
1191 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1192 |
*/ |
|
1193 |
EPagingPageUnlock, |
|
1194 |
||
1195 |
/** |
|
1196 |
A page containing RAM cache has been 'paged out'. I.e. removed from the live list to be |
|
1197 |
either reused or returned to free pool. |
|
1198 |
||
1199 |
Trace data format: |
|
1200 |
- 4 bytes containing the physical address of the page being 'paged out'. |
|
1201 |
- 4 bytes containing the virtual address of the page being 'paged out'. |
|
1202 |
||
1203 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1204 |
||
1205 |
This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. |
|
1206 |
*/ |
|
1207 |
EPagingPageOutCache, |
|
1208 |
||
1209 |
/** |
|
1210 |
A page containing RAM-loaded code has been paged in. |
|
1211 |
This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) |
|
1212 |
||
1213 |
Trace data format: |
|
1214 |
- 4 bytes containing the physical address of the page 'paged in'. |
|
1215 |
- 4 bytes containing the virtual address of the page 'paged in'. |
|
1216 |
||
1217 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1218 |
||
1219 |
This trace is not emitted on the flexible memory model - EPagingPageIn is used instead. |
|
1220 |
*/ |
|
1221 |
EPagingPageInCode, |
|
1222 |
||
1223 |
/** |
|
1224 |
A page containing RAM-loaded code has been 'paged out'. I.e. removed from the live list to be |
|
1225 |
either reused or returned to free pool. |
|
1226 |
||
1227 |
Trace data format: |
|
1228 |
- 4 bytes containing the physical address of the page being 'paged out'. |
|
1229 |
- 4 bytes containing the virtual address of the page being 'paged out'. |
|
1230 |
||
1231 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1232 |
||
1233 |
This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. |
|
1234 |
*/ |
|
1235 |
EPagingPageOutCode, |
|
1236 |
||
1237 |
/** |
|
1238 |
A page of RAM-loaded code was found to already be 'paged in' but not mapped in |
|
1239 |
the faulting process. |
|
1240 |
||
1241 |
Trace data format: |
|
1242 |
- 4 bytes containing the physical address of the page 'paged in'. |
|
1243 |
- 4 bytes containing the virtual address which was accessed, causing this paging event. |
|
1244 |
||
1245 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1246 |
||
1247 |
This trace is only emitted on the multiple memory model. |
|
1248 |
*/ |
|
1249 |
EPagingMapCode, |
|
1250 |
||
1251 |
/** |
|
1252 |
A page has been made 'old' because it was the last young page to be accessed. |
|
1253 |
||
1254 |
This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE |
|
1255 |
macro defined. |
|
1256 |
||
1257 |
Trace data format: |
|
1258 |
- 4 bytes containing the physical address of the page being aged, (made old). |
|
1259 |
||
1260 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1261 |
*/ |
|
1262 |
EPagingAged, |
|
1263 |
||
1264 |
/** |
|
1265 |
Trace emitted at the start of decompression of demand paged data. |
|
1266 |
||
1267 |
This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE |
|
1268 |
macro defined. |
|
1269 |
||
1270 |
Trace data format: |
|
1271 |
- 4 bytes containing an integer which indicates the compression type being used: |
|
1272 |
0, no compression; |
|
1273 |
1, bytepair compression. |
|
1274 |
||
1275 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1276 |
*/ |
|
1277 |
EPagingDecompressStart, |
|
1278 |
||
1279 |
/** |
|
1280 |
Trace emitted at the end of decompression of demand paged data. |
|
1281 |
||
1282 |
This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE |
|
1283 |
macro defined. |
|
1284 |
||
1285 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1286 |
*/ |
|
1287 |
EPagingDecompressEnd, |
|
1288 |
||
1289 |
/** |
|
1290 |
Information about the kernel's memory model. |
|
1291 |
||
1292 |
Trace data format: |
|
1293 |
- 4 bytes containing the memory model as defined by TMemModelAttributes. |
|
1294 |
*/ |
|
1295 |
EPagingMemoryModel, |
|
1296 |
||
1297 |
/** |
|
1298 |
A page has been donated to the paging cache via RChunk::Unlock(). |
|
1299 |
||
1300 |
Trace data format: |
|
1301 |
- 4 bytes containing the chunk id (a DChunk*). |
|
1302 |
- 4 bytes containing the page index of the page within the chunk. |
|
1303 |
||
1304 |
This trace is not emitted on the flexible memory model. |
|
1305 |
@see EPagingDonatePage |
|
1306 |
*/ |
|
1307 |
EPagingChunkDonatePage, |
|
1308 |
||
1309 |
/** |
|
1310 |
A page has been reclaimed from the paging cache via RChunk::Lock(). |
|
1311 |
||
1312 |
Trace data format: |
|
1313 |
- 4 bytes containing the chunk id (a DChunk*). |
|
1314 |
- 4 bytes containing the page index of the page within the chunk. |
|
1315 |
||
1316 |
This trace is not emitted on the flexible memory model. |
|
1317 |
@see EPagingReclaimPage. |
|
1318 |
*/ |
|
1319 |
EPagingChunkReclaimPage, |
|
1320 |
||
1321 |
// Traces specific to the flexible memory model |
|
1322 |
||
1323 |
/** |
|
1324 |
A page has been paged in. |
|
1325 |
This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) |
|
1326 |
||
1327 |
Trace data format: |
|
1328 |
- 4 bytes containing the physical address of the page 'paged in'. |
|
1329 |
- 4 bytes containing the memory object id (DMemoryObject*). |
|
1330 |
- 4 bytes containing the page index of the page within the memory object. |
|
1331 |
||
1332 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1333 |
||
1334 |
This trace is only emitted on the flexible memory model. |
|
1335 |
*/ |
|
1336 |
EPagingPageIn, |
|
1337 |
||
1338 |
/** |
|
1339 |
A page has been 'paged out'. I.e. removed from the live list to be either |
|
1340 |
reused or returned to free pool. |
|
1341 |
||
1342 |
Trace data format: |
|
1343 |
- 4 bytes containing the physical address of the page being 'paged out'. |
|
1344 |
||
1345 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1346 |
||
1347 |
This trace is only emitted on the flexible memory model. |
|
1348 |
*/ |
|
1349 |
EPagingPageOut, |
|
1350 |
||
1351 |
/** |
|
1352 |
Event which terminates the 'page in' activity when the required page was found to |
|
1353 |
already be paged in but not mapped in the faulting process (see EPagingPageInBegin). |
|
1354 |
||
1355 |
Trace data format: |
|
1356 |
- 4 bytes containing the physical address of the page 'paged in'. |
|
1357 |
||
1358 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1359 |
||
1360 |
This trace is only emitted on the flexible memory model. |
|
1361 |
*/ |
|
1362 |
EPagingMapPage, |
|
1363 |
||
1364 |
/** |
|
1365 |
A page has been donated to the paging cache via RChunk::Unlock(). |
|
1366 |
||
1367 |
Trace data format: |
|
1368 |
- 4 bytes containing the physical address of the page. |
|
1369 |
- 4 bytes containing the memory object id (DMemoryObject*). |
|
1370 |
- 4 bytes containing the page index of the page within the memory object. |
|
1371 |
||
1372 |
This trace is only emitted on the flexible memory model. |
|
1373 |
@see EPagingChunkDonatePage. |
|
1374 |
*/ |
|
1375 |
EPagingDonatePage, |
|
1376 |
||
1377 |
/** |
|
1378 |
A page has been reclaimed from the paging cache via RChunk::Lock(). |
|
1379 |
||
1380 |
Trace data format: |
|
1381 |
- 4 bytes containing the physical address of the page. |
|
1382 |
||
1383 |
This trace is only emitted on the flexible memory model. |
|
1384 |
@see EPagingChunkReclaimPage. |
|
1385 |
*/ |
|
1386 |
EPagingReclaimPage, |
|
1387 |
||
1388 |
/** |
|
1389 |
A page has been moved to the oldest clean list because it was the last old page and |
|
1390 |
it was clean. |
|
1391 |
||
1392 |
This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE |
|
1393 |
macro defined. |
|
1394 |
||
1395 |
Trace data format: |
|
1396 |
- 4 bytes containing the physical address of the page being moved to the oldest clean list. |
|
1397 |
||
1398 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1399 |
*/ |
|
1400 |
EPagingAgedClean, |
|
1401 |
||
1402 |
/** |
|
1403 |
A page has been moved to the oldest dirty list because it was the last old page and |
|
1404 |
it was dirty. |
|
1405 |
||
1406 |
This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE |
|
1407 |
macro defined. |
|
1408 |
||
1409 |
Trace data format: |
|
1410 |
- 4 bytes containing the physical address of the page being moved to the oldest dirty list. |
|
1411 |
||
1412 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1413 |
*/ |
|
1414 |
EPagingAgedDirty, |
|
1415 |
||
1416 |
/** |
|
1417 |
A page has been allocated to hold the MMU page tables required to map demand paged memory. |
|
1418 |
||
1419 |
Trace data format: |
|
1420 |
- 4 bytes containing the physical address of the page allocated. |
|
1421 |
||
1422 |
The context id (NThread*) in this trace is that of the thread caused this paging event. |
|
1423 |
||
1424 |
This trace is only emitted on the flexible memory model. |
|
1425 |
*/ |
|
1426 |
EPagingPageTableAlloc, |
|
1427 |
}; |
|
1428 |
||
1429 |
/** |
|
1430 |
Enumeration of sub-category values for trace category EResourceManager. |
|
1431 |
@see EResourceManager |
|
1432 |
@prototype 9.5 |
|
1433 |
*/ |
|
1434 |
enum TResourceManager |
|
1435 |
{ |
|
1436 |
/** |
|
1437 |
Trace output for resource registration. |
|
1438 |
||
1439 |
Trace data format: |
|
1440 |
- 4 bytes containing the Resource Id. |
|
1441 |
- 4 bytes containing the Resource address. |
|
1442 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1443 |
- 4 bytes containing the Resource Minimum Level |
|
1444 |
- 4 bytes containing the Resource Maximum Level |
|
1445 |
- 4 bytes containing the Resource Default Level |
|
1446 |
*/ |
|
1447 |
ERegisterResource = 0, |
|
1448 |
||
1449 |
/** |
|
1450 |
Trace output for client registration |
|
1451 |
||
1452 |
Trace data format: |
|
1453 |
- 4 bytes containing clientId |
|
1454 |
- 4 bytes containing client address |
|
1455 |
- N bytes containing client name, where 0 < N < 32 |
|
1456 |
*/ |
|
1457 |
ERegisterClient, |
|
1458 |
||
1459 |
/** |
|
1460 |
Trace output for client deregistration |
|
1461 |
||
1462 |
Trace data format: |
|
1463 |
- 4 bytes containing clientId |
|
1464 |
- 4 bytes containing client address |
|
1465 |
- N bytes containing client name, where 0 < N < 32 |
|
1466 |
*/ |
|
1467 |
EDeRegisterClient, |
|
1468 |
||
1469 |
/** |
|
1470 |
Trace output for resource state change start operation |
|
1471 |
||
1472 |
Trace data format: |
|
1473 |
- 4 bytes containing clientId |
|
1474 |
- 4 bytes containing the Resource Id. |
|
1475 |
- N bytes containing client name, where 0 < N < 32 |
|
1476 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1477 |
- 4 bytes containing the Resource state |
|
1478 |
*/ |
|
1479 |
ESetResourceStateStart, |
|
1480 |
||
1481 |
/** |
|
1482 |
Trace output for resource state change end operation |
|
1483 |
||
1484 |
Trace data format: |
|
1485 |
- 4 bytes containing clientId |
|
1486 |
- 4 bytes containing the Resource Id. |
|
1487 |
- N bytes containing client name, where 0 < N < 32 |
|
1488 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1489 |
- 4 bytes containing return value. |
|
1490 |
- 4 bytes containing the Resource state. |
|
1491 |
*/ |
|
1492 |
ESetResourceStateEnd, |
|
1493 |
||
1494 |
/** |
|
1495 |
Trace output for registration for post notification |
|
1496 |
||
1497 |
Trace data format: |
|
1498 |
- 4 bytes containing clientId |
|
1499 |
- 4 bytes containing the Resource Id. |
|
1500 |
- 4 bytest containing the callback address |
|
1501 |
- 4 bytes containing return value. |
|
1502 |
*/ |
|
1503 |
EPostNotificationRegister, |
|
1504 |
||
1505 |
/** |
|
1506 |
Trace output for deregistration for post notification |
|
1507 |
||
1508 |
Trace data format: |
|
1509 |
- 4 bytes containing clientId |
|
1510 |
- 4 bytes containing the Resource Id. |
|
1511 |
- 4 bytes containing the callback address |
|
1512 |
- 4 bytes containing the return value. |
|
1513 |
*/ |
|
1514 |
EPostNotificationDeRegister, |
|
1515 |
||
1516 |
/** |
|
1517 |
Trace output for post notification sent. |
|
1518 |
||
1519 |
Trace data format: |
|
1520 |
- 4 bytes containing clientId |
|
1521 |
- 4 bytes containing the Resource Id. |
|
1522 |
*/ |
|
1523 |
EPostNotificationSent, |
|
1524 |
||
1525 |
/** |
|
1526 |
Trace output for Callback complete |
|
1527 |
||
1528 |
Trace data format: |
|
1529 |
- 4 bytes containing clientId |
|
1530 |
- 4 bytes containing the Resource Id. |
|
1531 |
*/ |
|
1532 |
ECallbackComplete, |
|
1533 |
||
1534 |
/** |
|
1535 |
Trace output for resource manager memory usage |
|
1536 |
||
1537 |
Trace data format: |
|
1538 |
- 4 bytes containing memory allocated in bytes. |
|
1539 |
*/ |
|
1540 |
EMemoryUsage, |
|
1541 |
||
1542 |
/** |
|
1543 |
Trace output for get resource state start operation |
|
1544 |
||
1545 |
Trace data format: |
|
1546 |
- 4 bytes containing clientId |
|
1547 |
- 4 bytes containing the Resource Id. |
|
1548 |
- N bytes containing client name, where 0 < N < 32 |
|
1549 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1550 |
*/ |
|
1551 |
EGetResourceStateStart, |
|
1552 |
||
1553 |
/** |
|
1554 |
Trace output for get resource state end operation |
|
1555 |
||
1556 |
Trace data format: |
|
1557 |
- 4 bytes containing clientId |
|
1558 |
- 4 bytes containing the Resource Id. |
|
1559 |
- N bytes containing client name, where 0 < N < 32 |
|
1560 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1561 |
- 4 bytes containing the Resource state |
|
1562 |
- 4 bytes containing return value. |
|
1563 |
*/ |
|
1564 |
EGetResourceStateEnd, |
|
1565 |
||
1566 |
/** |
|
1567 |
Trace output for cancellation of long latency operation |
|
1568 |
||
1569 |
Trace data format: |
|
1570 |
- 4 bytes containing clientId |
|
1571 |
- 4 bytes containing the Resource Id. |
|
1572 |
- N bytes containing client name, where 0 < N < 32 |
|
1573 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1574 |
- 4 bytes containing return value |
|
1575 |
*/ |
|
1576 |
ECancelLongLatencyOperation, |
|
1577 |
||
1578 |
/** |
|
1579 |
Trace output for booting of resource manager |
|
1580 |
||
1581 |
Trace data format: |
|
1582 |
- 4 bytes containing entry point |
|
1583 |
*/ |
|
1584 |
EBooting, |
|
1585 |
||
1586 |
/** |
|
1587 |
Trace output for PSL resource state change operation |
|
1588 |
||
1589 |
Trace data format: |
|
1590 |
- 4 bytes containing clientId |
|
1591 |
- 4 bytes containing the Resource Id. |
|
1592 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1593 |
- 4 bytes containing the Resource current state |
|
1594 |
- 4 bytes containing the resource requested state |
|
1595 |
*/ |
|
1596 |
EPslChangeResourceStateStart, |
|
1597 |
||
1598 |
/** |
|
1599 |
Trace output for PSL resource state change operation |
|
1600 |
||
1601 |
Trace data format: |
|
1602 |
- 4 bytes containing clientId |
|
1603 |
- 4 bytes containing the Resource Id. |
|
1604 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1605 |
- 4 bytes containing the Resource current state |
|
1606 |
- 4 bytes containing the resource requested state |
|
1607 |
- 4 bytes containing return value |
|
1608 |
*/ |
|
1609 |
EPslChangeResourceStateEnd, |
|
1610 |
||
1611 |
/** |
|
1612 |
Trace output for get resource state start operation in PSL |
|
1613 |
||
1614 |
Trace data format: |
|
1615 |
- 4 bytes containing clientId |
|
1616 |
- 4 bytes containing the Resource Id. |
|
1617 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1618 |
*/ |
|
1619 |
EPslGetResourceStateStart, |
|
1620 |
||
1621 |
/** |
|
1622 |
Trace output for get resource state end operation in PSL |
|
1623 |
||
1624 |
Trace data format: |
|
1625 |
- 4 bytes containing clientId |
|
1626 |
- 4 bytes containing the Resource Id. |
|
1627 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1628 |
- 4 bytes containing the Resource state |
|
1629 |
- 4 bytes containing return value. |
|
1630 |
*/ |
|
1631 |
EPslGetResourceStateEnd, |
|
1632 |
||
1633 |
/** |
|
1634 |
Trace output for resource creation |
|
1635 |
||
1636 |
Trace data format: |
|
1637 |
- 4 bytes containing minimum value of resource |
|
1638 |
- 4 bytes containing maximum value of resource |
|
1639 |
- 4 bytes containing the default value of resource |
|
1640 |
- 4 bytes containing the properties of the resource |
|
1641 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1642 |
*/ |
|
1643 |
EPslResourceCreate, |
|
1644 |
||
1645 |
/** |
|
1646 |
Trace output for static resource with dependency registration |
|
1647 |
||
1648 |
Trace data format: |
|
1649 |
- 4 bytes containing the Resource Id |
|
1650 |
- 4 bytes containing the Resource address |
|
1651 |
- N bytes containing the Resource name, where 0 < N < 32 |
|
1652 |
- 4 bytes containing the minimum value of resource |
|
1653 |
- 4 bytes containing the maximum value of resource |
|
1654 |
- 4 bytes containing the default value of resource |
|
1655 |
*/ |
|
1656 |
ERegisterStaticResourceWithDependency, |
|
1657 |
||
1658 |
/** |
|
1659 |
Trace output for dynamic resource registration |
|
1660 |
||
1661 |
Trace data format: |
|
1662 |
- 4 bytes containing clientId |
|
1663 |
- 4 bytes containing the Resource Id |
|
1664 |
- N bytes containing the client name, where 0 < N < 32 |
|
1665 |
- N bytes containing the resource name, where 0 < N < 32 |
|
1666 |
- 4 bytes containing the resouce address |
|
1667 |
*/ |
|
1668 |
ERegisterDynamicResource, |
|
1669 |
||
1670 |
/** |
|
1671 |
Trace output for dynamic resource deregistration |
|
1672 |
||
1673 |
Trace data format: |
|
1674 |
- 4 bytes containing clientId |
|
1675 |
- 4 bytes containing the Resource Id |
|
1676 |
- N bytes containing the client name, where 0 < N < 32 |
|
1677 |
- N bytes containing the resource name, where 0 < N < 32 |
|
1678 |
- 4 bytes containing the resource address |
|
1679 |
- 4 bytes containing the resource level. |
|
1680 |
*/ |
|
1681 |
EDeRegisterDynamicResource, |
|
1682 |
||
1683 |
/** |
|
1684 |
Trace output for resource dependency registration |
|
1685 |
||
1686 |
Trace data format: |
|
1687 |
- 4 bytes containing clientId |
|
1688 |
- 4 bytes containing the Resource Id of first dependent resource |
|
1689 |
- N bytes containing the client name, where 0 < N < 32 |
|
1690 |
- N bytes containing the resource name of first dependent resource, where 0 < N < 32 |
|
1691 |
- 4 bytes containing the Resource Id of second dependent resource |
|
1692 |
- N bytes containing the resource name of second dependent resource, where 0 < N < 32 |
|
1693 |
- 4 bytes containing the address of first dependent resource |
|
1694 |
- 4 bytes containing the address of second dependent resource |
|
1695 |
*/ |
|
1696 |
ERegisterResourceDependency, |
|
1697 |
||
1698 |
/** |
|
1699 |
Trace output for resource dependency deregistration |
|
1700 |
||
1701 |
Trace data format: |
|
1702 |
- 4 bytes containing clientId |
|
1703 |
- 4 bytes containing the Resource Id of first dependent resource |
|
1704 |
- N bytes containing the client name, where 0 < N < 32 |
|
1705 |
- N bytes containing the resource name of first dependent resource, where 0 < N < 32 |
|
1706 |
- 4 bytes containing the resource id of second dependent resource |
|
1707 |
- N bytes containing the resource name of second dependent resource, where 0 < N < 32 |
|
1708 |
- 4 bytes containing the address of first dependent resource |
|
1709 |
- 4 bytes containing the address of second dependent resource |
|
1710 |
*/ |
|
1711 |
EDeRegisterResourceDependency |
|
1712 |
}; |
|
1713 |
/** |
|
1714 |
Enumeration of sub-category values for trace category EResourceManagerUs. |
|
1715 |
@see EResourceManagerUs |
|
1716 |
@prototype 9.5 |
|
1717 |
*/ |
|
1718 |
enum TResourceManagerUs |
|
1719 |
{ |
|
1720 |
/** |
|
1721 |
Trace output for the start of opening a channel to the Resource Controller. |
|
1722 |
||
1723 |
Trace data format: |
|
1724 |
- 4 bytes unused (displays 0) |
|
1725 |
- 4 bytes containing the client thread identifier. |
|
1726 |
- N bytes containing the client name, where 0 < N < 32 |
|
1727 |
*/ |
|
1728 |
EOpenChannelUsStart = 0, |
|
1729 |
/** |
|
1730 |
Trace output for the end of opening a channel to the Resource Controller. |
|
1731 |
||
1732 |
Trace data format: |
|
1733 |
- 4 bytes unused (displays 0) |
|
1734 |
- 4 bytes containing the client identifier provided by the Resource Controller |
|
1735 |
- N bytes containing the client name, where 0 < N < 32 |
|
1736 |
*/ |
|
1737 |
EOpenChannelUsEnd, |
|
1738 |
/** |
|
1739 |
Trace output for the start of registering a client with the Resource Controller. |
|
1740 |
||
1741 |
Trace data format: |
|
1742 |
- 4 bytes the number of concurrent change resource state operations to be supported |
|
1743 |
- 4 bytes the number of concurrent notification requests to be supported |
|
1744 |
- N bytes containing the client name, where 0 < N < 32 |
|
1745 |
- 4 bytes the number of concurrent get resource state operations to be supported |
|
1746 |
*/ |
|
1747 |
ERegisterClientUsStart, |
|
1748 |
/** |
|
1749 |
Trace output for the end of registering a client with the Resource Controller. |
|
1750 |
||
1751 |
Trace data format: |
|
1752 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1753 |
- 4 bytes specifying the value returned from the call to Resource Controller's AllocReserve method |
|
1754 |
*/ |
|
1755 |
ERegisterClientUsEnd, |
|
1756 |
/** |
|
1757 |
Trace output for the start of de-registering a client with the Resource Controller. |
|
1758 |
||
1759 |
Trace data format: |
|
1760 |
- 4 bytes unused (displays 0) |
|
1761 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1762 |
- N bytes containing the client name, where 0 < N < 32 |
|
1763 |
*/ |
|
1764 |
EDeRegisterClientUsStart, |
|
1765 |
/** |
|
1766 |
Trace output for the end of registering a client with the Resource Controller. |
|
1767 |
||
1768 |
Trace data format: |
|
1769 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1770 |
*/ |
|
1771 |
EDeRegisterClientUsEnd, |
|
1772 |
/** |
|
1773 |
Trace output for the start of a GetResourceState request to the Resource Controller. |
|
1774 |
||
1775 |
Trace data format: |
|
1776 |
- 4 bytes specifying the resource ID |
|
1777 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1778 |
- N bytes containing the client name, where 0 < N < 32 |
|
1779 |
*/ |
|
1780 |
EGetResourceStateUsStart, |
|
1781 |
/** |
|
1782 |
Trace output for the end of a GetResourceState request to the Resource Controller. |
|
1783 |
||
1784 |
Trace data format: |
|
1785 |
- 4 bytes specifying the resource ID |
|
1786 |
- 4 bytes specifying the resource level |
|
1787 |
- 4 bytes containing the client identifier |
|
1788 |
- 4 bytes specifying the success code returned by the Resource Controller. |
|
1789 |
*/ |
|
1790 |
EGetResourceStateUsEnd, |
|
1791 |
/** |
|
1792 |
Trace output for the start of a ChangeResourceState request to the Resource Controller. |
|
1793 |
||
1794 |
Trace data format: |
|
1795 |
- 4 bytes specifying the resource ID |
|
1796 |
- 4 bytes specifying the required state |
|
1797 |
- N bytes containing the client name, where 0 < N < 32 |
|
1798 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1799 |
*/ |
|
1800 |
ESetResourceStateUsStart, |
|
1801 |
/** |
|
1802 |
Trace output for the end of a ChangeResourceState request to the Resource Controller. |
|
1803 |
||
1804 |
Trace data format: |
|
1805 |
- 4 bytes specifying the resource ID |
|
1806 |
- 4 bytes specifying the requested state |
|
1807 |
- 4 bytes containing the client identifier |
|
1808 |
- 4 bytes specifying the success code returned by the Resource Controller. |
|
1809 |
*/ |
|
1810 |
ESetResourceStateUsEnd, |
|
1811 |
/** |
|
1812 |
Trace output for the start of a cancel GetResourceState request to the Resource Controller. |
|
1813 |
||
1814 |
Trace data format: |
|
1815 |
- 4 bytes specifying the resource ID |
|
1816 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1817 |
- N bytes containing the client name, where 0 < N < 32 |
|
1818 |
*/ |
|
1819 |
ECancelGetResourceStateUsStart, |
|
1820 |
/** |
|
1821 |
Trace output for the end of a cancel GetResourceState request to the Resource Controller. |
|
1822 |
||
1823 |
Trace data format: |
|
1824 |
- 4 bytes specifying the resource ID |
|
1825 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1826 |
- N bytes containing the client name, where 0 < N < 32 |
|
1827 |
*/ |
|
1828 |
ECancelGetResourceStateUsEnd, |
|
1829 |
/** |
|
1830 |
Trace output for the start of a cancel ChangeResourceState request to the Resource Controller. |
|
1831 |
||
1832 |
Trace data format: |
|
1833 |
- 4 bytes specifying the resource ID |
|
1834 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1835 |
- N bytes containing the client name, where 0 < N < 32 |
|
1836 |
*/ |
|
1837 |
ECancelSetResourceStateUsStart, |
|
1838 |
/** |
|
1839 |
Trace output for the end of a cancel ChangeResourceState request to the Resource Controller. |
|
1840 |
||
1841 |
Trace data format: |
|
1842 |
- 4 bytes specifying the resource ID |
|
1843 |
- 4 bytes containing the client identifier provided by the Resource Controller. |
|
1844 |
- N bytes containing the client name, where 0 < N < 32 |
|
1845 |
*/ |
|
1846 |
ECancelSetResourceStateUsEnd |
|
1847 |
}; |
|
1848 |
||
1849 |
/** |
|
1850 |
Enumeration of sub-category values for trace category EThreadPriority. |
|
1851 |
@see EThreadPriority |
|
1852 |
@internalTechnology |
|
1853 |
@prototype 9.3 |
|
1854 |
*/ |
|
1855 |
enum TThreadPriority |
|
1856 |
{ |
|
1857 |
/** |
|
1858 |
Trace output when a nanothread priority is changed. |
|
1859 |
||
1860 |
Trace data format: |
|
1861 |
- 4 bytes containing the context id (an NThread*) for the thread whose priority is changing. |
|
1862 |
- 4 bytes containing the new absolute priority. |
|
1863 |
*/ |
|
1864 |
ENThreadPriority=0, |
|
1865 |
||
1866 |
/** |
|
1867 |
Trace output when a DThread's default priority is set. |
|
1868 |
||
1869 |
Trace data format: |
|
1870 |
- 4 bytes containing the context id (an NThread*) for the thread whose priority is changing. |
|
1871 |
- 4 bytes containing the iThreadPriority member - a value from enum ::TThrdPriority. |
|
1872 |
- 4 bytes containing the new default absolute priority. |
|
1873 |
*/ |
|
1874 |
EDThreadPriority=1, |
|
1875 |
||
1876 |
/** |
|
1877 |
Trace output when a DProcess priority is changed. |
|
1878 |
||
1879 |
Trace data format: |
|
1880 |
- 4 bytes containing trace id (a DProcess*) for process. |
|
1881 |
- 4 bytes containing the new process priority, a value from enum ::TProcPriority |
|
1882 |
*/ |
|
1883 |
EProcessPriority=2 |
|
1884 |
}; |
|
1885 |
||
1886 |
/** |
|
1887 |
Enumeration of sub-category values for trace category EPagingMedia. |
|
1888 |
@see EPagingMedia |
|
1889 |
*/ |
|
1890 |
enum TPagingMedia |
|
1891 |
{ |
|
1892 |
/** |
|
1893 |
Event generated when a request to 'page in' data is received by the Local Media Subsystem. |
|
1894 |
||
1895 |
Trace data format: |
|
1896 |
- 4 bytes containing the linear address of the buffer to where the data is to be written. |
|
1897 |
- 4 bytes containing the offset from start of the partition to where the data to be paged in resides. |
|
1898 |
- 4 bytes containing the number of bytes to be read off the media. |
|
1899 |
- 4 bytes containing local drive number for the drive where the data to be paged in resides (-1 if ROM paging). |
|
1900 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1901 |
||
1902 |
The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. |
|
1903 |
*/ |
|
1904 |
EPagingMediaLocMedPageInBegin, |
|
1905 |
||
1906 |
/** |
|
1907 |
Event generated by the Local Media Subsystem when a request to page data in or out has completed. |
|
1908 |
||
1909 |
Trace data format: |
|
1910 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1911 |
- 4 bytes containing the completion code to be returned. |
|
1912 |
- 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out. |
|
1913 |
||
1914 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1915 |
*/ |
|
1916 |
EPagingMediaLocMedPageInPagedIn, |
|
1917 |
||
1918 |
/** |
|
1919 |
Event generated by the Local Media Subsystem when a request to 'page in' data is deferred. |
|
1920 |
||
1921 |
Trace data format: |
|
1922 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1923 |
- 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. |
|
1924 |
||
1925 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1926 |
*/ |
|
1927 |
EPagingMediaLocMedPageInDeferred, |
|
1928 |
||
1929 |
/** |
|
1930 |
Event generated by the Local Media Subsystem when a request to 'page in' data that has been deferred is re-posted. |
|
1931 |
||
1932 |
Trace data format: |
|
1933 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1934 |
- 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. |
|
1935 |
||
1936 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1937 |
*/ |
|
1938 |
EPagingMediaLocMedPageInDeferredReposted, |
|
1939 |
||
1940 |
/** |
|
1941 |
Event generated by the Local Media Subsystem when a request to 'page in' data is re-deferred. |
|
1942 |
||
1943 |
Trace data format: |
|
1944 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1945 |
- 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. |
|
1946 |
||
1947 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1948 |
*/ |
|
1949 |
EPagingMediaLocMedPageInReDeferred, |
|
1950 |
||
1951 |
/** |
|
1952 |
Event generated by the Local Media Subsystem when a request to 'page in' data is issued when the media is not yet open. |
|
1953 |
||
1954 |
Trace data format: |
|
1955 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1956 |
- 4 bytes containing the state of the media (one of TMediaState). |
|
1957 |
- 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. |
|
1958 |
||
1959 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1960 |
*/ |
|
1961 |
EPagingMediaLocMedPageInQuietlyDeferred, |
|
1962 |
||
1963 |
/** |
|
1964 |
Event generated by the Local Media Subsystem when a fragment of a Write request is created and is ready to be sent to the Media |
|
1965 |
Driver thread . |
|
1966 |
||
1967 |
Trace data format: |
|
1968 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1969 |
- 4 bytes containing the ID of this fragment (middle or last). |
|
1970 |
- 4 bytes containing the length of data in this request fragment. |
|
1971 |
- 4 bytes containing the offset within the original request to the start of data in this fragment. |
|
1972 |
- 4 bytes containing the offset from start of the partition to where the data in this fragment is to be written. |
|
1973 |
- 4 bytes containing the address of the DThread object representing the thread that issued the original Write request. |
|
1974 |
||
1975 |
The context id (NThread*) in this trace is that of the File Server drive thread that issued the original Write request. |
|
1976 |
*/ |
|
1977 |
EPagingMediaLocMedFragmentBegin, |
|
1978 |
||
1979 |
/** |
|
1980 |
Event generated by the Local Media Subsystem when a Write fragment is completed . |
|
1981 |
||
1982 |
Trace data format: |
|
1983 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1984 |
- 4 bytes containing the completion code to be returned. |
|
1985 |
||
1986 |
The context id (NThread*) in this trace is that of the File Server drive thread that issued the original Write request. |
|
1987 |
*/ |
|
1988 |
EPagingMediaLocMedFragmentEnd, |
|
1989 |
||
1990 |
/** |
|
1991 |
Event generated when the Media Driver starts processing a request to 'page in' data in its specific Request(..) function. |
|
1992 |
||
1993 |
Trace data format: |
|
1994 |
- 4 bytes containing a code describing the type of the media (one of TMediaDevice). |
|
1995 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
1996 |
||
1997 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
1998 |
*/ |
|
1999 |
EPagingMediaPagingMedDrvBegin, |
|
2000 |
||
2001 |
/** |
|
2002 |
Event generated by the Media Driver when the data read by a 'page in' request is written to the paging buffer. |
|
2003 |
||
2004 |
Trace data format: |
|
2005 |
- 4 bytes containing a code describing the type of the media (one of TMediaDevice). |
|
2006 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
2007 |
- 4 bytes containing the linear address of the buffer to where the data is to be written. |
|
2008 |
- 4 bytes containing the offset within the buffer to where the data will be written. |
|
2009 |
- 4 bytes containing the length of data to be written. |
|
2010 |
||
2011 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
2012 |
*/ |
|
2013 |
EPagingMediaMedDrvWriteBack, |
|
2014 |
||
2015 |
/** |
|
2016 |
Event generated when a request to 'page in' data is put on hold because the Media Driver is performing some background |
|
2017 |
operation (not another request) and cannot service the request. |
|
2018 |
||
2019 |
Trace data format: |
|
2020 |
- 4 bytes containing a code describing the type of the media (one of TMediaDevice). |
|
2021 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
2022 |
||
2023 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
2024 |
*/ |
|
2025 |
EPagingMediaMedDrvOnHold, |
|
2026 |
||
2027 |
/** |
|
2028 |
Event generated by the Media Driver when the data read by a 'page out' request is read from the paging buffer. |
|
2029 |
||
2030 |
Trace data format: |
|
2031 |
- 4 bytes containing a code describing the type of the media (one of TMediaDevice). |
|
2032 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
2033 |
- 4 bytes containing the linear address of the buffer to where the data is to be written. |
|
2034 |
- 4 bytes containing the offset within the buffer to where the data will be written. |
|
2035 |
- 4 bytes containing the length of data to be written. |
|
2036 |
||
2037 |
The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. |
|
2038 |
*/ |
|
2039 |
EPagingMediaMedDrvRead, |
|
2040 |
||
2041 |
/** |
|
2042 |
Event generated when a request to 'page out' data is received by the Local Media Subsystem. |
|
2043 |
||
2044 |
Trace data format: |
|
2045 |
- 4 bytes containing the linear address of the buffer from where the data is to be read. |
|
2046 |
- 4 bytes containing the offset from start of the partition to where the data to be paged out resides. |
|
2047 |
- 4 bytes containing the number of bytes to be written to the media. |
|
2048 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
2049 |
||
2050 |
The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. |
|
2051 |
*/ |
|
2052 |
EPagingMediaLocMedPageOutBegin, |
|
2053 |
||
2054 |
/** |
|
2055 |
Event generated when a request to mark an area of the swap file as deleted is received by the Local Media Subsystem. |
|
2056 |
||
2057 |
Trace data format: |
|
2058 |
- 4 bytes containing NULL |
|
2059 |
- 4 bytes containing the offset from start of the partition to where the data to be paged out resides. |
|
2060 |
- 4 bytes containing the number of bytes to be marked as deleted |
|
2061 |
- 4 bytes containing the linear address in memory where this request object resides. |
|
2062 |
||
2063 |
The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. |
|
2064 |
*/ |
|
2065 |
EPagingMediaLocMedDeleteNotifyBegin, |
|
2066 |
||
2067 |
}; |
|
2068 |
||
2069 |
/** |
|
2070 |
Enumeration of sub-category values for trace category EKernelMemory. |
|
2071 |
@see EKernelMemory |
|
2072 |
*/ |
|
2073 |
enum TKernelMemory |
|
2074 |
{ |
|
2075 |
/** |
|
2076 |
Event recorded during startup and prime which details the initial amount of free RAM. |
|
2077 |
||
2078 |
Trace data format: |
|
2079 |
- 4 bytes containing the number of bytes of RAM the system started with. |
|
2080 |
*/ |
|
2081 |
EKernelMemoryInitialFree, |
|
2082 |
||
2083 |
/** |
|
2084 |
Event recorded during prime which records the then-current amount of free RAM. |
|
2085 |
||
2086 |
Trace data format: |
|
2087 |
- 4 bytes containing the number of bytes of free RAM. |
|
2088 |
*/ |
|
2089 |
EKernelMemoryCurrentFree, |
|
2090 |
||
2091 |
/** |
|
2092 |
Event recorded when a miscellaneous kernel allocation is made. These include: |
|
2093 |
- Memory for MMU page table contents |
|
2094 |
- Memory for MMU SPageTableInfos |
|
2095 |
- Memory for shadow pages |
|
2096 |
||
2097 |
Trace data format: |
|
2098 |
- 4 bytes containing the size, in bytes, of the allocation. |
|
2099 |
*/ |
|
2100 |
EKernelMemoryMiscAlloc, |
|
2101 |
||
2102 |
/** |
|
2103 |
Event recorded when a miscellaneous kernel allocation (see EKernelMemoryMiscAlloc |
|
2104 |
above) is freed. |
|
2105 |
||
2106 |
Trace data format: |
|
2107 |
- 4 bytes containing the size, in bytes, of the freed allocation. |
|
2108 |
*/ |
|
2109 |
EKernelMemoryMiscFree, |
|
2110 |
||
2111 |
/** |
|
2112 |
The amount of memory reserved for the minimum demand paging cache. The *actual* DP cache |
|
2113 |
also uses free memory, only this minimum amount is permanently reserved for that purpose. |
|
2114 |
This event is recorded during prime and when the amount changes. |
|
2115 |
||
2116 |
Trace data format: |
|
2117 |
- 4 bytes containing the minimum size, in bytes, of the demand paging cache. |
|
2118 |
*/ |
|
2119 |
EKernelMemoryDemandPagingCache, |
|
2120 |
||
2121 |
/** |
|
2122 |
Physically contiguous memory allocated by device drivers via one of: |
|
2123 |
Epoc::AllocPhysicalRam() |
|
2124 |
Epoc::ZoneAllocPhysicalRam() |
|
2125 |
Epoc::ClaimPhysicalRam() |
|
2126 |
TRamDefragRequest::ClaimRamZone() |
|
2127 |
||
2128 |
Trace data format: |
|
2129 |
- 4 bytes containing the size of the allocated memory. |
|
2130 |
- 4 bytes containing the physical base address of allocated memory. |
|
2131 |
||
2132 |
NB: The prime function logs a EKernelMemoryDrvPhysAlloc record where the physical |
|
2133 |
address is -1 and should be ignored. |
|
2134 |
*/ |
|
2135 |
EKernelMemoryDrvPhysAlloc, |
|
2136 |
||
2137 |
/** |
|
2138 |
Memory freed by device drivers via calls to all versions of |
|
2139 |
Epoc::FreePhysicalRam(). |
|
2140 |
||
2141 |
Trace data format: |
|
2142 |
- 4 bytes containing the size of the freed memory. |
|
2143 |
- 4 bytes containing the physical base address of freed memory. |
|
2144 |
*/ |
|
2145 |
EKernelMemoryDrvPhysFree, |
|
2146 |
}; |
|
2147 |
||
2148 |
/** |
|
2149 |
Enumeration of sub-category values for trace category EHeap. |
|
2150 |
@see EHeap |
|
2151 |
*/ |
|
2152 |
enum THeap |
|
2153 |
{ |
|
2154 |
/** |
|
2155 |
Event recorded during process startup which logs the point of heap creation. |
|
2156 |
||
2157 |
Trace data format: |
|
2158 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2159 |
- 2 bytes containing the size of header overhead, per allocation (0xFFFF indicates a variable size) |
|
2160 |
- 2 bytes containing the size of footer overhead, per allocation (0xFFFF indicates a variable size) |
|
2161 |
*/ |
|
2162 |
EHeapCreate, |
|
2163 |
||
2164 |
/** |
|
2165 |
Event recorded during process startup which details the chunk being used as a heap. |
|
2166 |
||
2167 |
Trace data format: |
|
2168 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2169 |
- 4 bytes containing the chunk ID (The RHandleBase* of the chunk) |
|
2170 |
*/ |
|
2171 |
EHeapChunkCreate, |
|
2172 |
||
2173 |
/** |
|
2174 |
Event recorded when RHeap::Alloc() is called. |
|
2175 |
||
2176 |
Trace data format: |
|
2177 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2178 |
- 4 bytes containing the address of the allocation |
|
2179 |
- 4 bytes containing the size of the allocation |
|
2180 |
- 4 bytes containing the requested size of allocation |
|
2181 |
*/ |
|
2182 |
EHeapAlloc, |
|
2183 |
||
2184 |
/** |
|
2185 |
Event recorded when RHeap::ReAlloc() is called. |
|
2186 |
||
2187 |
Trace data format: |
|
2188 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2189 |
- 4 bytes containing the address of the new allocation |
|
2190 |
- 4 bytes containing the size of the allocation |
|
2191 |
- 4 bytes containing the requested size of allocation |
|
2192 |
- 4 bytes containing the address of the old allocation |
|
2193 |
*/ |
|
2194 |
EHeapReAlloc, |
|
2195 |
||
2196 |
/** |
|
2197 |
Event recorded when RHeap::Free() is called. |
|
2198 |
||
2199 |
Trace data format: |
|
2200 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2201 |
- 4 bytes containing the address of the free'd allocation |
|
2202 |
*/ |
|
2203 |
EHeapFree, |
|
2204 |
||
2205 |
/** |
|
2206 |
Event recorded when RHeap::Alloc() fails. |
|
2207 |
||
2208 |
Trace data format: |
|
2209 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2210 |
- 4 bytes containing the requested size of allocation |
|
2211 |
*/ |
|
2212 |
EHeapAllocFail, |
|
2213 |
||
2214 |
/** |
|
2215 |
Event recorded when RHeap::ReAlloc() fails. |
|
2216 |
||
2217 |
Trace data format: |
|
2218 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2219 |
- 4 bytes containing the address of the old allocation |
|
2220 |
- 4 bytes containing the requested size of allocation |
|
2221 |
*/ |
|
2222 |
EHeapReAllocFail, |
|
2223 |
||
2224 |
/** |
|
2225 |
Event recorded when heap memory corruption occurs. |
|
2226 |
||
2227 |
Trace data format: |
|
2228 |
- 4 bytes containing the heap ID (The RAllocator*) |
|
2229 |
- 4 bytes containing address of the corrupted memory block |
|
2230 |
- 4 bytes containing length of the corrupted memory block |
|
2231 |
*/ |
|
2232 |
EHeapCorruption, |
|
2233 |
||
2234 |
/** |
|
2235 |
Trace to provide additional heap debugging information. |
|
2236 |
||
2237 |
This trace (if present) is generated by Symbian OS memory debug tools, and |
|
2238 |
will follow one of the other THeap events (e.g. EHeapAlloc, EHeapFree, etc.). |
|
2239 |
It is intended to provide a stack trace for the preceding heap event, |
|
2240 |
to indicate how the previous heap event was generated. |
|
2241 |
||
2242 |
On many systems exact stack frames are not available, and the values |
|
2243 |
will be extracted from the stack using heuristics, so there may be some |
|
2244 |
spurious values and some missing values. |
|
2245 |
||
2246 |
Trace data format: |
|
2247 |
- 4 bytes containing the heap ID (the RAllocator*) |
|
2248 |
- sequence of 4-byte PC values representing the call stack, with the top-most |
|
2249 |
(most recent call) first. |
|
2250 |
*/ |
|
2251 |
EHeapCallStack, |
|
2252 |
}; |
|
2253 |
||
2254 |
/** |
|
2255 |
Enumeration of sub-category values for trace category EMetaTrace. |
|
2256 |
@see EMetaTrace |
|
2257 |
*/ |
|
2258 |
enum TMetaTrace |
|
2259 |
{ |
|
2260 |
/** |
|
2261 |
Information about timestamps used for tracing. |
|
2262 |
||
2263 |
Trace data format: |
|
2264 |
- 4 bytes containing the period of the Timestamp value. |
|
2265 |
- 4 bytes containing the period of the Timestamp2 value. |
|
2266 |
- 4 bytes containing a set of bit flags with the following meaning: |
|
2267 |
- Bit 0, if true, indicates that Timestamp and Timestamp2 are two halves |
|
2268 |
of a single 64bit timestamp value; Timestamp2 is the most significant part. |
|
2269 |
- All other bits are presently undefined. |
|
2270 |
||
2271 |
The format of the timestamp period data is a period in seconds given using an exponent and mantissa |
|
2272 |
format, where the most significant 8 bits are the signed power-of-two value for the exponent, and |
|
2273 |
the least significant 24 bits are the integer value of the mantissa. The binary point is to the right |
|
2274 |
of the least significant mantissa bit, and the mantissa may not be in normalised form. |
|
2275 |
||
2276 |
Example code for decoding the period: |
|
2277 |
@code |
|
2278 |
TInt32 period; // value from trace record |
|
2279 |
int exponent = (signed char)(period>>24); |
|
2280 |
int mantissa = period&0xffffff; |
|
2281 |
double periodInSeconds = (double)mantissa*pow(2,exponent); |
|
2282 |
@endcode |
|
2283 |
*/ |
|
2284 |
EMetaTraceTimestampsInfo, |
|
2285 |
||
2286 |
/** |
|
2287 |
Trace indicating the start of a test case being measured. |
|
2288 |
||
2289 |
Trace data format: |
|
2290 |
- 4 bytes containing measurement specific value. |
|
2291 |
- 4 bytes containing a further measurement specific value. |
|
2292 |
- Remaining data is ASCII text providing human readable information. |
|
2293 |
*/ |
|
2294 |
EMetaTraceMeasurementStart, |
|
2295 |
||
2296 |
/** |
|
2297 |
Trace indicating the end of a test case being measured. |
|
2298 |
||
2299 |
Trace data format: |
|
2300 |
- 4 bytes containing measurement specific identifying value. |
|
2301 |
- 4 bytes containing a further measurement specific identifying value. |
|
2302 |
||
2303 |
The values contained in this trace must be identical to those in the corresponding |
|
2304 |
ETraceInfoMeasurementStart trace. |
|
2305 |
*/ |
|
2306 |
EMetaTraceMeasurementEnd, |
|
2307 |
||
2308 |
/** |
|
2309 |
Trace indicating a change in state of the primary filter. |
|
2310 |
||
2311 |
Trace data format: |
|
2312 |
- 1 byte containing a trace category number. |
|
2313 |
- 1 byte containing the new filter state for the category. (0=off, 1=on). |
|
2314 |
- 2 byte padding. (Should be output as zeros.) |
|
2315 |
*/ |
|
2316 |
EMetaTraceFilterChange, |
|
2317 |
}; |
|
2318 |
||
2319 |
/** |
|
2320 |
Enumeration of sub-category values for trace category ERamAllocator. |
|
2321 |
@see BTrace::ERamAllocator |
|
2322 |
*/ |
|
2323 |
enum TRamAllocator |
|
2324 |
{ |
|
2325 |
/** |
|
2326 |
The number of RAM zones. |
|
2327 |
||
2328 |
Trace data format: |
|
2329 |
- 4 bytes containing the number of RAM zones. |
|
2330 |
*/ |
|
2331 |
ERamAllocZoneCount, |
|
2332 |
||
2333 |
/** |
|
2334 |
Information on the layout of a RAM zone. |
|
2335 |
||
2336 |
Trace data format: |
|
2337 |
- 4 bytes containing the number of pages in the zone |
|
2338 |
- 4 bytes containing the physical base address of the zone |
|
2339 |
- 4 bytes containing the ID of the zone |
|
2340 |
- 1 bytes containing the preference of the zone |
|
2341 |
- 1 bytes containing the flags of the zone |
|
2342 |
- 2 bytes reserved for future use |
|
2343 |
*/ |
|
2344 |
ERamAllocZoneConfig, |
|
2345 |
||
2346 |
/** |
|
2347 |
This trace is sent for every contiguous block of RAM that was allocated |
|
2348 |
during the kernel boot process. |
|
2349 |
||
2350 |
Trace data format: |
|
2351 |
- 4 bytes containing the number of contiguous pages allocated for the block |
|
2352 |
- 4 bytes containing the physical base address of the block |
|
2353 |
*/ |
|
2354 |
ERamAllocBootAllocation, |
|
2355 |
||
2356 |
||
2357 |
/** |
|
2358 |
This trace marks the end of the boot allocations |
|
2359 |
||
2360 |
Trace data format: |
|
2361 |
- no extra bytes are sent |
|
2362 |
*/ |
|
2363 |
ERamAllocBootAllocationEnd, |
|
2364 |
||
2365 |
/** |
|
2366 |
Event generated when a RAM zone's flags have been modified |
|
2367 |
This could occur when a RAM zone is blocked/unblocked from further |
|
2368 |
allocations from all/certain page types. |
|
2369 |
||
2370 |
Trace data format: |
|
2371 |
- 4 bytes containing the ID of the zone |
|
2372 |
- 4 bytes containing the flags of the zone |
|
2373 |
*/ |
|
2374 |
ERamAllocZoneFlagsModified, |
|
2375 |
||
2376 |
/** |
|
2377 |
Event generated when DRamAllocator::ClaimPhysicalRam has successfully |
|
2378 |
claimed the specified RAM pages. |
|
2379 |
||
2380 |
Trace data format: |
|
2381 |
- 4 bytes containing the number of contiguous pages |
|
2382 |
- 4 bytes containing the base address of the pages |
|
2383 |
*/ |
|
2384 |
ERamAllocClaimRam, |
|
2385 |
||
2386 |
/** |
|
2387 |
Event generated when DRamAllocator::MarkPageAllocated has successfully |
|
2388 |
marked the specified page as allocated. |
|
2389 |
||
2390 |
Trace data format: |
|
2391 |
- 4 bytes containing the TZonePageType type of the page |
|
2392 |
- 4 bytes containing the address of the page |
|
2393 |
*/ |
|
2394 |
ERamAllocMarkAllocated, |
|
2395 |
||
2396 |
/** |
|
2397 |
Event generated when DRamAllocator::AllocContiguousRam successfully |
|
2398 |
allocates the requested number of pages. |
|
2399 |
||
2400 |
Trace data format: |
|
2401 |
- 4 bytes containing the TZonePageType type of the pages |
|
2402 |
- 4 bytes containing the number of contiguous pages |
|
2403 |
- 4 bytes containing the base address of the pages |
|
2404 |
*/ |
|
2405 |
ERamAllocContiguousRam, |
|
2406 |
||
2407 |
/** |
|
2408 |
Event generated when DRamAllocator::FreePage has successfully freed |
|
2409 |
the specified RAM page. |
|
2410 |
||
2411 |
Trace data format: |
|
2412 |
- 4 bytes containing the TZonePageType type of the page |
|
2413 |
- 4 bytes containing the address of the page |
|
2414 |
*/ |
|
2415 |
ERamAllocFreePage, |
|
2416 |
||
2417 |
/** |
|
2418 |
Event generated when DRamAllocator::FreePhysical successfully freed |
|
2419 |
the specified RAM page(s). |
|
2420 |
||
2421 |
Trace data format: |
|
2422 |
- 4 bytes containing the number of contiguous pages |
|
2423 |
- 4 bytes containing the base address of the pages |
|
2424 |
*/ |
|
2425 |
ERamAllocFreePhysical, |
|
2426 |
||
2427 |
/** |
|
2428 |
Event generated for each contiguous block of pages when |
|
2429 |
DRamAllocator::AllocRamPages or DRamAllocator::ZoneAllocRamPages |
|
2430 |
are attempting to fulfil a request. |
|
2431 |
||
2432 |
Trace data format: |
|
2433 |
- 4 bytes containing the TZonePageType type of the pages |
|
2434 |
- 4 bytes containing the number of contiguous pages |
|
2435 |
- 4 bytes containing the base address of the pages |
|
2436 |
*/ |
|
2437 |
ERamAllocRamPages, |
|
2438 |
||
2439 |
/** |
|
2440 |
Event generated for contiguous block of pages when |
|
2441 |
DRamAllocator::FreeRamPages is invoked. |
|
2442 |
||
2443 |
Trace data format: |
|
2444 |
- 4 bytes containing the TZonePageType type of the pages |
|
2445 |
- 4 bytes containing the number of contiguous pages |
|
2446 |
- 4 bytes containing the base address of the pages |
|
2447 |
*/ |
|
2448 |
ERamAllocFreePages, |
|
2449 |
||
2450 |
/** |
|
2451 |
Event generated when DRamAllocator::AllocRamPages has successfully |
|
2452 |
allocated all the requested number of RAM pages. If DRamAllocator::AllocRamPages |
|
2453 |
couldn't allocate all the requested pages then this event is not generated. |
|
2454 |
||
2455 |
Trace data format: |
|
2456 |
- no extra bytes sent |
|
2457 |
*/ |
|
2458 |
ERamAllocRamPagesEnd, |
|
2459 |
||
2460 |
/** |
|
2461 |
Event generated when all ERamAllocFreePages events for a particular |
|
2462 |
call of DRamAllocator::FreeRamPages have been generated. |
|
2463 |
||
2464 |
Trace data format: |
|
2465 |
- no extra bytes sent |
|
2466 |
*/ |
|
2467 |
ERamAllocFreePagesEnd, |
|
2468 |
||
2469 |
/** |
|
2470 |
Event generated when DRamAllocator::ChangePageType is has successfully |
|
2471 |
updated the type of the specified page. |
|
2472 |
||
2473 |
Trace data format: |
|
2474 |
- 4 bytes containing the new TZonePageType type of the page |
|
2475 |
- 4 bytes containing the physical address of the page |
|
2476 |
*/ |
|
2477 |
ERamAllocChangePageType, |
|
2478 |
||
2479 |
/** |
|
2480 |
Event generated when DRamAllocator::ZoneAllocContiguousRam has |
|
2481 |
successfully allocated the required number of pages. |
|
2482 |
||
2483 |
Trace data format: |
|
2484 |
- 4 bytes containing the TZonePageType type of the pages |
|
2485 |
- 4 bytes containing the number of contiguous pages |
|
2486 |
- 4 bytes containing the base address of the pages |
|
2487 |
*/ |
|
2488 |
ERamAllocZoneContiguousRam, |
|
2489 |
||
2490 |
/** |
|
2491 |
Event generated when DRamAllocator::ZoneAllocRamPages has successfully |
|
2492 |
allocated all the requested RAM pages. If DRamAllocator::ZoneAllocRamPages |
|
2493 |
couldn't allocate all the requested pages then this event is not generated. |
|
2494 |
||
2495 |
Trace data format: |
|
2496 |
- no extra bytes sent |
|
2497 |
*/ |
|
2498 |
ERamAllocZoneRamPagesEnd, |
|
2499 |
||
2500 |
/** |
|
2501 |
Event generated when Epoc::ClaimRamZone has successfully claimed |
|
2502 |
the requested zone. |
|
2503 |
||
2504 |
Trace data format: |
|
2505 |
- 4 bytes containing the ID of the zone that has been claimed. |
|
2506 |
*/ |
|
2507 |
ERamAllocClaimZone, |
|
2508 |
}; |
|
2509 |
||
2510 |
enum TFastMutex |
|
2511 |
{ |
|
2512 |
/** |
|
2513 |
Event generated when a thread acquires a fast mutex, (waits on it). |
|
2514 |
||
2515 |
Trace data format: |
|
2516 |
- 4 bytes containing the fast mutex id, (an NFastMutex*). |
|
2517 |
*/ |
|
2518 |
EFastMutexWait, |
|
2519 |
||
2520 |
/** |
|
2521 |
Event generated when a thread releases a fast mutex, (signals it). |
|
2522 |
||
2523 |
Trace data format: |
|
2524 |
- 4 bytes containing the fast mutex id, (an NFastMutex*). |
|
2525 |
*/ |
|
2526 |
EFastMutexSignal, |
|
2527 |
||
2528 |
/** |
|
2529 |
Event generated when a fast mutex is 'flashed' (signalled then immediately |
|
2530 |
waited on again). E.g the operation performed by NKern::FlashSystem. |
|
2531 |
||
2532 |
Trace data format: |
|
2533 |
- 4 bytes containing the fast mutex id, (an NFastMutex*). |
|
2534 |
*/ |
|
2535 |
EFastMutexFlash, |
|
2536 |
||
2537 |
/** |
|
2538 |
Trace to associate a fast mutex with a textual name. |
|
2539 |
||
2540 |
Trace data format: |
|
2541 |
- 4 bytes containing the fast mutex id, (an NFastMutex*). |
|
2542 |
- 4 bytes containing unspecified data (should be output as zero). |
|
2543 |
- Remaining data is the ASCII name for the fast mutex. |
|
2544 |
*/ |
|
2545 |
EFastMutexName, |
|
2546 |
||
2547 |
/** |
|
2548 |
Event generated when a thread blocks on a fast mutex. |
|
2549 |
||
2550 |
Trace data format: |
|
2551 |
- 4 bytes containing the fast mutex id, (an NFastMutex*). |
|
2552 |
*/ |
|
2553 |
EFastMutexBlock, |
|
2554 |
}; |
|
2555 |
||
2556 |
/** |
|
2557 |
Enumeration of sub-category values for trace category EProfiling. |
|
2558 |
@see BTrace::EProfiling |
|
2559 |
*/ |
|
2560 |
enum TProfiling |
|
2561 |
{ |
|
2562 |
/** |
|
2563 |
CPU sample including program counter and thread context. |
|
2564 |
||
2565 |
Trace data format: |
|
2566 |
- 4 bytes containing the program counter. |
|
2567 |
- 4 bytes containing thread context (an NThread*). |
|
2568 |
*/ |
|
2569 |
ECpuFullSample = 0, |
|
2570 |
||
2571 |
/** |
|
2572 |
Optimised CPU sample including program counter. |
|
2573 |
Doesn't include a thread context id as it hasn't changed since |
|
2574 |
the last sample. |
|
2575 |
||
2576 |
Trace data format: |
|
2577 |
- 4 bytes containing the program counter. |
|
2578 |
*/ |
|
2579 |
ECpuOptimisedSample, |
|
2580 |
||
2581 |
/** |
|
2582 |
CPU sample from iDFC including program counter. |
|
2583 |
||
2584 |
Trace data format: |
|
2585 |
- 4 bytes containing the program counter. |
|
2586 |
*/ |
|
2587 |
ECpuIdfcSample, |
|
2588 |
||
2589 |
/** |
|
2590 |
CPU sample from non-Symbian thread. |
|
2591 |
||
2592 |
Trace data format: |
|
2593 |
- no extra bytes are sent |
|
2594 |
*/ |
|
2595 |
ECpuNonSymbianThreadSample |
|
2596 |
||
2597 |
}; |
|
2598 |
||
2599 |
/** |
|
2600 |
Enumeration of sub-category values for trace category ERawEvent. |
|
2601 |
@see BTrace::ERawEvent |
|
2602 |
*/ |
|
2603 |
enum TRawEventTrace |
|
2604 |
{ |
|
2605 |
||
2606 |
/** |
|
2607 |
For all the set Functions in the TRawEvent class. |
|
2608 |
Trace Data Format Varies depends which of the Overloaded Set Method from where its set . |
|
2609 |
Trace data format: |
|
2610 |
if there are only one 4 byte data |
|
2611 |
||
2612 |
--The Following oder is folloed for data. |
|
2613 |
- 4 bytes containing the event type |
|
2614 |
||
2615 |
if there are 2*4 byte data |
|
2616 |
- 4 bytes containing the event type |
|
2617 |
- 4 bytes containing the scan code |
|
2618 |
||
2619 |
if there are 3*4 byte data |
|
2620 |
- 4 bytes containing the event type |
|
2621 |
--4 bytes containining the X co-ordinate |
|
2622 |
--4 bytes containining the Y co-ordinate |
|
2623 |
||
2624 |
if there are 4*4 byte data |
|
2625 |
- 4 bytes containing the event type |
|
2626 |
--4 bytes containining the X co-ordinate |
|
2627 |
--4 bytes containining the Y co-ordinate |
|
2628 |
--4 bytes containining the Z co-ordinate |
|
2629 |
||
2630 |
if there are 5*4 byte data |
|
2631 |
- 4 bytes containing the event type |
|
2632 |
--4 bytes containining the X co-ordinate |
|
2633 |
--4 bytes containining the Y co-ordinate |
|
2634 |
--4 bytes containining the Z co-ordinate |
|
2635 |
--4 bytes containining the PointerNumber |
|
2636 |
||
2637 |
if there are 7*4 byte data |
|
2638 |
- 4 bytes containing the event type |
|
2639 |
--4 bytes containining the X co-ordinate |
|
2640 |
--4 bytes containining the Y co-ordinate |
|
2641 |
--4 bytes containining the Z co-ordinate |
|
2642 |
--4 bytes containining the Phi polar coordinate. |
|
2643 |
--4 bytes containining the Theta polar coordinate. |
|
2644 |
--4 bytes containining the rotation angle(alpha) |
|
2645 |
*/ |
|
2646 |
||
2647 |
ESetEvent = 1, |
|
2648 |
||
2649 |
/** |
|
2650 |
For user side SetTip Events |
|
2651 |
Trace data format: |
|
2652 |
- 4 bytes to state containing Tip Info. |
|
2653 |
*/ |
|
2654 |
ESetTipEvent, |
|
2655 |
||
2656 |
/** |
|
2657 |
For SetTilt Events |
|
2658 |
Trace data format: |
|
2659 |
- 4 bytes containing the event type |
|
2660 |
--4 bytes containining the Phi polar coordinate. |
|
2661 |
--4 bytes containining the Theta polar coordinate. |
|
2662 |
*/ |
|
2663 |
ESetTiltEvent, |
|
2664 |
||
2665 |
/** |
|
2666 |
For SetRotation Events |
|
2667 |
Trace data format: |
|
2668 |
- 4 bytes containing the event type |
|
2669 |
--4 bytes containining the rotation angle (alpha) |
|
2670 |
*/ |
|
2671 |
ESetRotationtEvent, |
|
2672 |
||
2673 |
/** |
|
2674 |
For SetPointerNumber Events |
|
2675 |
Trace data format: |
|
2676 |
- 4 bytes containing the Pointer Number |
|
2677 |
*/ |
|
2678 |
ESetPointerNumberEvent, |
|
2679 |
||
2680 |
/** |
|
2681 |
For user side addevents (User::AddEvent) |
|
2682 |
Trace data format: |
|
2683 |
- 4 bytes containing the event type |
|
2684 |
*/ |
|
2685 |
EUserAddEvent, |
|
2686 |
||
2687 |
/** |
|
2688 |
For kernal side addevents (Kern::AddEvent) |
|
2689 |
Trace data format: |
|
2690 |
- 4 bytes containing the event type |
|
2691 |
*/ |
|
2692 |
EKernelAddEvent |
|
2693 |
}; |
|
2694 |
||
2695 |
enum TSymbianKernelSync |
|
2696 |
{ |
|
2697 |
/** |
|
2698 |
A semaphore (DSemaphore) has been created. |
|
2699 |
||
2700 |
Trace data format: |
|
2701 |
- 4 bytes containing trace id (a DSemaphore*) for this semaphore. |
|
2702 |
- 4 bytes containing the owning DThread* or DProcess* |
|
2703 |
- Remaining data is the ASCII name of the semaphore. |
|
2704 |
*/ |
|
2705 |
ESemaphoreCreate=0x00, |
|
2706 |
||
2707 |
/** |
|
2708 |
A semaphore (DSemaphore) has been destroyed. |
|
2709 |
||
2710 |
Trace data format: |
|
2711 |
- 4 bytes containing trace id (a DSemaphore*) for this semaphore. |
|
2712 |
*/ |
|
2713 |
ESemaphoreDestroy=0x01, |
|
2714 |
||
2715 |
/** |
|
2716 |
A semaphore (DSemaphore) has been acquired. |
|
2717 |
||
2718 |
Trace data format: |
|
2719 |
- 4 bytes containing trace id (a DSemaphore*) for this semaphore. |
|
2720 |
*/ |
|
2721 |
ESemaphoreAcquire=0x02, |
|
2722 |
||
2723 |
/** |
|
2724 |
A semaphore (DSemaphore) has been released. |
|
2725 |
||
2726 |
Trace data format: |
|
2727 |
- 4 bytes containing trace id (a DSemaphore*) for this semaphore. |
|
2728 |
*/ |
|
2729 |
ESemaphoreRelease=0x03, |
|
2730 |
||
2731 |
/** |
|
2732 |
A thread has blocked on a semaphore (DSemaphore) |
|
2733 |
||
2734 |
Trace data format: |
|
2735 |
- 4 bytes containing trace id (a DSemaphore*) for this semaphore. |
|
2736 |
*/ |
|
2737 |
ESemaphoreBlock=0x04, |
|
2738 |
||
2739 |
||
2740 |
/** |
|
2741 |
A mutex (DMutex) has been created. |
|
2742 |
||
2743 |
Trace data format: |
|
2744 |
- 4 bytes containing trace id (a DMutex*) for this mutex. |
|
2745 |
- 4 bytes containing the owning DThread* or DProcess* |
|
2746 |
- Remaining data is the ASCII name of the mutex. |
|
2747 |
*/ |
|
2748 |
EMutexCreate=0x10, |
|
2749 |
||
2750 |
/** |
|
2751 |
A mutex (DMutex) has been destroyed. |
|
2752 |
||
2753 |
Trace data format: |
|
2754 |
- 4 bytes containing trace id (a DMutex*) for this mutex. |
|
2755 |
*/ |
|
2756 |
EMutexDestroy=0x11, |
|
2757 |
||
2758 |
/** |
|
2759 |
A mutex (DMutex) has been acquired. |
|
2760 |
||
2761 |
Trace data format: |
|
2762 |
- 4 bytes containing trace id (a DMutex*) for this mutex. |
|
2763 |
*/ |
|
2764 |
EMutexAcquire=0x12, |
|
2765 |
||
2766 |
/** |
|
2767 |
A mutex (DMutex) has been released. |
|
2768 |
||
2769 |
Trace data format: |
|
2770 |
- 4 bytes containing trace id (a DMutex*) for this mutex. |
|
2771 |
*/ |
|
2772 |
EMutexRelease=0x13, |
|
2773 |
||
2774 |
/** |
|
2775 |
A thread has blocked on a mutex (DMutex) |
|
2776 |
||
2777 |
Trace data format: |
|
2778 |
- 4 bytes containing trace id (a DMutex*) for this mutex. |
|
2779 |
*/ |
|
2780 |
EMutexBlock=0x14, |
|
2781 |
||
2782 |
||
2783 |
/** |
|
2784 |
A condition variable (DCondVar) has been created. |
|
2785 |
||
2786 |
Trace data format: |
|
2787 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2788 |
- 4 bytes containing the owning DThread* or DProcess* |
|
2789 |
- Remaining data is the ASCII name of the condition variable. |
|
2790 |
*/ |
|
2791 |
ECondVarCreate=0x20, |
|
2792 |
||
2793 |
/** |
|
2794 |
A condition variable (DCondVar) has been destroyed. |
|
2795 |
||
2796 |
Trace data format: |
|
2797 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2798 |
*/ |
|
2799 |
ECondVarDestroy=0x21, |
|
2800 |
||
2801 |
/** |
|
2802 |
A thread has blocked on a condition variable (DCondVar) |
|
2803 |
||
2804 |
Trace data format: |
|
2805 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2806 |
- 4 bytes containing trace id (DMutex*) for the associated mutex. |
|
2807 |
*/ |
|
2808 |
ECondVarBlock=0x22, |
|
2809 |
||
2810 |
/** |
|
2811 |
A thread has been released from a condition variable (DCondVar) wait |
|
2812 |
||
2813 |
Trace data format: |
|
2814 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2815 |
- 4 bytes containing trace id (DMutex*) for the associated mutex. |
|
2816 |
*/ |
|
2817 |
ECondVarWakeUp=0x23, |
|
2818 |
||
2819 |
/** |
|
2820 |
A condition variable (DCondVar) has been signalled |
|
2821 |
||
2822 |
Trace data format: |
|
2823 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2824 |
- 4 bytes containing trace id (DMutex*) for the associated mutex. |
|
2825 |
*/ |
|
2826 |
ECondVarSignal=0x24, |
|
2827 |
||
2828 |
/** |
|
2829 |
A condition variable (DCondVar) has been signalled in broadcast mode. |
|
2830 |
||
2831 |
Trace data format: |
|
2832 |
- 4 bytes containing trace id (a DCondVar*) for this condition variable. |
|
2833 |
- 4 bytes containing trace id (DMutex*) for the associated mutex. |
|
2834 |
*/ |
|
2835 |
ECondVarBroadcast=0x25, |
|
2836 |
||
2837 |
}; |
|
2838 |
||
2839 |
enum TFlexibleMemModel |
|
2840 |
{ |
|
2841 |
/** |
|
2842 |
A memory object has been created. |
|
2843 |
||
2844 |
Trace data format: |
|
2845 |
- 4 bytes containing the memory object id (DMemoryObject*). |
|
2846 |
- 4 bytes containing the size of the memory in pages. |
|
2847 |
*/ |
|
2848 |
EMemoryObjectCreate, |
|
2849 |
||
2850 |
/** |
|
2851 |
A memory object has been destroyed. |
|
2852 |
||
2853 |
Trace data format: |
|
2854 |
- 4 bytes containing the memory object id (DMemoryObject*). |
|
2855 |
*/ |
|
2856 |
EMemoryObjectDestroy, |
|
2857 |
||
2858 |
/** |
|
2859 |
A memory mapping has been created. |
|
2860 |
||
2861 |
Trace data format: |
|
2862 |
- 4 bytes containing the memory mapping id (DMemoryMapping*). |
|
2863 |
- 4 bytes containing the memory object id (DMemoryObject*). |
|
2864 |
- 4 bytes containing the offset of the mapping into the memory object, in pages |
|
2865 |
- 4 bytes containing the size of the mapping in pages |
|
2866 |
- 2 bytes containing the ASID |
|
2867 |
- 2 spare bytes, currently zero |
|
2868 |
- 4 bytes containing the virtual address the mapping |
|
2869 |
*/ |
|
2870 |
EMemoryMappingCreate, |
|
2871 |
||
2872 |
/** |
|
2873 |
A memory mapping has been destroyed. |
|
2874 |
||
2875 |
Trace data format: |
|
2876 |
- 4 bytes containing the memory mapping id (DMemoryMapping*). |
|
2877 |
*/ |
|
2878 |
EMemoryMappingDestroy, |
|
2879 |
||
2880 |
// The following traces associate memory model objects with the kernel objects that use them |
|
2881 |
||
2882 |
/** |
|
2883 |
A memory object is being used for the contents of a chunk. |
|
2884 |
||
2885 |
Trace data format: |
|
2886 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2887 |
- 4 bytes containing the chunk id (a DChunk*) |
|
2888 |
*/ |
|
2889 |
EMemoryObjectIsChunk, |
|
2890 |
||
2891 |
/** |
|
2892 |
A memory object is being used for the contents of a code segment. |
|
2893 |
||
2894 |
Trace data format: |
|
2895 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2896 |
- 4 bytes containing the code segment id (a DCodeSeg*) |
|
2897 |
*/ |
|
2898 |
EMemoryObjectIsCodeSeg, |
|
2899 |
||
2900 |
/** |
|
2901 |
A memory object is being used for process static data. |
|
2902 |
||
2903 |
Trace data format: |
|
2904 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2905 |
- 4 bytes containing the process id (a DProcess*) |
|
2906 |
*/ |
|
2907 |
EMemoryObjectIsProcessStaticData, |
|
2908 |
||
2909 |
/** |
|
2910 |
A memory object is being used for DLL static data. |
|
2911 |
||
2912 |
Trace data format: |
|
2913 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2914 |
- 4 bytes containing the code segment id (a DCodeSeg*) |
|
2915 |
- 4 bytes containing the process id (a DProcess*) |
|
2916 |
*/ |
|
2917 |
EMemoryObjectIsDllStaticData, |
|
2918 |
||
2919 |
/** |
|
2920 |
A memory object is being used for a thread's supervisor stack. |
|
2921 |
||
2922 |
Trace data format: |
|
2923 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2924 |
- 4 bytes containing the thread id (a DThread*) |
|
2925 |
*/ |
|
2926 |
EMemoryObjectIsSupervisorStack, |
|
2927 |
||
2928 |
/** |
|
2929 |
A memory object is being used for a thread's user stack. |
|
2930 |
||
2931 |
Trace data format: |
|
2932 |
- 4 bytes containing the memory object id (a DMemoryObject*). |
|
2933 |
- 4 bytes containing the thread id (a DThread*) |
|
2934 |
*/ |
|
2935 |
EMemoryObjectIsUserStack, |
|
2936 |
||
2937 |
/** |
|
2938 |
Identifies the Address Space ID (ASID) used for a process. |
|
2939 |
||
2940 |
Trace data format: |
|
2941 |
- 4 bytes containing the process id (a DProcess*) |
|
2942 |
- 2 bytes containing the ASID |
|
2943 |
- 2 spare bytes, currently zero |
|
2944 |
*/ |
|
2945 |
EAddressSpaceId |
|
2946 |
}; |
|
2947 |
||
2948 |
/** |
|
2949 |
Enumeration of sub-category values for trace category EIic. |
|
2950 |
@see EIic |
|
2951 |
@prototype 9.6 |
|
2952 |
*/ |
|
2953 |
enum TIic |
|
2954 |
{ |
|
2955 |
/** |
|
2956 |
Trace output for the invocation by the PSL of registering an array of pointers to channels with the IIC bus controller. |
|
2957 |
||
2958 |
Trace data format: |
|
2959 |
- 4 bytes containing the address of the array |
|
2960 |
- 4 bytes containing the number of channels in the array |
|
2961 |
*/ |
|
2962 |
ERegisterChansStartPsl = 0, |
|
2963 |
||
2964 |
/** |
|
2965 |
Trace output for the start of the PIL registering an array of pointers to channels with the IIC bus controller. |
|
2966 |
||
2967 |
Trace data format: |
|
2968 |
- 4 bytes containing the address of the array |
|
2969 |
- 4 bytes containing the number of channels in the array |
|
2970 |
- 4 bytes containing the number of channels registered with the controller prior to this point |
|
2971 |
*/ |
|
2972 |
ERegisterChansStartPil = 1, |
|
2973 |
||
2974 |
/** |
|
2975 |
Trace output for the end of the PIL registering an array of pointers to channels with the IIC bus controller. |
|
2976 |
||
2977 |
Trace data format: |
|
2978 |
- 4 bytes containing the address of the array |
|
2979 |
- 4 bytes containing the number of channels now registered with the controller |
|
2980 |
*/ |
|
2981 |
ERegisterChansEndPil = 2, |
|
2982 |
||
2983 |
/** |
|
2984 |
Trace output for the end of the PSL registering an array of pointers to channels with the IIC bus controller. |
|
2985 |
||
2986 |
Trace data format: |
|
2987 |
- 4 bytes containing the address of the array |
|
2988 |
- 4 bytes containing the number of channels in the array |
|
2989 |
- 4 bytes containing the error code returned by the IIC bus controller |
|
2990 |
*/ |
|
2991 |
ERegisterChansEndPsl = 3, |
|
2992 |
||
2993 |
/** |
|
2994 |
Trace output for the start of the PSL de-registering a channel with the IIC bus controller. |
|
2995 |
||
2996 |
Trace data format: |
|
2997 |
- 4 bytes containing the address of the channel |
|
2998 |
*/ |
|
2999 |
EDeRegisterChanStartPsl = 4, |
|
3000 |
||
3001 |
/** |
|
3002 |
Trace output for the start of the PIL de-registering a channel with the IIC bus controller. |
|
3003 |
||
3004 |
Trace data format: |
|
3005 |
- 4 bytes containing the address of the channel |
|
3006 |
- 4 bytes containing the number of channels registered with the controller prior to this point |
|
3007 |
*/ |
|
3008 |
EDeRegisterChanStartPil = 5, |
|
3009 |
||
3010 |
/** |
|
3011 |
Trace output for the end of the PSL de-registering a channel with the IIC bus controller. |
|
3012 |
||
3013 |
Trace data format: |
|
3014 |
- 4 bytes containing the address of the channel |
|
3015 |
- 4 bytes containing the number of channels now registered with the controller |
|
3016 |
*/ |
|
3017 |
EDeRegisterChanEndPil = 6, |
|
3018 |
||
3019 |
/** |
|
3020 |
Trace output for the end of the PSL de-registering a channel with the IIC bus controller. |
|
3021 |
||
3022 |
Trace data format: |
|
3023 |
- 4 bytes containing the address of the channel |
|
3024 |
- 4 bytes containing the error code returned by the IIC bus controller |
|
3025 |
*/ |
|
3026 |
EDeRegisterChanEndPsl = 7, |
|
3027 |
||
3028 |
/** |
|
3029 |
Trace output for the start of a synchronous queue transaction request in the PIL. |
|
3030 |
||
3031 |
Trace data format: |
|
3032 |
- 4 bytes containing the bus realisation variability token |
|
3033 |
- 4 bytes containing the pointer to the transaction object |
|
3034 |
*/ |
|
3035 |
EMQTransSyncStartPil = 8, |
|
3036 |
||
3037 |
/** |
|
3038 |
Trace output for the end of a synchronous queue transaction request in the PIL. |
|
3039 |
||
3040 |
Trace data format: |
|
3041 |
- 4 bytes containing the bus realisation variability token |
|
3042 |
- 4 bytes containing the error code returned by the controller |
|
3043 |
*/ |
|
3044 |
EMQTransSyncEndPil = 9, |
|
3045 |
||
3046 |
/** |
|
3047 |
Trace output for the start of a synchronous queue transaction request in the PIL. |
|
3048 |
||
3049 |
Trace data format: |
|
3050 |
- 4 bytes containing the bus realisation variability token |
|
3051 |
- 4 bytes containing the pointer to the transaction object |
|
3052 |
- 4 bytes containing the pointer to the callback object |
|
3053 |
*/ |
|
3054 |
EMQTransAsyncStartPil = 10, |
|
3055 |
||
3056 |
/** |
|
3057 |
Trace output for the end of a synchronous queue transaction request in the PIL. |
|
3058 |
||
3059 |
Trace data format: |
|
3060 |
- 4 bytes containing the bus realisation variability token |
|
3061 |
- 4 bytes containing the error code returned by the controller |
|
3062 |
*/ |
|
3063 |
EMQTransAsyncEndPil = 11, |
|
3064 |
||
3065 |
/** |
|
3066 |
Trace output for the start of cancelling an asynchronous queue transaction request in the PIL. |
|
3067 |
||
3068 |
Trace data format: |
|
3069 |
- 4 bytes containing the bus realisation variability token |
|
3070 |
- 4 bytes containing the pointer to the transaction object |
|
3071 |
*/ |
|
3072 |
EMCancelTransStartPil = 12, |
|
3073 |
||
3074 |
/** |
|
3075 |
Trace output for the end of cancelling an asynchronous queue transaction request in the PIL. |
|
3076 |
||
3077 |
Trace data format: |
|
3078 |
- 4 bytes containing the pointer to the transaction object |
|
3079 |
- 4 bytes containing the error code returned by the controller |
|
3080 |
*/ |
|
3081 |
EMCancelTransEndPil = 13, |
|
3082 |
||
3083 |
/** |
|
3084 |
Trace output for the start of processing a transaction request in the PIL. |
|
3085 |
||
3086 |
Trace data format: |
|
3087 |
- 4 bytes containing the address of the channel |
|
3088 |
- 4 bytes containing the pointer to the transaction object |
|
3089 |
*/ |
|
3090 |
EMProcessTransStartPil = 14, |
|
3091 |
||
3092 |
/** |
|
3093 |
Trace output for the start of processing a transaction request in the PSL. |
|
3094 |
||
3095 |
Trace data format: |
|
3096 |
- 4 bytes containing the pointer to the transaction object |
|
3097 |
*/ |
|
3098 |
EMProcessTransStartPsl = 15, |
|
3099 |
||
3100 |
/** |
|
3101 |
Trace output for the end of processing a transaction request in the PSL. |
|
3102 |
||
3103 |
Trace data format: |
|
3104 |
- 4 bytes containing the result code |
|
3105 |
*/ |
|
3106 |
EMProcessTransEndPsl = 16, |
|
3107 |
||
3108 |
/** |
|
3109 |
Trace output for the end of processing a transaction request in the PIL. |
|
3110 |
||
3111 |
Trace data format: |
|
3112 |
- 4 bytes containing the address of the channel |
|
3113 |
- 4 bytes containing the pointer to the transaction object |
|
3114 |
- 4 bytes containing the result code |
|
3115 |
- 4 bytes containing the pointer to the client callback object |
|
3116 |
*/ |
|
3117 |
EMProcessTransEndPil = 17, |
|
3118 |
||
3119 |
/** |
|
3120 |
Trace output for the start of synchronously capturing a Slave channel in the PIL. |
|
3121 |
||
3122 |
Trace data format: |
|
3123 |
- 4 bytes containing the bus realisation variability |
|
3124 |
- 4 bytes containing a pointer to device specific configuration option applicable to all transactions |
|
3125 |
*/ |
|
3126 |
ESCaptChanSyncStartPil = 18, |
|
3127 |
||
3128 |
/** |
|
3129 |
Trace output for the start of synchronously capturing a Slave channel in the PSL. |
|
3130 |
||
3131 |
Trace data format: |
|
3132 |
- 4 bytes containing the address of the channel |
|
3133 |
- 4 bytes containing a pointer to device specific configuration option applicable to all transactions |
|
3134 |
*/ |
|
3135 |
ESCaptChanSyncStartPsl = 19, |
|
3136 |
||
3137 |
/** |
|
3138 |
Trace output for the end of synchronously capturing a Slave channel in the PSL. |
|
3139 |
||
3140 |
Trace data format: |
|
3141 |
- 4 bytes containing the address of the channel |
|
3142 |
- 4 bytes containing the result code |
|
3143 |
*/ |
|
3144 |
ESCaptChanSyncEndPsl = 20, |
|
3145 |
||
3146 |
/** |
|
3147 |
Trace output for the end of synchronously capturing a Slave channel in the PIL. |
|
3148 |
||
3149 |
Trace data format: |
|
3150 |
- 4 bytes containing the bus realisation variability |
|
3151 |
- 4 bytes containing the platform-specific cookie that uniquely identifies the channel |
|
3152 |
- 4 bytes containing the result code |
|
3153 |
*/ |
|
3154 |
ESCaptChanSyncEndPil = 21, |
|
3155 |
||
3156 |
/** |
|
3157 |
Trace output for the start of asynchronously capturing a Slave channel in the PIL. |
|
3158 |
||
3159 |
Trace data format: |
|
3160 |
- 4 bytes containing the bus realisation variability |
|
3161 |
- 4 bytes containing a pointer to device specific configuration option applicable to all transactions |
|
3162 |
- 4 bytes containing the pointer to the client callback object |
|
3163 |
*/ |
|
3164 |
ESCaptChanASyncStartPil = 22, |
|
3165 |
||
3166 |
/** |
|
3167 |
Trace output for the start of asynchronously capturing a Slave channel in the PSL. |
|
3168 |
||
3169 |
Trace data format: |
|
3170 |
- 4 bytes containing a pointer to the channel object |
|
3171 |
- 4 bytes containing a pointer to device specific configuration option applicable to all transactions |
|
3172 |
*/ |
|
3173 |
ESCaptChanASyncStartPsl = 23, |
|
3174 |
||
3175 |
/** |
|
3176 |
Trace output for the end of asynchronously capturing a Slave channel in the PSL. |
|
3177 |
||
3178 |
Trace data format: |
|
3179 |
- 4 bytes containing a pointer to the channel object |
|
3180 |
- 4 bytes containing the result code |
|
3181 |
*/ |
|
3182 |
ESCaptChanASyncEndPsl = 24, |
|
3183 |
||
3184 |
/** |
|
3185 |
Trace output for the end of asynchronously capturing a Slave channel in the PIL. |
|
3186 |
||
3187 |
Trace data format: |
|
3188 |
- 4 bytes containing a pointer to the channel object |
|
3189 |
- 4 bytes containing the result code |
|
3190 |
*/ |
|
3191 |
ESCaptChanASyncEndPil = 25, |
|
3192 |
||
3193 |
/** |
|
3194 |
Trace output for the start of releasing a Slave channel in the PIL. |
|
3195 |
||
3196 |
Trace data format: |
|
3197 |
- 4 bytes containing the channel identifier cookie |
|
3198 |
*/ |
|
3199 |
ESRelChanStartPil = 26, |
|
3200 |
||
3201 |
/** |
|
3202 |
Trace output for the start of releasing a Slave channel in the PSL. |
|
3203 |
||
3204 |
Trace data format: |
|
3205 |
- 4 bytes containing a pointer to the channel object |
|
3206 |
*/ |
|
3207 |
ESRelChanStartPsl = 27, |
|
3208 |
||
3209 |
/** |
|
3210 |
Trace output for the end of releasing a Slave channel in the PSL. |
|
3211 |
||
3212 |
Trace data format: |
|
3213 |
- 4 bytes containing a pointer to the channel object |
|
3214 |
- 4 bytes containing the result code |
|
3215 |
*/ |
|
3216 |
ESRelChanEndPsl = 28, |
|
3217 |
||
3218 |
/** |
|
3219 |
Trace output for the end of releasing a Slave channel in the PIL. |
|
3220 |
||
3221 |
Trace data format: |
|
3222 |
- 4 bytes containing the channel identifier cookie |
|
3223 |
- 4 bytes containing the result code |
|
3224 |
*/ |
|
3225 |
ESRelChanEndPil = 29, |
|
3226 |
||
3227 |
/** |
|
3228 |
Trace output for the start of registering an Rx buffer for a Slave channel in the PIL. |
|
3229 |
||
3230 |
Trace data format: |
|
3231 |
- 4 bytes containing a pointer to the receive buffer |
|
3232 |
- 4 bytes containing the number of buffer bytes used to store a word. |
|
3233 |
- 4 bytes containing the number of words expected to be received. |
|
3234 |
- 4 bytes containing offset from the start of the buffer where to store the received data. |
|
3235 |
*/ |
|
3236 |
ESRegRxBufStartPil = 30, |
|
3237 |
||
3238 |
/** |
|
3239 |
Trace output for the start of registering an Rx buffer for a Slave channel in the PSL. |
|
3240 |
||
3241 |
Trace data format: |
|
3242 |
- 4 bytes containing a pointer to the channel object |
|
3243 |
- 4 bytes containing a pointer to the receive buffer |
|
3244 |
- 4 bytes containing the number of buffer bytes used to store a word. |
|
3245 |
- 4 bytes containing the number of words expected to be received. |
|
3246 |
- 4 bytes containing offset from the start of the buffer where to store the received data. |
|
3247 |
*/ |
|
3248 |
ESRegRxBufStartPsl = 31, |
|
3249 |
||
3250 |
/** |
|
3251 |
Trace output for the end of registering an Rx buffer for a Slave channel in the PSL. |
|
3252 |
||
3253 |
Trace data format: |
|
3254 |
- 4 bytes containing a pointer to the channel object |
|
3255 |
- 4 bytes containing the result code |
|
3256 |
*/ |
|
3257 |
ESRegRxBufEndPsl = 32, |
|
3258 |
||
3259 |
/** |
|
3260 |
Trace output for the end of registering an Rx buffer for a Slave channel in the PIL. |
|
3261 |
||
3262 |
Trace data format: |
|
3263 |
- 4 bytes containing the result code |
|
3264 |
*/ |
|
3265 |
ESRegRxBufEndPil = 33, |
|
3266 |
||
3267 |
/** |
|
3268 |
Trace output for the start of registering an Tx buffer for a Slave channel in the PIL. |
|
3269 |
||
3270 |
Trace data format: |
|
3271 |
- 4 bytes containing a pointer to the transmit buffer |
|
3272 |
- 4 bytes containing the number of buffer bytes used to store a word. |
|
3273 |
- 4 bytes containing the number of words expected to be transmitted. |
|
3274 |
- 4 bytes containing offset from the start of the buffer from where to transmit data. |
|
3275 |
*/ |
|
3276 |
ESRegTxBufStartPil = 34, |
|
3277 |
||
3278 |
/** |
|
3279 |
Trace output for the start of registering an Tx buffer for a Slave channel in the PSL. |
|
3280 |
||
3281 |
Trace data format: |
|
3282 |
- 4 bytes containing a pointer to the channel object |
|
3283 |
- 4 bytes containing a pointer to the transmit buffer |
|
3284 |
- 4 bytes containing the number of buffer bytes used to store a word. |
|
3285 |
- 4 bytes containing the number of words expected to be transmitted. |
|
3286 |
- 4 bytes containing offset from the start of the buffer from where to transmit data. |
|
3287 |
*/ |
|
3288 |
ESRegTxBufStartPsl = 35, |
|
3289 |
||
3290 |
/** |
|
3291 |
Trace output for the end of registering an Tx buffer for a Slave channel in the PSL. |
|
3292 |
||
3293 |
Trace data format: |
|
3294 |
- 4 bytes containing a pointer to the channel object |
|
3295 |
- 4 bytes containing the result code |
|
3296 |
*/ |
|
3297 |
ESRegTxBufEndPsl = 36, |
|
3298 |
||
3299 |
/** |
|
3300 |
Trace output for the start of setting a notification for a Slave channel in the PIL. |
|
3301 |
||
3302 |
Trace data format: |
|
3303 |
- 4 bytes containing the result code |
|
3304 |
*/ |
|
3305 |
ESRegTxBufEndPil = 37, |
|
3306 |
||
3307 |
/** |
|
3308 |
Trace output for the start of setting a notification for a Slave channel in the PIL. |
|
3309 |
||
3310 |
Trace data format: |
|
3311 |
- 4 bytes containing the channel identifier cookie |
|
3312 |
- 4 bytes containing the trigger value |
|
3313 |
*/ |
|
3314 |
ESNotifTrigStartPil = 38, |
|
3315 |
||
3316 |
/** |
|
3317 |
Trace output for the start of setting a notification for a Slave channel in the PSL. |
|
3318 |
||
3319 |
Trace data format: |
|
3320 |
- 4 bytes containing the trigger value |
|
3321 |
*/ |
|
3322 |
ESNotifTrigStartPsl = 39, |
|
3323 |
||
3324 |
/** |
|
3325 |
Trace output for the end of setting a notification for a Slave channel in the PSL. |
|
3326 |
||
3327 |
Trace data format: |
|
3328 |
- 4 bytes containing the result code |
|
3329 |
*/ |
|
3330 |
ESNotifTrigEndPsl = 40, |
|
3331 |
||
3332 |
/** |
|
3333 |
Trace output for the end of setting a notification for a Slave channel in the PIL. |
|
3334 |
||
3335 |
Trace data format: |
|
3336 |
- 4 bytes containing the channel identifier cookie |
|
3337 |
- 4 bytes containing the result code |
|
3338 |
*/ |
|
3339 |
ESNotifTrigEndPil = 41, |
|
3340 |
||
3341 |
/** |
|
3342 |
Trace output for the start of a StaticExtension operaton for a MasterSlave channel in the PIL. |
|
3343 |
||
3344 |
Trace data format: |
|
3345 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3346 |
- 4 bytes containing a function identifier |
|
3347 |
- 4 bytes containing an argument to be passed to the function |
|
3348 |
- 4 bytes containing an argument to be passed to the function |
|
3349 |
*/ |
|
3350 |
EMSStatExtStartPil = 42, |
|
3351 |
||
3352 |
/** |
|
3353 |
Trace output for the end of a StaticExtension operation for a MasterSlave channel in the PIL. |
|
3354 |
||
3355 |
Trace data format: |
|
3356 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3357 |
- 4 bytes containing a function identifier |
|
3358 |
- 4 bytes containing the result code |
|
3359 |
*/ |
|
3360 |
EMSStatExtEndPil = 43, |
|
3361 |
||
3362 |
/** |
|
3363 |
Trace output for the start of a StaticExtension operation for a Master channel in the PIL. |
|
3364 |
||
3365 |
Trace data format: |
|
3366 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3367 |
- 4 bytes containing a function identifier |
|
3368 |
- 4 bytes containing an argument to be passed to the function |
|
3369 |
- 4 bytes containing an argument to be passed to the function |
|
3370 |
*/ |
|
3371 |
EMStatExtStartPil = 44, |
|
3372 |
||
3373 |
/** |
|
3374 |
Trace output for the start of a StaticExtension operation for a Master channel in the PSL. |
|
3375 |
||
3376 |
Trace data format: |
|
3377 |
- 4 bytes containing a pointer to the channel object |
|
3378 |
- 4 bytes containing a function identifier |
|
3379 |
- 4 bytes containing an argument to be passed to the function |
|
3380 |
- 4 bytes containing an argument to be passed to the function |
|
3381 |
*/ |
|
3382 |
EMStatExtStartPsl = 45, |
|
3383 |
||
3384 |
/** |
|
3385 |
Trace output for the end of a StaticExtension operation for a Master channel in the PSL. |
|
3386 |
||
3387 |
Trace data format: |
|
3388 |
- 4 bytes containing a pointer to the channel object |
|
3389 |
- 4 bytes containing a function identifier |
|
3390 |
- 4 bytes containing the result code |
|
3391 |
*/ |
|
3392 |
EMStatExtEndPsl = 46, |
|
3393 |
||
3394 |
/** |
|
3395 |
Trace output for the end of a StaticExtension operation for a Master channel in the PIL. |
|
3396 |
||
3397 |
Trace data format: |
|
3398 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3399 |
- 4 bytes containing a function identifier |
|
3400 |
- 4 bytes containing the result code |
|
3401 |
*/ |
|
3402 |
EMStatExtEndPil = 47, |
|
3403 |
||
3404 |
/** |
|
3405 |
Trace output for the start of a StaticExtension operation for a Slave channel in the PIL. |
|
3406 |
||
3407 |
Trace data format: |
|
3408 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3409 |
- 4 bytes containing a function identifier |
|
3410 |
- 4 bytes containing an argument to be passed to the function |
|
3411 |
- 4 bytes containing an argument to be passed to the function |
|
3412 |
*/ |
|
3413 |
ESStatExtStartPil = 48, |
|
3414 |
||
3415 |
/** |
|
3416 |
Trace output for the start of a StaticExtension operation for a Slave channel in the PSL. |
|
3417 |
||
3418 |
Trace data format: |
|
3419 |
- 4 bytes containing a pointer to the channel object |
|
3420 |
- 4 bytes containing a function identifier |
|
3421 |
- 4 bytes containing an argument to be passed to the function |
|
3422 |
- 4 bytes containing an argument to be passed to the function |
|
3423 |
*/ |
|
3424 |
ESStatExtStartPsl = 49, |
|
3425 |
||
3426 |
/** |
|
3427 |
Trace output for the end of a StaticExtension operation for a Slave channel in the PSL. |
|
3428 |
||
3429 |
Trace data format: |
|
3430 |
- 4 bytes containing a pointer to the channel object |
|
3431 |
- 4 bytes containing a function identifier |
|
3432 |
- 4 bytes containing the result code |
|
3433 |
*/ |
|
3434 |
ESStatExtEndPsl = 50, |
|
3435 |
/** |
|
3436 |
Trace output for the end of a StaticExtension operation for a Slave channel in the PIL. |
|
3437 |
||
3438 |
Trace data format: |
|
3439 |
- 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. |
|
3440 |
- 4 bytes containing a function identifier |
|
3441 |
- 4 bytes containing the result code |
|
3442 |
*/ |
|
3443 |
ESStatExtEndPil = 51 |
|
3444 |
}; |
|
3445 |
||
3446 |
/** |
|
3447 |
Calculate the address of the next trace record. |
|
3448 |
@param aCurrentRecord A pointer to a trace record. |
|
3449 |
@return The address of the trace record which follows aCurrentRecord. |
|
3450 |
*/ |
|
3451 |
inline static TUint8* NextRecord(TAny* aCurrentRecord); |
|
3452 |
||
3453 |
#ifdef __KERNEL_MODE__ |
|
3454 |
||
3455 |
/** |
|
3456 |
Create initial trace output required for the specified trace category. |
|
3457 |
E.g. For the EThreadIdentification category, this will cause traces which identify |
|
3458 |
all threads already in existence at this point. |
|
3459 |
||
3460 |
@aCategory The trace category, or -1 to indicate all trace categories. |
|
3461 |
||
3462 |
@publishedPartner |
|
3463 |
@released |
|
3464 |
*/ |
|
3465 |
IMPORT_C static void Prime(TInt aCategory=-1); |
|
3466 |
||
3467 |
/** |
|
3468 |
Prototype for function which is called to output trace records. |
|
3469 |
I.e. as set by SetHandler(). |
|
3470 |
||
3471 |
The handler function should output all values which are appropriate for the |
|
3472 |
trace as specified in aHeader. |
|
3473 |
||
3474 |
@param aHeader The 4 bytes for the trace header. |
|
3475 |
@param aHeader2 The second header word. |
|
3476 |
(If EHeader2Present is set in the header flags.) |
|
3477 |
@param aContext The context id. |
|
3478 |
(If EContextIdPresent is set in the header flags.) |
|
3479 |
@param a1 The first four bytes of trace data. |
|
3480 |
(Only if the header size indicates that this is present.) |
|
3481 |
@param a2 The second four bytes of trace data. |
|
3482 |
(Only if the header size indicates that this is present.) |
|
3483 |
@param a3 This is either the third four bytes of trace data, if |
|
3484 |
the header size indicates there is between 9 and 12 bytes |
|
3485 |
of trace data. If more than 12 of trace data are indicated, then |
|
3486 |
a3 contains a pointer to the remaining trace data, bytes 8 trough to N. |
|
3487 |
This trace data is word aligned. |
|
3488 |
@param aExtra The 'extra' value. |
|
3489 |
(If EExtraPresent is set in the header flags.) |
|
3490 |
@param aPc The Program Counter value. |
|
3491 |
(If EPcPresent is set in the header flags.) |
|
3492 |
||
3493 |
@return True, if the trace handler is enabled and outputting trace. |
|
3494 |
False otherwise. |
|
3495 |
||
3496 |
Here is an example implementation of a trace handler: |
|
3497 |
||
3498 |
@code |
|
3499 |
TInt size = (aHeader>>BTrace::ESizeIndex*8)&0xff; |
|
3500 |
TInt flags = (aHeader>>BTrace::EFlagsIndex*8)&0xff; |
|
3501 |
Output(aHeader), size -= 4; |
|
3502 |
if(flags&BTrace::EHeader2Present) |
|
3503 |
Output(aHeader2), size -= 4; |
|
3504 |
if(flags&BTrace::EContextIdPresent) |
|
3505 |
Output(aContext), size -= 4; |
|
3506 |
if(flags&BTrace::EPcPresent) |
|
3507 |
Output(aPc), size -= 4; |
|
3508 |
if(flags&BTrace::EExtraPresent) |
|
3509 |
Output(aExtra), size -= 4; |
|
3510 |
if(size<=0) |
|
3511 |
return ETrue; |
|
3512 |
Output(a1), size -= 4; |
|
3513 |
if(size<=0) |
|
3514 |
return ETrue; |
|
3515 |
Output(a2), size -= 4; |
|
3516 |
if(size<=0) |
|
3517 |
return ETrue; |
|
3518 |
if(size<=4) |
|
3519 |
Output(a3); |
|
3520 |
else |
|
3521 |
{ |
|
3522 |
TUint32* data = (TUint32*)a3; |
|
3523 |
TUint32* end = (TUint32*)(a3+size); |
|
3524 |
do Output(*data++); while(data<end); |
|
3525 |
} |
|
3526 |
return ETrue; |
|
3527 |
@endcode |
|
3528 |
||
3529 |
The trace handler may add timestamp values to the trace it outputs, in which case |
|
3530 |
it should modify the flags and size in aHeader accordingly, before outputting this value. |
|
3531 |
The Timestamp and/or Timestamp2 should be output, in that order, between the Header2 and |
|
3532 |
Context ID values. |
|
3533 |
||
3534 |
IMPORTANT NOTES. |
|
3535 |
- The handler must not make use of any kernel APIs, apart from TDfc::RawAdd(). (This is |
|
3536 |
because kernel APIs may contain tracing and this would result in deadlock of the system.) |
|
3537 |
- The trace handler must not access or modify arguments which are not indicated as |
|
3538 |
being present by their flag in aHeader or aHeader2. |
|
3539 |
In particular, on ARM CPUs, the values a2, a3, aExtra and aPc are stored on the stack |
|
3540 |
and the caller of this function may not have created these arguments before calling the |
|
3541 |
trace handler. |
|
3542 |
- The handler may be called in any context and in a re-entrant manner. Implementations must |
|
3543 |
be designed to cope with this. |
|
3544 |
- The interrupt disable status must not be reduced by the trace handler during its operation. |
|
3545 |
E.g. if IRQs are disabled on entry, the handler must not cause them to become enabled |
|
3546 |
at any point. |
|
3547 |
||
3548 |
@pre Call in any context. |
|
3549 |
@post Interrupt enable status unchanged. |
|
3550 |
||
3551 |
@publishedPartner |
|
3552 |
@released |
|
3553 |
*/ |
|
3554 |
typedef TBool(*THandler)(TUint32 aHeader,TUint32 aHeader2,const TUint32 aContext,const TUint32 a1,const TUint32 a2,const TUint32 a3,const TUint32 aExtra,const TUint32 aPc); |
|
3555 |
||
3556 |
||
3557 |
/** |
|
3558 |
Set the function which will receive all trace records. |
|
3559 |
@return The handler function which existed before this function was called. |
|
3560 |
@publishedPartner |
|
3561 |
@released |
|
3562 |
*/ |
|
3563 |
IMPORT_C static BTrace::THandler SetHandler(BTrace::THandler aHandler); |
|
3564 |
||
3565 |
||
3566 |
/** |
|
3567 |
Set the trace filter bit for the specified category. |
|
3568 |
||
3569 |
@param aCategory A category value from enum BTrace::TCategory. |
|
3570 |
@param aValue The new filter value for the category. |
|
3571 |
1 means traces of this category are output, 0 means they are suppressed. |
|
3572 |
Other values must not be used. |
|
3573 |
||
3574 |
@return The previous value of the filter for the category, 0 or 1. |
|
3575 |
Or KErrNotSupported if this category is not supported by this build of the kernel. |
|
3576 |
@publishedPartner |
|
3577 |
@released |
|
3578 |
*/ |
|
3579 |
IMPORT_C static TInt SetFilter(TUint aCategory, TBool aValue); |
|
3580 |
||
3581 |
||
3582 |
/** |
|
3583 |
Modify the secondary trace filter to add or remove the specified UID. |
|
3584 |
||
3585 |
This method can not be used to disable a UID key if SetFilter2(TInt aGlobalFilter) |
|
3586 |
has been used to set the filter to pass all traces. Such attempts result in a return |
|
3587 |
code of KErrNotSupported. |
|
3588 |
||
3589 |
@param aUid The UID to filter. |
|
3590 |
@param aValue The new filter value for the UID. |
|
3591 |
1 means traces with this UID are output, 0 means they are suppressed. |
|
3592 |
Other values must not be used. |
|
3593 |
||
3594 |
@return The previous value of the filter for the UID, 0 or 1, if operation is successful. |
|
3595 |
Otherwise, a negative number representing a system wide error code. |
|
3596 |
(E.g. KErrNoMemory.) |
|
3597 |
||
3598 |
@pre Call in a thread context. |
|
3599 |
||
3600 |
@publishedPartner |
|
3601 |
@released |
|
3602 |
*/ |
|
3603 |
IMPORT_C static TInt SetFilter2(TUint32 aUid, TBool aValue); |
|
3604 |
||
3605 |
||
3606 |
/** |
|
3607 |
Set the secondary trace filter to include only the specified UIDs. |
|
3608 |
||
3609 |
@param aUids Pointer to array of UIDs. |
|
3610 |
@param aNumUids Number of UID values pointer to by \a aUid. |
|
3611 |
||
3612 |
@return KErrNone on success. |
|
3613 |
Otherwise, a negative number representing a system wide error code. |
|
3614 |
(E.g. KErrNoMemory.) |
|
3615 |
||
3616 |
@pre Call in a thread context. |
|
3617 |
||
3618 |
@publishedPartner |
|
3619 |
@released |
|
3620 |
*/ |
|
3621 |
IMPORT_C static TInt SetFilter2(const TUint32* aUids, TInt aNumUids); |
|
3622 |
||
3623 |
||
3624 |
/** |
|
3625 |
Set the secondary trace filter to pass or reject every trace. |
|
3626 |
||
3627 |
@param aGlobalFilter If 0, the secondary filter will reject |
|
3628 |
all traces; if 1, all traces are passed |
|
3629 |
by the filter. |
|
3630 |
Other values have no effect. |
|
3631 |
||
3632 |
@return The previous value of the global filter, or -1 if the global filter |
|
3633 |
was not previously set. |
|
3634 |
||
3635 |
@pre Call in a thread context. |
|
3636 |
||
3637 |
@publishedPartner |
|
3638 |
@released |
|
3639 |
*/ |
|
3640 |
IMPORT_C static TInt SetFilter2(TInt aGlobalFilter); |
|
3641 |
||
3642 |
||
3643 |
/** |
|
3644 |
Get the contents of the secondary trace filter. |
|
3645 |
||
3646 |
@param[out] aUids Pointer to array of UIDs contained in the secondary filter. |
|
3647 |
Ownership of this array is passed to the caller of this |
|
3648 |
function, which is then responsible for deleting it. |
|
3649 |
If filter is empty, \a aUid equals zero. |
|
3650 |
@param[out] aGlobalFilter Set to 1 if the secondary filter passes all traces. |
|
3651 |
Set to 0 if the secondary filter rejects all traces. |
|
3652 |
Set to -1 if the secondary filter operates by UIDs contained in traces. |
|
3653 |
||
3654 |
@return Number of UIDs in returned array, if operation is successful. |
|
3655 |
Otherwise, a negative number representing a system wide error code. |
|
3656 |
||
3657 |
||
3658 |
@pre Call in a thread context. |
|
3659 |
@pre Calling thread must be in a critical section. |
|
3660 |
||
3661 |
@publishedPartner |
|
3662 |
@released |
|
3663 |
*/ |
|
3664 |
IMPORT_C static TInt Filter2(TUint32*& aUids, TInt& aGlobalFilter); |
|
3665 |
||
3666 |
||
3667 |
/** |
|
3668 |
Get the trace filter bit for the specified category. |
|
3669 |
||
3670 |
@param aCategory A category value from enum BTrace::TCategory, |
|
3671 |
@return The value of the filter for the category, 0 or 1. |
|
3672 |
Or KErrNotSupported if this category is not supported by this build of the kernel. |
|
3673 |
||
3674 |
@publishedPartner |
|
3675 |
@released |
|
3676 |
*/ |
|
3677 |
inline static TInt Filter(TUint aCategory); |
|
3678 |
||
3679 |
/** |
|
3680 |
Get a pointer to the spinlock used to serialise BTrace output on SMP systems. |
|
3681 |
||
3682 |
@internalComponent |
|
3683 |
*/ |
|
3684 |
IMPORT_C static TSpinLock* LockPtr(); |
|
3685 |
||
3686 |
||
3687 |
/** |
|
3688 |
Enumeration of control functions which can be implemented by the BTrace handler. |
|
3689 |
||
3690 |
These values are passed to #Control to indicate the requested operation and are |
|
3691 |
passed unaltered to the BTrace implementation's control function as specified by |
|
3692 |
SetHandlers(). |
|
3693 |
||
3694 |
@see #Control |
|
3695 |
@see #TControlFunction |
|
3696 |
*/ |
|
3697 |
enum TControl |
|
3698 |
{ |
|
3699 |
/** |
|
3700 |
Called to indicate that the system has crashed. Typical response to this call |
|
3701 |
is to disable tracing so that debug monitor activity doesn't generate any additional |
|
3702 |
trace. |
|
3703 |
||
3704 |
As this function is called after the system is crashed its implementation must not |
|
3705 |
make use of any APIs which require a running system, it must also not re-enable |
|
3706 |
interrupts. |
|
3707 |
||
3708 |
ControlFunction argument meaning: None, ignore. |
|
3709 |
||
3710 |
ControlFunction returns nothing, ignore. |
|
3711 |
*/ |
|
3712 |
ECtrlSystemCrashed, |
|
3713 |
||
3714 |
/** |
|
3715 |
Called by crash monitor to request first block of data from any memory resident |
|
3716 |
trace buffer. A size of zero should be returned if the buffer is empty. |
|
3717 |
||
3718 |
This should be a non-destructive operation if possible. I.e. the contents of the |
|
3719 |
buffer should be capable of being read multiple times by issuing repeated |
|
3720 |
ECtrlCrashReadFirst/ECtrlCrashReadNext sequences. |
|
3721 |
||
3722 |
As this function is called after the system is crashed its implementation must not |
|
3723 |
make use of any APIs which require a running system, it must also not re-enable |
|
3724 |
interrupts. |
|
3725 |
||
3726 |
ControlFunction argument meaning: |
|
3727 |
- aArg1 should be treated as a TUint8*& and set to the start address of the trace data. |
|
3728 |
- aArg2 should be treated as a TUint& and set to the length of the trace data. |
|
3729 |
||
3730 |
ControlFunction returns KErrNone if successful, otherwise one of the other system wide |
|
3731 |
error codes. |
|
3732 |
*/ |
|
3733 |
ECtrlCrashReadFirst, |
|
3734 |
||
3735 |
/** |
|
3736 |
Called by crash monitor after using ECrashReadFirst, to request subsequent |
|
3737 |
blocks of data from the trace buffer. A size of zero should be returned if |
|
3738 |
the end of the buffer has been reached. |
|
3739 |
||
3740 |
As this function is called after the system is crashed its implementation must not |
|
3741 |
make use of any APIs which require a running system, it must also not re-enable |
|
3742 |
interrupts. |
|
3743 |
||
3744 |
ControlFunction argument meaning: |
|
3745 |
aArg1 should be treated as a TUint8** and set to the start address of the trace data. |
|
3746 |
aArg2 should be treated as a TUint* and set to the length of the trace data. |
|
3747 |
||
3748 |
ControlFunction returns KErrNone if successful, otherwise one of the other system wide |
|
3749 |
error codes. |
|
3750 |
*/ |
|
3751 |
ECtrlCrashReadNext |
|
3752 |
}; |
|
3753 |
||
3754 |
/** |
|
3755 |
Prototype for function callback called by #Control. |
|
3756 |
I.e. as set by SetHandlers(). |
|
3757 |
*/ |
|
3758 |
typedef TInt(*TControlFunction)(TControl aFunction, TAny* aArg1, TAny* aArg2); |
|
3759 |
||
3760 |
/** |
|
3761 |
Call the BTrace handlers control function to perform the function. |
|
3762 |
||
3763 |
@param aFunction A value from TControl specifying the requested operation. |
|
3764 |
@param aArg1 First argument for the operation. See enum TControl. |
|
3765 |
@param aArg1 Second argument for the operation. See enum TControl. |
|
3766 |
||
3767 |
@return KErrNone if successful, |
|
3768 |
KErrNotSupported if the function isn't supported. |
|
3769 |
otherwise one of the other system wide error codes. |
|
3770 |
||
3771 |
@see TControl. |
|
3772 |
*/ |
|
3773 |
IMPORT_C static TInt Control(TControl aFunction, TAny* aArg1=0, TAny* aArg2=0); |
|
3774 |
||
3775 |
/** |
|
3776 |
Set both the function which will receive all trace records, and the |
|
3777 |
control function which will be called by each use of #Control. |
|
3778 |
||
3779 |
@param aNewHandler The new handler to receive trace. |
|
3780 |
@param aNewControl The new handler for control functions. |
|
3781 |
@param aOldHandler The trace handler which existed prior to this function being called. |
|
3782 |
@param aOldControl The control handler which existed prior to this function being called. |
|
3783 |
*/ |
|
3784 |
IMPORT_C static void SetHandlers(BTrace::THandler aNewHandler, BTrace::TControlFunction aNewControl, BTrace::THandler& aOldHandler, BTrace::TControlFunction& aOldControl); |
|
3785 |
||
3786 |
#endif // __KERNEL_MODE__ |
|
3787 |
||
3788 |
/** |
|
3789 |
Check the trace filters to see if a trace with a given category |
|
3790 |
would be output. |
|
3791 |
||
3792 |
@param aCategory A category value from enum BTrace::TCategory. |
|
3793 |
Only the 8 least significant bits in this value are used; |
|
3794 |
other bits are ignored. |
|
3795 |
||
3796 |
@return True if a trace with this specification would be passed by the filters. |
|
3797 |
False if a trace with this specification would be dropped by the filters. |
|
3798 |
||
3799 |
@publishedPartner |
|
3800 |
@released |
|
3801 |
*/ |
|
3802 |
IMPORT_C static TBool CheckFilter(TUint32 aCategory); |
|
3803 |
||
3804 |
/** |
|
3805 |
Check the trace filters to see if a trace with a given category |
|
3806 |
and filter UID would be output. |
|
3807 |
||
3808 |
@param aCategory A category value from enum BTrace::TCategory. |
|
3809 |
Only the 8 least significant bits in this value are used; |
|
3810 |
other bits are ignored. |
|
3811 |
@param aUid A UID to filter on. |
|
3812 |
||
3813 |
@return True if a trace with this specification would be passed by the filters. |
|
3814 |
False if a trace with this specification would be dropped by the filters. |
|
3815 |
||
3816 |
@publishedPartner |
|
3817 |
@released |
|
3818 |
*/ |
|
3819 |
IMPORT_C static TBool CheckFilter2(TUint32 aCategory,TUint32 aUid); |
|
3820 |
||
3821 |
/** |
|
3822 |
Common function for BTrace macros. |
|
3823 |
@internalComponent |
|
3824 |
*/ |
|
3825 |
IMPORT_C static TBool Out(TUint32 a0,TUint32 a1,TUint32 a2,TUint32 a3); |
|
3826 |
||
3827 |
/** |
|
3828 |
Common function for BTrace macros. |
|
3829 |
@internalComponent |
|
3830 |
*/ |
|
3831 |
IMPORT_C static TBool OutX(TUint32 a0,TUint32 a1,TUint32 a2,TUint32 a3); |
|
3832 |
||
3833 |
/** |
|
3834 |
Common function for BTrace macros. |
|
3835 |
@internalComponent |
|
3836 |
*/ |
|
3837 |
IMPORT_C static TBool OutN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize); |
|
3838 |
||
3839 |
/** |
|
3840 |
Common function for BTrace macros. |
|
3841 |
@internalComponent |
|
3842 |
*/ |
|
3843 |
IMPORT_C static TBool OutNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize); |
|
3844 |
||
3845 |
/** |
|
3846 |
Common function for BTrace macros. |
|
3847 |
@internalComponent |
|
3848 |
*/ |
|
3849 |
IMPORT_C static TBool OutBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize); |
|
3850 |
||
3851 |
/** |
|
3852 |
Common function for BTrace macros. |
|
3853 |
@internalComponent |
|
3854 |
*/ |
|
3855 |
IMPORT_C static TBool OutFiltered(TUint32 a0,TUint32 a1,TUint32 a2,TUint32 a3); |
|
3856 |
||
3857 |
/** |
|
3858 |
Common function for BTrace macros. |
|
3859 |
@internalComponent |
|
3860 |
*/ |
|
3861 |
IMPORT_C static TBool OutFilteredX(TUint32 a0,TUint32 a1,TUint32 a2,TUint32 a3); |
|
3862 |
||
3863 |
/** |
|
3864 |
Common function for BTrace macros. |
|
3865 |
@internalComponent |
|
3866 |
*/ |
|
3867 |
IMPORT_C static TBool OutFilteredN(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize); |
|
3868 |
||
3869 |
/** |
|
3870 |
Common function for BTrace macros. |
|
3871 |
@internalComponent |
|
3872 |
*/ |
|
3873 |
IMPORT_C static TBool OutFilteredNX(TUint32 a0, TUint32 a1, TUint32 a2, const TAny* aData, TInt aDataSize); |
|
3874 |
||
3875 |
/** |
|
3876 |
Common function for BTrace macros. |
|
3877 |
@internalComponent |
|
3878 |
*/ |
|
3879 |
IMPORT_C static TBool OutFilteredBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize); |
|
3880 |
||
3881 |
/** |
|
3882 |
@internalComponent |
|
3883 |
*/ |
|
3884 |
static void Init0(); |
|
3885 |
||
3886 |
/** |
|
3887 |
@internalComponent |
|
3888 |
*/ |
|
3889 |
typedef TBool(*TBTrace1)(TUint32); |
|
3890 |
||
3891 |
/** |
|
3892 |
@internalComponent |
|
3893 |
*/ |
|
3894 |
typedef TBool(*TBTrace2)(TUint32,TUint32); |
|
3895 |
||
3896 |
/** |
|
3897 |
@internalComponent |
|
3898 |
*/ |
|
3899 |
typedef TBool(*TBTrace3)(TUint32,TUint32,TUint32); |
|
3900 |
||
3901 |
/** |
|
3902 |
@internalComponent |
|
3903 |
*/ |
|
3904 |
struct SExecExtension |
|
3905 |
{ |
|
3906 |
TUint32 iA2; |
|
3907 |
TUint32 iA3; |
|
3908 |
TUint32 iPc; |
|
3909 |
}; |
|
3910 |
||
3911 |
/** |
|
3912 |
@internalComponent |
|
3913 |
*/ |
|
3914 |
static TBool DoOutBig(TUint32 a0, TUint32 a1, const TAny* aData, TInt aDataSize, TUint32 aContext, TUint32 aPc); |
|
3915 |
||
3916 |
/** |
|
3917 |
@internalComponent |
|
3918 |
*/ |
|
3919 |
static TUint32 BigTraceId; |
|
3920 |
||
3921 |
/** |
|
3922 |
@internalComponent |
|
3923 |
*/ |
|
3924 |
static TBool IsSupported(TUint aCategory); |
|
3925 |
||
3926 |
/** |
|
3927 |
Common function for UTrace calls, that need to set both program counter and format id as well as the normal parameters. |
|
3928 |
||
3929 |
@param aHeader The header (a0) of the trace record. |
|
3930 |
@param aModuleUid A uid (a1) to filter on |
|
3931 |
@param aPc A program counter |
|
3932 |
@param aFormatId A format id |
|
3933 |
@param aData The data to output |
|
3934 |
@param aDataSize The size of the data |
|
3935 |
||
3936 |
@return ETrue if a trace was successfully sent and dealt with by the handler. |
|
3937 |
||
3938 |
@internalComponent |
|
3939 |
@prototype |
|
3940 |
*/ |
|
3941 |
IMPORT_C static TBool OutFilteredPcFormatBig(TUint32 aHeader, TUint32 aModuleUid, TUint32 aPc, TUint16 aFormatId, const TAny* aData, TInt aDataSize); |
|
3942 |
||
3943 |
}; |
|
3944 |
||
3945 |
||
3946 |
/** |
|
3947 |
@internalComponent |
|
3948 |
*/ |
|
3949 |
class DBTraceFilter2 |
|
3950 |
{ |
|
3951 |
public: |
|
3952 |
TUint iNumUids; |
|
3953 |
TInt iAccessCount; |
|
3954 |
TUint32 iUids[1]; |
|
3955 |
||
3956 |
TBool Check(TUint32 aUid); |
|
3957 |
||
3958 |
static DBTraceFilter2* New(TInt aNumUids); |
|
3959 |
static DBTraceFilter2* Open(DBTraceFilter2*volatile& aFilter2); |
|
3960 |
void Close(); |
|
3961 |
||
3962 |
DBTraceFilter2* iCleanupLink; |
|
3963 |
static DBTraceFilter2* iCleanupHead; |
|
3964 |
static void Cleanup(); |
|
3965 |
}; |
|
3966 |
||
3967 |
||
3968 |
||
3969 |
||
3970 |
// |
|
3971 |
// BTraceX macros |
|
3972 |
// |
|
3973 |
||
3974 |
/** |
|
3975 |
@internalComponent |
|
3976 |
*/ |
|
3977 |
#define BTRACE_HEADER(aSize,aCategory,aSubCategory) \ |
|
3978 |
(((aSize)<<BTrace::ESizeIndex*8) \ |
|
3979 |
+((aCategory)<<BTrace::ECategoryIndex*8) \ |
|
3980 |
+((aSubCategory)<<BTrace::ESubCategoryIndex*8)) |
|
3981 |
||
3982 |
/** |
|
3983 |
@internalComponent |
|
3984 |
*/ |
|
3985 |
#define BTRACE_HEADER_C(aSize,aCategory,aSubCategory) \ |
|
3986 |
((((aSize)+4)<<BTrace::ESizeIndex*8) \ |
|
3987 |
+((BTrace::EContextIdPresent)<<BTrace::EFlagsIndex*8) \ |
|
3988 |
+((aCategory)<<BTrace::ECategoryIndex*8) \ |
|
3989 |
+((aSubCategory)<<BTrace::ESubCategoryIndex*8)) |
|
3990 |
||
3991 |
/** |
|
3992 |
@internalComponent |
|
3993 |
*/ |
|
3994 |
#define BTRACE_HEADER_P(aSize,aCategory,aSubCategory) \ |
|
3995 |
((((aSize)+4)<<BTrace::ESizeIndex*8) \ |
|
3996 |
+((BTrace::EPcPresent)<<BTrace::EFlagsIndex*8) \ |
|
3997 |
+((aCategory)<<BTrace::ECategoryIndex*8) \ |
|
3998 |
+((aSubCategory)<<BTrace::ESubCategoryIndex*8)) |
|
3999 |
||
4000 |
/** |
|
4001 |
@internalComponent |
|
4002 |
*/ |
|
4003 |
#define BTRACE_HEADER_CP(aSize,aCategory,aSubCategory) \ |
|
4004 |
((((aSize)+8)<<BTrace::ESizeIndex*8) \ |
|
4005 |
+((BTrace::EContextIdPresent|BTrace::EPcPresent)<<BTrace::EFlagsIndex*8) \ |
|
4006 |
+((aCategory)<<BTrace::ECategoryIndex*8) \ |
|
4007 |
+((aSubCategory)<<BTrace::ESubCategoryIndex*8)) |
|
4008 |
||
4009 |
||
4010 |
||
4011 |
/** |
|
4012 |
Output a trace record of the specified category. |
|
4013 |
||
4014 |
The trace record data is 0 bytes in size. |
|
4015 |
||
4016 |
@param aCategory A value from enum BTrace::TCategory, |
|
4017 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4018 |
The meaning of this is dependent on the Category. |
|
4019 |
||
4020 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4021 |
@publishedPartner |
|
4022 |
@released |
|
4023 |
*/ |
|
4024 |
#define BTrace0(aCategory,aSubCategory) \ |
|
4025 |
((BTrace::TBTrace1)BTrace::Out) \ |
|
4026 |
(BTRACE_HEADER(4,(aCategory),(aSubCategory))) |
|
4027 |
||
4028 |
/** |
|
4029 |
Output a trace record of the specified category. |
|
4030 |
||
4031 |
The trace record data is 4 bytes in size. |
|
4032 |
||
4033 |
@param aCategory A value from enum BTrace::TCategory, |
|
4034 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4035 |
The meaning of this is dependent on the Category. |
|
4036 |
@param a1 The 32bit quantity which forms the data of this trace record. |
|
4037 |
||
4038 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4039 |
@publishedPartner |
|
4040 |
@released |
|
4041 |
*/ |
|
4042 |
#define BTrace4(aCategory,aSubCategory,a1) \ |
|
4043 |
((BTrace::TBTrace2)BTrace::Out) \ |
|
4044 |
(BTRACE_HEADER(8,(aCategory),(aSubCategory)),(TUint32)(a1)) |
|
4045 |
||
4046 |
/** |
|
4047 |
Output a trace record of the specified category. |
|
4048 |
||
4049 |
The trace record data is 8 bytes in size. |
|
4050 |
||
4051 |
@param aCategory A value from enum BTrace::TCategory, |
|
4052 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4053 |
The meaning of this is dependent on the Category. |
|
4054 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4055 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4056 |
||
4057 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4058 |
@publishedPartner |
|
4059 |
@released |
|
4060 |
*/ |
|
4061 |
#define BTrace8(aCategory,aSubCategory,a1,a2) \ |
|
4062 |
((BTrace::TBTrace3)BTrace::Out) \ |
|
4063 |
(BTRACE_HEADER(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2)) |
|
4064 |
||
4065 |
/** |
|
4066 |
Output a trace record of the specified category. |
|
4067 |
||
4068 |
The trace record data is 12 bytes in size. |
|
4069 |
||
4070 |
@param aCategory A value from enum BTrace::TCategory, |
|
4071 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4072 |
The meaning of this is dependent on the Category. |
|
4073 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4074 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4075 |
@param a3 The third 32bit quantity which forms the data of this trace record. |
|
4076 |
||
4077 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4078 |
@publishedPartner |
|
4079 |
@released |
|
4080 |
*/ |
|
4081 |
#define BTrace12(aCategory,aSubCategory,a1,a2,a3) \ |
|
4082 |
BTrace::Out \ |
|
4083 |
(BTRACE_HEADER(16,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),(TUint32)(a3)) |
|
4084 |
||
4085 |
/** |
|
4086 |
Output a trace record of the specified category. |
|
4087 |
||
4088 |
@param aCategory A value from enum BTrace::TCategory, |
|
4089 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4090 |
The meaning of this is dependent on the Category. |
|
4091 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4092 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4093 |
@param aData Address of addition data to add to trace. |
|
4094 |
Must be word aligned, i.e. a multiple of 4. |
|
4095 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4096 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4097 |
flag ERecordTruncated is set in the record. |
|
4098 |
||
4099 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4100 |
@publishedPartner |
|
4101 |
@released |
|
4102 |
*/ |
|
4103 |
#define BTraceN(aCategory,aSubCategory,a1,a2,aData,aDataSize) \ |
|
4104 |
BTrace::OutN \ |
|
4105 |
(BTRACE_HEADER(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),aData,aDataSize) |
|
4106 |
||
4107 |
/** |
|
4108 |
Output a trace record of the specified category. |
|
4109 |
||
4110 |
If the specified data is too big to find into a single trace record, then a |
|
4111 |
multipart trace is generated. See TMultiPart. |
|
4112 |
||
4113 |
@param aCategory A value from enum BTrace::TCategory, |
|
4114 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4115 |
The meaning of this is dependent on the Category. |
|
4116 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4117 |
@param aData Address of addition data to add to trace. |
|
4118 |
Must be word aligned, i.e. a multiple of 4. |
|
4119 |
@param aDataSize Number of bytes of additional data. |
|
4120 |
||
4121 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4122 |
@publishedPartner |
|
4123 |
@released |
|
4124 |
*/ |
|
4125 |
#define BTraceBig(aCategory,aSubCategory,a1,aData,aDataSize) \ |
|
4126 |
BTrace::OutBig \ |
|
4127 |
(BTRACE_HEADER(8,(aCategory),(aSubCategory)),(TUint32)(a1),aData,(TInt)(aDataSize)) |
|
4128 |
||
4129 |
||
4130 |
||
4131 |
/** |
|
4132 |
Output a trace record of the specified category. |
|
4133 |
||
4134 |
The trace record data is 0 bytes in size. |
|
4135 |
||
4136 |
@param aCategory A value from enum BTrace::TCategory, |
|
4137 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4138 |
The meaning of this is dependent on the Category. |
|
4139 |
||
4140 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4141 |
@publishedPartner |
|
4142 |
@released |
|
4143 |
*/ |
|
4144 |
#define BTraceContext0(aCategory,aSubCategory) \ |
|
4145 |
((BTrace::TBTrace1)BTrace::OutX) \ |
|
4146 |
(BTRACE_HEADER_C(4,(aCategory),(aSubCategory))) |
|
4147 |
||
4148 |
/** |
|
4149 |
Output a trace record of the specified category which also includes a Context ID. |
|
4150 |
||
4151 |
The trace record data is 4 bytes in size. |
|
4152 |
||
4153 |
@param aCategory A value from enum BTrace::TCategory, |
|
4154 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4155 |
The meaning of this is dependent on the Category. |
|
4156 |
@param a1 The 32bit quantity which forms the data of this trace record. |
|
4157 |
||
4158 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4159 |
@publishedPartner |
|
4160 |
@released |
|
4161 |
*/ |
|
4162 |
#define BTraceContext4(aCategory,aSubCategory,a1) \ |
|
4163 |
((BTrace::TBTrace2)BTrace::OutX) \ |
|
4164 |
(BTRACE_HEADER_C(8,(aCategory),(aSubCategory)),(TUint32)(a1)) |
|
4165 |
||
4166 |
/** |
|
4167 |
Output a trace record of the specified category which also includes a Context ID. |
|
4168 |
||
4169 |
The trace record data is 8 bytes in size. |
|
4170 |
||
4171 |
@param aCategory A value from enum BTrace::TCategory, |
|
4172 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4173 |
The meaning of this is dependent on the Category. |
|
4174 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4175 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4176 |
||
4177 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4178 |
@publishedPartner |
|
4179 |
@released |
|
4180 |
*/ |
|
4181 |
#define BTraceContext8(aCategory,aSubCategory,a1,a2) \ |
|
4182 |
((BTrace::TBTrace3)BTrace::OutX) \ |
|
4183 |
(BTRACE_HEADER_C(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2)) |
|
4184 |
||
4185 |
/** |
|
4186 |
Output a trace record of the specified category which also includes a Context ID. |
|
4187 |
||
4188 |
The trace record data is 12 bytes in size. |
|
4189 |
||
4190 |
@param aCategory A value from enum BTrace::TCategory, |
|
4191 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4192 |
The meaning of this is dependent on the Category. |
|
4193 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4194 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4195 |
@param a3 The third 32bit quantity which forms the data of this trace record. |
|
4196 |
||
4197 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4198 |
@publishedPartner |
|
4199 |
@released |
|
4200 |
*/ |
|
4201 |
#define BTraceContext12(aCategory,aSubCategory,a1,a2,a3) \ |
|
4202 |
BTrace::OutX \ |
|
4203 |
(BTRACE_HEADER_C(16,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),(TUint32)(a3)) |
|
4204 |
||
4205 |
/** |
|
4206 |
Output a trace record of the specified category which also includes a Context ID. |
|
4207 |
||
4208 |
@param aCategory A value from enum BTrace::TCategory, |
|
4209 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4210 |
The meaning of this is dependent on the Category. |
|
4211 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4212 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4213 |
@param aData Address of addition data to add to trace. |
|
4214 |
Must be word aligned, i.e. a multiple of 4. |
|
4215 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4216 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4217 |
flag ERecordTruncated is set in the record. |
|
4218 |
||
4219 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4220 |
@publishedPartner |
|
4221 |
@released |
|
4222 |
*/ |
|
4223 |
#define BTraceContextN(aCategory,aSubCategory,a1,a2,aData,aDataSize) \ |
|
4224 |
BTrace::OutNX \ |
|
4225 |
(BTRACE_HEADER_C(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),aData,aDataSize) |
|
4226 |
||
4227 |
/** |
|
4228 |
Output a trace record of the specified category which also includes a Context ID. |
|
4229 |
||
4230 |
If the specified data is too big to find into a single trace record, then a |
|
4231 |
multipart trace is generated. See TMultiPart. |
|
4232 |
||
4233 |
@param aCategory A value from enum BTrace::TCategory, |
|
4234 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4235 |
The meaning of this is dependent on the Category. |
|
4236 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4237 |
@param aData Address of addition data to add to trace. |
|
4238 |
Must be word aligned, i.e. a multiple of 4. |
|
4239 |
@param aDataSize Number of bytes of additional data. |
|
4240 |
||
4241 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4242 |
@publishedPartner |
|
4243 |
@released |
|
4244 |
*/ |
|
4245 |
#define BTraceContextBig(aCategory,aSubCategory,a1,aData,aDataSize) \ |
|
4246 |
BTrace::OutBig \ |
|
4247 |
(BTRACE_HEADER_C(8,(aCategory),(aSubCategory)),(TUint32)(a1),aData,(TInt)(aDataSize)) |
|
4248 |
||
4249 |
||
4250 |
||
4251 |
/** |
|
4252 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4253 |
||
4254 |
The trace record data is 0 bytes in size. |
|
4255 |
||
4256 |
@param aCategory A value from enum BTrace::TCategory, |
|
4257 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4258 |
The meaning of this is dependent on the Category. |
|
4259 |
||
4260 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4261 |
@publishedPartner |
|
4262 |
@released |
|
4263 |
*/ |
|
4264 |
#define BTracePc0(aCategory,aSubCategory) \ |
|
4265 |
((BTrace::TBTrace1)BTrace::Out) \ |
|
4266 |
(BTRACE_HEADER_P(4,(aCategory),(aSubCategory))) |
|
4267 |
||
4268 |
/** |
|
4269 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4270 |
||
4271 |
The trace record data is 4 bytes in size. |
|
4272 |
||
4273 |
@param aCategory A value from enum BTrace::TCategory, |
|
4274 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4275 |
The meaning of this is dependent on the Category. |
|
4276 |
@param a1 The 32bit quantity which forms the data of this trace record. |
|
4277 |
||
4278 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4279 |
@publishedPartner |
|
4280 |
@released |
|
4281 |
*/ |
|
4282 |
#define BTracePc4(aCategory,aSubCategory,a1) \ |
|
4283 |
((BTrace::TBTrace2)BTrace::Out) \ |
|
4284 |
(BTRACE_HEADER_P(8,(aCategory),(aSubCategory)),(TUint32)(a1)) |
|
4285 |
||
4286 |
/** |
|
4287 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4288 |
||
4289 |
The trace record data is 8 bytes in size. |
|
4290 |
||
4291 |
@param aCategory A value from enum BTrace::TCategory, |
|
4292 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4293 |
The meaning of this is dependent on the Category. |
|
4294 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4295 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4296 |
||
4297 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4298 |
@publishedPartner |
|
4299 |
@released |
|
4300 |
*/ |
|
4301 |
#define BTracePc8(aCategory,aSubCategory,a1,a2) \ |
|
4302 |
((BTrace::TBTrace3)BTrace::Out) \ |
|
4303 |
(BTRACE_HEADER_P(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2)) |
|
4304 |
||
4305 |
/** |
|
4306 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4307 |
||
4308 |
The trace record data is 12 bytes in size. |
|
4309 |
||
4310 |
@param aCategory A value from enum BTrace::TCategory, |
|
4311 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4312 |
The meaning of this is dependent on the Category. |
|
4313 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4314 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4315 |
@param a3 The third 32bit quantity which forms the data of this trace record. |
|
4316 |
||
4317 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4318 |
@publishedPartner |
|
4319 |
@released |
|
4320 |
*/ |
|
4321 |
#define BTracePc12(aCategory,aSubCategory,a1,a2,a3) \ |
|
4322 |
BTrace::Out \ |
|
4323 |
(BTRACE_HEADER_P(16,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),(TUint32)(a3)) |
|
4324 |
||
4325 |
/** |
|
4326 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4327 |
||
4328 |
@param aCategory A value from enum BTrace::TCategory, |
|
4329 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4330 |
The meaning of this is dependent on the Category. |
|
4331 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4332 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4333 |
@param aData Address of addition data to add to trace. |
|
4334 |
Must be word aligned, i.e. a multiple of 4. |
|
4335 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4336 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4337 |
flag ERecordTruncated is set in the record. |
|
4338 |
||
4339 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4340 |
@publishedPartner |
|
4341 |
@released |
|
4342 |
*/ |
|
4343 |
#define BTracePcN(aCategory,aSubCategory,a1,a2,aData,aDataSize) \ |
|
4344 |
BTrace::OutN \ |
|
4345 |
(BTRACE_HEADER_P(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),aData,aDataSize) |
|
4346 |
||
4347 |
/** |
|
4348 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4349 |
||
4350 |
If the specified data is too big to find into a single trace record, then a |
|
4351 |
multipart trace is generated. See TMultiPart. |
|
4352 |
||
4353 |
@param aCategory A value from enum BTrace::TCategory, |
|
4354 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4355 |
The meaning of this is dependent on the Category. |
|
4356 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4357 |
@param aData Address of addition data to add to trace. |
|
4358 |
Must be word aligned, i.e. a multiple of 4. |
|
4359 |
@param aDataSize Number of bytes of additional data. |
|
4360 |
||
4361 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4362 |
@publishedPartner |
|
4363 |
@released |
|
4364 |
*/ |
|
4365 |
#define BTracePcBig(aCategory,aSubCategory,a1,aData,aDataSize) \ |
|
4366 |
BTrace::OutBig \ |
|
4367 |
(BTRACE_HEADER_P(8,(aCategory),(aSubCategory)),(TUint32)(a1),aData,(TInt)(aDataSize)) |
|
4368 |
||
4369 |
||
4370 |
||
4371 |
||
4372 |
/** |
|
4373 |
Output a trace record of the specified category which also includes |
|
4374 |
Context ID and Program Counter values. |
|
4375 |
||
4376 |
The trace record data is 0 bytes in size. |
|
4377 |
||
4378 |
@param aCategory A value from enum BTrace::TCategory, |
|
4379 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4380 |
The meaning of this is dependent on the Category. |
|
4381 |
||
4382 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4383 |
@publishedPartner |
|
4384 |
@released |
|
4385 |
*/ |
|
4386 |
#define BTraceContextPc0(aCategory,aSubCategory) \ |
|
4387 |
((BTrace::TBTrace1)BTrace::OutX) \ |
|
4388 |
(BTRACE_HEADER_CP(4,(aCategory),(aSubCategory))) |
|
4389 |
||
4390 |
/** |
|
4391 |
Output a trace record of the specified category which also includes |
|
4392 |
Context ID and Program Counter values. |
|
4393 |
||
4394 |
The trace record data is 4 bytes in size. |
|
4395 |
||
4396 |
@param aCategory A value from enum BTrace::TCategory, |
|
4397 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4398 |
The meaning of this is dependent on the Category. |
|
4399 |
@param a1 The 32bit quantity which forms the data of this trace record. |
|
4400 |
||
4401 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4402 |
@publishedPartner |
|
4403 |
@released |
|
4404 |
*/ |
|
4405 |
#define BTraceContextPc4(aCategory,aSubCategory,a1) \ |
|
4406 |
((BTrace::TBTrace2)BTrace::OutX) \ |
|
4407 |
(BTRACE_HEADER_CP(8,(aCategory),(aSubCategory)),(TUint32)(a1)) |
|
4408 |
||
4409 |
/** |
|
4410 |
Output a trace record of the specified category which also includes |
|
4411 |
Context ID and Program Counter values. |
|
4412 |
||
4413 |
The trace record data is 8 bytes in size. |
|
4414 |
||
4415 |
@param aCategory A value from enum BTrace::TCategory, |
|
4416 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4417 |
The meaning of this is dependent on the Category. |
|
4418 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4419 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4420 |
||
4421 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4422 |
@publishedPartner |
|
4423 |
@released |
|
4424 |
*/ |
|
4425 |
#define BTraceContextPc8(aCategory,aSubCategory,a1,a2) \ |
|
4426 |
((BTrace::TBTrace3)BTrace::OutX) \ |
|
4427 |
(BTRACE_HEADER_CP(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2)) |
|
4428 |
||
4429 |
/** |
|
4430 |
Output a trace record of the specified category which also includes |
|
4431 |
Context ID and Program Counter values. |
|
4432 |
||
4433 |
The trace record data is 12 bytes in size. |
|
4434 |
||
4435 |
@param aCategory A value from enum BTrace::TCategory, |
|
4436 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4437 |
The meaning of this is dependent on the Category. |
|
4438 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4439 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4440 |
@param a3 The third 32bit quantity which forms the data of this trace record. |
|
4441 |
||
4442 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4443 |
@publishedPartner |
|
4444 |
@released |
|
4445 |
*/ |
|
4446 |
#define BTraceContextPc12(aCategory,aSubCategory,a1,a2,a3) \ |
|
4447 |
BTrace::OutX \ |
|
4448 |
(BTRACE_HEADER_CP(16,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),(TUint32)(a3)) |
|
4449 |
||
4450 |
/** |
|
4451 |
Output a trace record of the specified category which also includes |
|
4452 |
Context ID and Program Counter values. |
|
4453 |
||
4454 |
@param aCategory A value from enum BTrace::TCategory, |
|
4455 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4456 |
The meaning of this is dependent on the Category. |
|
4457 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4458 |
@param a2 The second 32bit quantity which forms the data of this trace record. |
|
4459 |
@param aData Address of addition data to add to trace. |
|
4460 |
Must be word aligned, i.e. a multiple of 4. |
|
4461 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4462 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4463 |
flag ERecordTruncated is set in the record. |
|
4464 |
||
4465 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4466 |
@publishedPartner |
|
4467 |
@released |
|
4468 |
*/ |
|
4469 |
#define BTraceContextPcN(aCategory,aSubCategory,a1,a2,aData,aDataSize) \ |
|
4470 |
BTrace::OutNX \ |
|
4471 |
(BTRACE_HEADER_CP(12,(aCategory),(aSubCategory)),(TUint32)(a1),(TUint32)(a2),aData,aDataSize) |
|
4472 |
||
4473 |
/** |
|
4474 |
Output a trace record of the specified category which also includes |
|
4475 |
Context ID and Program Counter values. |
|
4476 |
||
4477 |
If the specified data is too big to find into a single trace record, then a |
|
4478 |
multipart trace is generated. See TMultiPart. |
|
4479 |
||
4480 |
@param aCategory A value from enum BTrace::TCategory, |
|
4481 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4482 |
The meaning of this is dependent on the Category. |
|
4483 |
@param a1 The first 32bit quantity which forms the data of this trace record. |
|
4484 |
@param aData Address of addition data to add to trace. |
|
4485 |
Must be word aligned, i.e. a multiple of 4. |
|
4486 |
@param aDataSize Number of bytes of additional data. |
|
4487 |
||
4488 |
@return True if trace is enabled for aCategory, false otherwise. |
|
4489 |
@publishedPartner |
|
4490 |
@released |
|
4491 |
*/ |
|
4492 |
#define BTraceContextPcBig(aCategory,aSubCategory,a1,aData,aDataSize) \ |
|
4493 |
BTrace::OutBig \ |
|
4494 |
(BTRACE_HEADER_CP(8,(aCategory),(aSubCategory)),(TUint32)(a1),aData,(TInt)(aDataSize)) |
|
4495 |
||
4496 |
||
4497 |
||
4498 |
/** |
|
4499 |
Output a trace record of the specified category. |
|
4500 |
||
4501 |
The trace record data is 4 bytes in size. |
|
4502 |
||
4503 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4504 |
||
4505 |
@param aCategory A value from enum BTrace::TCategory, |
|
4506 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4507 |
The meaning of this is dependent on the Category. |
|
4508 |
@param aUid The 32bit quantity which forms the data of this trace record. |
|
4509 |
||
4510 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4511 |
@publishedPartner |
|
4512 |
@released |
|
4513 |
*/ |
|
4514 |
#define BTraceFiltered4(aCategory,aSubCategory,aUid) \ |
|
4515 |
((BTrace::TBTrace2)BTrace::OutFiltered) \ |
|
4516 |
(BTRACE_HEADER(8,(aCategory),(aSubCategory)),(TUint32)(aUid)) |
|
4517 |
||
4518 |
/** |
|
4519 |
Output a trace record of the specified category. |
|
4520 |
||
4521 |
The trace record data is 8 bytes in size. |
|
4522 |
||
4523 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4524 |
||
4525 |
@param aCategory A value from enum BTrace::TCategory, |
|
4526 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4527 |
The meaning of this is dependent on the Category. |
|
4528 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4529 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4530 |
||
4531 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4532 |
@publishedPartner |
|
4533 |
@released |
|
4534 |
*/ |
|
4535 |
#define BTraceFiltered8(aCategory,aSubCategory,aUid,a1) \ |
|
4536 |
((BTrace::TBTrace3)BTrace::OutFiltered) \ |
|
4537 |
(BTRACE_HEADER(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1)) |
|
4538 |
||
4539 |
/** |
|
4540 |
Output a trace record of the specified category. |
|
4541 |
||
4542 |
The trace record data is 12 bytes in size. |
|
4543 |
||
4544 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4545 |
||
4546 |
@param aCategory A value from enum BTrace::TCategory, |
|
4547 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4548 |
The meaning of this is dependent on the Category. |
|
4549 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4550 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4551 |
@param a2 The third 32bit quantity which forms the data of this trace record. |
|
4552 |
||
4553 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4554 |
@publishedPartner |
|
4555 |
@released |
|
4556 |
*/ |
|
4557 |
#define BTraceFiltered12(aCategory,aSubCategory,aUid,a1,a2) \ |
|
4558 |
BTrace::OutFiltered \ |
|
4559 |
(BTRACE_HEADER(16,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),(TUint32)(a2)) |
|
4560 |
||
4561 |
/** |
|
4562 |
Output a trace record of the specified category. |
|
4563 |
||
4564 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4565 |
||
4566 |
@param aCategory A value from enum BTrace::TCategory, |
|
4567 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4568 |
The meaning of this is dependent on the Category. |
|
4569 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4570 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4571 |
@param aData Address of addition data to add to trace. |
|
4572 |
Must be word aligned, i.e. a multiple of 4. |
|
4573 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4574 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4575 |
flag ERecordTruncated is set in the record. |
|
4576 |
||
4577 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4578 |
@publishedPartner |
|
4579 |
@released |
|
4580 |
*/ |
|
4581 |
#define BTraceFilteredN(aCategory,aSubCategory,aUid,a1,aData,aDataSize) \ |
|
4582 |
BTrace::OutFilteredN \ |
|
4583 |
(BTRACE_HEADER(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),aData,aDataSize) |
|
4584 |
||
4585 |
/** |
|
4586 |
Output a trace record of the specified category. |
|
4587 |
||
4588 |
If the specified data is too big to find into a single trace record, then a |
|
4589 |
multipart trace is generated. See TMultiPart. |
|
4590 |
||
4591 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4592 |
||
4593 |
@param aCategory A value from enum BTrace::TCategory, |
|
4594 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4595 |
The meaning of this is dependent on the Category. |
|
4596 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4597 |
@param aData Address of addition data to add to trace. |
|
4598 |
Must be word aligned, i.e. a multiple of 4. |
|
4599 |
@param aDataSize Number of bytes of additional data. |
|
4600 |
||
4601 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4602 |
@publishedPartner |
|
4603 |
@released |
|
4604 |
*/ |
|
4605 |
#define BTraceFilteredBig(aCategory,aSubCategory,aUid,aData,aDataSize) \ |
|
4606 |
BTrace::OutFilteredBig \ |
|
4607 |
(BTRACE_HEADER(8,(aCategory),(aSubCategory)),(TUint32)(aUid),aData,(TInt)(aDataSize)) |
|
4608 |
||
4609 |
||
4610 |
||
4611 |
/** |
|
4612 |
Output a trace record of the specified category which also includes a Context ID. |
|
4613 |
||
4614 |
The trace record data is 4 bytes in size. |
|
4615 |
||
4616 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4617 |
||
4618 |
@param aCategory A value from enum BTrace::TCategory, |
|
4619 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4620 |
The meaning of this is dependent on the Category. |
|
4621 |
@param aUid The 32bit quantity which forms the data of this trace record. |
|
4622 |
||
4623 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4624 |
@publishedPartner |
|
4625 |
@released |
|
4626 |
*/ |
|
4627 |
#define BTraceFilteredContext4(aCategory,aSubCategory,aUid) \ |
|
4628 |
((BTrace::TBTrace2)BTrace::OutFilteredX) \ |
|
4629 |
(BTRACE_HEADER_C(8,(aCategory),(aSubCategory)),(TUint32)(aUid)) |
|
4630 |
||
4631 |
/** |
|
4632 |
Output a trace record of the specified category which also includes a Context ID. |
|
4633 |
||
4634 |
The trace record data is 8 bytes in size. |
|
4635 |
||
4636 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4637 |
||
4638 |
@param aCategory A value from enum BTrace::TCategory, |
|
4639 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4640 |
The meaning of this is dependent on the Category. |
|
4641 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4642 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4643 |
||
4644 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4645 |
@publishedPartner |
|
4646 |
@released |
|
4647 |
*/ |
|
4648 |
#define BTraceFilteredContext8(aCategory,aSubCategory,aUid,a1) \ |
|
4649 |
((BTrace::TBTrace3)BTrace::OutFilteredX) \ |
|
4650 |
(BTRACE_HEADER_C(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1)) |
|
4651 |
||
4652 |
/** |
|
4653 |
Output a trace record of the specified category which also includes a Context ID. |
|
4654 |
||
4655 |
The trace record data is 12 bytes in size. |
|
4656 |
||
4657 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4658 |
||
4659 |
@param aCategory A value from enum BTrace::TCategory, |
|
4660 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4661 |
The meaning of this is dependent on the Category. |
|
4662 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4663 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4664 |
@param a2 The third 32bit quantity which forms the data of this trace record. |
|
4665 |
||
4666 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4667 |
@publishedPartner |
|
4668 |
@released |
|
4669 |
*/ |
|
4670 |
#define BTraceFilteredContext12(aCategory,aSubCategory,aUid,a1,a2) \ |
|
4671 |
BTrace::OutFilteredX \ |
|
4672 |
(BTRACE_HEADER_C(16,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),(TUint32)(a2)) |
|
4673 |
||
4674 |
/** |
|
4675 |
Output a trace record of the specified category which also includes a Context ID. |
|
4676 |
||
4677 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4678 |
||
4679 |
@param aCategory A value from enum BTrace::TCategory, |
|
4680 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4681 |
The meaning of this is dependent on the Category. |
|
4682 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4683 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4684 |
@param aData Address of addition data to add to trace. |
|
4685 |
Must be word aligned, i.e. a multiple of 4. |
|
4686 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4687 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4688 |
flag ERecordTruncated is set in the record. |
|
4689 |
||
4690 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4691 |
@publishedPartner |
|
4692 |
@released |
|
4693 |
*/ |
|
4694 |
#define BTraceFilteredContextN(aCategory,aSubCategory,aUid,a1,aData,aDataSize) \ |
|
4695 |
BTrace::OutFilteredNX \ |
|
4696 |
(BTRACE_HEADER_C(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),aData,aDataSize) |
|
4697 |
||
4698 |
/** |
|
4699 |
Output a trace record of the specified category which also includes a Context ID. |
|
4700 |
||
4701 |
If the specified data is too big to find into a single trace record, then a |
|
4702 |
multipart trace is generated. See TMultiPart. |
|
4703 |
||
4704 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4705 |
||
4706 |
@param aCategory A value from enum BTrace::TCategory, |
|
4707 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4708 |
The meaning of this is dependent on the Category. |
|
4709 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4710 |
@param aData Address of addition data to add to trace. |
|
4711 |
Must be word aligned, i.e. a multiple of 4. |
|
4712 |
@param aDataSize Number of bytes of additional data. |
|
4713 |
||
4714 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4715 |
@publishedPartner |
|
4716 |
@released |
|
4717 |
*/ |
|
4718 |
#define BTraceFilteredContextBig(aCategory,aSubCategory,aUid,aData,aDataSize) \ |
|
4719 |
BTrace::OutFilteredBig \ |
|
4720 |
(BTRACE_HEADER_C(8,(aCategory),(aSubCategory)),(TUint32)(aUid),aData,(TInt)(aDataSize)) |
|
4721 |
||
4722 |
||
4723 |
||
4724 |
/** |
|
4725 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4726 |
||
4727 |
The trace record data is 4 bytes in size. |
|
4728 |
||
4729 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4730 |
||
4731 |
@param aCategory A value from enum BTrace::TCategory, |
|
4732 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4733 |
The meaning of this is dependent on the Category. |
|
4734 |
@param aUid The 32bit quantity which forms the data of this trace record. |
|
4735 |
||
4736 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4737 |
@publishedPartner |
|
4738 |
@released |
|
4739 |
*/ |
|
4740 |
#define BTraceFilteredPc4(aCategory,aSubCategory,aUid) \ |
|
4741 |
((BTrace::TBTrace2)BTrace::OutFiltered) \ |
|
4742 |
(BTRACE_HEADER_P(8,(aCategory),(aSubCategory)),(TUint32)(aUid)) |
|
4743 |
||
4744 |
/** |
|
4745 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4746 |
||
4747 |
The trace record data is 8 bytes in size. |
|
4748 |
||
4749 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4750 |
||
4751 |
@param aCategory A value from enum BTrace::TCategory, |
|
4752 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4753 |
The meaning of this is dependent on the Category. |
|
4754 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4755 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4756 |
||
4757 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4758 |
@publishedPartner |
|
4759 |
@released |
|
4760 |
*/ |
|
4761 |
#define BTraceFilteredPc8(aCategory,aSubCategory,aUid,a1) \ |
|
4762 |
((BTrace::TBTrace3)BTrace::OutFiltered) \ |
|
4763 |
(BTRACE_HEADER_P(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1)) |
|
4764 |
||
4765 |
/** |
|
4766 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4767 |
||
4768 |
The trace record data is 12 bytes in size. |
|
4769 |
||
4770 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4771 |
||
4772 |
@param aCategory A value from enum BTrace::TCategory, |
|
4773 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4774 |
The meaning of this is dependent on the Category. |
|
4775 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4776 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4777 |
@param a2 The third 32bit quantity which forms the data of this trace record. |
|
4778 |
||
4779 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4780 |
@publishedPartner |
|
4781 |
@released |
|
4782 |
*/ |
|
4783 |
#define BTraceFilteredPc12(aCategory,aSubCategory,aUid,a1,a2) \ |
|
4784 |
BTrace::OutFiltered \ |
|
4785 |
(BTRACE_HEADER_P(16,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),(TUint32)(a2)) |
|
4786 |
||
4787 |
/** |
|
4788 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4789 |
||
4790 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4791 |
||
4792 |
@param aCategory A value from enum BTrace::TCategory, |
|
4793 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4794 |
The meaning of this is dependent on the Category. |
|
4795 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4796 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4797 |
@param aData Address of addition data to add to trace. |
|
4798 |
Must be word aligned, i.e. a multiple of 4. |
|
4799 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4800 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4801 |
flag ERecordTruncated is set in the record. |
|
4802 |
||
4803 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4804 |
@publishedPartner |
|
4805 |
@released |
|
4806 |
*/ |
|
4807 |
#define BTraceFilteredPcN(aCategory,aSubCategory,aUid,a1,aData,aDataSize) \ |
|
4808 |
BTrace::OutFilteredN \ |
|
4809 |
(BTRACE_HEADER_P(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),aData,aDataSize) |
|
4810 |
||
4811 |
/** |
|
4812 |
Output a trace record of the specified category which also includes a Program Counter value. |
|
4813 |
||
4814 |
If the specified data is too big to find into a single trace record, then a |
|
4815 |
multipart trace is generated. See TMultiPart. |
|
4816 |
||
4817 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4818 |
||
4819 |
@param aCategory A value from enum BTrace::TCategory, |
|
4820 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4821 |
The meaning of this is dependent on the Category. |
|
4822 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4823 |
@param aData Address of addition data to add to trace. |
|
4824 |
Must be word aligned, i.e. a multiple of 4. |
|
4825 |
@param aDataSize Number of bytes of additional data. |
|
4826 |
||
4827 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4828 |
@publishedPartner |
|
4829 |
@released |
|
4830 |
*/ |
|
4831 |
#define BTraceFilteredPcBig(aCategory,aSubCategory,aUid,aData,aDataSize) \ |
|
4832 |
BTrace::OutFilteredBig \ |
|
4833 |
(BTRACE_HEADER_P(8,(aCategory),(aSubCategory)),(TUint32)(aUid),aData,(TInt)(aDataSize)) |
|
4834 |
||
4835 |
||
4836 |
||
4837 |
||
4838 |
/** |
|
4839 |
Output a trace record of the specified category which also includes |
|
4840 |
Context ID and Program Counter values. |
|
4841 |
||
4842 |
The trace record data is 4 bytes in size. |
|
4843 |
||
4844 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4845 |
||
4846 |
@param aCategory A value from enum BTrace::TCategory, |
|
4847 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4848 |
The meaning of this is dependent on the Category. |
|
4849 |
@param aUid The 32bit quantity which forms the data of this trace record. |
|
4850 |
||
4851 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4852 |
@publishedPartner |
|
4853 |
@released |
|
4854 |
*/ |
|
4855 |
#define BTraceFilteredContextPc4(aCategory,aSubCategory,aUid) \ |
|
4856 |
((BTrace::TBTrace2)BTrace::OutFilteredX) \ |
|
4857 |
(BTRACE_HEADER_CP(8,(aCategory),(aSubCategory)),(TUint32)(aUid)) |
|
4858 |
||
4859 |
/** |
|
4860 |
Output a trace record of the specified category which also includes |
|
4861 |
Context ID and Program Counter values. |
|
4862 |
||
4863 |
The trace record data is 8 bytes in size. |
|
4864 |
||
4865 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4866 |
||
4867 |
@param aCategory A value from enum BTrace::TCategory, |
|
4868 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4869 |
The meaning of this is dependent on the Category. |
|
4870 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4871 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4872 |
||
4873 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4874 |
@publishedPartner |
|
4875 |
@released |
|
4876 |
*/ |
|
4877 |
#define BTraceFilteredContextPc8(aCategory,aSubCategory,aUid,a1) \ |
|
4878 |
((BTrace::TBTrace3)BTrace::OutFilteredX) \ |
|
4879 |
(BTRACE_HEADER_CP(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1)) |
|
4880 |
||
4881 |
/** |
|
4882 |
Output a trace record of the specified category which also includes |
|
4883 |
Context ID and Program Counter values. |
|
4884 |
||
4885 |
The trace record data is 12 bytes in size. |
|
4886 |
||
4887 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4888 |
||
4889 |
@param aCategory A value from enum BTrace::TCategory, |
|
4890 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4891 |
The meaning of this is dependent on the Category. |
|
4892 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4893 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4894 |
@param a2 The third 32bit quantity which forms the data of this trace record. |
|
4895 |
||
4896 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4897 |
@publishedPartner |
|
4898 |
@released |
|
4899 |
*/ |
|
4900 |
#define BTraceFilteredContextPc12(aCategory,aSubCategory,aUid,a1,a2) \ |
|
4901 |
BTrace::OutFilteredX \ |
|
4902 |
(BTRACE_HEADER_CP(16,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),(TUint32)(a2)) |
|
4903 |
||
4904 |
/** |
|
4905 |
Output a trace record of the specified category which also includes |
|
4906 |
Context ID and Program Counter values. |
|
4907 |
||
4908 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4909 |
||
4910 |
@param aCategory A value from enum BTrace::TCategory, |
|
4911 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4912 |
The meaning of this is dependent on the Category. |
|
4913 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4914 |
@param a1 The second 32bit quantity which forms the data of this trace record. |
|
4915 |
@param aData Address of addition data to add to trace. |
|
4916 |
Must be word aligned, i.e. a multiple of 4. |
|
4917 |
@param aDataSize Number of bytes of additional data. If this value is greater than |
|
4918 |
KMaxBTraceDataArray then data is truncated to this size and the |
|
4919 |
flag ERecordTruncated is set in the record. |
|
4920 |
||
4921 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4922 |
@publishedPartner |
|
4923 |
@released |
|
4924 |
*/ |
|
4925 |
#define BTraceFilteredContextPcN(aCategory,aSubCategory,aUid,a1,aData,aDataSize) \ |
|
4926 |
BTrace::OutFilteredNX \ |
|
4927 |
(BTRACE_HEADER_CP(12,(aCategory),(aSubCategory)),(TUint32)(aUid),(TUint32)(a1),aData,aDataSize) |
|
4928 |
||
4929 |
/** |
|
4930 |
Output a trace record of the specified category which also includes |
|
4931 |
Context ID and Program Counter values. |
|
4932 |
||
4933 |
If the specified data is too big to find into a single trace record, then a |
|
4934 |
multipart trace is generated. See TMultiPart. |
|
4935 |
||
4936 |
If the value of \a aUid is not contained in the secondary filter then the trace is discarded. |
|
4937 |
||
4938 |
@param aCategory A value from enum BTrace::TCategory, |
|
4939 |
@param aSubCategory Sub-category value between 0 and 255. |
|
4940 |
The meaning of this is dependent on the Category. |
|
4941 |
@param aUid The first 32bit quantity which forms the data of this trace record. |
|
4942 |
@param aData Address of addition data to add to trace. |
|
4943 |
Must be word aligned, i.e. a multiple of 4. |
|
4944 |
@param aDataSize Number of bytes of additional data. |
|
4945 |
||
4946 |
@return True if trace is enabled for aCategory and aUid, false otherwise. |
|
4947 |
@publishedPartner |
|
4948 |
@released |
|
4949 |
*/ |
|
4950 |
#define BTraceFilteredContextPcBig(aCategory,aSubCategory,aUid,aData,aDataSize) \ |
|
4951 |
BTrace::OutFilteredBig \ |
|
4952 |
(BTRACE_HEADER_CP(8,(aCategory),(aSubCategory)),(TUint32)(aUid),aData,(TInt)(aDataSize)) |
|
4953 |
||
4954 |
||
4955 |
||
4956 |
// |
|
4957 |
// Inline methods |
|
4958 |
// |
|
4959 |
||
4960 |
inline TUint8* BTrace::NextRecord(TAny* aCurrentRecord) |
|
4961 |
{ |
|
4962 |
TUint size = ((TUint8*)aCurrentRecord)[ESizeIndex]; |
|
4963 |
*(TUint*)&aCurrentRecord += 3; |
|
4964 |
*(TUint*)&aCurrentRecord += size; |
|
4965 |
*(TUint*)&aCurrentRecord &= ~3; |
|
4966 |
return (TUint8*)aCurrentRecord; |
|
4967 |
} |
|
4968 |
||
4969 |
#ifdef __KERNEL_MODE__ |
|
4970 |
||
4971 |
inline TInt BTrace::Filter(TUint aCategory) |
|
4972 |
{ |
|
4973 |
return SetFilter(aCategory,-1); |
|
4974 |
} |
|
4975 |
||
4976 |
#endif |
|
4977 |
||
4978 |
/** |
|
4979 |
The maximum permissible value for aDataSize in trace outputs. |
|
4980 |
@see BTraceN BTracePcN BTraceContextN BTraceContextPcN |
|
4981 |
@publishedPartner |
|
4982 |
@released |
|
4983 |
*/ |
|
4984 |
const TUint KMaxBTraceDataArray = 80; |
|
4985 |
||
4986 |
||
4987 |
||
4988 |
/** |
|
4989 |
The maximum total number of bytes in a trace record. |
|
4990 |
@publishedPartner |
|
4991 |
@released |
|
4992 |
*/ |
|
4993 |
const TInt KMaxBTraceRecordSize = 7*4+8+KMaxBTraceDataArray; |
|
4994 |
||
4995 |
||
4996 |
#ifdef __MARM__ |
|
4997 |
#define BTRACE_MACHINE_CODED |
|
4998 |
#endif |
|
4999 |
||
5000 |
#endif |