sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\e32btrace.h sl@0: // sl@0: // WARNING: This file contains some APIs which are internal and are subject sl@0: // to change without notice. Such APIs should therefore not be used sl@0: // outside the Kernel and Hardware Services package. sl@0: // sl@0: sl@0: #ifndef E32BTRACE_H sl@0: #define E32BTRACE_H sl@0: sl@0: #ifdef __KERNEL_MODE__ sl@0: class TSpinLock; sl@0: #endif sl@0: sl@0: /** sl@0: Class for handling fast tracing. sl@0: sl@0: A trace record consists of three parts: a header, header extensions, sl@0: and the trace data itself. sl@0: sl@0: The header consists of four bytes containing: sl@0: sl@0: -# Size of the record in bytes. (Maximum value is KMaxBTraceRecordSize.) sl@0: -# Flags. See enum TFlags. sl@0: -# Category. Category value from enum BTrace::TCategory. sl@0: -# Sub-category. The meaning of this is dependent on the value of Category. sl@0: sl@0: When trace records are stored in memory they are stored word (32 bit) aligned. sl@0: Therefore the size must be rounded up to a multiple of four when calculating sl@0: the address of the next record. E.g. sl@0: @code sl@0: TUint8* record; // pointer to trace record sl@0: TInt size = record[BTrace::ESizeIndex]; sl@0: record += (size+3)&~3; // move record pointer on to next record. sl@0: @endcode sl@0: The NextRecord() method is provided to do this operation. sl@0: sl@0: Following the header are optionally a number of 32 bit 'header extension' values. sl@0: These are present in the order shown below but only exist if the appropriate flag bit sl@0: is set in the Header. sl@0: sl@0: -# Header2. Contains flag values from enum Flags2. sl@0: This value is only present if the EHeader2Present flag is set. sl@0: -# Timestamp. A timestamp value indicating when the trace was generated. sl@0: The format and resolution of this value are platform-dependent, but sl@0: typically will contain the same values as would be returned by sl@0: User::FastCounter() or NKern::FastCounter(). sl@0: This value is only present if the ETimestampPresent flag is set. sl@0: -# Timestamp2. Additional timestamp information. E.g. the most significant sl@0: half of a 64bit timestamp value. Note, it is valid for a Timestamp2 value sl@0: to be present even if the previous Timestamp is absent. sl@0: This value is only present if the ETimestamp2Present flag is set. sl@0: -# Context ID. This value indicates the context in which the trace was generated. sl@0: The meaning of the id is dependent on the contents of the two sl@0: least significant bits: sl@0: - 00 indicates the value is the address of the NThread object for sl@0: the currently executing thread. sl@0: - 01 indicates Fast Interrupt (FIQ) context. sl@0: Other bits of the value are currently reserved for future use. sl@0: - 10 indicates Interrupt (IRQ) context. Other bits of the value sl@0: are currently reserved for future use. sl@0: - 11 indicates Immediate Delayed Function Call (IDFC) context. sl@0: Other bits of the value are currently reserved for future use. sl@0: . sl@0: This value is only present if the EContextIdPresent flag is set. sl@0: -# Program Counter. This is the memory address of the instruction after the location sl@0: the trace was output. sl@0: This value is only present if the EPcPresent flag is set. sl@0: -# Extra. An extra value used for different purposes depending on the trace type. sl@0: This value is only present if the EExtraPresent flag is set. sl@0: sl@0: Following the header extensions are 0 or more bytes of trace data specified when the trace sl@0: was output. sl@0: sl@0: To output a trace, the following macros can be used: sl@0: - BTrace0 sl@0: - BTrace4 sl@0: - BTrace8 sl@0: - BTrace12 sl@0: - BTraceN sl@0: - BTraceBig sl@0: - BTracePc0 sl@0: - BTracePc4 sl@0: - BTracePc8 sl@0: - BTracePc12 sl@0: - BTracePcN sl@0: - BTracePcBig sl@0: - BTraceContext0 sl@0: - BTraceContext4 sl@0: - BTraceContext8 sl@0: - BTraceContext12 sl@0: - BTraceContextN sl@0: - BTraceContextBig sl@0: - BTraceContextPc0 sl@0: - BTraceContextPc4 sl@0: - BTraceContextPc8 sl@0: - BTraceContextPc12 sl@0: - BTraceContextPcN sl@0: - BTraceContextPcBig sl@0: sl@0: Whenever a trace is output, the trace handler is called with the arguments specified. sl@0: See typedef THandler and SetHandler(). sl@0: sl@0: Each tracing category has a filter bit, which if set to zero means that traces in that category sl@0: are discarded, see SetFilter(). This filtering is performed before the trace handler is sl@0: called. This filter may also be initialised from boot time by using the 'btrace' keyword in sl@0: an OBY file used to build a ROM image. sl@0: sl@0: Traces may also be additionally sent through a second level of filtering. This examines the sl@0: first 32 bits of data in the trace and if this value isn't present in the list maintained sl@0: in the secondary filter, the trace is discarded. The contents of the secondary filter are sl@0: set using the SetFilter2 methods. sl@0: sl@0: Values used for secondary filtering must be Symbian Unique Identifiers (UIDs) allocated sl@0: using the normal UID allocation process. Note, the following non-valid UID value ranges sl@0: are reserved. sl@0: - 0x00000000..0x007fffff Reserved for platform specific use. sl@0: - 0x00800000..0x00ffffff Reserved for use by Symbian. sl@0: sl@0: To generate traces which are to be processed by the secondary filter, the following sl@0: macros can be used: sl@0: sl@0: - BTraceFiltered4 sl@0: - BTraceFiltered8 sl@0: - BTraceFiltered12 sl@0: - BTraceFilteredN sl@0: - BTraceFilteredBig sl@0: - BTraceFilteredPc4 sl@0: - BTraceFilteredPc8 sl@0: - BTraceFilteredPc12 sl@0: - BTraceFilteredPcN sl@0: - BTraceFilteredPcBig sl@0: - BTraceFilteredContext4 sl@0: - BTraceFilteredContext8 sl@0: - BTraceFilteredContext12 sl@0: - BTraceFilteredContextN sl@0: - BTraceFilteredContextBig sl@0: - BTraceFilteredContextPc4 sl@0: - BTraceFilteredContextPc8 sl@0: - BTraceFilteredContextPc12 sl@0: - BTraceFilteredContextPcN sl@0: - BTraceFilteredContextPcBig sl@0: sl@0: Traces generated using the above methods will be filtered twice; once using the primary sl@0: filter which checks the trace's category, and once using the secondary filter which checks sl@0: the 32 bit UID value at the start of the trace data. Therefore the trace must pass both filter sl@0: checks for it to be sent to the trace handler for output. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class BTrace sl@0: { sl@0: public: sl@0: /** sl@0: Byte indices into the trace header for specific fields. sl@0: */ sl@0: enum THeaderStructure sl@0: { sl@0: /** sl@0: Size of record in bytes. sl@0: */ sl@0: ESizeIndex = 0, sl@0: sl@0: /** sl@0: Bitfield of flags from enum TFlags. E.g. to detect if a timestamp is present in sl@0: the record, code like this could be used. sl@0: @code sl@0: TUint8* record; // pointer to trace record sl@0: if(record[BTrace::EFlagsIndex]&BTrace::ETimestampPresent) sl@0: TimestampPresent(); sl@0: else sl@0: TimestampNotPresent(); sl@0: @endcode sl@0: */ sl@0: EFlagsIndex = 1, sl@0: sl@0: /** sl@0: Category value from enum BTrace::TCategory. sl@0: */ sl@0: ECategoryIndex = 2, sl@0: sl@0: /** sl@0: Sub-category value. The meaning of this is dependent on the Category. sl@0: */ sl@0: ESubCategoryIndex = 3, sl@0: }; sl@0: sl@0: /** sl@0: Bit flags which indicate state of a trace record. sl@0: */ sl@0: enum TFlags sl@0: { sl@0: /** sl@0: Header2 is present in the trace record. sl@0: */ sl@0: EHeader2Present = 1<<0, sl@0: sl@0: /** sl@0: A timestamp value is present in the trace record. sl@0: */ sl@0: ETimestampPresent = 1<<1, sl@0: sl@0: /** sl@0: A second timestamp value is present in the trace record. sl@0: */ sl@0: ETimestamp2Present = 1<<2, sl@0: sl@0: /** sl@0: A context ID is present in the trace record. sl@0: */ sl@0: EContextIdPresent = 1<<3, sl@0: sl@0: /** sl@0: A CPU program counter (PC) value is present in the trace record. sl@0: */ sl@0: EPcPresent = 1<<4, sl@0: sl@0: /** sl@0: An 'extra' value is present in the trace record. sl@0: */ sl@0: EExtraPresent = 1<<5, sl@0: sl@0: /** sl@0: Indicates that the data in this trace record was truncated to keep the size sl@0: within the maximum permissible. sl@0: */ sl@0: ERecordTruncated = 1<<6, sl@0: sl@0: /** sl@0: Indicates that trace record(s) before this one are missing. sl@0: This can happen if the trace buffer was full when a trace output was attempted. sl@0: */ sl@0: EMissingRecord = 1<<7 sl@0: }; sl@0: sl@0: /** sl@0: Bit flags present in the Flags2 value of the header extension. sl@0: */ sl@0: enum TFlags2 sl@0: { sl@0: /** sl@0: Masks out the bits for the multipart trace type. (See enum TMultiPart.) sl@0: */ sl@0: EMultipartFlagMask = 3<<0, sl@0: sl@0: /** sl@0: Masks out the bits for the CPU ID for SMP systems (zero if present on non SMP systems) sl@0: */ sl@0: ECpuIdMask = 0xfff<<20, sl@0: }; sl@0: sl@0: /** sl@0: Values for multipart trace indicator. These values are stored in Flags2 an sl@0: are obtained by ANDing with the value EMultipartFlagMask. sl@0: sl@0: If a 'Big' trace is generated which doesn't fit into a single trace record sl@0: then its data is split into several separate trace records; a multipart trace. sl@0: sl@0: In multipart traces the 'extra' trace value is present in the header extension. sl@0: (EExtraPresent is set.) This extra value contains a unique trace identifier sl@0: which is the same is all parts of the trace. sl@0: sl@0: The structure of the data part of each trace record in a multipart trace is described sl@0: below. In this description, the following labels are used. sl@0: - A is the initial 4 bytes of data; the a1 argument of BTraceBig. sl@0: - D is the array of bytes of additional data; the aData argument of BTraceBig. sl@0: - N is the size of D; the aDataSize argument of BTraceBig sl@0: - X is the maximum number of additional bytes which will fit into a trace record. sl@0: This is usually KMaxBTraceDataArray but this should not be assumed, instead sl@0: the size and other information present in each trace record should be examined. sl@0: sl@0: For the first part of a multipart trace, the data in a trace record has the following sl@0: structure: sl@0: sl@0: - 4 bytes containing N. sl@0: - 4 bytes containing A. sl@0: - X bytes containing D[0..X-1] sl@0: sl@0: If the parts are numbered 0 through to 'j', then a middle part of a multipart trace sl@0: is numbered 'i' where 0\header.iby) sl@0: or at runtime by running the following at the Eshell command prompt: sl@0: sl@0: trace 0 0 1 sl@0: sl@0: Note that changing this flag at runtime only affects processes created after the flag sl@0: is set or unset. It will not affect running processes. sl@0: sl@0: @see enum THeap sl@0: @prototype 9.4 sl@0: */ sl@0: EHeap = 14, sl@0: sl@0: /** sl@0: Meta trace. Trace that is only useful to programs which use or display BTrace-based data. sl@0: @see enum TMetaTrace sl@0: @prototype 9.4 sl@0: */ sl@0: EMetaTrace = 15, sl@0: sl@0: /** sl@0: Trace generated by the ram allocator to allow the physical layout of RAM sl@0: to be tracked. sl@0: @internalTechnology sl@0: */ sl@0: ERamAllocator = 16, sl@0: sl@0: /** sl@0: Trace generated by the Fast Mutex in the Nkern. sl@0: */ sl@0: EFastMutex = 17, sl@0: sl@0: sl@0: /** sl@0: Trace generated by any sampling profiler. sl@0: @see enum TProfiling sl@0: */ sl@0: EProfiling = 18, sl@0: sl@0: /** sl@0: Trace generated by Power Resource Manager. sl@0: @prototype 9.5 sl@0: */ sl@0: EResourceManager = 19, sl@0: sl@0: sl@0: /** sl@0: Trace generated by Power Resource Manager User-Side API. sl@0: @prototype 9.5 sl@0: */ sl@0: EResourceManagerUs = 20, sl@0: sl@0: /** sl@0: Trace generated by Raw Event subsystem APIs sl@0: @see enum TRawEventTrace sl@0: @prototype 9.5 sl@0: */ sl@0: ERawEvent =21, sl@0: sl@0: /** sl@0: Trace generated by USB communications (Client, Host and OTG) where use sl@0: of standard logging (conditional Kern::Printf() calls) is sufficiently sl@0: time-consuming that the required device timings mandated by the core sl@0: USB standards cannot be achieved sl@0: @prototype 9.5 sl@0: */ sl@0: EUsb = 22, sl@0: sl@0: /** sl@0: Trace generated by Symbian OS kernel synchronization objects. sl@0: @prototype 9.5 sl@0: */ sl@0: ESymbianKernelSync = 23, sl@0: sl@0: /** sl@0: Trace generated by the flexible memory model. sl@0: */ sl@0: EFlexibleMemModel = 24, sl@0: sl@0: /** sl@0: Trace generated by IIC bus. sl@0: @prototype 9.6 sl@0: */ sl@0: EIic = 25, sl@0: sl@0: /** sl@0: First category value in the range reserved for platform specific use; sl@0: the end of this range is #EPlatformSpecificLast. sl@0: Symbian's code will not generate any traces with categories in this range. sl@0: sl@0: It is strongly recommended that platforms reserve the first half of this range sl@0: (128..143) for definition and use by base-port (kernel-side) code. Any general sl@0: trace framework built on top of BTrace APIs should use the second half of the range. sl@0: This allows fast (primary filtered only) BTrace categories to be used in device drivers sl@0: and other base-port code, without clashing with more general trace frameworks implemented sl@0: for application layer code. sl@0: */ sl@0: EPlatformSpecificFirst = 128, sl@0: sl@0: /** sl@0: Last category value in the range reserved for platform specific use. sl@0: @see EPlatformSpecificFirst sl@0: */ sl@0: EPlatformSpecificLast = 191, sl@0: sl@0: /** sl@0: First category value in the range reserved for Symbian tools and future trace framework sl@0: implementations; the end of this range is #ESymbianExtentionsLast. sl@0: */ sl@0: ESymbianExtentionsFirst = 192, sl@0: sl@0: /** sl@0: Last category value in the range reserved for Symbian tools and future trace framework sl@0: implementations. sl@0: @see ESymbianExtentionsFirst sl@0: */ sl@0: ESymbianExtentionsLast = 253, sl@0: sl@0: /** sl@0: Used for testing purposes. sl@0: sl@0: This may be used for ad-hoc testing purposes, e.g. special builds of components sl@0: with tracing enabled for diagnostic purposes. sl@0: sl@0: This category is also used by the E32 BTrace unit tests. sl@0: @test sl@0: */ sl@0: ETest1 = 254, sl@0: sl@0: /** sl@0: Used for testing purposes. sl@0: sl@0: This may be used for ad-hoc testing purposes, e.g. special builds of components sl@0: with tracing enabled for diagnostic purposes. sl@0: sl@0: This category is also used by the E32 BTrace unit tests. sl@0: @test sl@0: */ sl@0: ETest2 = 255 sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EThreadIdentification. sl@0: @see EThreadIdentification sl@0: */ sl@0: enum TThreadIdentification sl@0: { sl@0: /** sl@0: A nano-kernel thread (NThread) has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: */ sl@0: ENanoThreadCreate, sl@0: sl@0: /** sl@0: A nano-kernel thread (NThread) has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: */ sl@0: ENanoThreadDestroy, sl@0: sl@0: /** sl@0: A thread (DThread) has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: - 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. sl@0: - Remaining data is the ASCII name of the thread. sl@0: */ sl@0: EThreadCreate, sl@0: sl@0: /** sl@0: A thread (DThread) has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: - 4 bytes containing trace id for the process to which this thread belongs. sl@0: - 4 bytes containing thread ID, as returned by RThread::Id(). sl@0: */ sl@0: EThreadDestroy, sl@0: sl@0: /** sl@0: A thread (DThread) has been renamed. sl@0: This trace may also be output by the tracing system at initialisation sl@0: in order to identify threads already in existence. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: - 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. sl@0: - Remaining data is the ASCII name of the thread. sl@0: */ sl@0: EThreadName, sl@0: sl@0: /** sl@0: A process has been renamed. sl@0: This trace may also be output together with EThreadCreate or EThreadName traces sl@0: to help identify the name of the process to which the thread belongs. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing zero, or if this trace is generated together with EThreadName sl@0: or EThreadCreate, this contains the context id (an NThread*) for the thread. sl@0: - 4 bytes containing trace id (a DProcess*) for process. sl@0: - Remaining data is the ASCII name of the process. sl@0: */ sl@0: EProcessName, sl@0: sl@0: /** sl@0: Informational trace giving a threads ID, as returned by RThread::Id(). sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for this thread. sl@0: - 4 bytes containing trace id (a DProcess*) for the process to which this thread belongs. sl@0: - 4 bytes containing thread ID, as returned by RThread::Id(). sl@0: */ sl@0: EThreadId, sl@0: sl@0: /** sl@0: A process has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DProcess*) for the process. sl@0: */ sl@0: EProcessCreate, sl@0: sl@0: /** sl@0: A process has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DProcess*) for the process. sl@0: */ sl@0: EProcessDestroy sl@0: sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category ECpuUsage. sl@0: @see ECpuUsage sl@0: */ sl@0: enum TCpuUsage sl@0: { sl@0: /** sl@0: Trace output at start of Interrupt (IRQ) dispatch. sl@0: sl@0: On platforms which support nested interrupts, traces for these will also sl@0: be nested. sl@0: */ sl@0: EIrqStart, sl@0: sl@0: /** sl@0: Trace output at end of Interrupt (IRQ) dispatch. sl@0: sl@0: Note, this trace isn't generated if an Interrupt Service Routine queues sl@0: a DFC or causes a thread to be scheduled. In these cases, the traces for sl@0: these events (EIDFCStart or ENewThreadContext) should be taken to indicate sl@0: that interrupt servicing has ended. sl@0: */ sl@0: EIrqEnd, sl@0: sl@0: /** sl@0: Trace output at start of Fast Interrupt (FIQ) dispatch. sl@0: sl@0: On platforms which support nested interrupts, traces for these will also sl@0: be nested. sl@0: */ sl@0: EFiqStart, sl@0: sl@0: /** sl@0: Trace output at end of Fast Interrupt (FIQ) dispatch. sl@0: sl@0: Note, this trace isn't generated if an Interrupt Service Routine queues sl@0: a DFC or causes a thread to be scheduled. In these cases, the traces for sl@0: these events (EIDFCStart or ENewThreadContext) should be taken to indicate sl@0: that interrupt servicing has ended. sl@0: */ sl@0: EFiqEnd, sl@0: sl@0: /** sl@0: Trace output at start of Immediate Delayed Function Call (IDFC) processing. sl@0: This processing also includes moving DFCs to their final queue, so the trace sl@0: does not necessarily indicate that any IDFCs have been executed. sl@0: */ sl@0: EIDFCStart, sl@0: sl@0: /** sl@0: Trace output at end of Immediate Delayed Function Call (IDFC) processing. sl@0: */ sl@0: EIDFCEnd, sl@0: sl@0: /** sl@0: Trace output when a thread is scheduled to run. sl@0: The context id (NThread*) in this trace is that of the thread being scheduled. sl@0: */ sl@0: ENewThreadContext sl@0: }; sl@0: sl@0: /** sl@0: @internalTechnology sl@0: @prototype 9.3 sl@0: */ sl@0: enum TClientServer sl@0: { sl@0: /** sl@0: Trace generated whenever a server is created and during prime. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the server id (a DServer*). sl@0: - 4 bytes containing the owning thread pointer (a DThread*). sl@0: - Remaining data is the ASCII name of the server. sl@0: sl@0: */ sl@0: EServerCreate, sl@0: sl@0: /** sl@0: Trace generated whenever a server is destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the server id (a DServer*). sl@0: sl@0: */ sl@0: EServerDestroy, sl@0: sl@0: /** sl@0: Trace generated whenever a new session is attached to a server and during prime. sl@0: I.e. a new session has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the session id (a DSession*). sl@0: - 4 bytes containing the server id (a DServer*). sl@0: - 4 bytes containing the owner id (a DObject*). sl@0: sl@0: The context id (NThread*) in this trace is that of the thread creating the session sl@0: (apart from during prime when it is NULL). sl@0: */ sl@0: ESessionAttach, sl@0: sl@0: /** sl@0: Trace generated whenever a server session is detached from a server. sl@0: I.e. a session has been closed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the session id (a DSession*). sl@0: - 4 bytes containing the reasons (error code) for the session being closed. sl@0: sl@0: */ sl@0: ESessionDetach, sl@0: sl@0: /** sl@0: Trace generated whenever a new message is sent to a server. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the message handle. sl@0: - 4 bytes containing the iFunction value for the message. sl@0: - 4 bytes containing the session id (a DSession*). sl@0: sl@0: The context id (NThread*) in this trace is that of the thread which sent the message. sl@0: */ sl@0: EMessageSend, sl@0: sl@0: /** sl@0: Trace generated when a server receives a new message. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the message handle. sl@0: */ sl@0: EMessageReceive, sl@0: sl@0: /** sl@0: Trace generated whenever a message is completed using RMessagePtr2::Complete. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the message handle. sl@0: - 4 bytes containing the completion reason, or object handle, value. sl@0: (The object handle value is that which is delivered to the sender of the sl@0: message, not that supplied by the server actually completing the request.) sl@0: sl@0: The context id (NThread*) in this trace is that of the thread which completed the message. sl@0: */ sl@0: EMessageComplete sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @internalTechnology sl@0: @prototype 9.3 sl@0: */ sl@0: enum TRequests sl@0: { sl@0: /** sl@0: Trace generated whenever a request status is completed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the thread id (NThread*) of the thread being signalled. sl@0: - 4 bytes containing the address of the TRequestStatus object. sl@0: - 4 bytes containing the completion reason. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread which completed the request. sl@0: */ sl@0: ERequestComplete sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EChunks. sl@0: @see EChunks sl@0: */ sl@0: enum TChunks sl@0: { sl@0: /** sl@0: Trace output when a chunk is created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the maximum size of the chunk. sl@0: - The ASCII name of the chunk. sl@0: */ sl@0: EChunkCreated, sl@0: sl@0: /** sl@0: @internalTechnology sl@0: sl@0: Trace output when a chunk is created containing extra chunk information. sl@0: sl@0: Note that the meaning of the data in this trace is different between sl@0: memory models, and may change without warning. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the chunk type. sl@0: - 4 bytes containing the chunk's attributes. sl@0: */ sl@0: EChunkInfo, sl@0: sl@0: /** sl@0: Trace output when a chunk is destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*) sl@0: */ sl@0: EChunkDestroyed, sl@0: sl@0: /** sl@0: Trace output when memory is allocated and committed to a chunk. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the offset into the chunk. sl@0: - 4 bytes containing the size of the memory committed. sl@0: */ sl@0: EChunkMemoryAllocated, sl@0: sl@0: /** sl@0: Trace output when memory is decommitted from a chunk and deallocated. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the offset into the chunk. sl@0: - 4 bytes containing the size of the memory decommitted. sl@0: */ sl@0: EChunkMemoryDeallocated, sl@0: sl@0: /** sl@0: Trace output when un-owned memory is committed to a chunk. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the offset into the chunk. sl@0: - 4 bytes containing the size of the memory committed. sl@0: */ sl@0: EChunkMemoryAdded, sl@0: sl@0: /** sl@0: Trace output when un-owned memory is decommitted to a chunk. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the offset into the chunk. sl@0: - 4 bytes containing the size of the memory decommitted. sl@0: */ sl@0: EChunkMemoryRemoved, sl@0: sl@0: /** sl@0: Trace to indicate the owning process of a chunk - only for local (private) chunks. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the process id of the owner (a DProcess*). sl@0: */ sl@0: EChunkOwner sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category ECodeSegs. sl@0: @see ECodeSegs sl@0: */ sl@0: enum TCodeSegs sl@0: { sl@0: /** sl@0: Trace output when a code segment is created to associate a code segment sl@0: id with a filename. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - The ASCII filename. sl@0: */ sl@0: ECodeSegCreated, sl@0: sl@0: /** sl@0: Trace output when a code segment is created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - 4 bytes containing the attributes. sl@0: - 4 bytes containing the code base address (.text). sl@0: - 4 bytes containing the size of the code section (.text). sl@0: - 4 bytes containing the base address of the constant data section (.rodata). sl@0: - 4 bytes containing the size of the constant data section (.rodata). sl@0: - 4 bytes containing the base address of the initialised data section (.data). sl@0: - 4 bytes containing the size of the initialised data section (.data). sl@0: - 4 bytes containing the base address of the uninitialised data section (.bss). sl@0: - 4 bytes containing the size of the uninitialised data section (.bss). sl@0: */ sl@0: ECodeSegInfo, sl@0: sl@0: /** sl@0: Trace output when a code segment is destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: */ sl@0: ECodeSegDestroyed, sl@0: sl@0: /** sl@0: Trace output when a code segment is mapped into a process. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - 4 bytes containing the process id (a DProcess*). sl@0: */ sl@0: ECodeSegMapped, sl@0: sl@0: /** sl@0: Trace output when a code segment is unmapped from a process. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - 4 bytes containing the process id (a DProcess*). sl@0: */ sl@0: ECodeSegUnmapped, sl@0: sl@0: /** sl@0: Trace output when memory is allocated to a code segment. sl@0: sl@0: Under the multiple memory model, code segments for RAM-loaded user code sl@0: own the RAM pages the code occupies. The pages are not owned by any sl@0: chunk, but are mapped into the code chunk of each process that uses the sl@0: code segment. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - 4 bytes containing the size of the memory allocated. sl@0: */ sl@0: ECodeSegMemoryAllocated, sl@0: sl@0: /** sl@0: Trace output when memory is deallocated from a code segment. sl@0: sl@0: Under the multiple memory model, code segments for RAM-loaded user code sl@0: own the RAM pages the code occupies. The pages are not owned by any sl@0: chunk, but are mapped into the code chunk of each process that uses the sl@0: code segment. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the code segment id (a DCodeSeg*). sl@0: - 4 bytes containing the size of the memory deallocated. sl@0: */ sl@0: ECodeSegMemoryDeallocated sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EPaging. sl@0: @see EPaging sl@0: */ sl@0: enum TPaging sl@0: { sl@0: /** sl@0: This event indicates the beginning of the 'page in' activity. sl@0: The end of this activity is indicated by one of the following events: sl@0: - EPagingPageInUnneeded sl@0: - EPagingPageInROM sl@0: - EPagingPageInCode sl@0: - EPagingPageIn (flexible memory model) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the virtual address which was accessed, causing this paging event. sl@0: - 4 bytes containing the virtual address of the instruction which caused this paging event. sl@0: (The PC value.) sl@0: sl@0: On the flexible memory model, the following addition trace data is also present: sl@0: - 1 byte containing the required access permissions, as defined by TMappingPermissions. sl@0: - 3 spare bytes, currently zero sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingPageInBegin, sl@0: sl@0: /** sl@0: Event which terminates the 'page in' activity when the required page was found to have been sl@0: paged in by another thread while the current thread was processing the fault (see sl@0: EPagingPageInBegin). sl@0: sl@0: Trace data format: sl@0: - 0 bytes. (No extra data.) sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingPageInUnneeded, sl@0: sl@0: /** sl@0: A ROM page has been paged in. sl@0: This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page 'paged in'. sl@0: - 4 bytes containing the virtual address of the page 'paged in'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageIn is used instead. sl@0: */ sl@0: EPagingPageInROM, sl@0: sl@0: /** sl@0: A ROM page has been 'paged out'. I.e. removed from the live list to be either sl@0: reused or returned to free pool. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged out'. sl@0: - 4 bytes containing the virtual address of the page being 'paged out'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. sl@0: */ sl@0: EPagingPageOutROM, sl@0: sl@0: /** sl@0: A Free page has been 'paged in'. I.e. added to the live list. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged in'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingPageInFree, sl@0: sl@0: /** sl@0: A Free page has been 'paged out'. I.e. removed from the live list to be either sl@0: reused or returned to free pool. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged out'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. sl@0: */ sl@0: EPagingPageOutFree, sl@0: sl@0: /** sl@0: A page has been made 'young' again because it was accessed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being rejuvenated, (made young). sl@0: - 4 bytes containing the virtual address which was accessed, causing this paging event. sl@0: - 4 bytes containing the virtual address of the instruction which caused this paging event. sl@0: (The PC value.) sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingRejuvenate, sl@0: sl@0: /** sl@0: A page fault was found to have already been previously serviced. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page accessed. sl@0: - 4 bytes containing the virtual address which was accessed, causing this paging event. sl@0: - 4 bytes containing the virtual address of the instruction which caused this paging event. sl@0: (The PC value.) sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model. sl@0: */ sl@0: EPagingPageNop, sl@0: sl@0: /** sl@0: A page has been locked. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being locked. sl@0: - 4 bytes containing the value of the lock count after the paged was locked. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingPageLock, sl@0: sl@0: /** sl@0: A page has been unlocked. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being unlocked. sl@0: - 4 bytes containing the value of the lock count before the paged was unlocked. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingPageUnlock, sl@0: sl@0: /** sl@0: A page containing RAM cache has been 'paged out'. I.e. removed from the live list to be sl@0: either reused or returned to free pool. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged out'. sl@0: - 4 bytes containing the virtual address of the page being 'paged out'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. sl@0: */ sl@0: EPagingPageOutCache, sl@0: sl@0: /** sl@0: A page containing RAM-loaded code has been paged in. sl@0: This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page 'paged in'. sl@0: - 4 bytes containing the virtual address of the page 'paged in'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageIn is used instead. sl@0: */ sl@0: EPagingPageInCode, sl@0: sl@0: /** sl@0: A page containing RAM-loaded code has been 'paged out'. I.e. removed from the live list to be sl@0: either reused or returned to free pool. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged out'. sl@0: - 4 bytes containing the virtual address of the page being 'paged out'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is not emitted on the flexible memory model - EPagingPageOut is used instead. sl@0: */ sl@0: EPagingPageOutCode, sl@0: sl@0: /** sl@0: A page of RAM-loaded code was found to already be 'paged in' but not mapped in sl@0: the faulting process. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page 'paged in'. sl@0: - 4 bytes containing the virtual address which was accessed, causing this paging event. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is only emitted on the multiple memory model. sl@0: */ sl@0: EPagingMapCode, sl@0: sl@0: /** sl@0: A page has been made 'old' because it was the last young page to be accessed. sl@0: sl@0: This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE sl@0: macro defined. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being aged, (made old). sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingAged, sl@0: sl@0: /** sl@0: Trace emitted at the start of decompression of demand paged data. sl@0: sl@0: This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE sl@0: macro defined. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing an integer which indicates the compression type being used: sl@0: 0, no compression; sl@0: 1, bytepair compression. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingDecompressStart, sl@0: sl@0: /** sl@0: Trace emitted at the end of decompression of demand paged data. sl@0: sl@0: This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE sl@0: macro defined. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingDecompressEnd, sl@0: sl@0: /** sl@0: Information about the kernel's memory model. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory model as defined by TMemModelAttributes. sl@0: */ sl@0: EPagingMemoryModel, sl@0: sl@0: /** sl@0: A page has been donated to the paging cache via RChunk::Unlock(). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the page index of the page within the chunk. sl@0: sl@0: This trace is not emitted on the flexible memory model. sl@0: @see EPagingDonatePage sl@0: */ sl@0: EPagingChunkDonatePage, sl@0: sl@0: /** sl@0: A page has been reclaimed from the paging cache via RChunk::Lock(). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the chunk id (a DChunk*). sl@0: - 4 bytes containing the page index of the page within the chunk. sl@0: sl@0: This trace is not emitted on the flexible memory model. sl@0: @see EPagingReclaimPage. sl@0: */ sl@0: EPagingChunkReclaimPage, sl@0: sl@0: // Traces specific to the flexible memory model sl@0: sl@0: /** sl@0: A page has been paged in. sl@0: This event indicates the end of the 'page in' activity. (See EPagingPageInBegin.) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page 'paged in'. sl@0: - 4 bytes containing the memory object id (DMemoryObject*). sl@0: - 4 bytes containing the page index of the page within the memory object. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: */ sl@0: EPagingPageIn, sl@0: sl@0: /** sl@0: A page has been 'paged out'. I.e. removed from the live list to be either sl@0: reused or returned to free pool. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being 'paged out'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: */ sl@0: EPagingPageOut, sl@0: sl@0: /** sl@0: Event which terminates the 'page in' activity when the required page was found to sl@0: already be paged in but not mapped in the faulting process (see EPagingPageInBegin). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page 'paged in'. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: */ sl@0: EPagingMapPage, sl@0: sl@0: /** sl@0: A page has been donated to the paging cache via RChunk::Unlock(). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page. sl@0: - 4 bytes containing the memory object id (DMemoryObject*). sl@0: - 4 bytes containing the page index of the page within the memory object. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: @see EPagingChunkDonatePage. sl@0: */ sl@0: EPagingDonatePage, sl@0: sl@0: /** sl@0: A page has been reclaimed from the paging cache via RChunk::Lock(). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: @see EPagingChunkReclaimPage. sl@0: */ sl@0: EPagingReclaimPage, sl@0: sl@0: /** sl@0: A page has been moved to the oldest clean list because it was the last old page and sl@0: it was clean. sl@0: sl@0: This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE sl@0: macro defined. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being moved to the oldest clean list. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingAgedClean, sl@0: sl@0: /** sl@0: A page has been moved to the oldest dirty list because it was the last old page and sl@0: it was dirty. sl@0: sl@0: This trace is only produced when the kernel is compiled with the #BTRACE_PAGING_VERBOSE sl@0: macro defined. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page being moved to the oldest dirty list. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: */ sl@0: EPagingAgedDirty, sl@0: sl@0: /** sl@0: A page has been allocated to hold the MMU page tables required to map demand paged memory. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the physical address of the page allocated. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread caused this paging event. sl@0: sl@0: This trace is only emitted on the flexible memory model. sl@0: */ sl@0: EPagingPageTableAlloc, sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EResourceManager. sl@0: @see EResourceManager sl@0: @prototype 9.5 sl@0: */ sl@0: enum TResourceManager sl@0: { sl@0: /** sl@0: Trace output for resource registration. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the Resource Id. sl@0: - 4 bytes containing the Resource address. sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource Minimum Level sl@0: - 4 bytes containing the Resource Maximum Level sl@0: - 4 bytes containing the Resource Default Level sl@0: */ sl@0: ERegisterResource = 0, sl@0: sl@0: /** sl@0: Trace output for client registration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing client address sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: */ sl@0: ERegisterClient, sl@0: sl@0: /** sl@0: Trace output for client deregistration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing client address sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: */ sl@0: EDeRegisterClient, sl@0: sl@0: /** sl@0: Trace output for resource state change start operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource state sl@0: */ sl@0: ESetResourceStateStart, sl@0: sl@0: /** sl@0: Trace output for resource state change end operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing return value. sl@0: - 4 bytes containing the Resource state. sl@0: */ sl@0: ESetResourceStateEnd, sl@0: sl@0: /** sl@0: Trace output for registration for post notification sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - 4 bytest containing the callback address sl@0: - 4 bytes containing return value. sl@0: */ sl@0: EPostNotificationRegister, sl@0: sl@0: /** sl@0: Trace output for deregistration for post notification sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - 4 bytes containing the callback address sl@0: - 4 bytes containing the return value. sl@0: */ sl@0: EPostNotificationDeRegister, sl@0: sl@0: /** sl@0: Trace output for post notification sent. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: */ sl@0: EPostNotificationSent, sl@0: sl@0: /** sl@0: Trace output for Callback complete sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: */ sl@0: ECallbackComplete, sl@0: sl@0: /** sl@0: Trace output for resource manager memory usage sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing memory allocated in bytes. sl@0: */ sl@0: EMemoryUsage, sl@0: sl@0: /** sl@0: Trace output for get resource state start operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: */ sl@0: EGetResourceStateStart, sl@0: sl@0: /** sl@0: Trace output for get resource state end operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource state sl@0: - 4 bytes containing return value. sl@0: */ sl@0: EGetResourceStateEnd, sl@0: sl@0: /** sl@0: Trace output for cancellation of long latency operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing client name, where 0 < N < 32 sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing return value sl@0: */ sl@0: ECancelLongLatencyOperation, sl@0: sl@0: /** sl@0: Trace output for booting of resource manager sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing entry point sl@0: */ sl@0: EBooting, sl@0: sl@0: /** sl@0: Trace output for PSL resource state change operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource current state sl@0: - 4 bytes containing the resource requested state sl@0: */ sl@0: EPslChangeResourceStateStart, sl@0: sl@0: /** sl@0: Trace output for PSL resource state change operation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource current state sl@0: - 4 bytes containing the resource requested state sl@0: - 4 bytes containing return value sl@0: */ sl@0: EPslChangeResourceStateEnd, sl@0: sl@0: /** sl@0: Trace output for get resource state start operation in PSL sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: */ sl@0: EPslGetResourceStateStart, sl@0: sl@0: /** sl@0: Trace output for get resource state end operation in PSL sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id. sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the Resource state sl@0: - 4 bytes containing return value. sl@0: */ sl@0: EPslGetResourceStateEnd, sl@0: sl@0: /** sl@0: Trace output for resource creation sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing minimum value of resource sl@0: - 4 bytes containing maximum value of resource sl@0: - 4 bytes containing the default value of resource sl@0: - 4 bytes containing the properties of the resource sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: */ sl@0: EPslResourceCreate, sl@0: sl@0: /** sl@0: Trace output for static resource with dependency registration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the Resource Id sl@0: - 4 bytes containing the Resource address sl@0: - N bytes containing the Resource name, where 0 < N < 32 sl@0: - 4 bytes containing the minimum value of resource sl@0: - 4 bytes containing the maximum value of resource sl@0: - 4 bytes containing the default value of resource sl@0: */ sl@0: ERegisterStaticResourceWithDependency, sl@0: sl@0: /** sl@0: Trace output for dynamic resource registration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - N bytes containing the resource name, where 0 < N < 32 sl@0: - 4 bytes containing the resouce address sl@0: */ sl@0: ERegisterDynamicResource, sl@0: sl@0: /** sl@0: Trace output for dynamic resource deregistration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - N bytes containing the resource name, where 0 < N < 32 sl@0: - 4 bytes containing the resource address sl@0: - 4 bytes containing the resource level. sl@0: */ sl@0: EDeRegisterDynamicResource, sl@0: sl@0: /** sl@0: Trace output for resource dependency registration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id of first dependent resource sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - N bytes containing the resource name of first dependent resource, where 0 < N < 32 sl@0: - 4 bytes containing the Resource Id of second dependent resource sl@0: - N bytes containing the resource name of second dependent resource, where 0 < N < 32 sl@0: - 4 bytes containing the address of first dependent resource sl@0: - 4 bytes containing the address of second dependent resource sl@0: */ sl@0: ERegisterResourceDependency, sl@0: sl@0: /** sl@0: Trace output for resource dependency deregistration sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing clientId sl@0: - 4 bytes containing the Resource Id of first dependent resource sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - N bytes containing the resource name of first dependent resource, where 0 < N < 32 sl@0: - 4 bytes containing the resource id of second dependent resource sl@0: - N bytes containing the resource name of second dependent resource, where 0 < N < 32 sl@0: - 4 bytes containing the address of first dependent resource sl@0: - 4 bytes containing the address of second dependent resource sl@0: */ sl@0: EDeRegisterResourceDependency sl@0: }; sl@0: /** sl@0: Enumeration of sub-category values for trace category EResourceManagerUs. sl@0: @see EResourceManagerUs sl@0: @prototype 9.5 sl@0: */ sl@0: enum TResourceManagerUs sl@0: { sl@0: /** sl@0: Trace output for the start of opening a channel to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes unused (displays 0) sl@0: - 4 bytes containing the client thread identifier. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: EOpenChannelUsStart = 0, sl@0: /** sl@0: Trace output for the end of opening a channel to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes unused (displays 0) sl@0: - 4 bytes containing the client identifier provided by the Resource Controller sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: EOpenChannelUsEnd, sl@0: /** sl@0: Trace output for the start of registering a client with the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes the number of concurrent change resource state operations to be supported sl@0: - 4 bytes the number of concurrent notification requests to be supported sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - 4 bytes the number of concurrent get resource state operations to be supported sl@0: */ sl@0: ERegisterClientUsStart, sl@0: /** sl@0: Trace output for the end of registering a client with the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - 4 bytes specifying the value returned from the call to Resource Controller's AllocReserve method sl@0: */ sl@0: ERegisterClientUsEnd, sl@0: /** sl@0: Trace output for the start of de-registering a client with the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes unused (displays 0) sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: EDeRegisterClientUsStart, sl@0: /** sl@0: Trace output for the end of registering a client with the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: */ sl@0: EDeRegisterClientUsEnd, sl@0: /** sl@0: Trace output for the start of a GetResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: EGetResourceStateUsStart, sl@0: /** sl@0: Trace output for the end of a GetResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes specifying the resource level sl@0: - 4 bytes containing the client identifier sl@0: - 4 bytes specifying the success code returned by the Resource Controller. sl@0: */ sl@0: EGetResourceStateUsEnd, sl@0: /** sl@0: Trace output for the start of a ChangeResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes specifying the required state sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: */ sl@0: ESetResourceStateUsStart, sl@0: /** sl@0: Trace output for the end of a ChangeResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes specifying the requested state sl@0: - 4 bytes containing the client identifier sl@0: - 4 bytes specifying the success code returned by the Resource Controller. sl@0: */ sl@0: ESetResourceStateUsEnd, sl@0: /** sl@0: Trace output for the start of a cancel GetResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: ECancelGetResourceStateUsStart, sl@0: /** sl@0: Trace output for the end of a cancel GetResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: ECancelGetResourceStateUsEnd, sl@0: /** sl@0: Trace output for the start of a cancel ChangeResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: ECancelSetResourceStateUsStart, sl@0: /** sl@0: Trace output for the end of a cancel ChangeResourceState request to the Resource Controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes specifying the resource ID sl@0: - 4 bytes containing the client identifier provided by the Resource Controller. sl@0: - N bytes containing the client name, where 0 < N < 32 sl@0: */ sl@0: ECancelSetResourceStateUsEnd sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EThreadPriority. sl@0: @see EThreadPriority sl@0: @internalTechnology sl@0: @prototype 9.3 sl@0: */ sl@0: enum TThreadPriority sl@0: { sl@0: /** sl@0: Trace output when a nanothread priority is changed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for the thread whose priority is changing. sl@0: - 4 bytes containing the new absolute priority. sl@0: */ sl@0: ENThreadPriority=0, sl@0: sl@0: /** sl@0: Trace output when a DThread's default priority is set. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the context id (an NThread*) for the thread whose priority is changing. sl@0: - 4 bytes containing the iThreadPriority member - a value from enum ::TThrdPriority. sl@0: - 4 bytes containing the new default absolute priority. sl@0: */ sl@0: EDThreadPriority=1, sl@0: sl@0: /** sl@0: Trace output when a DProcess priority is changed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DProcess*) for process. sl@0: - 4 bytes containing the new process priority, a value from enum ::TProcPriority sl@0: */ sl@0: EProcessPriority=2 sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EPagingMedia. sl@0: @see EPagingMedia sl@0: */ sl@0: enum TPagingMedia sl@0: { sl@0: /** sl@0: Event generated when a request to 'page in' data is received by the Local Media Subsystem. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address of the buffer to where the data is to be written. sl@0: - 4 bytes containing the offset from start of the partition to where the data to be paged in resides. sl@0: - 4 bytes containing the number of bytes to be read off the media. sl@0: - 4 bytes containing local drive number for the drive where the data to be paged in resides (-1 if ROM paging). sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. sl@0: */ sl@0: EPagingMediaLocMedPageInBegin, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a request to page data in or out has completed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the completion code to be returned. sl@0: - 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaLocMedPageInPagedIn, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a request to 'page in' data is deferred. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaLocMedPageInDeferred, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a request to 'page in' data that has been deferred is re-posted. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaLocMedPageInDeferredReposted, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a request to 'page in' data is re-deferred. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaLocMedPageInReDeferred, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a request to 'page in' data is issued when the media is not yet open. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the state of the media (one of TMediaState). sl@0: - 4 bytes containing a code qualifying this request as either a ROM or Code 'page in' (see TPagingRequestId) or a data page-in/out.. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaLocMedPageInQuietlyDeferred, sl@0: sl@0: /** sl@0: 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 sl@0: Driver thread . sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the ID of this fragment (middle or last). sl@0: - 4 bytes containing the length of data in this request fragment. sl@0: - 4 bytes containing the offset within the original request to the start of data in this fragment. sl@0: - 4 bytes containing the offset from start of the partition to where the data in this fragment is to be written. sl@0: - 4 bytes containing the address of the DThread object representing the thread that issued the original Write request. sl@0: sl@0: The context id (NThread*) in this trace is that of the File Server drive thread that issued the original Write request. sl@0: */ sl@0: EPagingMediaLocMedFragmentBegin, sl@0: sl@0: /** sl@0: Event generated by the Local Media Subsystem when a Write fragment is completed . sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the completion code to be returned. sl@0: sl@0: The context id (NThread*) in this trace is that of the File Server drive thread that issued the original Write request. sl@0: */ sl@0: EPagingMediaLocMedFragmentEnd, sl@0: sl@0: /** sl@0: Event generated when the Media Driver starts processing a request to 'page in' data in its specific Request(..) function. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a code describing the type of the media (one of TMediaDevice). sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaPagingMedDrvBegin, sl@0: sl@0: /** sl@0: Event generated by the Media Driver when the data read by a 'page in' request is written to the paging buffer. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a code describing the type of the media (one of TMediaDevice). sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the linear address of the buffer to where the data is to be written. sl@0: - 4 bytes containing the offset within the buffer to where the data will be written. sl@0: - 4 bytes containing the length of data to be written. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaMedDrvWriteBack, sl@0: sl@0: /** sl@0: Event generated when a request to 'page in' data is put on hold because the Media Driver is performing some background sl@0: operation (not another request) and cannot service the request. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a code describing the type of the media (one of TMediaDevice). sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaMedDrvOnHold, sl@0: sl@0: /** sl@0: Event generated by the Media Driver when the data read by a 'page out' request is read from the paging buffer. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a code describing the type of the media (one of TMediaDevice). sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: - 4 bytes containing the linear address of the buffer to where the data is to be written. sl@0: - 4 bytes containing the offset within the buffer to where the data will be written. sl@0: - 4 bytes containing the length of data to be written. sl@0: sl@0: The context id (NThread*) in this trace is that of the media driver thread that services this 'page in' request. sl@0: */ sl@0: EPagingMediaMedDrvRead, sl@0: sl@0: /** sl@0: Event generated when a request to 'page out' data is received by the Local Media Subsystem. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the linear address of the buffer from where the data is to be read. sl@0: - 4 bytes containing the offset from start of the partition to where the data to be paged out resides. sl@0: - 4 bytes containing the number of bytes to be written to the media. sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. sl@0: */ sl@0: EPagingMediaLocMedPageOutBegin, sl@0: sl@0: /** sl@0: Event generated when a request to mark an area of the swap file as deleted is received by the Local Media Subsystem. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing NULL sl@0: - 4 bytes containing the offset from start of the partition to where the data to be paged out resides. sl@0: - 4 bytes containing the number of bytes to be marked as deleted sl@0: - 4 bytes containing the linear address in memory where this request object resides. sl@0: sl@0: The context id (NThread*) in this trace is that of the thread that took the page fault that caused this event. sl@0: */ sl@0: EPagingMediaLocMedDeleteNotifyBegin, sl@0: sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EKernelMemory. sl@0: @see EKernelMemory sl@0: */ sl@0: enum TKernelMemory sl@0: { sl@0: /** sl@0: Event recorded during startup and prime which details the initial amount of free RAM. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of bytes of RAM the system started with. sl@0: */ sl@0: EKernelMemoryInitialFree, sl@0: sl@0: /** sl@0: Event recorded during prime which records the then-current amount of free RAM. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of bytes of free RAM. sl@0: */ sl@0: EKernelMemoryCurrentFree, sl@0: sl@0: /** sl@0: Event recorded when a miscellaneous kernel allocation is made. These include: sl@0: - Memory for MMU page table contents sl@0: - Memory for MMU SPageTableInfos sl@0: - Memory for shadow pages sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the size, in bytes, of the allocation. sl@0: */ sl@0: EKernelMemoryMiscAlloc, sl@0: sl@0: /** sl@0: Event recorded when a miscellaneous kernel allocation (see EKernelMemoryMiscAlloc sl@0: above) is freed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the size, in bytes, of the freed allocation. sl@0: */ sl@0: EKernelMemoryMiscFree, sl@0: sl@0: /** sl@0: The amount of memory reserved for the minimum demand paging cache. The *actual* DP cache sl@0: also uses free memory, only this minimum amount is permanently reserved for that purpose. sl@0: This event is recorded during prime and when the amount changes. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the minimum size, in bytes, of the demand paging cache. sl@0: */ sl@0: EKernelMemoryDemandPagingCache, sl@0: sl@0: /** sl@0: Physically contiguous memory allocated by device drivers via one of: sl@0: Epoc::AllocPhysicalRam() sl@0: Epoc::ZoneAllocPhysicalRam() sl@0: Epoc::ClaimPhysicalRam() sl@0: TRamDefragRequest::ClaimRamZone() sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the size of the allocated memory. sl@0: - 4 bytes containing the physical base address of allocated memory. sl@0: sl@0: NB: The prime function logs a EKernelMemoryDrvPhysAlloc record where the physical sl@0: address is -1 and should be ignored. sl@0: */ sl@0: EKernelMemoryDrvPhysAlloc, sl@0: sl@0: /** sl@0: Memory freed by device drivers via calls to all versions of sl@0: Epoc::FreePhysicalRam(). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the size of the freed memory. sl@0: - 4 bytes containing the physical base address of freed memory. sl@0: */ sl@0: EKernelMemoryDrvPhysFree, sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EHeap. sl@0: @see EHeap sl@0: */ sl@0: enum THeap sl@0: { sl@0: /** sl@0: Event recorded during process startup which logs the point of heap creation. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 2 bytes containing the size of header overhead, per allocation (0xFFFF indicates a variable size) sl@0: - 2 bytes containing the size of footer overhead, per allocation (0xFFFF indicates a variable size) sl@0: */ sl@0: EHeapCreate, sl@0: sl@0: /** sl@0: Event recorded during process startup which details the chunk being used as a heap. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the chunk ID (The RHandleBase* of the chunk) sl@0: */ sl@0: EHeapChunkCreate, sl@0: sl@0: /** sl@0: Event recorded when RHeap::Alloc() is called. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the address of the allocation sl@0: - 4 bytes containing the size of the allocation sl@0: - 4 bytes containing the requested size of allocation sl@0: */ sl@0: EHeapAlloc, sl@0: sl@0: /** sl@0: Event recorded when RHeap::ReAlloc() is called. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the address of the new allocation sl@0: - 4 bytes containing the size of the allocation sl@0: - 4 bytes containing the requested size of allocation sl@0: - 4 bytes containing the address of the old allocation sl@0: */ sl@0: EHeapReAlloc, sl@0: sl@0: /** sl@0: Event recorded when RHeap::Free() is called. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the address of the free'd allocation sl@0: */ sl@0: EHeapFree, sl@0: sl@0: /** sl@0: Event recorded when RHeap::Alloc() fails. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the requested size of allocation sl@0: */ sl@0: EHeapAllocFail, sl@0: sl@0: /** sl@0: Event recorded when RHeap::ReAlloc() fails. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing the address of the old allocation sl@0: - 4 bytes containing the requested size of allocation sl@0: */ sl@0: EHeapReAllocFail, sl@0: sl@0: /** sl@0: Event recorded when heap memory corruption occurs. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (The RAllocator*) sl@0: - 4 bytes containing address of the corrupted memory block sl@0: - 4 bytes containing length of the corrupted memory block sl@0: */ sl@0: EHeapCorruption, sl@0: sl@0: /** sl@0: Trace to provide additional heap debugging information. sl@0: sl@0: This trace (if present) is generated by Symbian OS memory debug tools, and sl@0: will follow one of the other THeap events (e.g. EHeapAlloc, EHeapFree, etc.). sl@0: It is intended to provide a stack trace for the preceding heap event, sl@0: to indicate how the previous heap event was generated. sl@0: sl@0: On many systems exact stack frames are not available, and the values sl@0: will be extracted from the stack using heuristics, so there may be some sl@0: spurious values and some missing values. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the heap ID (the RAllocator*) sl@0: - sequence of 4-byte PC values representing the call stack, with the top-most sl@0: (most recent call) first. sl@0: */ sl@0: EHeapCallStack, sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EMetaTrace. sl@0: @see EMetaTrace sl@0: */ sl@0: enum TMetaTrace sl@0: { sl@0: /** sl@0: Information about timestamps used for tracing. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the period of the Timestamp value. sl@0: - 4 bytes containing the period of the Timestamp2 value. sl@0: - 4 bytes containing a set of bit flags with the following meaning: sl@0: - Bit 0, if true, indicates that Timestamp and Timestamp2 are two halves sl@0: of a single 64bit timestamp value; Timestamp2 is the most significant part. sl@0: - All other bits are presently undefined. sl@0: sl@0: The format of the timestamp period data is a period in seconds given using an exponent and mantissa sl@0: format, where the most significant 8 bits are the signed power-of-two value for the exponent, and sl@0: the least significant 24 bits are the integer value of the mantissa. The binary point is to the right sl@0: of the least significant mantissa bit, and the mantissa may not be in normalised form. sl@0: sl@0: Example code for decoding the period: sl@0: @code sl@0: TInt32 period; // value from trace record sl@0: int exponent = (signed char)(period>>24); sl@0: int mantissa = period&0xffffff; sl@0: double periodInSeconds = (double)mantissa*pow(2,exponent); sl@0: @endcode sl@0: */ sl@0: EMetaTraceTimestampsInfo, sl@0: sl@0: /** sl@0: Trace indicating the start of a test case being measured. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing measurement specific value. sl@0: - 4 bytes containing a further measurement specific value. sl@0: - Remaining data is ASCII text providing human readable information. sl@0: */ sl@0: EMetaTraceMeasurementStart, sl@0: sl@0: /** sl@0: Trace indicating the end of a test case being measured. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing measurement specific identifying value. sl@0: - 4 bytes containing a further measurement specific identifying value. sl@0: sl@0: The values contained in this trace must be identical to those in the corresponding sl@0: ETraceInfoMeasurementStart trace. sl@0: */ sl@0: EMetaTraceMeasurementEnd, sl@0: sl@0: /** sl@0: Trace indicating a change in state of the primary filter. sl@0: sl@0: Trace data format: sl@0: - 1 byte containing a trace category number. sl@0: - 1 byte containing the new filter state for the category. (0=off, 1=on). sl@0: - 2 byte padding. (Should be output as zeros.) sl@0: */ sl@0: EMetaTraceFilterChange, sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category ERamAllocator. sl@0: @see BTrace::ERamAllocator sl@0: */ sl@0: enum TRamAllocator sl@0: { sl@0: /** sl@0: The number of RAM zones. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of RAM zones. sl@0: */ sl@0: ERamAllocZoneCount, sl@0: sl@0: /** sl@0: Information on the layout of a RAM zone. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of pages in the zone sl@0: - 4 bytes containing the physical base address of the zone sl@0: - 4 bytes containing the ID of the zone sl@0: - 1 bytes containing the preference of the zone sl@0: - 1 bytes containing the flags of the zone sl@0: - 2 bytes reserved for future use sl@0: */ sl@0: ERamAllocZoneConfig, sl@0: sl@0: /** sl@0: This trace is sent for every contiguous block of RAM that was allocated sl@0: during the kernel boot process. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of contiguous pages allocated for the block sl@0: - 4 bytes containing the physical base address of the block sl@0: */ sl@0: ERamAllocBootAllocation, sl@0: sl@0: sl@0: /** sl@0: This trace marks the end of the boot allocations sl@0: sl@0: Trace data format: sl@0: - no extra bytes are sent sl@0: */ sl@0: ERamAllocBootAllocationEnd, sl@0: sl@0: /** sl@0: Event generated when a RAM zone's flags have been modified sl@0: This could occur when a RAM zone is blocked/unblocked from further sl@0: allocations from all/certain page types. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the ID of the zone sl@0: - 4 bytes containing the flags of the zone sl@0: */ sl@0: ERamAllocZoneFlagsModified, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::ClaimPhysicalRam has successfully sl@0: claimed the specified RAM pages. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocClaimRam, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::MarkPageAllocated has successfully sl@0: marked the specified page as allocated. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the page sl@0: - 4 bytes containing the address of the page sl@0: */ sl@0: ERamAllocMarkAllocated, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::AllocContiguousRam successfully sl@0: allocates the requested number of pages. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the pages sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocContiguousRam, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::FreePage has successfully freed sl@0: the specified RAM page. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the page sl@0: - 4 bytes containing the address of the page sl@0: */ sl@0: ERamAllocFreePage, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::FreePhysical successfully freed sl@0: the specified RAM page(s). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocFreePhysical, sl@0: sl@0: /** sl@0: Event generated for each contiguous block of pages when sl@0: DRamAllocator::AllocRamPages or DRamAllocator::ZoneAllocRamPages sl@0: are attempting to fulfil a request. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the pages sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocRamPages, sl@0: sl@0: /** sl@0: Event generated for contiguous block of pages when sl@0: DRamAllocator::FreeRamPages is invoked. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the pages sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocFreePages, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::AllocRamPages has successfully sl@0: allocated all the requested number of RAM pages. If DRamAllocator::AllocRamPages sl@0: couldn't allocate all the requested pages then this event is not generated. sl@0: sl@0: Trace data format: sl@0: - no extra bytes sent sl@0: */ sl@0: ERamAllocRamPagesEnd, sl@0: sl@0: /** sl@0: Event generated when all ERamAllocFreePages events for a particular sl@0: call of DRamAllocator::FreeRamPages have been generated. sl@0: sl@0: Trace data format: sl@0: - no extra bytes sent sl@0: */ sl@0: ERamAllocFreePagesEnd, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::ChangePageType is has successfully sl@0: updated the type of the specified page. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the new TZonePageType type of the page sl@0: - 4 bytes containing the physical address of the page sl@0: */ sl@0: ERamAllocChangePageType, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::ZoneAllocContiguousRam has sl@0: successfully allocated the required number of pages. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the TZonePageType type of the pages sl@0: - 4 bytes containing the number of contiguous pages sl@0: - 4 bytes containing the base address of the pages sl@0: */ sl@0: ERamAllocZoneContiguousRam, sl@0: sl@0: /** sl@0: Event generated when DRamAllocator::ZoneAllocRamPages has successfully sl@0: allocated all the requested RAM pages. If DRamAllocator::ZoneAllocRamPages sl@0: couldn't allocate all the requested pages then this event is not generated. sl@0: sl@0: Trace data format: sl@0: - no extra bytes sent sl@0: */ sl@0: ERamAllocZoneRamPagesEnd, sl@0: sl@0: /** sl@0: Event generated when Epoc::ClaimRamZone has successfully claimed sl@0: the requested zone. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the ID of the zone that has been claimed. sl@0: */ sl@0: ERamAllocClaimZone, sl@0: }; sl@0: sl@0: enum TFastMutex sl@0: { sl@0: /** sl@0: Event generated when a thread acquires a fast mutex, (waits on it). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the fast mutex id, (an NFastMutex*). sl@0: */ sl@0: EFastMutexWait, sl@0: sl@0: /** sl@0: Event generated when a thread releases a fast mutex, (signals it). sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the fast mutex id, (an NFastMutex*). sl@0: */ sl@0: EFastMutexSignal, sl@0: sl@0: /** sl@0: Event generated when a fast mutex is 'flashed' (signalled then immediately sl@0: waited on again). E.g the operation performed by NKern::FlashSystem. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the fast mutex id, (an NFastMutex*). sl@0: */ sl@0: EFastMutexFlash, sl@0: sl@0: /** sl@0: Trace to associate a fast mutex with a textual name. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the fast mutex id, (an NFastMutex*). sl@0: - 4 bytes containing unspecified data (should be output as zero). sl@0: - Remaining data is the ASCII name for the fast mutex. sl@0: */ sl@0: EFastMutexName, sl@0: sl@0: /** sl@0: Event generated when a thread blocks on a fast mutex. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the fast mutex id, (an NFastMutex*). sl@0: */ sl@0: EFastMutexBlock, sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EProfiling. sl@0: @see BTrace::EProfiling sl@0: */ sl@0: enum TProfiling sl@0: { sl@0: /** sl@0: CPU sample including program counter and thread context. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the program counter. sl@0: - 4 bytes containing thread context (an NThread*). sl@0: */ sl@0: ECpuFullSample = 0, sl@0: sl@0: /** sl@0: Optimised CPU sample including program counter. sl@0: Doesn't include a thread context id as it hasn't changed since sl@0: the last sample. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the program counter. sl@0: */ sl@0: ECpuOptimisedSample, sl@0: sl@0: /** sl@0: CPU sample from iDFC including program counter. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the program counter. sl@0: */ sl@0: ECpuIdfcSample, sl@0: sl@0: /** sl@0: CPU sample from non-Symbian thread. sl@0: sl@0: Trace data format: sl@0: - no extra bytes are sent sl@0: */ sl@0: ECpuNonSymbianThreadSample sl@0: sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category ERawEvent. sl@0: @see BTrace::ERawEvent sl@0: */ sl@0: enum TRawEventTrace sl@0: { sl@0: sl@0: /** sl@0: For all the set Functions in the TRawEvent class. sl@0: Trace Data Format Varies depends which of the Overloaded Set Method from where its set . sl@0: Trace data format: sl@0: if there are only one 4 byte data sl@0: sl@0: --The Following oder is folloed for data. sl@0: - 4 bytes containing the event type sl@0: sl@0: if there are 2*4 byte data sl@0: - 4 bytes containing the event type sl@0: - 4 bytes containing the scan code sl@0: sl@0: if there are 3*4 byte data sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the X co-ordinate sl@0: --4 bytes containining the Y co-ordinate sl@0: sl@0: if there are 4*4 byte data sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the X co-ordinate sl@0: --4 bytes containining the Y co-ordinate sl@0: --4 bytes containining the Z co-ordinate sl@0: sl@0: if there are 5*4 byte data sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the X co-ordinate sl@0: --4 bytes containining the Y co-ordinate sl@0: --4 bytes containining the Z co-ordinate sl@0: --4 bytes containining the PointerNumber sl@0: sl@0: if there are 7*4 byte data sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the X co-ordinate sl@0: --4 bytes containining the Y co-ordinate sl@0: --4 bytes containining the Z co-ordinate sl@0: --4 bytes containining the Phi polar coordinate. sl@0: --4 bytes containining the Theta polar coordinate. sl@0: --4 bytes containining the rotation angle(alpha) sl@0: */ sl@0: sl@0: ESetEvent = 1, sl@0: sl@0: /** sl@0: For user side SetTip Events sl@0: Trace data format: sl@0: - 4 bytes to state containing Tip Info. sl@0: */ sl@0: ESetTipEvent, sl@0: sl@0: /** sl@0: For SetTilt Events sl@0: Trace data format: sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the Phi polar coordinate. sl@0: --4 bytes containining the Theta polar coordinate. sl@0: */ sl@0: ESetTiltEvent, sl@0: sl@0: /** sl@0: For SetRotation Events sl@0: Trace data format: sl@0: - 4 bytes containing the event type sl@0: --4 bytes containining the rotation angle (alpha) sl@0: */ sl@0: ESetRotationtEvent, sl@0: sl@0: /** sl@0: For SetPointerNumber Events sl@0: Trace data format: sl@0: - 4 bytes containing the Pointer Number sl@0: */ sl@0: ESetPointerNumberEvent, sl@0: sl@0: /** sl@0: For user side addevents (User::AddEvent) sl@0: Trace data format: sl@0: - 4 bytes containing the event type sl@0: */ sl@0: EUserAddEvent, sl@0: sl@0: /** sl@0: For kernal side addevents (Kern::AddEvent) sl@0: Trace data format: sl@0: - 4 bytes containing the event type sl@0: */ sl@0: EKernelAddEvent sl@0: }; sl@0: sl@0: enum TSymbianKernelSync sl@0: { sl@0: /** sl@0: A semaphore (DSemaphore) has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DSemaphore*) for this semaphore. sl@0: - 4 bytes containing the owning DThread* or DProcess* sl@0: - Remaining data is the ASCII name of the semaphore. sl@0: */ sl@0: ESemaphoreCreate=0x00, sl@0: sl@0: /** sl@0: A semaphore (DSemaphore) has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DSemaphore*) for this semaphore. sl@0: */ sl@0: ESemaphoreDestroy=0x01, sl@0: sl@0: /** sl@0: A semaphore (DSemaphore) has been acquired. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DSemaphore*) for this semaphore. sl@0: */ sl@0: ESemaphoreAcquire=0x02, sl@0: sl@0: /** sl@0: A semaphore (DSemaphore) has been released. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DSemaphore*) for this semaphore. sl@0: */ sl@0: ESemaphoreRelease=0x03, sl@0: sl@0: /** sl@0: A thread has blocked on a semaphore (DSemaphore) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DSemaphore*) for this semaphore. sl@0: */ sl@0: ESemaphoreBlock=0x04, sl@0: sl@0: sl@0: /** sl@0: A mutex (DMutex) has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DMutex*) for this mutex. sl@0: - 4 bytes containing the owning DThread* or DProcess* sl@0: - Remaining data is the ASCII name of the mutex. sl@0: */ sl@0: EMutexCreate=0x10, sl@0: sl@0: /** sl@0: A mutex (DMutex) has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DMutex*) for this mutex. sl@0: */ sl@0: EMutexDestroy=0x11, sl@0: sl@0: /** sl@0: A mutex (DMutex) has been acquired. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DMutex*) for this mutex. sl@0: */ sl@0: EMutexAcquire=0x12, sl@0: sl@0: /** sl@0: A mutex (DMutex) has been released. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DMutex*) for this mutex. sl@0: */ sl@0: EMutexRelease=0x13, sl@0: sl@0: /** sl@0: A thread has blocked on a mutex (DMutex) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DMutex*) for this mutex. sl@0: */ sl@0: EMutexBlock=0x14, sl@0: sl@0: sl@0: /** sl@0: A condition variable (DCondVar) has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: - 4 bytes containing the owning DThread* or DProcess* sl@0: - Remaining data is the ASCII name of the condition variable. sl@0: */ sl@0: ECondVarCreate=0x20, sl@0: sl@0: /** sl@0: A condition variable (DCondVar) has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: */ sl@0: ECondVarDestroy=0x21, sl@0: sl@0: /** sl@0: A thread has blocked on a condition variable (DCondVar) sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: - 4 bytes containing trace id (DMutex*) for the associated mutex. sl@0: */ sl@0: ECondVarBlock=0x22, sl@0: sl@0: /** sl@0: A thread has been released from a condition variable (DCondVar) wait sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: - 4 bytes containing trace id (DMutex*) for the associated mutex. sl@0: */ sl@0: ECondVarWakeUp=0x23, sl@0: sl@0: /** sl@0: A condition variable (DCondVar) has been signalled sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: - 4 bytes containing trace id (DMutex*) for the associated mutex. sl@0: */ sl@0: ECondVarSignal=0x24, sl@0: sl@0: /** sl@0: A condition variable (DCondVar) has been signalled in broadcast mode. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing trace id (a DCondVar*) for this condition variable. sl@0: - 4 bytes containing trace id (DMutex*) for the associated mutex. sl@0: */ sl@0: ECondVarBroadcast=0x25, sl@0: sl@0: }; sl@0: sl@0: enum TFlexibleMemModel sl@0: { sl@0: /** sl@0: A memory object has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (DMemoryObject*). sl@0: - 4 bytes containing the size of the memory in pages. sl@0: */ sl@0: EMemoryObjectCreate, sl@0: sl@0: /** sl@0: A memory object has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (DMemoryObject*). sl@0: */ sl@0: EMemoryObjectDestroy, sl@0: sl@0: /** sl@0: A memory mapping has been created. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory mapping id (DMemoryMapping*). sl@0: - 4 bytes containing the memory object id (DMemoryObject*). sl@0: - 4 bytes containing the offset of the mapping into the memory object, in pages sl@0: - 4 bytes containing the size of the mapping in pages sl@0: - 2 bytes containing the ASID sl@0: - 2 spare bytes, currently zero sl@0: - 4 bytes containing the virtual address the mapping sl@0: */ sl@0: EMemoryMappingCreate, sl@0: sl@0: /** sl@0: A memory mapping has been destroyed. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory mapping id (DMemoryMapping*). sl@0: */ sl@0: EMemoryMappingDestroy, sl@0: sl@0: // The following traces associate memory model objects with the kernel objects that use them sl@0: sl@0: /** sl@0: A memory object is being used for the contents of a chunk. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the chunk id (a DChunk*) sl@0: */ sl@0: EMemoryObjectIsChunk, sl@0: sl@0: /** sl@0: A memory object is being used for the contents of a code segment. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the code segment id (a DCodeSeg*) sl@0: */ sl@0: EMemoryObjectIsCodeSeg, sl@0: sl@0: /** sl@0: A memory object is being used for process static data. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the process id (a DProcess*) sl@0: */ sl@0: EMemoryObjectIsProcessStaticData, sl@0: sl@0: /** sl@0: A memory object is being used for DLL static data. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the code segment id (a DCodeSeg*) sl@0: - 4 bytes containing the process id (a DProcess*) sl@0: */ sl@0: EMemoryObjectIsDllStaticData, sl@0: sl@0: /** sl@0: A memory object is being used for a thread's supervisor stack. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the thread id (a DThread*) sl@0: */ sl@0: EMemoryObjectIsSupervisorStack, sl@0: sl@0: /** sl@0: A memory object is being used for a thread's user stack. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the memory object id (a DMemoryObject*). sl@0: - 4 bytes containing the thread id (a DThread*) sl@0: */ sl@0: EMemoryObjectIsUserStack, sl@0: sl@0: /** sl@0: Identifies the Address Space ID (ASID) used for a process. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the process id (a DProcess*) sl@0: - 2 bytes containing the ASID sl@0: - 2 spare bytes, currently zero sl@0: */ sl@0: EAddressSpaceId sl@0: }; sl@0: sl@0: /** sl@0: Enumeration of sub-category values for trace category EIic. sl@0: @see EIic sl@0: @prototype 9.6 sl@0: */ sl@0: enum TIic sl@0: { sl@0: /** sl@0: Trace output for the invocation by the PSL of registering an array of pointers to channels with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the array sl@0: - 4 bytes containing the number of channels in the array sl@0: */ sl@0: ERegisterChansStartPsl = 0, sl@0: sl@0: /** sl@0: Trace output for the start of the PIL registering an array of pointers to channels with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the array sl@0: - 4 bytes containing the number of channels in the array sl@0: - 4 bytes containing the number of channels registered with the controller prior to this point sl@0: */ sl@0: ERegisterChansStartPil = 1, sl@0: sl@0: /** sl@0: Trace output for the end of the PIL registering an array of pointers to channels with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the array sl@0: - 4 bytes containing the number of channels now registered with the controller sl@0: */ sl@0: ERegisterChansEndPil = 2, sl@0: sl@0: /** sl@0: Trace output for the end of the PSL registering an array of pointers to channels with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the array sl@0: - 4 bytes containing the number of channels in the array sl@0: - 4 bytes containing the error code returned by the IIC bus controller sl@0: */ sl@0: ERegisterChansEndPsl = 3, sl@0: sl@0: /** sl@0: Trace output for the start of the PSL de-registering a channel with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: */ sl@0: EDeRegisterChanStartPsl = 4, sl@0: sl@0: /** sl@0: Trace output for the start of the PIL de-registering a channel with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the number of channels registered with the controller prior to this point sl@0: */ sl@0: EDeRegisterChanStartPil = 5, sl@0: sl@0: /** sl@0: Trace output for the end of the PSL de-registering a channel with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the number of channels now registered with the controller sl@0: */ sl@0: EDeRegisterChanEndPil = 6, sl@0: sl@0: /** sl@0: Trace output for the end of the PSL de-registering a channel with the IIC bus controller. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the error code returned by the IIC bus controller sl@0: */ sl@0: EDeRegisterChanEndPsl = 7, sl@0: sl@0: /** sl@0: Trace output for the start of a synchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability token sl@0: - 4 bytes containing the pointer to the transaction object sl@0: */ sl@0: EMQTransSyncStartPil = 8, sl@0: sl@0: /** sl@0: Trace output for the end of a synchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability token sl@0: - 4 bytes containing the error code returned by the controller sl@0: */ sl@0: EMQTransSyncEndPil = 9, sl@0: sl@0: /** sl@0: Trace output for the start of a synchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability token sl@0: - 4 bytes containing the pointer to the transaction object sl@0: - 4 bytes containing the pointer to the callback object sl@0: */ sl@0: EMQTransAsyncStartPil = 10, sl@0: sl@0: /** sl@0: Trace output for the end of a synchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability token sl@0: - 4 bytes containing the error code returned by the controller sl@0: */ sl@0: EMQTransAsyncEndPil = 11, sl@0: sl@0: /** sl@0: Trace output for the start of cancelling an asynchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability token sl@0: - 4 bytes containing the pointer to the transaction object sl@0: */ sl@0: EMCancelTransStartPil = 12, sl@0: sl@0: /** sl@0: Trace output for the end of cancelling an asynchronous queue transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the pointer to the transaction object sl@0: - 4 bytes containing the error code returned by the controller sl@0: */ sl@0: EMCancelTransEndPil = 13, sl@0: sl@0: /** sl@0: Trace output for the start of processing a transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the pointer to the transaction object sl@0: */ sl@0: EMProcessTransStartPil = 14, sl@0: sl@0: /** sl@0: Trace output for the start of processing a transaction request in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the pointer to the transaction object sl@0: */ sl@0: EMProcessTransStartPsl = 15, sl@0: sl@0: /** sl@0: Trace output for the end of processing a transaction request in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the result code sl@0: */ sl@0: EMProcessTransEndPsl = 16, sl@0: sl@0: /** sl@0: Trace output for the end of processing a transaction request in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the pointer to the transaction object sl@0: - 4 bytes containing the result code sl@0: - 4 bytes containing the pointer to the client callback object sl@0: */ sl@0: EMProcessTransEndPil = 17, sl@0: sl@0: /** sl@0: Trace output for the start of synchronously capturing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability sl@0: - 4 bytes containing a pointer to device specific configuration option applicable to all transactions sl@0: */ sl@0: ESCaptChanSyncStartPil = 18, sl@0: sl@0: /** sl@0: Trace output for the start of synchronously capturing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing a pointer to device specific configuration option applicable to all transactions sl@0: */ sl@0: ESCaptChanSyncStartPsl = 19, sl@0: sl@0: /** sl@0: Trace output for the end of synchronously capturing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the address of the channel sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESCaptChanSyncEndPsl = 20, sl@0: sl@0: /** sl@0: Trace output for the end of synchronously capturing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability sl@0: - 4 bytes containing the platform-specific cookie that uniquely identifies the channel sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESCaptChanSyncEndPil = 21, sl@0: sl@0: /** sl@0: Trace output for the start of asynchronously capturing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the bus realisation variability sl@0: - 4 bytes containing a pointer to device specific configuration option applicable to all transactions sl@0: - 4 bytes containing the pointer to the client callback object sl@0: */ sl@0: ESCaptChanASyncStartPil = 22, sl@0: sl@0: /** sl@0: Trace output for the start of asynchronously capturing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a pointer to device specific configuration option applicable to all transactions sl@0: */ sl@0: ESCaptChanASyncStartPsl = 23, sl@0: sl@0: /** sl@0: Trace output for the end of asynchronously capturing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESCaptChanASyncEndPsl = 24, sl@0: sl@0: /** sl@0: Trace output for the end of asynchronously capturing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESCaptChanASyncEndPil = 25, sl@0: sl@0: /** sl@0: Trace output for the start of releasing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the channel identifier cookie sl@0: */ sl@0: ESRelChanStartPil = 26, sl@0: sl@0: /** sl@0: Trace output for the start of releasing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: */ sl@0: ESRelChanStartPsl = 27, sl@0: sl@0: /** sl@0: Trace output for the end of releasing a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRelChanEndPsl = 28, sl@0: sl@0: /** sl@0: Trace output for the end of releasing a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the channel identifier cookie sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRelChanEndPil = 29, sl@0: sl@0: /** sl@0: Trace output for the start of registering an Rx buffer for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the receive buffer sl@0: - 4 bytes containing the number of buffer bytes used to store a word. sl@0: - 4 bytes containing the number of words expected to be received. sl@0: - 4 bytes containing offset from the start of the buffer where to store the received data. sl@0: */ sl@0: ESRegRxBufStartPil = 30, sl@0: sl@0: /** sl@0: Trace output for the start of registering an Rx buffer for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a pointer to the receive buffer sl@0: - 4 bytes containing the number of buffer bytes used to store a word. sl@0: - 4 bytes containing the number of words expected to be received. sl@0: - 4 bytes containing offset from the start of the buffer where to store the received data. sl@0: */ sl@0: ESRegRxBufStartPsl = 31, sl@0: sl@0: /** sl@0: Trace output for the end of registering an Rx buffer for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRegRxBufEndPsl = 32, sl@0: sl@0: /** sl@0: Trace output for the end of registering an Rx buffer for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRegRxBufEndPil = 33, sl@0: sl@0: /** sl@0: Trace output for the start of registering an Tx buffer for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the transmit buffer sl@0: - 4 bytes containing the number of buffer bytes used to store a word. sl@0: - 4 bytes containing the number of words expected to be transmitted. sl@0: - 4 bytes containing offset from the start of the buffer from where to transmit data. sl@0: */ sl@0: ESRegTxBufStartPil = 34, sl@0: sl@0: /** sl@0: Trace output for the start of registering an Tx buffer for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a pointer to the transmit buffer sl@0: - 4 bytes containing the number of buffer bytes used to store a word. sl@0: - 4 bytes containing the number of words expected to be transmitted. sl@0: - 4 bytes containing offset from the start of the buffer from where to transmit data. sl@0: */ sl@0: ESRegTxBufStartPsl = 35, sl@0: sl@0: /** sl@0: Trace output for the end of registering an Tx buffer for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRegTxBufEndPsl = 36, sl@0: sl@0: /** sl@0: Trace output for the start of setting a notification for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESRegTxBufEndPil = 37, sl@0: sl@0: /** sl@0: Trace output for the start of setting a notification for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the channel identifier cookie sl@0: - 4 bytes containing the trigger value sl@0: */ sl@0: ESNotifTrigStartPil = 38, sl@0: sl@0: /** sl@0: Trace output for the start of setting a notification for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the trigger value sl@0: */ sl@0: ESNotifTrigStartPsl = 39, sl@0: sl@0: /** sl@0: Trace output for the end of setting a notification for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESNotifTrigEndPsl = 40, sl@0: sl@0: /** sl@0: Trace output for the end of setting a notification for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing the channel identifier cookie sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESNotifTrigEndPil = 41, sl@0: sl@0: /** sl@0: Trace output for the start of a StaticExtension operaton for a MasterSlave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing an argument to be passed to the function sl@0: - 4 bytes containing an argument to be passed to the function sl@0: */ sl@0: EMSStatExtStartPil = 42, sl@0: sl@0: /** sl@0: Trace output for the end of a StaticExtension operation for a MasterSlave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing the result code sl@0: */ sl@0: EMSStatExtEndPil = 43, sl@0: sl@0: /** sl@0: Trace output for the start of a StaticExtension operation for a Master channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing an argument to be passed to the function sl@0: - 4 bytes containing an argument to be passed to the function sl@0: */ sl@0: EMStatExtStartPil = 44, sl@0: sl@0: /** sl@0: Trace output for the start of a StaticExtension operation for a Master channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing an argument to be passed to the function sl@0: - 4 bytes containing an argument to be passed to the function sl@0: */ sl@0: EMStatExtStartPsl = 45, sl@0: sl@0: /** sl@0: Trace output for the end of a StaticExtension operation for a Master channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing the result code sl@0: */ sl@0: EMStatExtEndPsl = 46, sl@0: sl@0: /** sl@0: Trace output for the end of a StaticExtension operation for a Master channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing the result code sl@0: */ sl@0: EMStatExtEndPil = 47, sl@0: sl@0: /** sl@0: Trace output for the start of a StaticExtension operation for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing an argument to be passed to the function sl@0: - 4 bytes containing an argument to be passed to the function sl@0: */ sl@0: ESStatExtStartPil = 48, sl@0: sl@0: /** sl@0: Trace output for the start of a StaticExtension operation for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing an argument to be passed to the function sl@0: - 4 bytes containing an argument to be passed to the function sl@0: */ sl@0: ESStatExtStartPsl = 49, sl@0: sl@0: /** sl@0: Trace output for the end of a StaticExtension operation for a Slave channel in the PSL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a pointer to the channel object sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESStatExtEndPsl = 50, sl@0: /** sl@0: Trace output for the end of a StaticExtension operation for a Slave channel in the PIL. sl@0: sl@0: Trace data format: sl@0: - 4 bytes containing a token containing the bus realisation variability or the channel identifier cookie for this client. sl@0: - 4 bytes containing a function identifier sl@0: - 4 bytes containing the result code sl@0: */ sl@0: ESStatExtEndPil = 51 sl@0: }; sl@0: sl@0: /** sl@0: Calculate the address of the next trace record. sl@0: @param aCurrentRecord A pointer to a trace record. sl@0: @return The address of the trace record which follows aCurrentRecord. sl@0: */ sl@0: inline static TUint8* NextRecord(TAny* aCurrentRecord); sl@0: sl@0: #ifdef __KERNEL_MODE__ sl@0: sl@0: /** sl@0: Create initial trace output required for the specified trace category. sl@0: E.g. For the EThreadIdentification category, this will cause traces which identify sl@0: all threads already in existence at this point. sl@0: sl@0: @aCategory The trace category, or -1 to indicate all trace categories. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: IMPORT_C static void Prime(TInt aCategory=-1); sl@0: sl@0: /** sl@0: Prototype for function which is called to output trace records. sl@0: I.e. as set by SetHandler(). sl@0: sl@0: The handler function should output all values which are appropriate for the sl@0: trace as specified in aHeader. sl@0: sl@0: @param aHeader The 4 bytes for the trace header. sl@0: @param aHeader2 The second header word. sl@0: (If EHeader2Present is set in the header flags.) sl@0: @param aContext The context id. sl@0: (If EContextIdPresent is set in the header flags.) sl@0: @param a1 The first four bytes of trace data. sl@0: (Only if the header size indicates that this is present.) sl@0: @param a2 The second four bytes of trace data. sl@0: (Only if the header size indicates that this is present.) sl@0: @param a3 This is either the third four bytes of trace data, if sl@0: the header size indicates there is between 9 and 12 bytes sl@0: of trace data. If more than 12 of trace data are indicated, then sl@0: a3 contains a pointer to the remaining trace data, bytes 8 trough to N. sl@0: This trace data is word aligned. sl@0: @param aExtra The 'extra' value. sl@0: (If EExtraPresent is set in the header flags.) sl@0: @param aPc The Program Counter value. sl@0: (If EPcPresent is set in the header flags.) sl@0: sl@0: @return True, if the trace handler is enabled and outputting trace. sl@0: False otherwise. sl@0: sl@0: Here is an example implementation of a trace handler: sl@0: sl@0: @code sl@0: TInt size = (aHeader>>BTrace::ESizeIndex*8)&0xff; sl@0: TInt flags = (aHeader>>BTrace::EFlagsIndex*8)&0xff; sl@0: Output(aHeader), size -= 4; sl@0: if(flags&BTrace::EHeader2Present) sl@0: Output(aHeader2), size -= 4; sl@0: if(flags&BTrace::EContextIdPresent) sl@0: Output(aContext), size -= 4; sl@0: if(flags&BTrace::EPcPresent) sl@0: Output(aPc), size -= 4; sl@0: if(flags&BTrace::EExtraPresent) sl@0: Output(aExtra), size -= 4; sl@0: if(size<=0) sl@0: return ETrue; sl@0: Output(a1), size -= 4; sl@0: if(size<=0) sl@0: return ETrue; sl@0: Output(a2), size -= 4; sl@0: if(size<=0) sl@0: return ETrue; sl@0: if(size<=4) sl@0: Output(a3); sl@0: else sl@0: { sl@0: TUint32* data = (TUint32*)a3; sl@0: TUint32* end = (TUint32*)(a3+size); sl@0: do Output(*data++); while(data