kernel/eka/include/e32btrace.h
changeset 90 947f0dc9f7a8
parent 31 56f325a607ea
child 109 b3a1d9898418
--- a/kernel/eka/include/e32btrace.h	Tue Feb 02 01:24:03 2010 +0200
+++ b/kernel/eka/include/e32btrace.h	Fri Apr 16 16:24:37 2010 +0300
@@ -59,11 +59,11 @@
 					typically will contain the same values as would be returned by
 					User::FastCounter() or NKern::FastCounter().
 					This value is only present if the ETimestampPresent flag is set.
--#	Timestamp2.		Additional timestamp information. E.g. the most significant
+-#	Timestamp2. 	Additional timestamp information. E.g. the most significant
 					half of a 64bit timestamp value. Note, it is valid for a Timestamp2 value
 					to be present even if the previous Timestamp is absent.
 					This value is only present if the ETimestamp2Present flag is set.
--#	Context ID.		This value indicates the context in which the trace was generated.
+-#	Context ID. 	This value indicates the context in which the trace was generated.
 					The meaning of the id is dependent on the contents of the two
 					least significant bits:
 					-	00	indicates the value is the address of the NThread object for
@@ -207,7 +207,7 @@
 		/**
 		Header2 is present in the trace record.
 		*/
-		EHeader2Present		= 1<<0,
+		EHeader2Present 	= 1<<0,
 
 		/**
 		A timestamp value is present in the trace record.
@@ -308,7 +308,7 @@
 		/**
 		Indicates that this trace is the first part of a multipart trace.
 		*/
-		EMultipartFirst			= 1,
+		EMultipartFirst 		= 1,
 
 		/**
 		Indicates that this trace is a middle part of a multipart trace.
@@ -379,28 +379,27 @@
 		*/
 		ECpuUsage = 4,
 
-        /**
-        Category used for profiling device drivers, kernel extensions etc.
-        Used by PERF_LOG macro.
-        @prototype 9.3
-        */
-        EKernPerfLog = 5,
-
-        /**
+		/**
+		Category used for profiling device drivers, kernel extensions etc.
+		Used by PERF_LOG macro.
+		@prototype 9.3
+		*/
+		EKernPerfLog = 5,
+
+		/**
 		Trace generated when client-server activity takes place such as server creation,
 		session management, message handling, etc.
-
 		If #Prime is called with this category, traces will be generated for all
 		servers currently running and their sessions.
-        */
-        EClientServer = 6,
-
-        /**
+		*/
+		EClientServer = 6,
+
+		/**
 		Trace generated on thread request completion.
-        */
-        ERequests = 7,
-
-        /**
+		*/
+		ERequests = 7,
+
+		/**
 		Trace generated when chunks are created and destroyed, and when memory
 		is committed and decommitted to and from chunks.
 
@@ -408,10 +407,10 @@
 		chunks currently extant.
 
 		@see TChunks
-        */
-        EChunks = 8,
-
-        /**
+		*/
+		EChunks = 8,
+
+		/**
 		Trace generated when code segments are created and destroyed, mapped
 		into out of processes, and when memory is committed and decommitted to
 		and from them.
@@ -420,8 +419,8 @@
 		code segments currently extant.
 
 		@see TCodeSegs
-        */
-        ECodeSegs = 9,
+		*/
+		ECodeSegs = 9,
 
 		/**
 		Trace generated by Demand Paging.
@@ -442,7 +441,7 @@
 
 		@see enum TThreadPriority
 		@internalTechnology
-        @prototype 9.3
+		@prototype 9.3
 		*/
 		EThreadPriority = 11,
 
@@ -512,17 +511,17 @@
 		EProfiling = 18,
 
 		/**
-        Trace generated by Power Resource Manager.
-        @prototype 9.5
-        */
-        EResourceManager = 19,
-
-
-        /**
-        Trace generated by Power Resource Manager User-Side API.
-        @prototype 9.5
-        */
-        EResourceManagerUs = 20,
+		Trace generated by Power Resource Manager.
+		@prototype 9.5
+		*/
+		EResourceManager = 19,
+
+
+		/**
+		Trace generated by Power Resource Manager User-Side API.
+		@prototype 9.5
+		*/
+		EResourceManagerUs = 20,
 
 		/**
 		Trace generated by Raw Event subsystem APIs
@@ -536,13 +535,13 @@
 		of standard logging (conditional Kern::Printf() calls) is sufficiently
 		time-consuming that the required device timings mandated by the core
 		USB standards cannot be achieved
-        @prototype 9.5
+		@prototype 9.5
 		*/
 		EUsb = 22,
 
 		/**
 		Trace generated by Symbian OS kernel synchronization objects.
-        @prototype 9.5
+		@prototype 9.5
 		*/
 		ESymbianKernelSync = 23,
 
@@ -552,10 +551,22 @@
 		EFlexibleMemModel = 24,
 
 		/**
-        Trace generated by IIC bus.
-        @prototype 9.6
-        */
-        EIic = 25,
+		Trace generated by IIC bus.
+		@prototype 9.6
+		*/
+		EIic = 25,
+
+		/**
+		Trace generated by load balancing or higher-level scheduling
+		@prototype 9.6
+		*/
+		EHSched = 26,
+
+		/**
+		Trace generated by the nanokernel
+		@prototype 9.6
+		*/
+		ENKern = 27,
 
 		/**
 		First category value in the range reserved for platform specific use;
@@ -768,10 +779,10 @@
 		ENewThreadContext
 		};
 
-    /**
+	/**
 	@internalTechnology
-    @prototype 9.3
-    */
+	@prototype 9.3
+	*/
 	enum TClientServer
 		{
 		/**
@@ -845,7 +856,7 @@
 		Trace data format:
 		- 4 bytes containing the message handle.
 		- 4 bytes containing the completion reason, or object handle, value.
-		    (The object handle value is that which is delivered to the sender of the
+			(The object handle value is that which is delivered to the sender of the
 			message, not that supplied by the server actually completing the request.)
 
 		The context id (NThread*) in this trace is that of the thread which completed the message.
@@ -854,10 +865,10 @@
 		};
 
 
-    /**
+	/**
 	@internalTechnology
-    @prototype 9.3
-    */
+	@prototype 9.3
+	*/
 	enum TRequests
 		{
 		/**
@@ -1426,10 +1437,10 @@
 		EPagingPageTableAlloc,
 		};
 
-    /**
+	/**
 	Enumeration of sub-category values for trace category EResourceManager.
 	@see EResourceManager
-    @prototype 9.5
+	@prototype 9.5
 	*/
 	enum TResourceManager
 		{
@@ -1710,10 +1721,10 @@
 		*/
 		EDeRegisterResourceDependency
 		};
-    /**
+	/**
 	Enumeration of sub-category values for trace category EResourceManagerUs.
 	@see EResourceManagerUs
-    @prototype 9.5
+	@prototype 9.5
 	*/
 	enum TResourceManagerUs
 		{
@@ -1850,7 +1861,7 @@
 	Enumeration of sub-category values for trace category EThreadPriority.
 	@see EThreadPriority
 	@internalTechnology
-    @prototype 9.3
+	@prototype 9.3
 	*/
 	enum TThreadPriority
 		{
@@ -2489,7 +2500,7 @@
 
 		/**
 		Event generated when DRamAllocator::ZoneAllocRamPages has successfully
-		allocated all the requested RAM pages.  If DRamAllocator::ZoneAllocRamPages
+		allocated all the requested RAM pages.	If DRamAllocator::ZoneAllocRamPages
 		couldn't allocate all the requested pages then this event is not generated.
 
 		Trace data format:
@@ -2589,7 +2600,7 @@
 		/**
 		CPU sample from non-Symbian thread.
 
-  		Trace data format:
+		Trace data format:
 		- no extra bytes are sent
 		*/
 		ECpuNonSymbianThreadSample
@@ -2634,7 +2645,7 @@
 		--4 bytes containining the Z co-ordinate
 		--4 bytes containining the PointerNumber
 
-  		if there are  7*4 byte data
+		if there are  7*4 byte data
 		- 4 bytes containing the event type
 		--4 bytes containining the X co-ordinate
 		--4 bytes containining the Y co-ordinate
@@ -2880,7 +2891,7 @@
 		// The following traces associate memory model objects with the kernel objects that use them
 
 		/**
-	    A memory object is being used for the contents of a chunk.
+		A memory object is being used for the contents of a chunk.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2889,7 +2900,7 @@
 		EMemoryObjectIsChunk,
 
 		/**
-	    A memory object is being used for the contents of a code segment.
+		A memory object is being used for the contents of a code segment.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2898,7 +2909,7 @@
 		EMemoryObjectIsCodeSeg,
 
 		/**
-	    A memory object is being used for process static data.
+		A memory object is being used for process static data.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2907,7 +2918,7 @@
 		EMemoryObjectIsProcessStaticData,
 
 		/**
-	    A memory object is being used for DLL static data.
+		A memory object is being used for DLL static data.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2917,7 +2928,7 @@
 		EMemoryObjectIsDllStaticData,
 
 		/**
-	    A memory object is being used for a thread's supervisor stack.
+		A memory object is being used for a thread's supervisor stack.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2926,7 +2937,7 @@
 		EMemoryObjectIsSupervisorStack,
 
 		/**
-	    A memory object is being used for a thread's user stack.
+		A memory object is being used for a thread's user stack.
 
 		Trace data format:
 		- 4 bytes containing the memory object id (a DMemoryObject*).
@@ -2945,10 +2956,10 @@
 		EAddressSpaceId
 		};
 
-    /**
+	/**
 	Enumeration of sub-category values for trace category EIic.
 	@see EIic
-    @prototype 9.6
+	@prototype 9.6
 	*/
 	enum TIic
 		{
@@ -3444,6 +3455,22 @@
 		};
 
 	/**
+	Enumeration of sub-category values for trace category EHSched.
+	@see EHSched
+	@prototype 9.6
+	*/
+	enum THSched
+		{
+		/**
+		Trace output when a thread has been processed by the load balancer
+		Trace data format:
+		- 4 bytes containing pointer to thread
+		- 4 bytes containing flags indicating result of balancing
+		*/
+		ELbDone = 0,
+		};
+
+	/**
 	Calculate the address of the next trace record.
 	@param aCurrentRecord A pointer to a trace record.
 	@return The address of the trace record which follows aCurrentRecord.
@@ -3472,9 +3499,9 @@
 	trace as specified in aHeader.
 
 	@param aHeader	The 4 bytes for the trace header.
-	@param aHeader2	The second header word.
+	@param aHeader2 The second header word.
 					(If EHeader2Present is set in the header flags.)
-	@param aContext	The context id.
+	@param aContext The context id.
 					(If EContextIdPresent is set in the header flags.)
 	@param a1		The first four bytes of trace data.
 					(Only if the header size indicates that this is present.)
@@ -3490,7 +3517,7 @@
 	@param aPc		The Program Counter value.
 					(If EPcPresent is set in the header flags.)
 
-	@return			True, if the trace handler is enabled and outputting trace.
+	@return 		True, if the trace handler is enabled and outputting trace.
 					False otherwise.
 
 	Here is an example implementation of a trace handler:
@@ -3606,7 +3633,7 @@
 	/**
 	Set the secondary trace filter to include only the specified UIDs.
 
-	@param aUids    Pointer to array of UIDs.
+	@param aUids	Pointer to array of UIDs.
 	@param aNumUids Number of UID values pointer to by \a aUid.
 
 	@return KErrNone on success.
@@ -3643,7 +3670,7 @@
 	/**
 	Get the contents of the secondary trace filter.
 
-	@param[out] aUids   Pointer to array of UIDs contained in the secondary filter.
+	@param[out] aUids	Pointer to array of UIDs contained in the secondary filter.
 						Ownership of this array is passed to the caller of this
 						function, which is then responsible for deleting it.
 						If filter is empty, \a aUid equals zero.
@@ -3656,7 +3683,7 @@
 
 
 	@pre Call in a thread context.
-    @pre Calling thread must be in a critical section.
+	@pre Calling thread must be in a critical section.
 
 	@publishedPartner
 	@released
@@ -3808,7 +3835,7 @@
 	@param aCategory  A category value from enum BTrace::TCategory.
 					  Only the 8 least significant bits in this value are used;
 					  other bits are ignored.
-	@param aUid       A UID to filter on.
+	@param aUid 	  A UID to filter on.
 
 	@return True if a trace with this specification would be passed by the filters.
 			False if a trace with this specification would be dropped by the filters.
@@ -3903,9 +3930,9 @@
 	*/
 	struct SExecExtension
 		{
-		TUint32	iA2;
-		TUint32	iA3;
-		TUint32	iPc;
+		TUint32 iA2;
+		TUint32 iA3;
+		TUint32 iPc;
 		};
 
 	/**
@@ -3974,7 +4001,7 @@
 /**
 @internalComponent
 */
-#define BTRACE_HEADER(aSize,aCategory,aSubCategory)			\
+#define BTRACE_HEADER(aSize,aCategory,aSubCategory) 		\
 	(((aSize)<<BTrace::ESizeIndex*8)							\
 	+((aCategory)<<BTrace::ECategoryIndex*8)					\
 	+((aSubCategory)<<BTrace::ESubCategoryIndex*8))
@@ -4402,7 +4429,7 @@
 @publishedPartner
 @released
 */
-#define BTraceContextPc4(aCategory,aSubCategory,a1)	\
+#define BTraceContextPc4(aCategory,aSubCategory,a1) \
 	((BTrace::TBTrace2)BTrace::OutX) \
 		(BTRACE_HEADER_CP(8,(aCategory),(aSubCategory)),(TUint32)(a1))
 
@@ -4505,7 +4532,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The 32bit quantity which forms the data of this trace record.
+@param aUid 		The 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
 @publishedPartner
@@ -4525,7 +4552,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
@@ -4546,7 +4573,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param a2			The third 32bit quantity which forms the data of this trace record.
 
@@ -4566,7 +4593,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
@@ -4593,7 +4620,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
 @param aDataSize	Number of bytes of additional data.
@@ -4618,7 +4645,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The 32bit quantity which forms the data of this trace record.
+@param aUid 		The 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
 @publishedPartner
@@ -4638,7 +4665,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
@@ -4659,7 +4686,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param a2			The third 32bit quantity which forms the data of this trace record.
 
@@ -4679,7 +4706,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
@@ -4706,7 +4733,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
 @param aDataSize	Number of bytes of additional data.
@@ -4731,7 +4758,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The 32bit quantity which forms the data of this trace record.
+@param aUid 		The 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
 @publishedPartner
@@ -4751,7 +4778,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
@@ -4772,7 +4799,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param a2			The third 32bit quantity which forms the data of this trace record.
 
@@ -4792,7 +4819,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
@@ -4819,7 +4846,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
 @param aDataSize	Number of bytes of additional data.
@@ -4846,7 +4873,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The 32bit quantity which forms the data of this trace record.
+@param aUid 		The 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
 @publishedPartner
@@ -4867,7 +4894,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 
 @return True if trace is enabled for aCategory and aUid, false otherwise.
@@ -4889,7 +4916,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param a2			The third 32bit quantity which forms the data of this trace record.
 
@@ -4910,7 +4937,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param a1			The second 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
@@ -4938,7 +4965,7 @@
 @param aCategory	A value from enum BTrace::TCategory,
 @param aSubCategory Sub-category value between 0 and 255.
 					The meaning of this is dependent on the Category.
-@param aUid			The first 32bit quantity which forms the data of this trace record.
+@param aUid 		The first 32bit quantity which forms the data of this trace record.
 @param aData		Address of addition data to add to trace.
 					Must be word aligned, i.e. a multiple of 4.
 @param aDataSize	Number of bytes of additional data.