Binary file perfsrv/analyzetool/doc/S60_AnalyzeTool_Users_Guide.doc has changed
--- a/perfsrv/memspy/CommandLine/Include/MemSpyCommandLine.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/CommandLine/Include/MemSpyCommandLine.h Tue Oct 26 16:20:32 2010 +0300
@@ -69,6 +69,7 @@
void ParseSWMTParametersL( const CDesCArray& aParameters, TInt& aCategories, TDes& aFilter );
TInt FindBatchFile( TDes &aFileName );
TInt FindFile( TDes &aFileName, const TDesC &aDirPath );
+ void PrintHelp();
private: // Console write methods
void RedrawInputPrompt();
--- a/perfsrv/memspy/CommandLine/Include/MemSpyCommands.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/CommandLine/Include/MemSpyCommands.h Tue Oct 26 16:20:32 2010 +0300
@@ -43,7 +43,7 @@
_LIT( KHelpMessage, "=== MemSpy CommandLineInterpreter Help ===\r\n" );
_LIT( KHelpOutputCommand, "Change output mode to trace: 'memspy output trace'\r\n" );
_LIT( KHelpOutputToFileCommand, "Change output mode to trace: 'memspy output file'\r\n" );
-_LIT( KHelpHeapDumpCommand, "Heap dump: 'memspy heapdup <all | kernel | user heap filter >'\r\n" );
+_LIT( KHelpHeapDumpCommand, "Heap dump: 'memspy heapdump <all | kernel | user heap filter >'\r\n" );
_LIT( KHelpSwmtCommand, "SWMT: 'memspy swmt <starttimer <value in seconds> | stop timer | dumpnow > <categories>'\r\n" );
_LIT( KHelpKillServerCommand, "Kill server: 'memspy killserver'\r\n" );
_LIT( KHelpCommand, "Press 'c' to continue" );
--- a/perfsrv/memspy/CommandLine/Source/MemSpyCommandLine.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/CommandLine/Source/MemSpyCommandLine.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -94,7 +94,7 @@
}
else if ( count == 1 )
{
- TRACE( RDebug::Printf( "[MemSpyCmdLine] CMemSpyCommandLine::PerformOpL() - nno commands and parameters set" ) );
+ PrintHelp();
}
else
{
@@ -132,22 +132,7 @@
aCommand.CompareF(KMemSpyCmdHelp3) == 0 ||
aCommand.CompareF(KMemSpyCmdHelp4) == 0)
{
- iConsole.Write(KHelpMessage);
- iConsole.Write(KMemSpyCLINewLine);
- iConsole.Write(KHelpOutputCommand);
- iConsole.Write(KHelpOutputToFileCommand);
- iConsole.Write(KHelpHeapDumpCommand);
- iConsole.Write(KHelpSwmtCommand);
- iConsole.Write(KHelpKillServerCommand);
- iConsole.Write(KMemSpyCLINewLine);
- iConsole.Write(KHelpCommand);
-
- // Show input prompt.
- iCommandPromptPos = iConsole.CursorPos();
- RedrawInputPrompt();
- WaitForInput();
-
- CActiveScheduler::Start();
+ PrintHelp();
}
// --- OUTPUT
//TODO: directory option to be added
@@ -707,3 +692,24 @@
RedrawInputPrompt();
}
}
+
+
+void CMemSpyCommandLine::PrintHelp()
+ {
+ iConsole.Write(KHelpMessage);
+ iConsole.Write(KMemSpyCLINewLine);
+ iConsole.Write(KHelpOutputCommand);
+ iConsole.Write(KHelpOutputToFileCommand);
+ iConsole.Write(KHelpHeapDumpCommand);
+ iConsole.Write(KHelpSwmtCommand);
+ iConsole.Write(KHelpKillServerCommand);
+ iConsole.Write(KMemSpyCLINewLine);
+ iConsole.Write(KHelpCommand);
+
+ // Show input prompt.
+ iCommandPromptPos = iConsole.CursorPos();
+ RedrawInputPrompt();
+ WaitForInput();
+
+ CActiveScheduler::Start();
+ }
--- a/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverHeap.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverHeap.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -49,7 +49,9 @@
return TMemSpyHeapInfo::ETypeRHeap;
case LtkUtils::RAllocatorHelper::ETypeRHybridHeap:
return TMemSpyHeapInfo::ETypeRHybridHeap;
- case LtkUtils::RAllocatorHelper::ETypeUnknown:
+ case LtkUtils::RAllocatorHelper::ETypeRHybridHeapV2:
+ return TMemSpyHeapInfo::ETypeRHybridHeapV2;
+ case LtkUtils::RAllocatorHelper::ETypeUnknown:
default:
return TMemSpyHeapInfo::ETypeUnknown;
}
--- a/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverInspectedProcess.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverInspectedProcess.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -102,8 +102,9 @@
// the user-side thread stacks.
iInfoCurrent.iMemoryStack = StackSize( *aProcess );
- // Request events
- EventMonitor().RequestEvents( *this );
+ // Request events
+ // Ignore error since it can only be KErrAlreadyExists or KErrNone
+ (void) EventMonitor().RequestEvents( *this );
// Find initial chunks that are mapped into process
FindChunks( *aProcess );
@@ -111,8 +112,8 @@
// Indicate that we have data waiting for client. This will
// cause the client's RS to be completed as soon as it
// registers with us...
- UpdateStatistics();
- CompleteClientsRequest( KErrNone, &iInfoCurrent );
+ (void) UpdateStatistics();// Ignore return since we don't care if it's different or not
+ CompleteClientsRequest( KErrNone, &iInfoCurrent );
}
}
//
--- a/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverInspectedProcessManager.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverInspectedProcessManager.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -33,8 +33,11 @@
TRACE( Kern::Printf("DMemSpyInspectedProcessManager::~DMemSpyInspectedProcessManager() - START"));
NKern::ThreadEnterCS();
- TRACE( Kern::Printf("DMemSpyInspectedProcessManager::~DMemSpyInspectedProcessManager() - cancelling event monitor..."));
- EventMonitor().RequestEventsCancel( *this );
+ if ( iDevice )
+ {
+ TRACE( Kern::Printf("DMemSpyInspectedProcessManager::~DMemSpyInspectedProcessManager() - cancelling event monitor..."));
+ EventMonitor().RequestEventsCancel( *this );
+ }
TRACE( Kern::Printf("DMemSpyInspectedProcessManager::~DMemSpyInspectedProcessManager() - freeing all inspected processes..."));
FreeAllInspectedProcesses();
--- a/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverXferBuffer.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/MemSpyDriverXferBuffer.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -41,9 +41,12 @@
{
TRACE( Kern::Printf("DMemSpyDriverXferBuffer::~DMemSpyDriverXferBuffer() - START - this: 0x%08x", this ));
- NKern::ThreadEnterCS();
- delete iBuffer;
- NKern::ThreadLeaveCS();
+ if (iBuffer)
+ {
+ NKern::ThreadEnterCS();
+ delete iBuffer;
+ NKern::ThreadLeaveCS();
+ }
TRACE( Kern::Printf("DMemSpyDriverXferBuffer::~DMemSpyDriverXferBuffer() - END - this: 0x%08x", this ));
}
--- a/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanChunks.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanChunks.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -113,8 +113,7 @@
const TInt maxCount = params.iMaxCount;
TRACE( Kern::Printf("DMemSpyDriverLogChanChunks::GetChunkHandles() - START - id: %d, maxCount: %d, type: %d", params.iId, maxCount, params.iType));
-
- DMemSpyDriverOSAdaptionDChunk& chunkAdaption = OSAdaption().DChunk();
+
DMemSpyDriverOSAdaptionDThread& threadAdaption = OSAdaption().DThread();
DMemSpyDriverOSAdaptionDProcess& processAdaption = OSAdaption().DProcess();
--- a/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanContainers.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanContainers.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -742,9 +742,10 @@
const TBool isReady = pra.GetIsReady( *object );
TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo() - isReady: %d", isReady ));
+ TMemSpyDriverPAndSInfo params;
if ( isReady )
{
- TMemSpyDriverPAndSInfo params;
+ //TMemSpyDriverPAndSInfo params;
//
params.iType = pra.GetType( *object );
params.iCategory = pra.GetCategory( *object );
@@ -754,7 +755,8 @@
params.iCreatorSID = pra.GetCreatorSID( *object );
//
TRACE( Kern::Printf("DMemSpyDriverLogChanContainers::GetPAndSInfo - writing back to client thread..."));
- r = Kern::ThreadRawWrite( &ClientThread(), aInfo, ¶ms, sizeof( TMemSpyDriverPAndSInfo ) );
+ //r = Kern::ThreadRawWrite( &ClientThread(), aInfo, ¶ms, sizeof( TMemSpyDriverPAndSInfo ) );
+ r = KErrNone; //--
}
else
{
@@ -762,6 +764,13 @@
}
NKern::UnlockSystem();
+ //--
+ if( r == KErrNone )
+ {
+ r = Kern::ThreadRawWrite( &ClientThread(), aInfo, ¶ms, sizeof( TMemSpyDriverPAndSInfo ) );
+ }
+
+ //--
object->Close(NULL);
}
@@ -870,9 +879,7 @@
{
TRACE( Kern::Printf("DMemSpyDriverLogChanMisc::GetCondVarSuspThrInfo() - END - params read error: %d", r));
return r;
- }
-
- DMemSpyDriverOSAdaptionDThread& threadAdaption = OSAdaption().DThread();
+ }
NKern::ThreadEnterCS();
--- a/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapDataUser.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Kernel/Source/SubChannels/MemSpyDriverLogChanHeapDataUser.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -109,7 +109,7 @@
TRACE( Kern::Printf("DMemSpyDriverLogChanHeapDataUser::GetInfoData - opening client heap returned: %d", r) );
if ( r == KErrNone )
- {
+ {
// This object holds all of the info we will accumulate for the client.
TMemSpyHeapInfo masterHeapInfo;
masterHeapInfo.SetType(rHeap.GetTypeFromHelper());
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/Driver/Shared/heapoffsets.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,231 @@
+// heaputils.h
+//
+// Copyright (c) 2010 Accenture. All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Accenture - Initial contribution
+//
+// Contributors:
+// Adrian Issott (Nokia) - Updates for RHybridHeap v2
+//
+
+#ifndef FSHELL_HEAP_OFFSETS_H
+#define FSHELL_HEAP_OFFSETS_H
+
+#include <e32def.h>
+
+#if defined(TEST_HYBRIDHEAP_V1_ASSERTS) || defined(TEST_HYBRIDHEAP_V2_ASSERTS)
+#define TEST_HYBRIDHEAP_COMMON_ASSERTS
+#endif
+
+#ifdef TEST_HYBRIDHEAP_COMMON_ASSERTS
+#define private public
+#include <e32def.h>
+#endif
+
+#ifdef TEST_HYBRIDHEAP_V2_ASSERTS
+#include <e32panic.h>
+#include <kernel/heap_hybrid.h>
+#include "common.h"
+#include "heap_priv_defs.h"
+#include "dla.h"
+#endif
+
+#ifdef TEST_HYBRIDHEAP_COMMON_ASSERTS
+#include "slab.h"
+#include "page_alloc.h"
+#endif
+
+#ifdef TEST_HYBRIDHEAP_V1_ASSERTS
+#include <kernel/heap_hybrid.h>
+#endif
+
+
+/*
+ * This header provides offsets for use with three different types of heap algorithms:
+ * i) The original RHeap implemenation
+ * (RHeap v1)
+ * ii) The first RHybridHeap implemenation
+ * (RHeap v2 + RHybridHeap v1)
+ * iii) The second / refactored RHybridHeap implementation
+ * (RHeap v2 + RHybridHeap v2 + RDlAllocator + RPageAllocator + RSlabHeapAllocator)
+ */
+namespace LtkUtils
+ {
+
+//
+// OFFSETS COMMON TO ALL THREE HEAP CLASSES
+//
+
+class RHackAllocator : public RAllocator
+ {
+public:
+ using RAllocator::iHandles;
+ using RAllocator::iTotalAllocSize;
+ using RAllocator::iCellCount;
+ };
+
+class RHackHeap : public RHeap
+ {
+public:
+ // Careful, only allowed to use things that are in the same place for versions 1 and 2 of RHeap
+ using RHeap::iMaxLength;
+ using RHeap::iChunkHandle;
+ using RHeap::iLock;
+ using RHeap::iBase;
+ using RHeap::iAlign;
+ using RHeap::iTop;
+ };
+
+const TInt KChunkSizeOffset = 30*4;
+
+//
+// OFFSETS COMMON TO BOTH RHYBRIDHEAP CLASSES
+//
+
+namespace HeapV1
+ {
+
+const TInt KUserInitialHeapMetaDataSize = 34*4;
+
+ } // namespace HeapV1
+
+//
+// OFFSETS COMMON TO BOTH RHYBRIDHEAP CLASSES
+//
+
+namespace HybridCom
+ {
+
+const TInt KMallocStateTopSizeOffset = 3*4;
+const TInt KMallocStateTopOffset = 5*4;
+const TInt KMallocStateSegOffset = 105*4;
+const TInt KSlabParentOffset = 1*4;
+const TInt KSlabChild1Offset = 2*4;
+const TInt KSlabChild2Offset = 3*4;
+const TInt KSlabPayloadOffset = 4*4;
+const TInt KSlabsetSize = 4;
+//const TInt KDlOnlyOffset = 33*4;
+
+#define MAXSLABSIZE 56
+#define SLABSHIFT 10
+#define SLABSIZE (1 << SLABSHIFT)
+const TInt KMaxSlabPayload = SLABSIZE - KSlabPayloadOffset;
+
+#ifdef TEST_HYBRIDHEAP_COMMON_ASSERTS
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iChunkSize) == KChunkSizeOffset);
+__ASSERT_COMPILE(sizeof(malloc_state) == 107*4);
+#endif
+
+ } // namespace HybridCom
+
+//
+// OFFSETS SPECIFIC TO THE RHYBRIDHEAP V1 CLASSES
+//
+
+namespace HybridV1
+ {
+
+const TInt KUserPageMapOffset = 141*4;
+const TInt KMallocStateOffset = 34*4; // same for user and kernel heaps
+const TInt KUserSparePageOffset = 167*4;
+const TInt KUserPartialPageOffset = 165*4;
+const TInt KUserFullSlabOffset = 166*4;
+const TInt KUserSlabAllocOffset = 172*4;
+
+const TInt KUserInitialHeapMetaDataSize = 186*4;
+
+__ASSERT_COMPILE(HeapV1::KUserInitialHeapMetaDataSize < KUserInitialHeapMetaDataSize);
+
+#ifdef TEST_HYBRIDHEAP_V1_ASSERTS
+
+const TInt KUserHybridHeapSize = KUserInitialHeapMetaDataSize;
+
+#ifndef __KERNEL_MODE__
+__ASSERT_COMPILE(sizeof(RHybridHeap) == KUserHybridHeapSize);
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iPageMap) == KUserPageMapOffset);
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iSparePage) == KUserSparePageOffset);
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iPartialPage) == KUserPartialPageOffset);
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iSlabAlloc) == KUserSlabAllocOffset);
+__ASSERT_COMPILE(_FOFF(slab, iParent) == HybridCom::KSlabParentOffset);
+__ASSERT_COMPILE(_FOFF(slab, iChild1) == HybridCom::KSlabChild1Offset);
+__ASSERT_COMPILE(_FOFF(slab, iChild2) == HybridCom::KSlabChild2Offset);
+__ASSERT_COMPILE(_FOFF(slab, iPayload) == HybridCom::KSlabPayloadOffset);
+__ASSERT_COMPILE(sizeof(slabset) == HybridCom::KSlabsetSize);
+#endif
+__ASSERT_COMPILE(_FOFF(RHybridHeap, iGlobalMallocState) == KMallocStateOffset);
+__ASSERT_COMPILE(_FOFF(malloc_state, iTopSize) == HybridCom::KMallocStateTopSizeOffset);
+__ASSERT_COMPILE(_FOFF(malloc_state, iTop) == HybridCom::KMallocStateTopOffset);
+__ASSERT_COMPILE(_FOFF(malloc_state, iSeg) == HybridCom::KMallocStateSegOffset);
+
+#endif
+
+ } // namespace HybridV1
+
+//
+// OFFSETS SPECIFIC TO THE RHYBRIDHEAP V2 CLASSES
+//
+
+namespace HybridV2
+ {
+
+const TInt KUserPageMapOffset = 153*4;
+const TInt KUserMallocStateOffset = 45*4;
+const TInt KKernelMallocStateOffset = 37*4;
+const TInt KUserSparePageOffset = 175*4;
+const TInt KUserPartialPageOffset = 173*4;
+const TInt KUserFullSlabOffset = 174*4;
+const TInt KUserSlabAllocOffset = 180*4;
+const TInt KSelfReferenceOffset = 34*4; // same for user and kernel heaps
+const TInt KUserInitialHeapMetaDataSize = 194 * 4;
+const TInt KKernelInitialHeapMetaDataSize = 144 * 4;
+
+__ASSERT_COMPILE(HeapV1::KUserInitialHeapMetaDataSize < KUserInitialHeapMetaDataSize);
+__ASSERT_COMPILE(HeapV1::KUserInitialHeapMetaDataSize < KKernelInitialHeapMetaDataSize);
+__ASSERT_COMPILE(KSelfReferenceOffset == HybridV1::KMallocStateOffset);
+
+#ifdef TEST_HYBRIDHEAP_V2_ASSERTS
+
+const TInt KUserHybridHeapSize = 44*4;
+const TInt KUserDlAllocatorOffset = KUserHybridHeapSize;
+const TInt KUserPageAllocatorOffset = 152 * 4;
+const TInt KUserSlabAllocatorOffset = 172 * 4;
+
+const TInt KKernelHybridHeapSize = 36*4;
+const TInt KKernelDlAllocatorOffset = KKernelHybridHeapSize;
+
+
+#ifndef __KERNEL_MODE__
+__ASSERT_COMPILE(sizeof(RHybridHeap) == KUserHybridHeapSize);
+__ASSERT_COMPILE(sizeof(RDlAllocator) == KUserPageAllocatorOffset - KUserDlAllocatorOffset);
+__ASSERT_COMPILE(_FOFF(RDlAllocator, iDlaState) == KUserMallocStateOffset - KUserHybridHeapSize);
+__ASSERT_COMPILE(sizeof(RPageAllocator) == KUserSlabAllocatorOffset - KUserPageAllocatorOffset);
+__ASSERT_COMPILE(sizeof(RSlabHeapAllocator) == KUserInitialHeapMetaDataSize - KUserSlabAllocatorOffset);
+__ASSERT_COMPILE(sizeof(RHybridHeap) + sizeof(RDlAllocator) + sizeof(RPageAllocator) + sizeof(RSlabHeapAllocator) == KUserInitialHeapMetaDataSize);
+__ASSERT_COMPILE(_FOFF(RPageAllocator, iPageMap) == KUserPageMapOffset - KUserPageAllocatorOffset);
+__ASSERT_COMPILE(_FOFF(RSlabHeapAllocator, iSparePage) == KUserSparePageOffset - KUserSlabAllocatorOffset);
+__ASSERT_COMPILE(_FOFF(RSlabHeapAllocator, iPartialPage) == KUserPartialPageOffset - KUserSlabAllocatorOffset);
+__ASSERT_COMPILE(_FOFF(RSlabHeapAllocator, iSlabAlloc) == KUserSlabAllocOffset - KUserSlabAllocatorOffset);
+__ASSERT_COMPILE(_FOFF(TSlab, iParent) == HybridCom::KSlabParentOffset);
+__ASSERT_COMPILE(_FOFF(TSlab, iChild1) == HybridCom::KSlabChild1Offset);
+__ASSERT_COMPILE(_FOFF(TSlab, iChild2) == HybridCom::KSlabChild2Offset);
+__ASSERT_COMPILE(_FOFF(TSlab, iPayload) == HybridCom::KSlabPayloadOffset);
+__ASSERT_COMPILE(sizeof(TSlabSet) == HybridCom::KSlabsetSize);
+#endif
+__ASSERT_COMPILE(sizeof(RHybridHeap) == KKernelHybridHeapSize);
+__ASSERT_COMPILE(_FOFF(RDlAllocator, iDlaState) == KKernelMallocStateOffset - KKernelHybridHeapSize);
+__ASSERT_COMPILE(_FOFF(malloc_state, topsize) == HybridCom::KMallocStateTopSizeOffset);
+__ASSERT_COMPILE(_FOFF(malloc_state, top) == HybridCom::KMallocStateTopOffset);
+__ASSERT_COMPILE(_FOFF(malloc_state, seg) == HybridCom::KMallocStateSegOffset);
+
+#endif
+
+ } // namespace HybridV2
+
+ } // namespace LtkUtils
+
+#endif // FSHELL_HEAP_OFFSETS_H
--- a/perfsrv/memspy/Driver/Shared/heaputils.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Shared/heaputils.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -9,15 +9,18 @@
// Initial Contributors:
// Accenture - Initial contribution
//
-#ifdef TEST_HYBRIDHEAP_ASSERTS
-#define private public
-#include <e32def.h>
-#include "slab.h"
-#include "page_alloc.h"
-#include "heap_hybrid.h"
-#endif
+// Contributors:
+// Adrian Issott (Nokia) - Updates for kernel-side alloc helper & RHybridHeap v2
+//
#include "heaputils.h"
+#include "heapoffsets.h"
+
+enum THeapUtilsPanic
+ {
+ EUnsupportedAllocatorType,
+ EUserHeapOffsetRequestedForKernelHeap,
+ };
#ifdef __KERNEL_MODE__
@@ -26,34 +29,47 @@
__ASSERT_COMPILE(sizeof(LtkUtils::RUserAllocatorHelper) == 10*4);
#define KERN_ENTER_CS() NKern::ThreadEnterCS()
#define KERN_LEAVE_CS() NKern::ThreadLeaveCS()
+#ifdef _DEBUG
+#define LOG(args...) Kern::Printf(args)
+#else
#define LOG(args...)
+#endif
#define HUEXPORT_C
-#else
+#define PANIC(r) Kern::Fault( "HeapUtils", (r) );
+
+#else // __KERNEL_MODE__
#include <e32std.h>
#define MEM User
#define KERN_ENTER_CS()
#define KERN_LEAVE_CS()
-//#include <e32debug.h>
-//#define LOG(args...) RDebug::Printf(args)
+#ifdef _DEBUG
+#include <e32debug.h>
+#define LOG(args...) RDebug::Printf(args)
+#else
#define LOG(args...)
-
+#endif
#ifdef STANDALONE_ALLOCHELPER
#define HUEXPORT_C
#else
#define HUEXPORT_C EXPORT_C
#endif
-
+#define PANIC(r) User::Panic( _L("HeapUtils"), (r) );
#endif // __KERNEL_MODE__
using LtkUtils::RAllocatorHelper;
+
+#ifndef TEST_HYBRIDHEAP_V2_ASSERTS
const TUint KPageSize = 4096;
+#endif // TEST_HYBRIDHEAP_V2_ASSERTS
+
__ASSERT_COMPILE(sizeof(RAllocatorHelper) == 9*4);
// RAllocatorHelper
HUEXPORT_C RAllocatorHelper::RAllocatorHelper()
- : iAllocatorAddress(0), iAllocatorType(EUnknown), iInfo(NULL), iValidInfo(0), iTempSlabBitmap(NULL), iPageCache(NULL), iPageCacheAddr(0)
+ : iAllocatorAddress(0), iAllocatorType(EAllocatorNotSet), iInfo(NULL)
+ , iIsKernelHeapAllocator(EFalse), iTempSlabBitmap(NULL), iPageCache(NULL), iPageCacheAddr(0)
#ifdef __KERNEL_MODE__
, iChunk(NULL)
#endif
@@ -74,7 +90,8 @@
{
memclr(this, sizeof(THeapInfo));
}
-
+
+ TUint iValidInfo;
TInt iAllocatedSize; // number of bytes in allocated cells (excludes free cells, cell header overhead)
TInt iCommittedSize; // amount of memory actually committed (includes cell header overhead, gaps smaller than an MMU page)
TInt iAllocationCount; // number of allocations currently
@@ -123,6 +140,8 @@
TInt RAllocatorHelper::OpenKernelHeap()
{
+ SetIsKernelHeapAllocator(ETrue);
+
_LIT(KName, "SvHeap");
NKern::ThreadEnterCS();
DObjectCon* chunkContainer = Kern::Containers()[EChunk];
@@ -358,7 +377,9 @@
LtkUtils::RKernelCopyAllocatorHelper::RKernelCopyAllocatorHelper()
: iCopiedChunk(NULL), iOffset(0)
- {}
+ {
+ SetIsKernelHeapAllocator(ETrue);
+ }
TInt LtkUtils::RKernelCopyAllocatorHelper::OpenCopiedHeap(DChunk* aOriginalChunk, DChunk* aCopiedChunk, TInt aOffset)
{
@@ -439,20 +460,26 @@
TBool isTheKernelHeap = EFalse;
#endif
+ if (iAllocatorAddress == 0)
+ {
+ // Subclasses with more knowledge about the layout of the allocator within the chunk may have already set the iAllocatorAddress (eg kernel heap's allocator doesn't start at the chunk base)
+ iAllocatorAddress = aChunkBase;
+ }
+
TInt err = IdentifyAllocatorType(udeb, isTheKernelHeap);
- if (err == KErrNone && iAllocatorType == EAllocator)
+ if (err == KErrNone && iAllocatorType == EAllocatorUnknown)
{
// We've no reason to assume it's an allocator because we don't know the iAllocatorAddress actually is an RAllocator*
err = KErrNotFound;
}
- if (err && aChunkMaxSize > 0)
+ if (err && aChunkMaxSize > 0 && iAllocatorAddress == aChunkBase)
{
TInt oldErr = err;
TAllocatorType oldType = iAllocatorType;
// Try middle of chunk, in case it's an RHybridHeap
iAllocatorAddress += aChunkMaxSize / 2;
err = IdentifyAllocatorType(udeb, isTheKernelHeap);
- if (err || iAllocatorType == EAllocator)
+ if (err || iAllocatorType == EAllocatorUnknown)
{
// No better than before
iAllocatorAddress = aChunkBase;
@@ -469,7 +496,7 @@
TInt err = kernelAllocator->DebugFunction(7, NULL, NULL); // 7 is RAllocator::TAllocDebugOp::EGetFail
if (err == 9999)
{
- // udeb new hybrid heap
+ // udeb hybrid heap (v1 or v2)
udeb = ETrue;
}
else if (err == KErrNotSupported)
@@ -509,63 +536,6 @@
EHybridStats = 128,
};
-class RHackAllocator : public RAllocator
- {
-public:
- using RAllocator::iHandles;
- using RAllocator::iTotalAllocSize;
- using RAllocator::iCellCount;
- };
-
-class RHackHeap : public RHeap
- {
-public:
- // Careful, only allowed to use things that are still in the new RHeap, and are still in the same place
- using RHeap::iMaxLength;
- using RHeap::iChunkHandle;
- using RHeap::iLock;
- using RHeap::iBase;
- using RHeap::iAlign;
- using RHeap::iTop;
- };
-
-const TInt KChunkSizeOffset = 30*4;
-const TInt KPageMapOffset = 141*4;
-//const TInt KDlOnlyOffset = 33*4;
-const TInt KMallocStateOffset = 34*4;
-const TInt KMallocStateTopSizeOffset = 3*4;
-const TInt KMallocStateTopOffset = 5*4;
-const TInt KMallocStateSegOffset = 105*4;
-const TInt KUserHybridHeapSize = 186*4;
-const TInt KSparePageOffset = 167*4;
-const TInt KPartialPageOffset = 165*4;
-const TInt KFullSlabOffset = 166*4;
-const TInt KSlabAllocOffset = 172*4;
-const TInt KSlabParentOffset = 1*4;
-const TInt KSlabChild1Offset = 2*4;
-const TInt KSlabChild2Offset = 3*4;
-const TInt KSlabPayloadOffset = 4*4;
-const TInt KSlabsetSize = 4;
-
-#ifdef TEST_HYBRIDHEAP_ASSERTS
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iChunkSize) == KChunkSizeOffset);
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iPageMap) == KPageMapOffset);
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iGlobalMallocState) == KMallocStateOffset);
-__ASSERT_COMPILE(sizeof(malloc_state) == 107*4);
-__ASSERT_COMPILE(_FOFF(malloc_state, iTopSize) == KMallocStateTopSizeOffset);
-__ASSERT_COMPILE(_FOFF(malloc_state, iTop) == KMallocStateTopOffset);
-__ASSERT_COMPILE(_FOFF(malloc_state, iSeg) == KMallocStateSegOffset);
-__ASSERT_COMPILE(sizeof(RHybridHeap) == KUserHybridHeapSize);
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iSparePage) == KSparePageOffset);
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iPartialPage) == KPartialPageOffset);
-__ASSERT_COMPILE(_FOFF(RHybridHeap, iSlabAlloc) == KSlabAllocOffset);
-__ASSERT_COMPILE(_FOFF(slab, iParent) == KSlabParentOffset);
-__ASSERT_COMPILE(_FOFF(slab, iChild1) == KSlabChild1Offset);
-__ASSERT_COMPILE(_FOFF(slab, iChild2) == KSlabChild2Offset);
-__ASSERT_COMPILE(_FOFF(slab, iPayload) == KSlabPayloadOffset);
-__ASSERT_COMPILE(sizeof(slabset) == KSlabsetSize);
-#endif
-
TInt RAllocatorHelper::TryLock()
{
#ifdef __KERNEL_MODE__
@@ -574,7 +544,7 @@
if (m) Kern::MutexWait(*m);
return KErrNone;
#else
- if (iAllocatorType != EUnknown && iAllocatorType != EAllocator)
+ if (iAllocatorType != EAllocatorNotSet && iAllocatorType != EAllocatorUnknown)
{
RFastLock& lock = *reinterpret_cast<RFastLock*>(iAllocatorAddress + _FOFF(RHackHeap, iLock));
lock.Wait();
@@ -591,7 +561,7 @@
if (m) Kern::MutexSignal(*m);
NKern::ThreadLeaveCS();
#else
- if (iAllocatorType != EUnknown && iAllocatorType != EAllocator)
+ if (iAllocatorType != EAllocatorNotSet && iAllocatorType != EAllocatorUnknown)
{
RFastLock& lock = *reinterpret_cast<RFastLock*>(iAllocatorAddress + _FOFF(RHackHeap, iLock));
lock.Signal();
@@ -602,22 +572,23 @@
HUEXPORT_C void RAllocatorHelper::Close()
{
KERN_ENTER_CS();
- iAllocatorType = EUnknown;
+ iAllocatorType = EAllocatorNotSet;
iAllocatorAddress = 0;
delete iInfo;
iInfo = NULL;
- iValidInfo = 0;
MEM::Free(iTempSlabBitmap);
iTempSlabBitmap = NULL;
MEM::Free(iPageCache);
iPageCache = NULL;
iPageCacheAddr = 0;
+ SetIsKernelHeapAllocator(EFalse);
KERN_LEAVE_CS();
}
TInt RAllocatorHelper::IdentifyAllocatorType(TBool aAllocatorIsUdeb, TBool aIsTheKernelHeap)
{
- iAllocatorType = EUnknown;
+ iAllocatorType = EAllocatorNotSet;
+ SetIsKernelHeapAllocator(aIsTheKernelHeap);
TUint32 handlesPtr = 0;
TInt err = ReadWord(iAllocatorAddress + _FOFF(RHackAllocator, iHandles), handlesPtr);
@@ -632,21 +603,43 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iBase), base);
if (err) return err;
TInt objsize = (TInt)base - (TInt)iAllocatorAddress;
- if (objsize <= 32*4)
+
+ if (objsize <= HeapV1::KUserInitialHeapMetaDataSize)
{
// Old RHeap
iAllocatorType = aAllocatorIsUdeb ? EUdebOldRHeap : EUrelOldRHeap;
}
- else
+ else if (objsize > HybridV2::KSelfReferenceOffset) // same value as HybridV1::KMallocStateOffset so will be true for RHybridHeap V1 and V2
{
- // new hybrid heap - bigger than the old one. Likewise figure out if udeb or urel.
- iAllocatorType = aAllocatorIsUdeb ? EUdebHybridHeap : EUrelHybridHeap;
+ // First and second versions of hybrid heap are bigger than the original RHeap
+ // But the user and kernel side versions have different sizes
+
+ TUint32 possibleSelfRef = 0; // in the new refactored RHybridHeap ...
+ err = ReadWord(iAllocatorAddress + HybridV2::KSelfReferenceOffset, possibleSelfRef);
+ if (err) return err;
+
+ // Only the second version references itself
+ if (possibleSelfRef == iAllocatorAddress)
+ {
+ iAllocatorType = aAllocatorIsUdeb ? EUdebHybridHeapV2 : EUrelHybridHeapV2;
+ }
+ else
+ {
+ iAllocatorType = aAllocatorIsUdeb ? EUdebHybridHeap : EUrelHybridHeap;
+ }
}
+ else
+ {
+ iAllocatorType = EAllocatorUnknown;
+ }
}
else
{
- iAllocatorType = EAllocator;
+ iAllocatorType = EAllocatorUnknown;
}
+
+ LOG("RAllocatorHelper::IdentifyAllocatorType() - allocator at 0x%08x has type: %d", iAllocatorAddress, iAllocatorType);
+
return KErrNone;
}
@@ -656,16 +649,17 @@
switch (iAllocatorType)
{
+ // All of them are in the same place amazingly
case EUdebOldRHeap:
case EUdebHybridHeap:
- // By this reckoning, they're in the same place amazingly
+ case EUdebHybridHeapV2:
{
TLinAddr nestingAddr = (TLinAddr)aCell - 8;
err = WriteWord(nestingAddr, aNestingLevel);
break;
}
default:
- break;
+ return KErrNotSupported;
}
return err;
}
@@ -674,9 +668,10 @@
{
switch (iAllocatorType)
{
+ // All of them are in the same place amazingly
case EUdebOldRHeap:
case EUdebHybridHeap:
- // By this reckoning, they're in the same place amazingly
+ case EUdebHybridHeapV2:
{
TLinAddr nestingAddr = (TLinAddr)aCell - 8;
return ReadWord(nestingAddr, (TUint32&)aNestingLevel);
@@ -725,7 +720,7 @@
//iInfo->iCommittedSize = top - base;
iInfo->iCommittedSize = top - iAllocatorAddress;
- iValidInfo |= ECommitted;
+ iInfo->iValidInfo |= ECommitted;
}
if (aMask & EAllocated)
{
@@ -733,7 +728,7 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackAllocator, iTotalAllocSize), allocSize);
if (err) return err;
iInfo->iAllocatedSize = allocSize;
- iValidInfo |= EAllocated;
+ iInfo->iValidInfo |= EAllocated;
}
if (aMask & ECount)
{
@@ -741,7 +736,7 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackAllocator, iCellCount), count);
if (err) return err;
iInfo->iAllocationCount = count;
- iValidInfo |= ECount;
+ iInfo->iValidInfo |= ECount;
}
if (aMask & EMaxSize)
{
@@ -749,7 +744,7 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iMaxLength), maxlen);
if (err) return err;
iInfo->iMaxCommittedSize = maxlen;
- iValidInfo |= EMaxSize;
+ iInfo->iValidInfo |= EMaxSize;
}
if (aMask & EMinSize)
{
@@ -757,20 +752,22 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iMaxLength) - 4, minlen); // This isn't a typo! iMinLength is 4 bytes before iMaxLength, on old heap ONLY
if (err) return err;
iInfo->iMinCommittedSize = minlen;
- iValidInfo |= EMinSize;
+ iInfo->iValidInfo |= EMinSize;
}
if (aMask & KHeapWalkStatsForOldHeap)
{
// Need a heap walk
iInfo->ClearStats();
- iValidInfo = 0;
+ iInfo->iValidInfo = 0;
err = DoWalk(&WalkForStats, NULL);
- if (err == KErrNone) iValidInfo |= KHeapWalkStatsForOldHeap;
+ if (err == KErrNone) iInfo->iValidInfo |= KHeapWalkStatsForOldHeap;
}
return err;
}
case EUrelHybridHeap:
case EUdebHybridHeap:
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
{
TBool needWalk = EFalse;
if (aMask & ECommitted)
@@ -785,7 +782,7 @@
//err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iBase), baseAddr);
//if (err) return err;
iInfo->iCommittedSize = chunkSize; // - (baseAddr - iAllocatorAddress);
- iValidInfo |= ECommitted;
+ iInfo->iValidInfo |= ECommitted;
}
if (aMask & (EAllocated|ECount))
{
@@ -796,13 +793,13 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackAllocator, iTotalAllocSize), totalAlloc);
if (err) return err;
iInfo->iAllocatedSize = totalAlloc;
- iValidInfo |= EAllocated;
+ iInfo->iValidInfo |= EAllocated;
TUint32 cellCount = 0;
err = ReadWord(iAllocatorAddress + _FOFF(RHackAllocator, iCellCount), cellCount);
if (err) return err;
iInfo->iAllocationCount = cellCount;
- iValidInfo |= ECount;
+ iInfo->iValidInfo |= ECount;
}
else
{
@@ -816,7 +813,7 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iMaxLength), maxlen);
if (err) return err;
iInfo->iMaxCommittedSize = maxlen;
- iValidInfo |= EMaxSize;
+ iInfo->iValidInfo |= EMaxSize;
}
if (aMask & EMinSize)
{
@@ -824,7 +821,7 @@
err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iAlign) + 4*4, minlen); // iMinLength is in different place to old RHeap
if (err) return err;
iInfo->iMinCommittedSize = minlen;
- iValidInfo |= EMinSize;
+ iInfo->iValidInfo |= EMinSize;
}
if (aMask & (EUnusedPages|ECommittedFreeSpace|EHybridStats))
{
@@ -835,9 +832,9 @@
if (needWalk)
{
iInfo->ClearStats();
- iValidInfo = 0;
+ iInfo->iValidInfo = 0;
err = DoWalk(&WalkForStats, NULL);
- if (err == KErrNone) iValidInfo |= KHeapWalkStatsForNewHeap;
+ if (err == KErrNone) iInfo->iValidInfo |= KHeapWalkStatsForNewHeap;
}
return err;
}
@@ -848,7 +845,7 @@
TInt RAllocatorHelper::CheckValid(TUint aMask)
{
- if ((iValidInfo & aMask) == aMask)
+ if ((iInfo->iValidInfo & aMask) == aMask)
{
return KErrNone;
}
@@ -881,7 +878,7 @@
HUEXPORT_C TInt RAllocatorHelper::RefreshDetails()
{
- return RefreshDetails(iValidInfo);
+ return RefreshDetails(iInfo->iValidInfo);
}
HUEXPORT_C TInt RAllocatorHelper::MaxCommittedSize()
@@ -903,8 +900,10 @@
TUint32 allocCount = 0;
switch (iAllocatorType)
{
+ // All of them are in the same place amazingly
case EUdebOldRHeap:
- case EUdebHybridHeap: // Both are in the same place, amazingly
+ case EUdebHybridHeap:
+ case EUdebHybridHeapV2:
{
TLinAddr allocCountAddr = (TLinAddr)aCell - 4;
TInt err = ReadWord(allocCountAddr, allocCount);
@@ -916,6 +915,162 @@
}
}
+//
+
+void RAllocatorHelper::SetIsKernelHeapAllocator(TBool aIsKernelHeapAllocator)
+ {
+ iIsKernelHeapAllocator = aIsKernelHeapAllocator;
+ }
+
+TBool RAllocatorHelper::GetIsKernelHeapAllocator() const
+ {
+ return iIsKernelHeapAllocator;
+ }
+
+TInt RAllocatorHelper::PageMapOffset() const
+ {
+ if (GetIsKernelHeapAllocator())
+ {
+ PANIC(EUserHeapOffsetRequestedForKernelHeap);
+ }
+
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserPageMapOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserPageMapOffset;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::MallocStateOffset() const
+ {
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KMallocStateOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ if (GetIsKernelHeapAllocator())
+ {
+ return HybridV2::KKernelMallocStateOffset;
+ }
+ else
+ {
+ return HybridV2::KUserMallocStateOffset;
+ }
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::SparePageOffset() const
+ {
+ if (GetIsKernelHeapAllocator())
+ {
+ PANIC(EUserHeapOffsetRequestedForKernelHeap);
+ }
+
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserSparePageOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserSparePageOffset;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::PartialPageOffset() const
+ {
+ if (GetIsKernelHeapAllocator())
+ {
+ PANIC(EUserHeapOffsetRequestedForKernelHeap);
+ }
+
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserPartialPageOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserPartialPageOffset;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::FullSlabOffset() const
+ {
+ if (GetIsKernelHeapAllocator())
+ {
+ PANIC(EUserHeapOffsetRequestedForKernelHeap);
+ }
+
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserFullSlabOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserFullSlabOffset;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::SlabAllocOffset() const
+ {
+ if (GetIsKernelHeapAllocator())
+ {
+ PANIC(EUserHeapOffsetRequestedForKernelHeap);
+ }
+
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserSlabAllocOffset;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserSlabAllocOffset;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
+TInt RAllocatorHelper::UserInitialHeapMetaDataSize() const
+ {
+ switch (iAllocatorType)
+ {
+ case EUrelHybridHeap:
+ case EUdebHybridHeap:
+ return HybridV1::KUserInitialHeapMetaDataSize;
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return HybridV2::KUserInitialHeapMetaDataSize;
+ default:
+ PANIC(EUnsupportedAllocatorType);
+ return KErrNotSupported; // only needed to make the compiler happy
+ }
+ }
+
struct SContext3
{
RAllocatorHelper::TWalkFunc3 iOrigWalkFn;
@@ -954,6 +1109,8 @@
break;
case EUrelHybridHeap:
case EUdebHybridHeap:
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
err = NewHotnessWalk(aCallbackFn, aContext);
break;
default:
@@ -1189,7 +1346,7 @@
{
//return 1U&(iBase[ix>>3] >> (ix&7));
TUint32 basePtr = 0;
- err = ReadWord(iAllocatorAddress + KPageMapOffset, basePtr);
+ err = ReadWord(iAllocatorAddress + PageMapOffset(), basePtr);
if (err) return 0;
TUint8 res = 0;
@@ -1203,7 +1360,7 @@
TInt RAllocatorHelper::PageMapFind(TUint start, TUint bit, TInt& err)
{
TUint32 iNbits = 0;
- err = ReadWord(iAllocatorAddress + KPageMapOffset + 4, iNbits);
+ err = ReadWord(iAllocatorAddress + PageMapOffset() + 4, iNbits);
if (err) return 0;
if (start<iNbits) do
@@ -1252,13 +1409,6 @@
enum TSlabType { ESlabFullInfo, ESlabPartialInfo, ESlabEmptyInfo };
-#ifndef TEST_HYBRIDHEAP_ASSERTS
-#define MAXSLABSIZE 56
-#define SLABSHIFT 10
-#define SLABSIZE (1 << SLABSHIFT)
-const TInt KMaxSlabPayload = SLABSIZE - KSlabPayloadOffset;
-#endif
-
TInt RAllocatorHelper::NewHotnessWalk(TWalkFunc3 aCallbackFn, TAny* aContext)
{
// RHybridHeap does paged, slab then DLA, so that's what we do too
@@ -1267,7 +1417,7 @@
TUint32 basePtr;
TInt err = ReadWord(iAllocatorAddress + _FOFF(RHackHeap, iBase), basePtr);
if (err) return err;
- if (basePtr < iAllocatorAddress + KUserHybridHeapSize)
+ if (basePtr < iAllocatorAddress + UserInitialHeapMetaDataSize())
{
// Must be a kernel one - don't do page and slab
}
@@ -1275,7 +1425,7 @@
{
// Paged
TUint32 membase = 0;
- err = ReadWord(iAllocatorAddress + KPageMapOffset + 8, membase);
+ err = ReadWord(iAllocatorAddress + PageMapOffset() + 8, membase);
if (err) return err;
TBool shouldContinue = ETrue;
@@ -1302,7 +1452,7 @@
// Slab
TUint32 sparePage = 0;
- err = ReadWord(iAllocatorAddress + KSparePageOffset, sparePage);
+ err = ReadWord(iAllocatorAddress + SparePageOffset(), sparePage);
if (err) return err;
if (sparePage)
{
@@ -1316,17 +1466,17 @@
}
//TreeWalk(&iFullSlab, &SlabFullInfo, i, wi);
- TInt err = TreeWalk(iAllocatorAddress + KFullSlabOffset, ESlabFullInfo, aCallbackFn, aContext, shouldContinue);
+ TInt err = TreeWalk(iAllocatorAddress + FullSlabOffset(), ESlabFullInfo, aCallbackFn, aContext, shouldContinue);
if (err || !shouldContinue) return err;
for (int ix = 0; ix < (MAXSLABSIZE>>2); ++ix)
{
- TUint32 partialAddr = iAllocatorAddress + KSlabAllocOffset + ix*KSlabsetSize;
+ TUint32 partialAddr = iAllocatorAddress + SlabAllocOffset() + ix*HybridCom::KSlabsetSize;
//TreeWalk(&iSlabAlloc[ix].iPartial, &SlabPartialInfo, i, wi);
err = TreeWalk(partialAddr, ESlabPartialInfo, aCallbackFn, aContext, shouldContinue);
if (err || !shouldContinue) return err;
}
//TreeWalk(&iPartialPage, &SlabEmptyInfo, i, wi);
- TreeWalk(iAllocatorAddress + KPartialPageOffset, ESlabEmptyInfo, aCallbackFn, aContext, shouldContinue);
+ TreeWalk(iAllocatorAddress + PartialPageOffset(), ESlabEmptyInfo, aCallbackFn, aContext, shouldContinue);
}
// DLA
@@ -1343,11 +1493,11 @@
#define INUSE_BITS 3
TUint32 topSize = 0;
- err = ReadWord(iAllocatorAddress + KMallocStateOffset + KMallocStateTopSizeOffset, topSize);
+ err = ReadWord(iAllocatorAddress + MallocStateOffset() + HybridCom::KMallocStateTopSizeOffset, topSize);
if (err) return err;
TUint32 top = 0;
- err = ReadWord(iAllocatorAddress + KMallocStateOffset + KMallocStateTopOffset, top);
+ err = ReadWord(iAllocatorAddress + MallocStateOffset() + HybridCom::KMallocStateTopOffset, top);
if (err) return err;
TInt max = ((topSize-1) & ~CHUNK_ALIGN_MASK) - CHUNK_OVERHEAD;
@@ -1358,7 +1508,7 @@
if (!shouldContinue) return KErrNone;
TUint32 mallocStateSegBase = 0;
- err = ReadWord(iAllocatorAddress + KMallocStateOffset + KMallocStateSegOffset, mallocStateSegBase);
+ err = ReadWord(iAllocatorAddress + MallocStateOffset() + HybridCom::KMallocStateSegOffset, mallocStateSegBase);
if (err) return err;
for (TLinAddr q = ALIGN_AS_CHUNK(mallocStateSegBase); q != top; /*q = NEXT_CHUNK(q)*/)
@@ -1412,7 +1562,7 @@
TUint32 c;
for(;;)
{
- err = ReadWord(s + KSlabChild1Offset, c);
+ err = ReadWord(s + HybridCom::KSlabChild1Offset, c);
if (err) return err;
if (c == 0) break;
else s = c;
@@ -1436,7 +1586,7 @@
TUint32 i = 0;
while ( i < count )
{
- TUint32 addr = s + KSlabPayloadOffset + i*size; //&aSlab->iPayload[i*size];
+ TUint32 addr = s + HybridCom::KSlabPayloadOffset + i*size; //&aSlab->iPayload[i*size];
shouldContinue = (*aCallbackFn)(*this, aContext, ESlabAllocation, addr + debugheadersize, size - debugheadersize);
if (!shouldContinue) return KErrNone;
i++;
@@ -1446,7 +1596,7 @@
case ESlabPartialInfo:
{
//TODO __HEAP_CORRUPTED_TEST_STATIC
- TUint32 count = KMaxSlabPayload / size;
+ TUint32 count = HybridCom::KMaxSlabPayload / size;
TUint32 freeOffset = (h & 0xff) << 2;
if (freeOffset == 0)
{
@@ -1457,7 +1607,7 @@
while (freeOffset)
{
wildernessCount--;
- TInt idx = (freeOffset-KSlabPayloadOffset)/size;
+ TInt idx = (freeOffset - HybridCom::KSlabPayloadOffset) / size;
LOG("iTempSlabBitmap freeOffset %d index %d", freeOffset, idx);
iTempSlabBitmap[idx] = 0; // Mark it as free
@@ -1470,7 +1620,7 @@
memset(iTempSlabBitmap + count - wildernessCount, 0, wildernessCount); // Mark the wilderness as free
for (TInt i = 0; i < count; i++)
{
- TLinAddr addr = s + KSlabPayloadOffset + i*size;
+ TLinAddr addr = s + HybridCom::KSlabPayloadOffset + i*size;
if (iTempSlabBitmap[i])
{
// In use
@@ -1497,8 +1647,8 @@
{
if (slabHeaderPageMap & (1<<slabIdx))
{
- TUint32 addr = pageAddr + SLABSIZE*slabIdx + KSlabPayloadOffset; //&aSlab->iPayload[i*size];
- shouldContinue = (*aCallbackFn)(*this, aContext, ESlabFreeSlab, addr, KMaxSlabPayload);
+ TUint32 addr = pageAddr + SLABSIZE*slabIdx + HybridCom::KSlabPayloadOffset; //&aSlab->iPayload[i*size];
+ shouldContinue = (*aCallbackFn)(*this, aContext, ESlabFreeSlab, addr, HybridCom::KMaxSlabPayload);
if (!shouldContinue) return KErrNone;
}
}
@@ -1507,7 +1657,7 @@
}
//c = s->iChild2;
- err = ReadWord(s + KSlabChild2Offset, c);
+ err = ReadWord(s + HybridCom::KSlabChild2Offset, c);
if (err) return err;
if (c)
@@ -1518,7 +1668,7 @@
for (;;)
{ // loop to walk up right side
TUint32 pp = 0;
- err = ReadWord(s + KSlabParentOffset, pp);
+ err = ReadWord(s + HybridCom::KSlabParentOffset, pp);
if (err) return err;
//slab** pp = s->iParent;
if (pp == aSlabRoot)
@@ -1526,7 +1676,7 @@
#define SlabFor(x) ROUND_DOWN(x, SLABSIZE)
s = SlabFor(pp);
//if (pp == &s->iChild1)
- if (pp == s + KSlabChild1Offset)
+ if (pp == s + HybridCom::KSlabChild1Offset)
break;
}
}
@@ -1646,7 +1796,7 @@
HUEXPORT_C TBool LtkUtils::RAllocatorHelper::AllocatorIsUdeb() const
{
- return iAllocatorType == EUdebOldRHeap || iAllocatorType == EUdebHybridHeap;
+ return iAllocatorType == EUdebOldRHeap || iAllocatorType == EUdebHybridHeap || iAllocatorType == EUdebHybridHeapV2;
}
@@ -1654,6 +1804,7 @@
{
_LIT(KRHeap, "RHeap");
_LIT(KRHybridHeap, "RHybridHeap");
+ _LIT(KRHybridHeapRefactored, "RHybridHeap (Refactored)");
_LIT(KUnknown, "Unknown");
switch (iAllocatorType)
{
@@ -1663,8 +1814,11 @@
case EUrelHybridHeap:
case EUdebHybridHeap:
return KRHybridHeap;
- case EAllocator:
- case EUnknown:
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return KRHybridHeapRefactored;
+ case EAllocatorUnknown:
+ case EAllocatorNotSet:
default:
return KUnknown;
}
@@ -1682,8 +1836,14 @@
DChunk* LtkUtils::RUserAllocatorHelper::OpenUnderlyingChunk()
{
- if (iAllocatorType != EUrelOldRHeap && iAllocatorType != EUdebOldRHeap && iAllocatorType != EUrelHybridHeap && iAllocatorType != EUdebHybridHeap) return NULL;
- // Note RKernelSideAllocatorHelper doesn't use or access RAllocatorHelper::iChunk, because we figure out the chunk handle in a different way.
+ if (iAllocatorType != EUrelOldRHeap && iAllocatorType != EUdebOldRHeap &&
+ iAllocatorType != EUrelHybridHeap && iAllocatorType != EUdebHybridHeap &&
+ iAllocatorType != EUrelHybridHeapV2 && iAllocatorType != EUdebHybridHeapV2)
+ {
+ return NULL;
+ }
+
+ // Note RUserAllocatorHelper doesn't use or access RAllocatorHelper::iChunk, because we figure out the chunk handle in a different way.
// It is for this reason that iChunk is private, to remove temptation
// Enter and leave in CS and with no locks held. On exit the returned DChunk has been Open()ed.
@@ -1711,8 +1871,11 @@
case EUrelHybridHeap:
case EUdebHybridHeap:
return ETypeRHybridHeap;
- case EAllocator:
- case EUnknown:
+ case EUrelHybridHeapV2:
+ case EUdebHybridHeapV2:
+ return ETypeRHybridHeapV2;
+ case EAllocatorUnknown:
+ case EAllocatorNotSet:
default:
return ETypeUnknown;
}
--- a/perfsrv/memspy/Driver/Shared/heaputils.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/Shared/heaputils.h Tue Oct 26 16:20:32 2010 +0300
@@ -9,7 +9,9 @@
// Initial Contributors:
// Accenture - Initial contribution
//
-
+// Contributors:
+// Adrian Issott (Nokia) - Updates for kernel-side alloc helper & RHybridHeap v2
+//
#ifndef FSHELL_HEAP_UTILS_H
#define FSHELL_HEAP_UTILS_H
@@ -41,7 +43,7 @@
public:
HUIMPORT_C RAllocatorHelper();
#ifdef __KERNEL_MODE__
- TLinAddr GetKernelAllocator(DChunk* aKernelChunk);
+ static TLinAddr GetKernelAllocator(DChunk* aKernelChunk);
TInt OpenKernelHeap();
#else
HUIMPORT_C TInt Open(RAllocator* aAllocator);
@@ -111,6 +113,7 @@
ETypeUnknown,
ETypeRHeap,
ETypeRHybridHeap,
+ ETypeRHybridHeapV2,
};
TType GetType() const; // This is for information only, nothing should care about the return value
#endif
@@ -124,7 +127,10 @@
#endif
virtual TInt ReadData(TLinAddr aLocation, TAny* aResult, TInt aSize) const;
virtual TInt WriteData(TLinAddr aLocation, const TAny* aData, TInt aSize);
-
+
+ void SetIsKernelHeapAllocator(TBool aIsKernelHeapAllocator);
+ TBool GetIsKernelHeapAllocator() const;
+
#ifndef __KERNEL_MODE__
protected:
#else
@@ -150,21 +156,34 @@
TUint PageMapBits(unsigned ix, unsigned len, TInt& err);
TUint PagedDecode(TUint pos, TInt& err);
TInt TreeWalk(TUint32 aSlabRoot, TInt aSlabType, TWalkFunc3 aCallbackFn, TAny* aContext, TBool& shouldContinue);
+
+private:
+ TInt PageMapOffset() const;
+ TInt MallocStateOffset() const;
+ TInt SparePageOffset() const;
+ TInt PartialPageOffset() const;
+ TInt FullSlabOffset() const;
+ TInt SlabAllocOffset() const;
+ TInt UserInitialHeapMetaDataSize() const;
+
protected:
TLinAddr iAllocatorAddress;
enum TAllocatorType
{
- EUnknown,
- EAllocator,
+ EAllocatorNotSet,
+ EAllocatorUnknown,
EUrelOldRHeap,
EUdebOldRHeap,
EUrelHybridHeap,
EUdebHybridHeap,
+ EUrelHybridHeapV2,
+ EUdebHybridHeapV2,
};
TAllocatorType iAllocatorType;
+
private:
THeapInfo* iInfo;
- TUint iValidInfo;
+ TBool iIsKernelHeapAllocator;
TUint8* iTempSlabBitmap;
mutable TAny* iPageCache;
mutable TLinAddr iPageCacheAddr;
--- a/perfsrv/memspy/Driver/group/MemSpyDriver.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/group/MemSpyDriver.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -90,3 +90,11 @@
#endif
#include <kernel/kern_ext.mmh>
+
+
+// Enable these lines to check all the offset calculations for RAllocatorHelper are correct. Requires base_e32 source code to be installed
+//MACRO TEST_HYBRIDHEAP_V1_ASSERTS
+//MACRO TEST_HYBRIDHEAP_V2_ASSERTS
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/include
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/common
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/common/dla
--- a/perfsrv/memspy/Driver/group/MemSpyDriverClient.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Driver/group/MemSpyDriverClient.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -54,3 +54,10 @@
START MARM
END
+
+// Enable these lines to check all the offset calculations for RAllocatorHelper are correct. Requires base_e32 source code to be installed
+//MACRO TEST_HYBRIDHEAP_V1_ASSERTS
+//MACRO TEST_HYBRIDHEAP_V2_ASSERTS
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/include
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/common
+//USERINCLUDE /sf/os/kernelhwsrv/kernel/eka/common/dla
--- a/perfsrv/memspy/Engine/Include/ClientServer/MemSpyEngineServer.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Include/ClientServer/MemSpyEngineServer.h Tue Oct 26 16:20:32 2010 +0300
@@ -24,10 +24,12 @@
// User includes
#include <memspyengineclientinterface.h>
#include <memspy/engine/memspydevicewideoperations.h>
+#include <memspy/engine/memspyengineobserver.h>
// Classes referenced
class CMemSpyEngine;
class CMemSpyDwOperationTracker;
+class CMemSpyNotificationTracker;
NONSHARABLE_CLASS( CShutdown ) : public CTimer
{
@@ -49,6 +51,8 @@
CMemSpyDwOperationTracker* CurrentOperationTracker() const { return iCurrentOperationTracker; }
void SetCurrentOperationTracker(CMemSpyDwOperationTracker* aTracker) { iCurrentOperationTracker = aTracker; }
+ CMemSpyNotificationTracker* NotificationTracker() const { return iNotificationTracker; }
+
CMemSpyEngine& Engine() { return iEngine; }
void AddSession(TBool aCliRequest);
@@ -64,6 +68,7 @@
private:
CMemSpyEngine& iEngine;
CMemSpyDwOperationTracker* iCurrentOperationTracker;
+ CMemSpyNotificationTracker* iNotificationTracker;
TInt iSessionCount;
TBool iCliConnected;
@@ -139,5 +144,31 @@
TInt iProgress;
};
+/**
+ * CMemSpyNotificationTracker
+ * Tracks notification requests for various events on server site.
+ * Currently only notifications of process changes are supported.
+ */
+NONSHARABLE_CLASS( CMemSpyNotificationTracker ) : public CBase, public MMemSpyEngineObserver
+ {
+public:
+ static CMemSpyNotificationTracker* NewL();
+ ~CMemSpyNotificationTracker();
+
+ void AddNotificationL( const RMessage2& aMessage );
+
+ void CancelNotification(const RMessage2& aMessage);
+
+public: // From MMemSpyEngineObserver
+ void HandleMemSpyEngineEventL( TEvent aEvent, TAny* aContext = NULL );
+
+private:
+ CMemSpyNotificationTracker() {};
+ void ConstructL();
+
+private:
+ CArrayFixFlat<RMessage2>* iPendingNotifications;
+ };
+
#endif
--- a/perfsrv/memspy/Engine/Include/Sink/MemSpyEngineOutputSinkDebug.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Include/Sink/MemSpyEngineOutputSinkDebug.h Tue Oct 26 16:20:32 2010 +0300
@@ -47,8 +47,9 @@
void DataStreamEndL();
void DoOutputLineL( const TDesC& aLine );
void DoOutputRawL( const TDesC8& aData );
+ void FlushL();
};
-#endif
\ No newline at end of file
+#endif
--- a/perfsrv/memspy/Engine/Include/Sink/MemSpyEngineOutputSinkFile.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Include/Sink/MemSpyEngineOutputSinkFile.h Tue Oct 26 16:20:32 2010 +0300
@@ -47,6 +47,8 @@
void DataStreamBeginL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite );
void DataStreamBeginL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseTimeStamp );
void DataStreamEndL();
+ void FlushL();
+
void DoOutputLineL( const TDesC& aLine );
void DoOutputRawL( const TDesC8& aData );
TBool IsPrefixAllowed( const TDesC& aPrefix );
@@ -93,6 +95,7 @@
void EnableBufferL();
void DisableBufferL();
const TDesC& FileName() const;
+ void FlushL();
//
inline TBool UsingBuffer() const { return iEntireFileBuffer != NULL; }
inline TBool IsMainLog() const { return iIsMainLog; }
--- a/perfsrv/memspy/Engine/Include/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryWindowServer.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Include/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryWindowServer.h Tue Oct 26 16:20:32 2010 +0300
@@ -83,11 +83,11 @@
EMemSpyWindowServerEventFocusLost
};
public:
- static CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup* NewLC( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails aCurrent, TMemSpyWindowServerEvent aEvent = EMemSpyWindowServerEventNoEvent );
+ static CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup* NewLC( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails& aCurrent, TMemSpyWindowServerEvent aEvent = EMemSpyWindowServerEventNoEvent );
~CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup();
private:
- CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup( TUint8 aAttrib, const TMemSpyEngineWindowGroupDetails aCurrent, TMemSpyWindowServerEvent aEvent );
+ CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup( TUint8 aAttrib, const TMemSpyEngineWindowGroupDetails& aCurrent, TMemSpyWindowServerEvent aEvent );
void ConstructL();
public: // From CMemSpyEngineHelperSysMemTrackerCycleChange
--- a/perfsrv/memspy/Engine/Source/ClientServer/MemSpyEngineServer.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/ClientServer/MemSpyEngineServer.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -56,6 +56,8 @@
#include <memspy/engine/memspyserverdata.h>
#include <memspysession.h>
#include <memspy/engine/memspyecomdata.h>
+#include <memspy/engine/memspychunkdata.h>
+#include <memspy/engine/memspycodesegmentdata.h>
inline CShutdown::CShutdown() :CTimer(-1)
{
@@ -88,12 +90,20 @@
CMemSpyEngineServer::~CMemSpyEngineServer()
{
+ if (iNotificationTracker)
+ {
+ delete iNotificationTracker;
+ }
}
void CMemSpyEngineServer::ConstructL()
{
StartL( KMemSpyServerName );
+
+ // create and setup notification tracker
+ iNotificationTracker = CMemSpyNotificationTracker::NewL();
+ iEngine.SetObserver( iNotificationTracker );
iShutdown.ConstructL();
// ensure that the server still exits even if the 1st client fails to connect
@@ -387,6 +397,18 @@
process.KillL();
break;
}
+ case EExit:
+ {
+ if (!iEngine.IsHelperWindowServerSupported())
+ {
+ User::Leave(KErrNotSupported);
+ }
+
+ MMemSpyEngineHelperWindowServer& windowServerManager = iEngine.HelperWindowServer();
+ windowServerManager.EndTaskL( process.Name() );
+
+ break;
+ }
}
break;
}
@@ -965,7 +987,6 @@
CleanupStack::PopAndDestroy(list);
break;
}
-
case EMemSpyClientServerOpServerListOutputGeneric:
{
TPckgBuf<TBool> a0;
@@ -1003,7 +1024,95 @@
CleanupStack::PopAndDestroy(list);
break;
}
+ case EMemSpyClientServerOpGetChunksCount:
+ {
+ CMemSpyEngineChunkList* list = iEngine.HelperChunk().ListL();
+ CleanupStack::PushL( list );
+ aMessage.WriteL(0, TPckgBuf<TInt>(list->MdcaCount()));
+ CleanupStack::PopAndDestroy( list );
+
+ break;
+ }
+ case EMemSpyClientServerOpGetSortedChunks:
+ {
+ CMemSpyEngineChunkList* list = iEngine.HelperChunk().ListL();
+ CleanupStack::PushL( list );
+
+ TPckgBuf<TSortType> a2;
+ aMessage.ReadL( 2, a2 );
+
+ //sort the list of chunks
+ if( a2() == ESortChunkByName )
+ list->SortByNameL();
+ else
+ list->SortBySizeL();
+
+ TPckgBuf<TInt> a0;
+ aMessage.ReadL(0, a0);
+
+ TInt realCount = Min(a0(), list->MdcaCount());
+
+ for(TInt i=0, offset = 0; i<realCount; i++, offset += sizeof(TMemSpyChunkData))
+ {
+ const CMemSpyEngineChunkEntry& chunk = list->At(i);
+ TMemSpyChunkData data;
+
+ data.iName.Copy( chunk.Name() );
+ data.iHandle = (TUint8*)chunk.Handle();
+ data.iSize = chunk.Size();
+ data.iMaxSize = chunk.MaxSize();
+ data.iBaseAddress = (TUint8*)chunk.BaseAddress();
+ data.iOwnerId = chunk.OwnerId();
+ TFullName ownerName;
+ chunk.OwnerName( ownerName );
+ data.iOwnerName = ownerName;
+ data.iType = chunk.Type();
+ data.iAttributes = chunk.Attributes();
+
+ TPckgBuf<TMemSpyChunkData> buffer(data);
+ aMessage.WriteL(1, buffer, offset);
+ }
+
+ CleanupStack::PopAndDestroy( list );
+
+ break;
+ }
+ case EMemSpyClientServerOpChunkListOutput:
+ {
+ //Get Chunk list
+ CMemSpyEngineChunkList* list = iEngine.HelperChunk().ListL();
+ CleanupStack::PushL( list );
+ // Begin a new data stream
+ _LIT( KMemSpyContext, "Chunk List" );
+ _LIT( KMemSpyFolder, "Chunks" );
+ iEngine.Sink().DataStreamBeginL( KMemSpyContext, KMemSpyFolder );
+
+ // Set prefix for overall listing
+ _LIT( KOverallPrefix, "Chunk List - " );
+ iEngine.Sink().OutputPrefixSetLC( KOverallPrefix );
+
+ // Create header
+ CMemSpyEngineChunkList::OutputDataColumnsL( iEngine );
+
+ // List items
+ const TInt count = list->Count();
+ for(TInt i=0; i<count; i++)
+ {
+ const CMemSpyEngineChunkEntry& entry = list->At( i );
+ //
+ entry.OutputDataL( iEngine.HelperChunk() );
+ }
+
+ // Tidy up
+ CleanupStack::PopAndDestroy(); // prefix
+
+ // End data stream
+ iEngine.Sink().DataStreamEndL();
+ CleanupStack::PopAndDestroy( list );
+
+ break;
+ }
case EMemSpyClientServerOpGetMemoryTrackingCycleCount:
{
TInt count = iEngine.HelperSysMemTracker().CompletedCycles().Count();
@@ -1297,6 +1406,146 @@
break;
}
+ case EMemSpyClientServerOpSwitchToWindowGroup:
+ {
+ TPckgBuf<TInt> id;
+ aMessage.ReadL(0, id);
+
+ MMemSpyEngineHelperWindowServer& windowServerManager = iEngine.HelperWindowServer();
+ windowServerManager.SwitchToL( id() );
+
+ break;
+ }
+ case EMemSpyClientServerOpIsAknIconCacheConfigurable:
+ {
+ TBool ret = iEngine.HelperRAM().IsAknIconCacheConfigurable();
+
+ TPckgBuf<TBool> retBuf( ret );
+ aMessage.WriteL( 0, retBuf );
+ break;
+ }
+ case EMemSpyClientServerOpSetAknIconCacheStatus:
+ {
+ TPckgBuf<TBool> enabled;
+ aMessage.ReadL(0, enabled);
+
+ TInt64 savedAmount = iEngine.HelperRAM().SetAknIconCacheStatusL( enabled() );
+
+ TPckgBuf<TInt64> ret(savedAmount);
+ aMessage.WriteL(1, ret);
+ break;
+ }
+
+ // Code Segments
+ case EMemSpyClientServerOpGetCodeSegmentsCount:
+ {
+ TInt result = 0;
+
+ CMemSpyEngineCodeSegList* list = iEngine.HelperCodeSegment().CodeSegmentListL();
+ CleanupStack::PushL( list );
+ result = list->MdcaCount();
+ aMessage.WriteL(0, TPckgBuf<TInt>(result));
+ CleanupStack::Pop( list );
+ break;
+ }
+ case EMemSpyClientServerOpGetSortedCodeSegments:
+ {
+ CMemSpyEngineCodeSegList* list = iEngine.HelperCodeSegment().CodeSegmentListL();
+ CleanupStack::PushL( list );
+
+ TPckgBuf<TSortType> a2;
+ aMessage.ReadL( 2, a2 );
+
+ //sort the list of Code Segments
+ if( a2() == ESortCodeSegByName )
+ list->SortByFileNameL();
+ else if ( a2() == ESortCodeSegBySize )
+ list->SortByCodeSizeL();
+ else if ( a2() == ESortCodeSegByTotalDataSize )
+ list->SortByDataSizeL();
+ else
+ list->SortByUidsL();
+
+ TPckgBuf<TInt> a0;
+ aMessage.ReadL(0, a0);
+
+ TInt realCount = Min(a0(), list->MdcaCount());
+
+ for(TInt i=0, offset = 0; i<realCount; i++, offset += sizeof(TMemSpyCodeSegmentData))
+ {
+ const CMemSpyEngineCodeSegEntry& codeSegment = list->At(i);
+ TMemSpyCodeSegmentData data;
+ TCodeSegCreateInfo createInfo = codeSegment.CreateInfo();
+
+ data.iName.Copy( codeSegment.FileName() );
+ data.iCodeSize = createInfo.iCodeSize;
+ data.iTotalDataSize = createInfo.iTotalDataSize;
+ data.iTextSize = createInfo.iTextSize;
+ data.iDataSize = createInfo.iDataSize;
+ data.iBssSize = createInfo.iBssSize;
+ data.iUids = createInfo.iUids;
+ data.iModuleVersion = createInfo.iModuleVersion;
+ data.iSecureId = createInfo.iS.iSecureId;
+ data.iVendorId = createInfo.iS.iVendorId;
+ data.iEntryPtVeneer = createInfo.iEntryPtVeneer;
+ data.iFileEntryPoint = createInfo.iFileEntryPoint;
+ data.iDepCount = createInfo.iDepCount;
+ data.iCodeLoadAddress = createInfo.iCodeLoadAddress;
+ data.iDataLoadAddress = createInfo.iDataLoadAddress;
+ data.iCapabilities1 = static_cast<TUint32>(createInfo.iS.iCaps[0]);
+ data.iCapabilities2 = static_cast<TUint32>(createInfo.iS.iCaps[1]);
+
+ TPckgBuf<TMemSpyCodeSegmentData> buffer(data);
+ aMessage.WriteL(1, buffer, offset);
+ }
+ CleanupStack::PopAndDestroy( list );
+
+ break;
+ }
+ case EMemSpyClientServerOpCodeSegmentsOutput:
+ {
+ CMemSpyEngineCodeSegList* list = iEngine.HelperCodeSegment().CodeSegmentListL();
+ CleanupStack::PushL( list );
+ // Begin a new data stream
+ _LIT( KMemSpyContext, "CodeSeg List - " );
+ _LIT( KMemSpyFolder, "CodeSegs" );
+ iEngine.Sink().DataStreamBeginL( KMemSpyContext, KMemSpyFolder );
+
+ // Set prefix for overall listing
+ _LIT(KOverallPrefix, "CodeSeg List - ");
+ iEngine.Sink().OutputPrefixSetLC( KOverallPrefix );
+
+ // Create header
+ CMemSpyEngineCodeSegList::OutputDataColumnsL( iEngine );
+
+ // List items
+ const TInt count = list->Count();
+ for(TInt i=0; i<count; i++)
+ {
+ const CMemSpyEngineCodeSegEntry& entry = list->At( i );
+ //
+ entry.OutputDataL( iEngine.HelperCodeSegment() );
+ }
+
+ // Tidy up
+ CleanupStack::PopAndDestroy(); // prefix
+
+ // End data stream
+ iEngine.Sink().DataStreamEndL();
+
+ // Tidy up Code segment list
+ CleanupStack::PopAndDestroy( list );
+
+ break;
+ }
+
+ case EMemSpyClientServerOpNotifyEvent:
+ Server().NotificationTracker()->AddNotificationL( aMessage );
+ break;
+
+ case EMemSpyClientServerOpCancelEventNotification:
+ Server().NotificationTracker()->CancelNotification( aMessage );
+ break;
}
@@ -1858,3 +2107,71 @@
}
}
+
+
+
+
+
+
+
+
+
+CMemSpyNotificationTracker* CMemSpyNotificationTracker::NewL()
+ {
+ CMemSpyNotificationTracker* self = new (ELeave) CMemSpyNotificationTracker();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+CMemSpyNotificationTracker::~CMemSpyNotificationTracker()
+ {
+ delete iPendingNotifications;
+ }
+
+void CMemSpyNotificationTracker::ConstructL()
+ {
+ iPendingNotifications = new (ELeave) CArrayFixFlat<RMessage2>(3);
+ }
+
+void CMemSpyNotificationTracker::AddNotificationL( const RMessage2& aMessage )
+ {
+ iPendingNotifications->AppendL(aMessage);
+ }
+
+void CMemSpyNotificationTracker::CancelNotification( const RMessage2& aMessage )
+ {
+ for (TInt i = iPendingNotifications->Count()-1; i >= 0; --i)
+ {
+ if (iPendingNotifications->At( i ).Session() == aMessage.Session())
+ {
+ iPendingNotifications->At( i ).Complete( KErrCancel );
+ iPendingNotifications->Delete( i );
+ }
+ }
+ }
+
+void CMemSpyNotificationTracker::HandleMemSpyEngineEventL( TEvent aEvent, TAny* aContext )
+ {
+ switch( aEvent )
+ {
+
+ case MMemSpyEngineObserver::EHandleThreadsOrProcessesChanged:
+ {
+ for (TInt i=0; i<iPendingNotifications->Count(); i++)
+ {
+ TRAPD(err, iPendingNotifications->At(i).WriteL(0, TPckgBuf<TInt>( aEvent )));
+ if (err != KErrNone)
+ {
+ // TODO: iPendingProgressNotifications->At(i).Panic()
+ }
+ iPendingNotifications->At(i).Complete( KErrNone );
+ }
+ iPendingNotifications->Reset();
+ break;
+ }
+
+ }
+
+ }
--- a/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperChunk.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperChunk.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -734,6 +734,16 @@
return iInfo->iOwnerId;
}
+TMemSpyDriverChunkType CMemSpyEngineChunkEntry::Type() const
+ {
+ return iInfo->iType;
+ }
+
+TInt CMemSpyEngineChunkEntry::Attributes() const
+ {
+ return iInfo->iAttributes;
+ }
+
EXPORT_C void CMemSpyEngineChunkEntry::OwnerName( TDes& aDes ) const
{
--- a/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperFbServ.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperFbServ.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -437,65 +437,67 @@
delete con;
// We should have the valid CObjectCon data now.
- RDesReadStream stream( *cellData );
- CleanupClosePushL( stream );
+ if( cellData )
+ {
+ RDesReadStream stream( *cellData );
+ CleanupClosePushL( stream );
- // Read vtable
- const TUint32 vTable = stream.ReadUint32L();
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - actual vTable: 0x%08x", vTable ));
- if ( vTable != KExpectedObjectConVTable )
- {
- User::Leave( KErrNotFound );
- }
+ // Read vtable
+ const TUint32 vTable = stream.ReadUint32L();
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - actual vTable: 0x%08x", vTable ));
+ if ( vTable != KExpectedObjectConVTable )
+ {
+ User::Leave( KErrNotFound );
+ }
- const TInt uniqueId = stream.ReadInt32L();
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - uniqueId: %d", uniqueId ));
+ const TInt uniqueId = stream.ReadInt32L();
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - uniqueId: %d", uniqueId ));
- aCount = stream.ReadInt32L();
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - aCount: %d", aCount ));
+ aCount = stream.ReadInt32L();
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - aCount: %d", aCount ));
- aAllocated = stream.ReadInt32L();
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - aAllocated: %d", aAllocated ));
+ aAllocated = stream.ReadInt32L();
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - aAllocated: %d", aAllocated ));
- // This is actually CObject's iObject, i.e. CObject** iObjects.
- TAny* pObjects = reinterpret_cast< TAny*>( stream.ReadUint32L() );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - pObjects: 0x%08x", pObjects ));
-
- CleanupStack::PopAndDestroy( 2, cellData ); // cellData & stream
+ // This is actually CObject's iObject, i.e. CObject** iObjects.
+ TAny* pObjects = reinterpret_cast< TAny*>( stream.ReadUint32L() );
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - pObjects: 0x%08x", pObjects ));
- // Now fetch the cell containing the CObject pointers...
- err = iEngine.Driver().WalkHeapGetCellInfo( pObjects, cellType, cellLength, cellNestingLevel, cellAllocationNumber, cellHeaderSize, cellPayloadAddress );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - array of CObject* cell fetch err: %d, cellAddress: 0x%08x, cellLength: %d, cellAllocationNumber: %d, cellType: %d", err, aCellAddress, cellLength, cellAllocationNumber, cellType));
- User::LeaveIfError( err );
+ CleanupStack::PopAndDestroy( 2, cellData ); // cellData & stream
+
+ // Now fetch the cell containing the CObject pointers...
+ err = iEngine.Driver().WalkHeapGetCellInfo( pObjects, cellType, cellLength, cellNestingLevel, cellAllocationNumber, cellHeaderSize, cellPayloadAddress );
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - array of CObject* cell fetch err: %d, cellAddress: 0x%08x, cellLength: %d, cellAllocationNumber: %d, cellType: %d", err, aCellAddress, cellLength, cellAllocationNumber, cellType));
+ User::LeaveIfError( err );
- const TInt expectedSize = ( aAllocated * sizeof(CObject*) ) + cellHeaderSize;
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - expectedSize: %d, actual size: %d", expectedSize, cellLength ));
- if ( cellLength < expectedSize )
- {
- User::Leave( KErrUnderflow );
- }
+ const TInt expectedSize = ( aAllocated * sizeof(CObject*) ) + cellHeaderSize;
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - expectedSize: %d, actual size: %d", expectedSize, cellLength ));
+ if ( cellLength < expectedSize )
+ {
+ User::Leave( KErrUnderflow );
+ }
- // Get the data
- cellData = HBufC8::NewLC( cellLength );
- TPtr8 pData( cellData->Des() );
- err = iEngine.Driver().WalkHeapReadCellData( pObjects, pData, cellLength );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - reading cell data returned error: %d", err));
- User::LeaveIfError( err );
+ // Get the data
+ cellData = HBufC8::NewLC( cellLength );
+ TPtr8 pData( cellData->Des() );
+ err = iEngine.Driver().WalkHeapReadCellData( pObjects, pData, cellLength );
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - reading cell data returned error: %d", err));
+ User::LeaveIfError( err );
- // Open stream
- stream.Open( *cellData );
- CleanupClosePushL( stream );
+ // Open stream
+ stream.Open( *cellData );
+ CleanupClosePushL( stream );
- // Extract array of pointers
- for( TInt i=0; i<aCount; i++ )
- {
- TAny* objectAddress = reinterpret_cast< TAny*>( stream.ReadUint32L() );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - object[%04d]: 0x%08x", i, objectAddress ));
- aContainerObjects.AppendL( objectAddress );
- }
- CleanupStack::PopAndDestroy( 2, cellData ); // cellData & stream
-
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - END" ));
+ // Extract array of pointers
+ for( TInt i=0; i<aCount; i++ )
+ {
+ TAny* objectAddress = reinterpret_cast< TAny*>( stream.ReadUint32L() );
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - object[%04d]: 0x%08x", i, objectAddress ));
+ aContainerObjects.AppendL( objectAddress );
+ }
+ CleanupStack::PopAndDestroy( 2, cellData ); // cellData & stream
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::ReadCObjectConInfoL() - END" ));
+ }
}
@@ -773,33 +775,36 @@
User::Leave( KErrNotFound );
}
- RDesReadStream stream( *cellData );
- CleanupClosePushL( stream );
-
- // Read vtable
- const TUint32 vTable = stream.ReadUint32L();
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - actual vTable: 0x%08x", vTable ));
- TBool isROMAddress = EFalse;
- err = User::IsRomAddress( isROMAddress, (TAny*) vTable );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - vtable (0x%08x) is in ROM: %d (error: %d)", vTable, isROMAddress, err));
- User::LeaveIfError( err );
+ if( cellData )
+ {
+ RDesReadStream stream( *cellData );
+ CleanupClosePushL( stream );
+
+ // Read vtable
+ const TUint32 vTable = stream.ReadUint32L();
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - actual vTable: 0x%08x", vTable ));
+ TBool isROMAddress = EFalse;
+ err = User::IsRomAddress( isROMAddress, (TAny*) vTable );
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - vtable (0x%08x) is in ROM: %d (error: %d)", vTable, isROMAddress, err));
+ User::LeaveIfError( err );
- // Skip CObject members
- (void) stream.ReadL( sizeof( CObject ) ); // skip this much
- object->iThisPointer = reinterpret_cast< CBitmapObject* >( cellPayloadAddress );;
- object->iTop = reinterpret_cast< CBase* >( stream.ReadUint32L() );
- object->iAddressPointer = reinterpret_cast< CBitwiseBitmap* >( stream.ReadUint32L() );
- object->iHandle = stream.ReadInt32L();
- object->iCleanBitmap = reinterpret_cast< CBitmapObject* >( stream.ReadUint32L() );
+ // Skip CObject members
+ (void) stream.ReadL( sizeof( CObject ) ); // skip this much
+ object->iThisPointer = reinterpret_cast< CBitmapObject* >( cellPayloadAddress );;
+ object->iTop = reinterpret_cast< CBase* >( stream.ReadUint32L() );
+ object->iAddressPointer = reinterpret_cast< CBitwiseBitmap* >( stream.ReadUint32L() );
+ object->iHandle = stream.ReadInt32L();
+ object->iCleanBitmap = reinterpret_cast< CBitmapObject* >( stream.ReadUint32L() );
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iThisPointer: 0x%08x", object->iThisPointer ));
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iTop: 0x%08x", object->iTop ));
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iAddressPointer: 0x%08x", object->iAddressPointer ));
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iHandle: 0x%08x", object->iHandle ));
- TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iCleanBitmap: 0x%08x", object->iCleanBitmap ));
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iThisPointer: 0x%08x", object->iThisPointer ));
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iTop: 0x%08x", object->iTop ));
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iAddressPointer: 0x%08x", object->iAddressPointer ));
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iHandle: 0x%08x", object->iHandle ));
+ TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - object->iCleanBitmap: 0x%08x", object->iCleanBitmap ));
- // Clean up - don't need this data anymore. Real data is in another cell
- CleanupStack::PopAndDestroy( 2, cellData ); // stream & cellData
+ // Clean up - don't need this data anymore. Real data is in another cell
+ CleanupStack::PopAndDestroy( 2, cellData ); // stream & cellData
+ }
TRACE( RDebug::Printf("CMemSpyEngineHelperFbServ::GetBitmapObjectLC() - END - aCellAddress: 0x%08x", aCellAddress ));
return object;
--- a/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperHeap.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Helpers/MemSpyEngineHelperHeap.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -927,15 +927,24 @@
_LIT( KItem0_Type_RHeap, "RHeap" );
_LIT( KItem0_Type_RHybridHeap, "RHybridHeap" );
+ _LIT( KItem0_Type_RHybridHeapRefactored, "RHybridHeap (Refactored)" );
if (aInfo.Type() == TMemSpyHeapInfo::ETypeRHeap)
{
list->AddItemL( KItem0, KItem0_Type_RHeap );
}
- else
+ else if (aInfo.Type() == TMemSpyHeapInfo::ETypeRHybridHeap)
{
list->AddItemL( KItem0, KItem0_Type_RHybridHeap );
}
-
+ else if (aInfo.Type() == TMemSpyHeapInfo::ETypeRHeap)
+ {
+ list->AddItemL( KItem0, KItem0_Type_RHybridHeapRefactored );
+ }
+ else
+ {
+ MemSpyEngineUtils::Panic( EMemSpyEnginePanicUnsupportedHeapType );
+ }
+
// Heap size is the size of the heap minus the size of the embedded (in-place) RHeap.
_LIT( KItem1, "Heap size" );
list->AddItemL(KItem1, metaData.iHeapSize);
@@ -1033,6 +1042,7 @@
_LIT(KRHeap, "RHeap");
_LIT(KRHybridHeap, "RHybridHeap");
+ _LIT(KRHybridHeapV2, "RHybridHeap v2");
switch (aInfo.Type())
{
case TMemSpyHeapInfo::ETypeRHeap:
@@ -1041,7 +1051,11 @@
case TMemSpyHeapInfo::ETypeRHybridHeap:
list.iType.Copy(KRHybridHeap);
break;
+ case TMemSpyHeapInfo::ETypeRHybridHeapV2:
+ list.iType.Copy(KRHybridHeapV2);
+ break;
default:
+ MemSpyEngineUtils::Panic( EMemSpyEnginePanicUnsupportedHeapType );
break;
}
@@ -1138,15 +1152,24 @@
// Type
_LIT( KMetaData_Type_RHeap, "Symbian OS RHeap" );
_LIT( KMetaData_Type_RHybridHeap, "Symbian OS RHybridHeap" );
+ _LIT( KMetaData_Type_RHybridHeapV2, "Symbian OS RHybridHeap v2" );
if (aInfo.Type() == TMemSpyHeapInfo::ETypeRHeap)
{
aList.AddItemL( KMetaData_Type, KMetaData_Type_RHeap );
}
- else
+ else if(aInfo.Type() == TMemSpyHeapInfo::ETypeRHybridHeap)
{
aList.AddItemL( KMetaData_Type, KMetaData_Type_RHybridHeap );
}
-
+ else if(aInfo.Type() == TMemSpyHeapInfo::ETypeRHybridHeapV2)
+ {
+ aList.AddItemL( KMetaData_Type, KMetaData_Type_RHybridHeapV2 );
+ }
+ else
+ {
+ MemSpyEngineUtils::Panic( EMemSpyEnginePanicUnsupportedHeapType );
+ }
+
// VTable
//_LIT( KMetaData_VTable, "VTable:" );
//aList.AddItemHexL( KMetaData_VTable, metaData.VTable() );
--- a/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputList.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputList.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -40,6 +40,10 @@
delete iFormatBuffer;
iItems.ResetAndDestroy();
iItems.Close();
+ if (iSink)
+ {
+ TRAP_IGNORE(iSink->FlushL());
+ }
}
@@ -151,6 +155,10 @@
}
}
+void CMemSpyEngineOutputList::FlushL()
+ {
+ iSink->FlushL();
+ }
CMemSpyEngineOutputListItem& CMemSpyEngineOutputList::Item( TInt aPos )
{
--- a/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputSinkDebug.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputSinkDebug.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -108,4 +108,7 @@
User::Leave( KErrNotSupported );
}
-
+void CMemSpyEngineOutputSinkDebug::FlushL()
+ {
+ // Nothing to do since everything has already been written out
+ }
--- a/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputSinkFile.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/Sink/MemSpyEngineOutputSinkFile.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -214,6 +214,10 @@
TRACE( RDebug::Printf( "CMemSpyEngineOutputSinkFile::DataStreamEndL() - END" ) );
}
+void CMemSpyEngineOutputSinkFile::FlushL()
+ {
+ HeadLog().FlushL();
+ }
void CMemSpyEngineOutputSinkFile::DoOutputLineL( const TDesC& aLine )
{
@@ -331,11 +335,6 @@
-
-
-
-
-
CMemSpyEngineFileHolder::CMemSpyEngineFileHolder( CMemSpyEngineOutputSinkFile& aParent, CMemSpyEngineSinkMetaData* aMetaData )
: iParent( aParent ), iMetaData( aMetaData )
{
@@ -638,6 +637,11 @@
}
+void CMemSpyEngineFileHolder::FlushL()
+ {
+ FlushWorkingBufferL();
+ }
+
void CMemSpyEngineFileHolder::FlushWorkingBufferL()
{
TRACE( RDebug::Print( _L("CMemSpyEngineFileHolder::FlushWorkingBufferL() - START - fileName: [%S], file handle: 0x%08x, iWorkingBuffer: 0x%08x"), &FileName(), iFile.SubSessionHandle(), iWorkingBuffer ) );
--- a/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryFileServerCache.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryFileServerCache.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -210,6 +210,5 @@
void CMemSpyEngineHelperSysMemTrackerCycleChangeFileServerCache::OutputDataL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& /*aCycle*/ )
{
- CMemSpyEngine& engine = aSink.Engine();
}
--- a/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryGlobalData.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryGlobalData.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -280,6 +280,5 @@
void CMemSpyEngineHelperSysMemTrackerCycleChangeGlobalData::OutputDataL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& /*aCycle*/ )
{
- CMemSpyEngine& engine = aSink.Engine();
}
--- a/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryManager.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryManager.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -720,8 +720,7 @@
void CMemSpyEngineHelperSysMemTrackerEntryManager::CreateSeedItemsHeapKernelL( CMemSpyEngineChunkList& aList )
{
SYSMEMTRACKERLOG_PRINTF( RDebug::Printf( "CMemSpyEngineHelperSysMemTrackerEntryManager::CreateSeedItemsHeapKernelL() - START" ) );
-
- CMemSpyEngine& engine = Engine();
+
CMemSpyEngineHelperSysMemTrackerEntryHeap* entry = CMemSpyEngineHelperSysMemTrackerEntryHeap::NewKernelLC( iTracker );
AddItemAndPopL( entry );
--- a/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryStack.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryStack.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -216,7 +216,6 @@
void CMemSpyEngineHelperSysMemTrackerCycleChangeStack::OutputDataL( CMemSpyEngineOutputSink& aSink, CMemSpyEngineHelperSysMemTrackerCycle& /*aCycle*/ )
{
- CMemSpyEngine& engine = aSink.Engine();
}
--- a/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryWindowServer.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/SysMemTracker/MemSpyEngineHelperSysMemTrackerEntryWindowServer.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -162,7 +162,7 @@
-CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup::CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails aCurrent, TMemSpyWindowServerEvent aEvent )
+CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup::CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails& aCurrent, TMemSpyWindowServerEvent aEvent )
: CMemSpyEngineHelperSysMemTrackerCycleChange( aAttribs ),
iCurrentWindowGroupDetails( aCurrent ),
iEvent( aEvent )
@@ -181,7 +181,7 @@
}
-CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup* CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup::NewLC( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails aCurrent, TMemSpyWindowServerEvent aEvent )
+CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup* CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup::NewLC( TUint8 aAttribs, const TMemSpyEngineWindowGroupDetails& aCurrent, TMemSpyWindowServerEvent aEvent )
{
CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup* self = new(ELeave) CMemSpyEngineHelperSysMemTrackerCycleChangeWindowGroup( aAttribs, aCurrent, aEvent );
CleanupStack::PushL( self );
--- a/perfsrv/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectProcess.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectProcess.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -394,11 +394,19 @@
void CMemSpyProcess::RefreshL( const RProcess& aProcess )
{
- const TBool handleValid = aProcess.Handle() != KNullHandle;
+ TBool handleValid = aProcess.Handle() != KNullHandle;
if ( handleValid )
{
- RMemSpyDriverClient& driver = iEngine.Driver();
- User::LeaveIfError( driver.GetProcessInfo( iId, *iInfo ) );
+ TInt err = iEngine.Driver().GetProcessInfo( iId, *iInfo );
+ if ( err != KErrNone && err != KErrDied )
+ {
+ User::Leave( err );
+ }
+
+ if ( err == KErrDied )
+ {
+ handleValid = false;
+ }
}
// Get priority, exit info etc
--- a/perfsrv/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectThreadInfoObjects.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/Engine/Source/ThreadAndProcess/MemSpyEngineObjectThreadInfoObjects.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -3083,9 +3083,7 @@
void CMemSpyThreadInfoMemoryTrackingStatisticsCurrent::ConstructL()
- {
- CMemSpyEngine& engine = Container().Thread().Process().Engine();
- //
+ {
if ( iTracker )
{
iTracker->RemoveObserver( *this );
@@ -3214,8 +3212,6 @@
void CMemSpyThreadInfoMemoryTrackingStatisticsPeak::ConstructL()
{
- CMemSpyEngine& engine = Container().Thread().Process().Engine();
- //
if ( iTracker )
{
iTracker->RemoveObserver( *this );
@@ -3341,8 +3337,6 @@
void CMemSpyThreadInfoMemoryTrackingStatisticsHWM::ConstructL()
{
- CMemSpyEngine& engine = Container().Thread().Process().Engine();
- //
if ( iTracker )
{
iTracker->RemoveObserver( *this );
--- a/perfsrv/memspy/MemSpyClient/bwins/MemSpyClientu.def Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/bwins/MemSpyClientu.def Tue Oct 26 16:20:32 2010 +0300
@@ -1,239 +1,276 @@
EXPORTS
- ?CpuUse@CMemSpyApiThread@@QBEHXZ @ 1 NONAME ; int CMemSpyApiThread::CpuUse(void) const
- ?Name@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 2 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::Name(void) const
- ?GetThreadInfoItemsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiThreadInfoItem@@@@VTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 3 NONAME ; void RMemSpySession::GetThreadInfoItemsL(class RArray<class CMemSpyApiThreadInfoItem *> &, class TThreadId, enum TMemSpyThreadInfoItemType)
- ?Description@TMemSpyDeviceWideOperationProgress@@QBEABVTDesC16@@XZ @ 4 NONAME ; class TDesC16 const & TMemSpyDeviceWideOperationProgress::Description(void) const
- ?TotalOverhead@CMemSpyApiHeap@@QAEHXZ @ 5 NONAME ; int CMemSpyApiHeap::TotalOverhead(void)
- ?OutputDetailedPhoneInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 6 NONAME ; void RMemSpySession::OutputDetailedPhoneInfo(class TRequestStatus &)
- ?UniqueID@CMemSpyApiKernelObjectItem@@QBEHXZ @ 7 NONAME ; int CMemSpyApiKernelObjectItem::UniqueID(void) const
- ?OutputHeapData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 8 NONAME ; void RMemSpySession::OutputHeapData(class TRequestStatus &)
- ?GetSwmtCategoriesL@RMemSpySession@@QAEXAAH@Z @ 9 NONAME ; void RMemSpySession::GetSwmtCategoriesL(int &)
- ?SessionType@CMemSpyApiKernelObjectItem@@QBE?AW4TIpcSessionType@@XZ @ 10 NONAME ; enum TIpcSessionType CMemSpyApiKernelObjectItem::SessionType(void) const
- ?DocName@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 11 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::DocName(void) const
- ?ProcessId@CMemSpyApiServer@@QBE?AVTProcessId@@XZ @ 12 NONAME ; class TProcessId CMemSpyApiServer::ProcessId(void) const
- ?VID@CMemSpyApiThread@@QBEHXZ @ 13 NONAME ; int CMemSpyApiThread::VID(void) const
- ?IsHidden@CMemSpyApiWindowGroup@@QBEHXZ @ 14 NONAME ; int CMemSpyApiWindowGroup::IsHidden(void) const
- ?Id@CMemSpyApiEComCategory@@QBE?AVTUid@@XZ @ 15 NONAME ; class TUid CMemSpyApiEComCategory::Id(void) const
- ?OutputStackInfoL@RMemSpySession@@QAEXVTThreadId@@@Z @ 16 NONAME ; void RMemSpySession::OutputStackInfoL(class TThreadId)
- ?FreeMemory@CMemSpyApiMemoryTrackingCycle@@QBEAB_JXZ @ 17 NONAME ; long long const & CMemSpyApiMemoryTrackingCycle::FreeMemory(void) const
- ?ProcessNumberUsing@CMemSpyApiThread@@QBEHXZ @ 18 NONAME ; int CMemSpyApiThread::ProcessNumberUsing(void) const
- ?PreviousCycleDiff@CMemSpyApiMemoryTrackingCycle@@QBE_JXZ @ 19 NONAME ; long long CMemSpyApiMemoryTrackingCycle::PreviousCycleDiff(void) const
- ?OutputStackDataL@RMemSpySession@@QAEXVTThreadId@@W4TMemSpyDriverDomainType@@@Z @ 20 NONAME ; void RMemSpySession::OutputStackDataL(class TThreadId, enum TMemSpyDriverDomainType)
- ?OutputThreadHeapDataL@RMemSpySession@@QAEXVTThreadId@@@Z @ 21 NONAME ; void RMemSpySession::OutputThreadHeapDataL(class TThreadId)
- ?ExitType@CMemSpyApiProcess@@QBE?AW4TExitType@@XZ @ 22 NONAME ; enum TExitType CMemSpyApiProcess::ExitType(void) const
- ?SwitchOutputToFileL@RMemSpySession@@QAEXABVTDesC16@@@Z @ 23 NONAME ; void RMemSpySession::SwitchOutputToFileL(class TDesC16 const &)
- ?OutputHeapCellListing@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 24 NONAME ; void RMemSpySession::OutputHeapCellListing(class TRequestStatus &)
- ?SetThreadPriorityL@RMemSpySession@@QAEXVTThreadId@@H@Z @ 25 NONAME ; void RMemSpySession::SetThreadPriorityL(class TThreadId, int)
- ?Restrictions@CMemSpyApiKernelObjectItem@@QBEIXZ @ 26 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Restrictions(void) const
- ?Id@CMemSpyApiKernelObjectItem@@QBEHXZ @ 27 NONAME ; int CMemSpyApiKernelObjectItem::Id(void) const
- ?Count@CMemSpyApiKernelObjectItem@@QBEHXZ @ 28 NONAME ; int CMemSpyApiKernelObjectItem::Count(void) const
- ??1CMemSpyApiEComCategory@@UAE@XZ @ 29 NONAME ; CMemSpyApiEComCategory::~CMemSpyApiEComCategory(void)
- ?ControllingOwner@CMemSpyApiKernelObjectItem@@QBEIXZ @ 30 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ControllingOwner(void) const
- ?Priority@CMemSpyApiWindowGroup@@QBEHXZ @ 31 NONAME ; int CMemSpyApiWindowGroup::Priority(void) const
- ?SwmtResetTracking@RMemSpySession@@QAEXXZ @ 32 NONAME ; void RMemSpySession::SwmtResetTracking(void)
- ?Version@CMemSpyApiKernelObjectItem@@QBE?AVTVersion@@XZ @ 33 NONAME ; class TVersion CMemSpyApiKernelObjectItem::Version(void) const
- ?SwitchToProcess@RMemSpySession@@QAEHVTProcessId@@H@Z @ 34 NONAME ; int RMemSpySession::SwitchToProcess(class TProcessId, int)
- ?MaxSize@CMemSpyApiKernelObjectItem@@QBEHXZ @ 35 NONAME ; int CMemSpyApiKernelObjectItem::MaxSize(void) const
- ?IsSwmtRunningL@RMemSpySession@@QAEHXZ @ 36 NONAME ; int RMemSpySession::IsSwmtRunningL(void)
- ?AddressOfOwningProcess@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 37 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfOwningProcess(void)
- ?ExitReason@CMemSpyApiProcess@@QBEHXZ @ 38 NONAME ; int CMemSpyApiProcess::ExitReason(void) const
- ?MsgCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 39 NONAME ; int CMemSpyApiKernelObjectItem::MsgCount(void) const
- ?ImplementationUid@CMemSpyApiEComImplementation@@QBE?AVTUid@@XZ @ 40 NONAME ; class TUid CMemSpyApiEComImplementation::ImplementationUid(void) const
- ?DataType@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 41 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::DataType(void) const
- ?AllocationsCount@CMemSpyApiHeap@@QAEHXZ @ 42 NONAME ; int CMemSpyApiHeap::AllocationsCount(void)
- ?WaitCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 43 NONAME ; int CMemSpyApiKernelObjectItem::WaitCount(void) const
- ?SID@CMemSpyApiProcess@@QBEKXZ @ 44 NONAME ; unsigned long CMemSpyApiProcess::SID(void) const
- ?ThreadId@CMemSpyApiWindowGroup@@QBE?AVTThreadId@@XZ @ 45 NONAME ; class TThreadId CMemSpyApiWindowGroup::ThreadId(void) const
- ?GetKernelObjectsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiKernelObject@@@@@Z @ 46 NONAME ; void RMemSpySession::GetKernelObjectsL(class RArray<class CMemSpyApiKernelObject *> &)
- ?CycleNumber@CMemSpyApiMemoryTrackingCycle@@QBEHXZ @ 47 NONAME ; int CMemSpyApiMemoryTrackingCycle::CycleNumber(void) const
- ?OpaqueData@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 48 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::OpaqueData(void) const
- ?GetEComCategoriesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiEComCategory@@@@@Z @ 49 NONAME ; void RMemSpySession::GetEComCategoriesL(class RArray<class CMemSpyApiEComCategory *> &)
- ?Size@CMemSpyApiKernelObject@@QBE_JXZ @ 50 NONAME ; long long CMemSpyApiKernelObject::Size(void) const
- ?SetSwmtCategoriesL@RMemSpySession@@QAEXH@Z @ 51 NONAME ; void RMemSpySession::SetSwmtCategoriesL(int)
- ?CancelDeviceWideOperationL@RMemSpySession@@QAEXXZ @ 52 NONAME ; void RMemSpySession::CancelDeviceWideOperationL(void)
- ?TotalAllocations@CMemSpyApiHeap@@QAEHXZ @ 53 NONAME ; int CMemSpyApiHeap::TotalAllocations(void)
- ?Name@CMemSpyApiProcess@@QBEABVTDesC16@@XZ @ 54 NONAME ; class TDesC16 const & CMemSpyApiProcess::Name(void) const
- ?DumpKernelHeap@RMemSpySession@@QAEXXZ @ 55 NONAME ; void RMemSpySession::DumpKernelHeap(void)
- ?GetKernelObjects@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiKernelObject@@@@@Z @ 56 NONAME ; int RMemSpySession::GetKernelObjects(class RArray<class CMemSpyApiKernelObject *> &)
- ?Priority@CMemSpyApiProcess@@QBE?AW4TProcessPriority@@XZ @ 57 NONAME ; enum TProcessPriority CMemSpyApiProcess::Priority(void) const
- ?HeaderSizeF@CMemSpyApiHeap@@QAEHXZ @ 58 NONAME ; int CMemSpyApiHeap::HeaderSizeF(void)
- ?OutputCompactStackInfoL@RMemSpySession@@QAEXXZ @ 59 NONAME ; void RMemSpySession::OutputCompactStackInfoL(void)
- ?MsgLimit@CMemSpyApiKernelObjectItem@@QBEHXZ @ 60 NONAME ; int CMemSpyApiKernelObjectItem::MsgLimit(void) const
- ?AddressOfDataBssStackChunk@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 61 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfDataBssStackChunk(void)
- ?Top@CMemSpyApiKernelObjectItem@@QBEHXZ @ 62 NONAME ; int CMemSpyApiKernelObjectItem::Top(void) const
- ?Resetting@CMemSpyApiKernelObjectItem@@QBEEXZ @ 63 NONAME ; unsigned char CMemSpyApiKernelObjectItem::Resetting(void) const
- ?GetProcessIdByThreadId@RMemSpySession@@QAEXAAVTProcessId@@VTThreadId@@@Z @ 64 NONAME ; void RMemSpySession::GetProcessIdByThreadId(class TProcessId &, class TThreadId)
- ?GetWindowGroupsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiWindowGroup@@@@@Z @ 65 NONAME ; void RMemSpySession::GetWindowGroupsL(class RArray<class CMemSpyApiWindowGroup *> &)
- ?HeaderSizeA@CMemSpyApiHeap@@QAEHXZ @ 66 NONAME ; int CMemSpyApiHeap::HeaderSizeA(void)
- ?OutputHeapData@RMemSpySession@@QAEXXZ @ 67 NONAME ; void RMemSpySession::OutputHeapData(void)
- ?TotalAccessCount@CMemSpyApiKernelObjectItem@@QBEGXZ @ 68 NONAME ; unsigned short CMemSpyApiKernelObjectItem::TotalAccessCount(void) const
- ?Name@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 69 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::Name(void) const
- ?Changes@CMemSpyApiKernelObjectItem@@QBEIXZ @ 70 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Changes(void) const
- ??0RMemSpySession@@QAE@XZ @ 71 NONAME ; RMemSpySession::RMemSpySession(void)
- ?OutputUserStackData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 72 NONAME ; void RMemSpySession::OutputUserStackData(class TRequestStatus &)
- ?Drive@CMemSpyApiEComImplementation@@QBE?AVTDriveUnit@@XZ @ 73 NONAME ; class TDriveUnit CMemSpyApiEComImplementation::Drive(void) const
- ?AddressOfServer@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 74 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfServer(void)
- ?VendorId@CMemSpyApiEComImplementation@@QBE?AVTVendorId@@XZ @ 75 NONAME ; class TVendorId CMemSpyApiEComImplementation::VendorId(void) const
- ?Version@CMemSpyApiEComImplementation@@QBEHXZ @ 76 NONAME ; int CMemSpyApiEComImplementation::Version(void) const
- ?Size@CMemSpyApiHeap@@QAEHXZ @ 77 NONAME ; int CMemSpyApiHeap::Size(void)
- ?GetServersL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiServer@@@@@Z @ 78 NONAME ; void RMemSpySession::GetServersL(class RArray<class CMemSpyApiServer *> &)
- ?GetInfoItemType@RMemSpySession@@QAEHHVTThreadId@@AAW4TMemSpyThreadInfoItemType@@@Z @ 79 NONAME ; int RMemSpySession::GetInfoItemType(int, class TThreadId, enum TMemSpyThreadInfoItemType &)
- ??1CMemSpyApiKernelObject@@QAE@XZ @ 80 NONAME ; CMemSpyApiKernelObject::~CMemSpyApiKernelObject(void)
- ??1CMemSpyApiHeap@@QAE@XZ @ 81 NONAME ; CMemSpyApiHeap::~CMemSpyApiHeap(void)
- ?SetSwmtHeapDumpsEnabledL@RMemSpySession@@QAEXH@Z @ 82 NONAME ; void RMemSpySession::SetSwmtHeapDumpsEnabledL(int)
- ?SetSwmtFilter@RMemSpySession@@QAEXABVTDesC16@@@Z @ 83 NONAME ; void RMemSpySession::SetSwmtFilter(class TDesC16 const &)
- ?Name@CMemSpyApiEComCategory@@QBEABVTDesC16@@XZ @ 84 NONAME ; class TDesC16 const & CMemSpyApiEComCategory::Name(void) const
- ?Size@CMemSpyApiKernelObjectItem@@QBEKXZ @ 85 NONAME ; unsigned long CMemSpyApiKernelObjectItem::Size(void) const
- ?OutputThreadInfoHandlesL@RMemSpySession@@QAEXVTThreadId@@@Z @ 86 NONAME ; void RMemSpySession::OutputThreadInfoHandlesL(class TThreadId)
- ?OutputThreadHeapDataL@RMemSpySession@@QAEXABVTDesC16@@@Z @ 87 NONAME ; void RMemSpySession::OutputThreadHeapDataL(class TDesC16 const &)
- ?GetEComImplementationsL@RMemSpySession@@QAEXVTUid@@AAV?$RArray@PAVCMemSpyApiEComImplementation@@@@@Z @ 88 NONAME ; void RMemSpySession::GetEComImplementationsL(class TUid, class RArray<class CMemSpyApiEComImplementation *> &)
- ?Type@CMemSpyApiKernelObject@@QBE?AW4TMemSpyDriverContainerType@@XZ @ 89 NONAME ; enum TMemSpyDriverContainerType CMemSpyApiKernelObject::Type(void) const
- ?Name@CMemSpyApiKernelObject@@QBEABVTDesC16@@XZ @ 90 NONAME ; class TDesC16 const & CMemSpyApiKernelObject::Name(void) const
- ?Fragmentation@CMemSpyApiHeap@@QAEHXZ @ 91 NONAME ; int CMemSpyApiHeap::Fragmentation(void)
- ?TimerType@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverTimerType@@XZ @ 92 NONAME ; enum TMemSpyDriverTimerType CMemSpyApiKernelObjectItem::TimerType(void) const
- ?Value@CMemSpyApiThreadInfoItem@@QBEABVTDesC16@@XZ @ 93 NONAME ; class TDesC16 const & CMemSpyApiThreadInfoItem::Value(void) const
- ?SecurityZone@CMemSpyApiKernelObjectItem@@QBEIXZ @ 94 NONAME ; unsigned int CMemSpyApiKernelObjectItem::SecurityZone(void) const
- ?CreatorId@CMemSpyApiKernelObjectItem@@QBEIXZ @ 95 NONAME ; unsigned int CMemSpyApiKernelObjectItem::CreatorId(void) const
- ?Order@CMemSpyApiKernelObjectItem@@QBEEXZ @ 96 NONAME ; unsigned char CMemSpyApiKernelObjectItem::Order(void) const
- ?NameDetail@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 97 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::NameDetail(void) const
- ??1CMemSpyApiEComImplementation@@UAE@XZ @ 98 NONAME ; CMemSpyApiEComImplementation::~CMemSpyApiEComImplementation(void)
- ?OutputStackInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 99 NONAME ; void RMemSpySession::OutputStackInfo(class TRequestStatus &)
- ?Handle@CMemSpyApiKernelObjectItem@@QBEPAXXZ @ 100 NONAME ; void * CMemSpyApiKernelObjectItem::Handle(void) const
- ?GetProcessesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiProcess@@@@W4TSortType@@@Z @ 101 NONAME ; void RMemSpySession::GetProcessesL(class RArray<class CMemSpyApiProcess *> &, enum TSortType)
- ?ParseMask@CMemSpyApiKernelObjectItem@@QBEIXZ @ 102 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ParseMask(void) const
- ?Attributes@CMemSpyApiKernelObjectItem@@QBEHXZ @ 103 NONAME ; int CMemSpyApiKernelObjectItem::Attributes(void) const
- ?MemoryDelta@CMemSpyApiMemoryTrackingCycle@@QBE_JXZ @ 104 NONAME ; long long CMemSpyApiMemoryTrackingCycle::MemoryDelta(void) const
- ?GetSwmtFilter@RMemSpySession@@QAEXAAV?$TBuf@$0IA@@@@Z @ 105 NONAME ; void RMemSpySession::GetSwmtFilter(class TBuf<128> &)
- ?Caption@CMemSpyApiThreadInfoItem@@QBEABVTDesC16@@XZ @ 106 NONAME ; class TDesC16 const & CMemSpyApiThreadInfoItem::Caption(void) const
- ?DebugAllocatorLibrary@CMemSpyApiHeap@@QAEHXZ @ 107 NONAME ; int CMemSpyApiHeap::DebugAllocatorLibrary(void)
- ?Overhead@CMemSpyApiHeap@@QAEHXZ @ 108 NONAME ; int CMemSpyApiHeap::Overhead(void)
- ?InterfaceCount@CMemSpyApiEComCategory@@QBEHXZ @ 109 NONAME ; int CMemSpyApiEComCategory::InterfaceCount(void) const
- ?ForceSwmtUpdate@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 110 NONAME ; void RMemSpySession::ForceSwmtUpdate(class TRequestStatus &)
- ?GetHeapL@RMemSpySession@@QAEPAVCMemSpyApiHeap@@XZ @ 111 NONAME ; class CMemSpyApiHeap * RMemSpySession::GetHeapL(void)
- ?ServerListOutputGenericL@RMemSpySession@@QAEXH@Z @ 112 NONAME ; void RMemSpySession::ServerListOutputGenericL(int)
- ?OutputKernelStackData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 113 NONAME ; void RMemSpySession::OutputKernelStackData(class TRequestStatus &)
- ?GetSwmtTimerIntervalL@RMemSpySession@@QAEXAAH@Z @ 114 NONAME ; void RMemSpySession::GetSwmtTimerIntervalL(int &)
- ?GetSwmtHeapDumpsEnabledL@RMemSpySession@@QAEXAAH@Z @ 115 NONAME ; void RMemSpySession::GetSwmtHeapDumpsEnabledL(int &)
- ?AddressOfOwningThread@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 116 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfOwningThread(void)
- ?ThreadPriority@CMemSpyApiThread@@QBE?AW4TThreadPriority@@XZ @ 117 NONAME ; enum TThreadPriority CMemSpyApiThread::ThreadPriority(void) const
- ?GetHeap@RMemSpySession@@QAEPAVCMemSpyApiHeap@@XZ @ 118 NONAME ; class CMemSpyApiHeap * RMemSpySession::GetHeap(void)
- ?Id@CMemSpyApiEComInterface@@QBE?AVTUid@@XZ @ 119 NONAME ; class TUid CMemSpyApiEComInterface::Id(void) const
- ?Caption@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 120 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::Caption(void) const
- ??1CMemSpyApiMemoryTrackingCycle@@QAE@XZ @ 121 NONAME ; CMemSpyApiMemoryTrackingCycle::~CMemSpyApiMemoryTrackingCycle(void)
- ?AccessCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 122 NONAME ; int CMemSpyApiKernelObjectItem::AccessCount(void) const
- ?ChangeCount@CMemSpyApiMemoryTrackingCycle@@QBEHXZ @ 123 NONAME ; int CMemSpyApiMemoryTrackingCycle::ChangeCount(void) const
- ?OutputHeapInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 124 NONAME ; void RMemSpySession::OutputHeapInfo(class TRequestStatus &)
- ?Time@CMemSpyApiMemoryTrackingCycle@@QBEABVTTime@@XZ @ 125 NONAME ; class TTime const & CMemSpyApiMemoryTrackingCycle::Time(void) const
- ?SetSwmtTimerIntervalL@RMemSpySession@@QAEXH@Z @ 126 NONAME ; void RMemSpySession::SetSwmtTimerIntervalL(int)
- ?OutputKernelHeapData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 127 NONAME ; void RMemSpySession::OutputKernelHeapData(class TRequestStatus &)
- ?Id@CMemSpyApiWindowGroup@@QBEHXZ @ 128 NONAME ; int CMemSpyApiWindowGroup::Id(void) const
- ?MaxLength@CMemSpyApiHeap@@QAEHXZ @ 129 NONAME ; int CMemSpyApiHeap::MaxLength(void)
- ?AddressOfKernelOwner@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 130 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfKernelOwner(void)
- ?RomBased@CMemSpyApiEComImplementation@@QBEHXZ @ 131 NONAME ; int CMemSpyApiEComImplementation::RomBased(void) const
- ??1CMemSpyApiThreadInfoItem@@QAE@XZ @ 132 NONAME ; CMemSpyApiThreadInfoItem::~CMemSpyApiThreadInfoItem(void)
- ?FreeCount@CMemSpyApiHeap@@QAEHXZ @ 133 NONAME ; int CMemSpyApiHeap::FreeCount(void)
- ?RomOnly@CMemSpyApiEComImplementation@@QBEHXZ @ 134 NONAME ; int CMemSpyApiEComImplementation::RomOnly(void) const
- ?TotalFree@CMemSpyApiHeap@@QAEHXZ @ 135 NONAME ; int CMemSpyApiHeap::TotalFree(void)
- ?SwitchToThread@RMemSpySession@@QAEHVTThreadId@@H@Z @ 136 NONAME ; int RMemSpySession::SwitchToThread(class TThreadId, int)
- ?GetServersL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiServer@@@@W4TSortType@@@Z @ 137 NONAME ; void RMemSpySession::GetServersL(class RArray<class CMemSpyApiServer *> &, enum TSortType)
- ?FreeOverhead@CMemSpyApiHeap@@QAEHXZ @ 138 NONAME ; int CMemSpyApiHeap::FreeOverhead(void)
- ?SwitchOutputToTraceL@RMemSpySession@@QAEXXZ @ 139 NONAME ; void RMemSpySession::SwitchOutputToTraceL(void)
- ?SlackFreeSpace@CMemSpyApiHeap@@QAEHXZ @ 140 NONAME ; int CMemSpyApiHeap::SlackFreeSpace(void)
- ?Priority@CMemSpyApiKernelObjectItem@@QBEHXZ @ 141 NONAME ; int CMemSpyApiKernelObjectItem::Priority(void) const
- ?ForceSwmtUpdateL@RMemSpySession@@QAEXXZ @ 142 NONAME ; void RMemSpySession::ForceSwmtUpdateL(void)
- ?ThreadCount@CMemSpyApiProcess@@QBEHXZ @ 143 NONAME ; int CMemSpyApiProcess::ThreadCount(void) const
- ?RequestCount@CMemSpyApiThread@@QBEHXZ @ 144 NONAME ; int CMemSpyApiThread::RequestCount(void) const
- ?Caption@CMemSpyApiMemoryTrackingCycle@@QBEABVTDesC16@@XZ @ 145 NONAME ; class TDesC16 const & CMemSpyApiMemoryTrackingCycle::Caption(void) const
- ?StopSwmtTimerL@RMemSpySession@@QAEXXZ @ 146 NONAME ; void RMemSpySession::StopSwmtTimerL(void)
- ??1CMemSpyApiProcess@@QAE@XZ @ 147 NONAME ; CMemSpyApiProcess::~CMemSpyApiProcess(void)
- ?MinLength@CMemSpyApiHeap@@QAEHXZ @ 148 NONAME ; int CMemSpyApiHeap::MinLength(void)
- ?ExitCategory@CMemSpyApiProcess@@QBE?AV?$TBuf@$0BA@@@XZ @ 149 NONAME ; class TBuf<16> CMemSpyApiProcess::ExitCategory(void) const
- ?Progress@TMemSpyDeviceWideOperationProgress@@QBEHXZ @ 150 NONAME ; int TMemSpyDeviceWideOperationProgress::Progress(void) const
- ?Count@CMemSpyApiKernelObject@@QBEHXZ @ 151 NONAME ; int CMemSpyApiKernelObject::Count(void) const
- ?IsDead@CMemSpyApiProcess@@QBEHXZ @ 152 NONAME ; int CMemSpyApiProcess::IsDead(void) const
- ?EndThreadL@RMemSpySession@@QAEHVTThreadId@@W4TMemSpyEndType@@@Z @ 153 NONAME ; int RMemSpySession::EndThreadL(class TThreadId, enum TMemSpyEndType)
- ?OrdinalPosition@CMemSpyApiWindowGroup@@QBEHXZ @ 154 NONAME ; int CMemSpyApiWindowGroup::OrdinalPosition(void) const
- ?StartPos@CMemSpyApiKernelObjectItem@@QBEHXZ @ 155 NONAME ; int CMemSpyApiKernelObjectItem::StartPos(void) const
- ?TimerState@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverTimerState@@XZ @ 156 NONAME ; enum TMemSpyDriverTimerState CMemSpyApiKernelObjectItem::TimerState(void) const
- ?GetEComInterfacesL@RMemSpySession@@QAEXVTUid@@AAV?$RArray@PAVCMemSpyApiEComInterface@@@@@Z @ 157 NONAME ; void RMemSpySession::GetEComInterfacesL(class TUid, class RArray<class CMemSpyApiEComInterface *> &)
- ?BaseAddress@CMemSpyApiHeap@@QAEHXZ @ 158 NONAME ; int CMemSpyApiHeap::BaseAddress(void)
- ?ExitType@CMemSpyApiThread@@QBE?AW4TExitType@@XZ @ 159 NONAME ; enum TExitType CMemSpyApiThread::ExitType(void) const
- ?StartSwmtTimerL@RMemSpySession@@QAEXH@Z @ 160 NONAME ; void RMemSpySession::StartSwmtTimerL(int)
- ?Type@CMemSpyApiHeap@@QAEAAVTDesC16@@XZ @ 161 NONAME ; class TDesC16 & CMemSpyApiHeap::Type(void)
- ?GetOutputSink@RMemSpySession@@QAEXAAW4TMemSpySinkType@@@Z @ 162 NONAME ; void RMemSpySession::GetOutputSink(enum TMemSpySinkType &)
- ?Id@CMemSpyApiProcess@@QBE?AVTProcessId@@XZ @ 163 NONAME ; class TProcessId CMemSpyApiProcess::Id(void) const
- ?BiggestAllocation@CMemSpyApiHeap@@QAEHXZ @ 164 NONAME ; int CMemSpyApiHeap::BiggestAllocation(void)
- ??1CMemSpyApiKernelObjectItem@@QAE@XZ @ 165 NONAME ; CMemSpyApiKernelObjectItem::~CMemSpyApiKernelObjectItem(void)
- ?AllocationOverhead@CMemSpyApiHeap@@QAEHXZ @ 166 NONAME ; int CMemSpyApiHeap::AllocationOverhead(void)
- ?OutputKernelObjectsL@RMemSpySession@@QAEXXZ @ 167 NONAME ; void RMemSpySession::OutputKernelObjectsL(void)
- ?NameOfOwner@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 168 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::NameOfOwner(void) const
- ?OutputAllContainerContents@RMemSpySession@@QAEXXZ @ 169 NONAME ; void RMemSpySession::OutputAllContainerContents(void)
- ?ThreadSystemPermanentOrCritical@RMemSpySession@@QAEHVTThreadId@@H@Z @ 170 NONAME ; int RMemSpySession::ThreadSystemPermanentOrCritical(class TThreadId, int)
- ?Uid@CMemSpyApiWindowGroup@@QBE?AVTUid@@XZ @ 171 NONAME ; class TUid CMemSpyApiWindowGroup::Uid(void) const
- ?Protection@CMemSpyApiKernelObjectItem@@QBEIXZ @ 172 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Protection(void) const
- ?BiggestFree@CMemSpyApiHeap@@QAEHXZ @ 173 NONAME ; int CMemSpyApiHeap::BiggestFree(void)
- ?Attributes@CMemSpyApiThread@@QBEHXZ @ 174 NONAME ; int CMemSpyApiThread::Attributes(void) const
- ?GetSwmtCyclesCount@RMemSpySession@@QAEHXZ @ 175 NONAME ; int RMemSpySession::GetSwmtCyclesCount(void)
- ?Bottom@CMemSpyApiKernelObjectItem@@QBEHXZ @ 176 NONAME ; int CMemSpyApiKernelObjectItem::Bottom(void) const
- ?StartSwmtTimerL@RMemSpySession@@QAEXXZ @ 177 NONAME ; void RMemSpySession::StartSwmtTimerL(void)
- ?EndProcessL@RMemSpySession@@QAEHVTProcessId@@W4TMemSpyEndType@@@Z @ 178 NONAME ; int RMemSpySession::EndProcessL(class TProcessId, enum TMemSpyEndType)
- ?GetKernelObjectItemsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiKernelObjectItem@@@@W4TMemSpyDriverContainerType@@@Z @ 179 NONAME ; void RMemSpySession::GetKernelObjectItemsL(class RArray<class CMemSpyApiKernelObjectItem *> &, enum TMemSpyDriverContainerType)
- ?OutputPhoneInfo@RMemSpySession@@QAEXXZ @ 180 NONAME ; void RMemSpySession::OutputPhoneInfo(void)
- ?IsBusy@CMemSpyApiWindowGroup@@QBEHXZ @ 181 NONAME ; int CMemSpyApiWindowGroup::IsBusy(void) const
- ?NotifyDeviceWideOperationProgress@RMemSpySession@@QAEXAAVTMemSpyDeviceWideOperationProgress@@AAVTRequestStatus@@@Z @ 182 NONAME ; void RMemSpySession::NotifyDeviceWideOperationProgress(class TMemSpyDeviceWideOperationProgress &, class TRequestStatus &)
- ?OutputCompactHeapInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 183 NONAME ; void RMemSpySession::OutputCompactHeapInfo(class TRequestStatus &)
- ?ThreadHandles@CMemSpyApiThread@@QBEHXZ @ 184 NONAME ; int CMemSpyApiThread::ThreadHandles(void) const
- ?SvrSessionType@CMemSpyApiKernelObjectItem@@QBEEXZ @ 185 NONAME ; unsigned char CMemSpyApiKernelObjectItem::SvrSessionType(void) const
- ?IsSystem@CMemSpyApiWindowGroup@@QBEHXZ @ 186 NONAME ; int CMemSpyApiWindowGroup::IsSystem(void) const
- ?SwitchOutputSinkL@RMemSpySession@@QAEXW4TMemSpySinkType@@@Z @ 187 NONAME ; void RMemSpySession::SwitchOutputSinkL(enum TMemSpySinkType)
- ?ChunkType@CMemSpyApiKernelObjectItem@@QBEIXZ @ 188 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ChunkType(void) const
- ?GetSwmtMode@RMemSpySession@@QAEXAAW4TMemSpyEngineSysMemTrackerMode@TMemSpyEngineHelperSysMemTrackerConfig@@@Z @ 189 NONAME ; void RMemSpySession::GetSwmtMode(enum TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode &)
- ?WindowGroupHandle@CMemSpyApiWindowGroup@@QBEHXZ @ 190 NONAME ; int CMemSpyApiWindowGroup::WindowGroupHandle(void) const
- ?OutputPhoneInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 191 NONAME ; void RMemSpySession::OutputPhoneInfo(class TRequestStatus &)
- ?Id@CMemSpyApiThread@@QBE?AVTThreadId@@XZ @ 192 NONAME ; class TThreadId CMemSpyApiThread::Id(void) const
- ?GetMemoryTrackingCyclesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiMemoryTrackingCycle@@@@@Z @ 193 NONAME ; void RMemSpySession::GetMemoryTrackingCyclesL(class RArray<class CMemSpyApiMemoryTrackingCycle *> &)
- ?GetProcessIdByNameL@RMemSpySession@@QAE?AVTProcessId@@ABVTDesC16@@@Z @ 194 NONAME ; class TProcessId RMemSpySession::GetProcessIdByNameL(class TDesC16 const &)
- ?MapAttr@CMemSpyApiKernelObjectItem@@QBEIXZ @ 195 NONAME ; unsigned int CMemSpyApiKernelObjectItem::MapAttr(void) const
- ?OutputCompactStackInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 196 NONAME ; void RMemSpySession::OutputCompactStackInfo(class TRequestStatus &)
- ?VID@CMemSpyApiProcess@@QBEKXZ @ 197 NONAME ; unsigned long CMemSpyApiProcess::VID(void) const
- ?AddressOfCodeSeg@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 198 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfCodeSeg(void)
- ?ThreadId@CMemSpyApiServer@@QBE?AVTThreadId@@XZ @ 199 NONAME ; class TThreadId CMemSpyApiServer::ThreadId(void) const
- ?GetThreadsL@RMemSpySession@@QAEXVTProcessId@@AAV?$RArray@PAVCMemSpyApiThread@@@@W4TSortType@@@Z @ 200 NONAME ; void RMemSpySession::GetThreadsL(class TProcessId, class RArray<class CMemSpyApiThread *> &, enum TSortType)
- ?ProcessId@CMemSpyApiThread@@QBE?AVTProcessId@@XZ @ 201 NONAME ; class TProcessId CMemSpyApiThread::ProcessId(void) const
- ?Type@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverContainerType@@XZ @ 202 NONAME ; enum TMemSpyDriverContainerType CMemSpyApiKernelObjectItem::Type(void) const
- ?ImplementationCount@CMemSpyApiEComInterface@@QBEHXZ @ 203 NONAME ; int CMemSpyApiEComInterface::ImplementationCount(void) const
- ?FullName@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 204 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::FullName(void) const
- ?ChunkSize@CMemSpyApiHeap@@QAEHXZ @ 205 NONAME ; int CMemSpyApiHeap::ChunkSize(void)
- ??1CMemSpyApiEComInterface@@UAE@XZ @ 206 NONAME ; CMemSpyApiEComInterface::~CMemSpyApiEComInterface(void)
- ?UnitsMask@CMemSpyApiKernelObjectItem@@QBEIXZ @ 207 NONAME ; unsigned int CMemSpyApiKernelObjectItem::UnitsMask(void) const
- ?Name@CMemSpyApiEComInterface@@QBEABVTDesC16@@XZ @ 208 NONAME ; class TDesC16 const & CMemSpyApiEComInterface::Name(void) const
- ?Disabled@CMemSpyApiEComImplementation@@QBEHXZ @ 209 NONAME ; int CMemSpyApiEComImplementation::Disabled(void) const
- ?Name@CMemSpyApiServer@@QBEABVTDesC16@@XZ @ 210 NONAME ; class TDesC16 const & CMemSpyApiServer::Name(void) const
- ?State@CMemSpyApiKernelObjectItem@@QBEEXZ @ 211 NONAME ; unsigned char CMemSpyApiKernelObjectItem::State(void) const
- ?Shared@CMemSpyApiHeap@@QAEHXZ @ 212 NONAME ; int CMemSpyApiHeap::Shared(void)
- ?SetSwmtAutoStartProcessList@RMemSpySession@@QAEXPAV?$CArrayFixFlat@VTUid@@@@@Z @ 213 NONAME ; void RMemSpySession::SetSwmtAutoStartProcessList(class CArrayFixFlat<class TUid> *)
- ?OutputCompactHeapInfoL@RMemSpySession@@QAEXXZ @ 214 NONAME ; void RMemSpySession::OutputCompactHeapInfoL(void)
- ?ProcessSystemPermanentOrCritical@RMemSpySession@@QAEHVTProcessId@@H@Z @ 215 NONAME ; int RMemSpySession::ProcessSystemPermanentOrCritical(class TProcessId, int)
- ??1CMemSpyApiServer@@QAE@XZ @ 216 NONAME ; CMemSpyApiServer::~CMemSpyApiServer(void)
- ?SetSwmtMode@RMemSpySession@@QAEXW4TMemSpyEngineSysMemTrackerMode@TMemSpyEngineHelperSysMemTrackerConfig@@@Z @ 217 NONAME ; void RMemSpySession::SetSwmtMode(enum TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode)
- ?OutputKernelHeapDataL@RMemSpySession@@QAEXXZ @ 218 NONAME ; void RMemSpySession::OutputKernelHeapDataL(void)
- ??1CMemSpyApiWindowGroup@@UAE@XZ @ 219 NONAME ; CMemSpyApiWindowGroup::~CMemSpyApiWindowGroup(void)
- ?MapCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 220 NONAME ; int CMemSpyApiKernelObjectItem::MapCount(void) const
- ?OpenChannels@CMemSpyApiKernelObjectItem@@QAEHXZ @ 221 NONAME ; int CMemSpyApiKernelObjectItem::OpenChannels(void)
- ?ProcessPriority@CMemSpyApiThread@@QBE?AW4TProcessPriority@@XZ @ 222 NONAME ; enum TProcessPriority CMemSpyApiThread::ProcessPriority(void) const
- ?IsFocused@CMemSpyApiWindowGroup@@QBEHXZ @ 223 NONAME ; int CMemSpyApiWindowGroup::IsFocused(void) const
- ?OutputAOListL@RMemSpySession@@QAEXVTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 224 NONAME ; void RMemSpySession::OutputAOListL(class TThreadId, enum TMemSpyThreadInfoItemType)
- ?ThreadNumberUsing@CMemSpyApiThread@@QBEHXZ @ 225 NONAME ; int CMemSpyApiThread::ThreadNumberUsing(void) const
- ?OutputThreadCellListL@RMemSpySession@@QAEXVTThreadId@@@Z @ 226 NONAME ; void RMemSpySession::OutputThreadCellListL(class TThreadId)
- ?OutputHeapInfoUserL@RMemSpySession@@QAEXVTThreadId@@@Z @ 227 NONAME ; void RMemSpySession::OutputHeapInfoUserL(class TThreadId)
- ?SessionCount@CMemSpyApiServer@@QBEHXZ @ 228 NONAME ; int CMemSpyApiServer::SessionCount(void) const
- ?Connect@RMemSpySession@@QAEHXZ @ 229 NONAME ; int RMemSpySession::Connect(void)
- ??1CMemSpyApiThread@@QAE@XZ @ 230 NONAME ; CMemSpyApiThread::~CMemSpyApiThread(void)
- ?GetThreadInfoItems@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiThreadInfoItem@@@@VTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 231 NONAME ; int RMemSpySession::GetThreadInfoItems(class RArray<class CMemSpyApiThreadInfoItem *> &, class TThreadId, enum TMemSpyThreadInfoItemType)
- ?SID@CMemSpyApiThread@@QBEHXZ @ 232 NONAME ; int CMemSpyApiThread::SID(void) const
- ?GetKernelObjectItems@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiKernelObjectItem@@@@W4TMemSpyDriverContainerType@@@Z @ 233 NONAME ; int RMemSpySession::GetKernelObjectItems(class RArray<class CMemSpyApiKernelObjectItem *> &, enum TMemSpyDriverContainerType)
- ?Name@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 234 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::Name(void) const
- ?ProcessHandles@CMemSpyApiThread@@QBEHXZ @ 235 NONAME ; int CMemSpyApiThread::ProcessHandles(void) const
- ?Name@CMemSpyApiThread@@QBEABVTDesC16@@XZ @ 236 NONAME ; class TDesC16 const & CMemSpyApiThread::Name(void) const
- ?StartSwmtTimer@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 237 NONAME ; void RMemSpySession::StartSwmtTimer(class TRequestStatus &)
+ ?Name@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 1 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::Name(void) const
+ ?Description@TMemSpyDeviceWideOperationProgress@@QBEABVTDesC16@@XZ @ 2 NONAME ; class TDesC16 const & TMemSpyDeviceWideOperationProgress::Description(void) const
+ ?GetSwmtCategoriesL@RMemSpySession@@QAEXAAH@Z @ 3 NONAME ; void RMemSpySession::GetSwmtCategoriesL(int &)
+ ?SessionType@CMemSpyApiKernelObjectItem@@QBE?AW4TIpcSessionType@@XZ @ 4 NONAME ; enum TIpcSessionType CMemSpyApiKernelObjectItem::SessionType(void) const
+ ?ProcessId@CMemSpyApiServer@@QBE?AVTProcessId@@XZ @ 5 NONAME ; class TProcessId CMemSpyApiServer::ProcessId(void) const
+ ?IsHidden@CMemSpyApiWindowGroup@@QBEHXZ @ 6 NONAME ; int CMemSpyApiWindowGroup::IsHidden(void) const
+ ?Id@CMemSpyApiEComCategory@@QBE?AVTUid@@XZ @ 7 NONAME ; class TUid CMemSpyApiEComCategory::Id(void) const
+ ?OutputStackInfoL@RMemSpySession@@QAEXVTThreadId@@@Z @ 8 NONAME ; void RMemSpySession::OutputStackInfoL(class TThreadId)
+ ?FreeMemory@CMemSpyApiMemoryTrackingCycle@@QBEAB_JXZ @ 9 NONAME ; long long const & CMemSpyApiMemoryTrackingCycle::FreeMemory(void) const
+ ?ProcessNumberUsing@CMemSpyApiThread@@QBEHXZ @ 10 NONAME ; int CMemSpyApiThread::ProcessNumberUsing(void) const
+ ?PreviousCycleDiff@CMemSpyApiMemoryTrackingCycle@@QBE_JXZ @ 11 NONAME ; long long CMemSpyApiMemoryTrackingCycle::PreviousCycleDiff(void) const
+ ?OutputThreadHeapDataL@RMemSpySession@@QAEXVTThreadId@@@Z @ 12 NONAME ; void RMemSpySession::OutputThreadHeapDataL(class TThreadId)
+ ?FileEntryPoint@CMemSpyApiCodeSegment@@QBEKXZ @ 13 NONAME ; unsigned long CMemSpyApiCodeSegment::FileEntryPoint(void) const
+ ?BaseAddress@CMemSpyApiChunk@@QBEPAEXZ @ 14 NONAME ; unsigned char * CMemSpyApiChunk::BaseAddress(void) const
+ ?ExitType@CMemSpyApiProcess@@QBE?AW4TExitType@@XZ @ 15 NONAME ; enum TExitType CMemSpyApiProcess::ExitType(void) const
+ ?SwitchOutputToFileL@RMemSpySession@@QAEXABVTDesC16@@@Z @ 16 NONAME ; void RMemSpySession::SwitchOutputToFileL(class TDesC16 const &)
+ ?SetThreadPriorityL@RMemSpySession@@QAEXVTThreadId@@H@Z @ 17 NONAME ; void RMemSpySession::SetThreadPriorityL(class TThreadId, int)
+ ??1CMemSpyApiEComCategory@@UAE@XZ @ 18 NONAME ; CMemSpyApiEComCategory::~CMemSpyApiEComCategory(void)
+ ?Priority@CMemSpyApiWindowGroup@@QBEHXZ @ 19 NONAME ; int CMemSpyApiWindowGroup::Priority(void) const
+ ?Version@CMemSpyApiKernelObjectItem@@QBE?AVTVersion@@XZ @ 20 NONAME ; class TVersion CMemSpyApiKernelObjectItem::Version(void) const
+ ?SwitchToProcess@RMemSpySession@@QAEHVTProcessId@@H@Z @ 21 NONAME ; int RMemSpySession::SwitchToProcess(class TProcessId, int)
+ ?MaxSize@CMemSpyApiKernelObjectItem@@QBEHXZ @ 22 NONAME ; int CMemSpyApiKernelObjectItem::MaxSize(void) const
+ ?IsSwmtRunningL@RMemSpySession@@QAEHXZ @ 23 NONAME ; int RMemSpySession::IsSwmtRunningL(void)
+ ?AddressOfOwningProcess@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 24 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfOwningProcess(void)
+ ?ExitReason@CMemSpyApiProcess@@QBEHXZ @ 25 NONAME ; int CMemSpyApiProcess::ExitReason(void) const
+ ?MsgCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 26 NONAME ; int CMemSpyApiKernelObjectItem::MsgCount(void) const
+ ?DataType@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 27 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::DataType(void) const
+ ?AllocationsCount@CMemSpyApiHeap@@QAEHXZ @ 28 NONAME ; int CMemSpyApiHeap::AllocationsCount(void)
+ ?SID@CMemSpyApiProcess@@QBEKXZ @ 29 NONAME ; unsigned long CMemSpyApiProcess::SID(void) const
+ ?VID@CMemSpyApiCodeSegment@@QBEKXZ @ 30 NONAME ; unsigned long CMemSpyApiCodeSegment::VID(void) const
+ ?ThreadId@CMemSpyApiWindowGroup@@QBE?AVTThreadId@@XZ @ 31 NONAME ; class TThreadId CMemSpyApiWindowGroup::ThreadId(void) const
+ ?CycleNumber@CMemSpyApiMemoryTrackingCycle@@QBEHXZ @ 32 NONAME ; int CMemSpyApiMemoryTrackingCycle::CycleNumber(void) const
+ ?GetCodeSegmentsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiCodeSegment@@@@W4TSortType@@@Z @ 33 NONAME ; void RMemSpySession::GetCodeSegmentsL(class RArray<class CMemSpyApiCodeSegment *> &, enum TSortType)
+ ?CancelDeviceWideOperationL@RMemSpySession@@QAEXXZ @ 34 NONAME ; void RMemSpySession::CancelDeviceWideOperationL(void)
+ ?TotalAllocations@CMemSpyApiHeap@@QAEHXZ @ 35 NONAME ; int CMemSpyApiHeap::TotalAllocations(void)
+ ?Name@CMemSpyApiProcess@@QBEABVTDesC16@@XZ @ 36 NONAME ; class TDesC16 const & CMemSpyApiProcess::Name(void) const
+ ?DumpKernelHeap@RMemSpySession@@QAEXXZ @ 37 NONAME ; void RMemSpySession::DumpKernelHeap(void)
+ ?OutputCompactStackInfoL@RMemSpySession@@QAEXXZ @ 38 NONAME ; void RMemSpySession::OutputCompactStackInfoL(void)
+ ?Top@CMemSpyApiKernelObjectItem@@QBEHXZ @ 39 NONAME ; int CMemSpyApiKernelObjectItem::Top(void) const
+ ?GetProcessIdByThreadId@RMemSpySession@@QAEXAAVTProcessId@@VTThreadId@@@Z @ 40 NONAME ; void RMemSpySession::GetProcessIdByThreadId(class TProcessId &, class TThreadId)
+ ?HeaderSizeA@CMemSpyApiHeap@@QAEHXZ @ 41 NONAME ; int CMemSpyApiHeap::HeaderSizeA(void)
+ ?OutputHeapData@RMemSpySession@@QAEXXZ @ 42 NONAME ; void RMemSpySession::OutputHeapData(void)
+ ?TotalAccessCount@CMemSpyApiKernelObjectItem@@QBEGXZ @ 43 NONAME ; unsigned short CMemSpyApiKernelObjectItem::TotalAccessCount(void) const
+ ??0RMemSpySession@@QAE@XZ @ 44 NONAME ; RMemSpySession::RMemSpySession(void)
+ ?ChunkType@CMemSpyApiChunk@@QBE?AW4TMemSpyDriverChunkType@@XZ @ 45 NONAME ; enum TMemSpyDriverChunkType CMemSpyApiChunk::ChunkType(void) const
+ ?GetInfoItemType@RMemSpySession@@QAEHHVTThreadId@@AAW4TMemSpyThreadInfoItemType@@@Z @ 46 NONAME ; int RMemSpySession::GetInfoItemType(int, class TThreadId, enum TMemSpyThreadInfoItemType &)
+ ??1CMemSpyApiKernelObject@@QAE@XZ @ 47 NONAME ; CMemSpyApiKernelObject::~CMemSpyApiKernelObject(void)
+ ?SetSwmtHeapDumpsEnabledL@RMemSpySession@@QAEXH@Z @ 48 NONAME ; void RMemSpySession::SetSwmtHeapDumpsEnabledL(int)
+ ?SetSwmtFilter@RMemSpySession@@QAEXABVTDesC16@@@Z @ 49 NONAME ; void RMemSpySession::SetSwmtFilter(class TDesC16 const &)
+ ?Name@CMemSpyApiEComCategory@@QBEABVTDesC16@@XZ @ 50 NONAME ; class TDesC16 const & CMemSpyApiEComCategory::Name(void) const
+ ?GetEComImplementationsL@RMemSpySession@@QAEXVTUid@@AAV?$RArray@PAVCMemSpyApiEComImplementation@@@@@Z @ 51 NONAME ; void RMemSpySession::GetEComImplementationsL(class TUid, class RArray<class CMemSpyApiEComImplementation *> &)
+ ?Name@CMemSpyApiKernelObject@@QBEABVTDesC16@@XZ @ 52 NONAME ; class TDesC16 const & CMemSpyApiKernelObject::Name(void) const
+ ?Fragmentation@CMemSpyApiHeap@@QAEHXZ @ 53 NONAME ; int CMemSpyApiHeap::Fragmentation(void)
+ ?TimerType@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverTimerType@@XZ @ 54 NONAME ; enum TMemSpyDriverTimerType CMemSpyApiKernelObjectItem::TimerType(void) const
+ ?Capabilities1@CMemSpyApiCodeSegment@@QBEKXZ @ 55 NONAME ; unsigned long CMemSpyApiCodeSegment::Capabilities1(void) const
+ ?Name@CMemSpyApiCodeSegment@@QBEABVTDesC16@@XZ @ 56 NONAME ; class TDesC16 const & CMemSpyApiCodeSegment::Name(void) const
+ ?CreatorId@CMemSpyApiKernelObjectItem@@QBEIXZ @ 57 NONAME ; unsigned int CMemSpyApiKernelObjectItem::CreatorId(void) const
+ ??1CMemSpyApiEComImplementation@@UAE@XZ @ 58 NONAME ; CMemSpyApiEComImplementation::~CMemSpyApiEComImplementation(void)
+ ?OutputStackInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 59 NONAME ; void RMemSpySession::OutputStackInfo(class TRequestStatus &)
+ ?Handle@CMemSpyApiKernelObjectItem@@QBEPAXXZ @ 60 NONAME ; void * CMemSpyApiKernelObjectItem::Handle(void) const
+ ?ParseMask@CMemSpyApiKernelObjectItem@@QBEIXZ @ 61 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ParseMask(void) const
+ ?Attributes@CMemSpyApiKernelObjectItem@@QBEHXZ @ 62 NONAME ; int CMemSpyApiKernelObjectItem::Attributes(void) const
+ ?MemoryDelta@CMemSpyApiMemoryTrackingCycle@@QBE_JXZ @ 63 NONAME ; long long CMemSpyApiMemoryTrackingCycle::MemoryDelta(void) const
+ ?Caption@CMemSpyApiThreadInfoItem@@QBEABVTDesC16@@XZ @ 64 NONAME ; class TDesC16 const & CMemSpyApiThreadInfoItem::Caption(void) const
+ ?GetHeapL@RMemSpySession@@QAEPAVCMemSpyApiHeap@@XZ @ 65 NONAME ; class CMemSpyApiHeap * RMemSpySession::GetHeapL(void)
+ ?ServerListOutputGenericL@RMemSpySession@@QAEXH@Z @ 66 NONAME ; void RMemSpySession::ServerListOutputGenericL(int)
+ ?GetSwmtHeapDumpsEnabledL@RMemSpySession@@QAEXAAH@Z @ 67 NONAME ; void RMemSpySession::GetSwmtHeapDumpsEnabledL(int &)
+ ?CancelEventNotificationL@RMemSpySession@@QAEXXZ @ 68 NONAME ; void RMemSpySession::CancelEventNotificationL(void)
+ ?AddressOfOwningThread@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 69 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfOwningThread(void)
+ ?ThreadPriority@CMemSpyApiThread@@QBE?AW4TThreadPriority@@XZ @ 70 NONAME ; enum TThreadPriority CMemSpyApiThread::ThreadPriority(void) const
+ ?Id@CMemSpyApiEComInterface@@QBE?AVTUid@@XZ @ 71 NONAME ; class TUid CMemSpyApiEComInterface::Id(void) const
+ ?Caption@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 72 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::Caption(void) const
+ ?AccessCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 73 NONAME ; int CMemSpyApiKernelObjectItem::AccessCount(void) const
+ ?ChangeCount@CMemSpyApiMemoryTrackingCycle@@QBEHXZ @ 74 NONAME ; int CMemSpyApiMemoryTrackingCycle::ChangeCount(void) const
+ ?OutputHeapInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 75 NONAME ; void RMemSpySession::OutputHeapInfo(class TRequestStatus &)
+ ?Time@CMemSpyApiMemoryTrackingCycle@@QBEABVTTime@@XZ @ 76 NONAME ; class TTime const & CMemSpyApiMemoryTrackingCycle::Time(void) const
+ ?SetSwmtTimerIntervalL@RMemSpySession@@QAEXH@Z @ 77 NONAME ; void RMemSpySession::SetSwmtTimerIntervalL(int)
+ ?OutputKernelHeapData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 78 NONAME ; void RMemSpySession::OutputKernelHeapData(class TRequestStatus &)
+ ?Id@CMemSpyApiWindowGroup@@QBEHXZ @ 79 NONAME ; int CMemSpyApiWindowGroup::Id(void) const
+ ?AddressOfKernelOwner@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 80 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfKernelOwner(void)
+ ?ProcessSystemPermanentOrCritical@RMemSpySession@@QAEHVTProcessId@@AAH@Z @ 81 NONAME ; int RMemSpySession::ProcessSystemPermanentOrCritical(class TProcessId, int &)
+ ?OwnerName@CMemSpyApiChunk@@QBEABVTDesC16@@XZ @ 82 NONAME ; class TDesC16 const & CMemSpyApiChunk::OwnerName(void) const
+ ?FreeCount@CMemSpyApiHeap@@QAEHXZ @ 83 NONAME ; int CMemSpyApiHeap::FreeCount(void)
+ ?TotalFree@CMemSpyApiHeap@@QAEHXZ @ 84 NONAME ; int CMemSpyApiHeap::TotalFree(void)
+ ?SwitchToThread@RMemSpySession@@QAEHVTThreadId@@H@Z @ 85 NONAME ; int RMemSpySession::SwitchToThread(class TThreadId, int)
+ ?GetServersL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiServer@@@@W4TSortType@@@Z @ 86 NONAME ; void RMemSpySession::GetServersL(class RArray<class CMemSpyApiServer *> &, enum TSortType)
+ ?FreeOverhead@CMemSpyApiHeap@@QAEHXZ @ 87 NONAME ; int CMemSpyApiHeap::FreeOverhead(void)
+ ?Priority@CMemSpyApiKernelObjectItem@@QBEHXZ @ 88 NONAME ; int CMemSpyApiKernelObjectItem::Priority(void) const
+ ?ThreadCount@CMemSpyApiProcess@@QBEHXZ @ 89 NONAME ; int CMemSpyApiProcess::ThreadCount(void) const
+ ?StopSwmtTimerL@RMemSpySession@@QAEXXZ @ 90 NONAME ; void RMemSpySession::StopSwmtTimerL(void)
+ ?MinLength@CMemSpyApiHeap@@QAEHXZ @ 91 NONAME ; int CMemSpyApiHeap::MinLength(void)
+ ?ExitCategory@CMemSpyApiProcess@@QBE?AV?$TBuf@$0BA@@@XZ @ 92 NONAME ; class TBuf<16> CMemSpyApiProcess::ExitCategory(void) const
+ ?Progress@TMemSpyDeviceWideOperationProgress@@QBEHXZ @ 93 NONAME ; int TMemSpyDeviceWideOperationProgress::Progress(void) const
+ ?IsDead@CMemSpyApiProcess@@QBEHXZ @ 94 NONAME ; int CMemSpyApiProcess::IsDead(void) const
+ ?EndThreadL@RMemSpySession@@QAEHVTThreadId@@W4TMemSpyEndType@@@Z @ 95 NONAME ; int RMemSpySession::EndThreadL(class TThreadId, enum TMemSpyEndType)
+ ?TimerState@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverTimerState@@XZ @ 96 NONAME ; enum TMemSpyDriverTimerState CMemSpyApiKernelObjectItem::TimerState(void) const
+ ?Capabilities2@CMemSpyApiCodeSegment@@QBEKXZ @ 97 NONAME ; unsigned long CMemSpyApiCodeSegment::Capabilities2(void) const
+ ?BaseAddress@CMemSpyApiHeap@@QAEHXZ @ 98 NONAME ; int CMemSpyApiHeap::BaseAddress(void)
+ ?ExitType@CMemSpyApiThread@@QBE?AW4TExitType@@XZ @ 99 NONAME ; enum TExitType CMemSpyApiThread::ExitType(void) const
+ ?Handle@CMemSpyApiChunk@@QBEPAEXZ @ 100 NONAME ; unsigned char * CMemSpyApiChunk::Handle(void) const
+ ?GetOutputSink@RMemSpySession@@QAEXAAW4TMemSpySinkType@@@Z @ 101 NONAME ; void RMemSpySession::GetOutputSink(enum TMemSpySinkType &)
+ ?BiggestAllocation@CMemSpyApiHeap@@QAEHXZ @ 102 NONAME ; int CMemSpyApiHeap::BiggestAllocation(void)
+ ??1CMemSpyApiKernelObjectItem@@QAE@XZ @ 103 NONAME ; CMemSpyApiKernelObjectItem::~CMemSpyApiKernelObjectItem(void)
+ ?OutputKernelObjectsL@RMemSpySession@@QAEXXZ @ 104 NONAME ; void RMemSpySession::OutputKernelObjectsL(void)
+ ?OutputAllContainerContents@RMemSpySession@@QAEXXZ @ 105 NONAME ; void RMemSpySession::OutputAllContainerContents(void)
+ ?ThreadSystemPermanentOrCritical@RMemSpySession@@QAEHVTThreadId@@H@Z @ 106 NONAME ; int RMemSpySession::ThreadSystemPermanentOrCritical(class TThreadId, int)
+ ?IsAknIconCacheConfigurable@RMemSpySession@@QAEXAAH@Z @ 107 NONAME ; void RMemSpySession::IsAknIconCacheConfigurable(int &)
+ ?Protection@CMemSpyApiKernelObjectItem@@QBEIXZ @ 108 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Protection(void) const
+ ?BiggestFree@CMemSpyApiHeap@@QAEHXZ @ 109 NONAME ; int CMemSpyApiHeap::BiggestFree(void)
+ ?Attributes@CMemSpyApiThread@@QBEHXZ @ 110 NONAME ; int CMemSpyApiThread::Attributes(void) const
+ ?OutputPhoneInfo@RMemSpySession@@QAEXXZ @ 111 NONAME ; void RMemSpySession::OutputPhoneInfo(void)
+ ?OutputCompactHeapInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 112 NONAME ; void RMemSpySession::OutputCompactHeapInfo(class TRequestStatus &)
+ ?NotifyDeviceWideOperationProgress@RMemSpySession@@QAEXAAVTMemSpyDeviceWideOperationProgress@@AAVTRequestStatus@@@Z @ 113 NONAME ; void RMemSpySession::NotifyDeviceWideOperationProgress(class TMemSpyDeviceWideOperationProgress &, class TRequestStatus &)
+ ?IsBusy@CMemSpyApiWindowGroup@@QBEHXZ @ 114 NONAME ; int CMemSpyApiWindowGroup::IsBusy(void) const
+ ?ThreadHandles@CMemSpyApiThread@@QBEHXZ @ 115 NONAME ; int CMemSpyApiThread::ThreadHandles(void) const
+ ?SvrSessionType@CMemSpyApiKernelObjectItem@@QBEEXZ @ 116 NONAME ; unsigned char CMemSpyApiKernelObjectItem::SvrSessionType(void) const
+ ?SwitchOutputSinkL@RMemSpySession@@QAEXW4TMemSpySinkType@@@Z @ 117 NONAME ; void RMemSpySession::SwitchOutputSinkL(enum TMemSpySinkType)
+ ?ChunkType@CMemSpyApiKernelObjectItem@@QBEIXZ @ 118 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ChunkType(void) const
+ ?GetSwmtMode@RMemSpySession@@QAEXAAW4TMemSpyEngineSysMemTrackerMode@TMemSpyEngineHelperSysMemTrackerConfig@@@Z @ 119 NONAME ; void RMemSpySession::GetSwmtMode(enum TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode &)
+ ?GetMemoryTrackingCyclesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiMemoryTrackingCycle@@@@@Z @ 120 NONAME ; void RMemSpySession::GetMemoryTrackingCyclesL(class RArray<class CMemSpyApiMemoryTrackingCycle *> &)
+ ?MapAttr@CMemSpyApiKernelObjectItem@@QBEIXZ @ 121 NONAME ; unsigned int CMemSpyApiKernelObjectItem::MapAttr(void) const
+ ?OutputCompactStackInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 122 NONAME ; void RMemSpySession::OutputCompactStackInfo(class TRequestStatus &)
+ ?VID@CMemSpyApiProcess@@QBEKXZ @ 123 NONAME ; unsigned long CMemSpyApiProcess::VID(void) const
+ ?AddressOfCodeSeg@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 124 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfCodeSeg(void)
+ ?ThreadId@CMemSpyApiServer@@QBE?AVTThreadId@@XZ @ 125 NONAME ; class TThreadId CMemSpyApiServer::ThreadId(void) const
+ ?ChunkListOutputL@RMemSpySession@@QAEXXZ @ 126 NONAME ; void RMemSpySession::ChunkListOutputL(void)
+ ?TotalDataSize@CMemSpyApiCodeSegment@@QBEHXZ @ 127 NONAME ; int CMemSpyApiCodeSegment::TotalDataSize(void) const
+ ?Type@CMemSpyApiKernelObjectItem@@QBE?AW4TMemSpyDriverContainerType@@XZ @ 128 NONAME ; enum TMemSpyDriverContainerType CMemSpyApiKernelObjectItem::Type(void) const
+ ?ImplementationCount@CMemSpyApiEComInterface@@QBEHXZ @ 129 NONAME ; int CMemSpyApiEComInterface::ImplementationCount(void) const
+ ?FullName@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 130 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::FullName(void) const
+ ??1CMemSpyApiEComInterface@@UAE@XZ @ 131 NONAME ; CMemSpyApiEComInterface::~CMemSpyApiEComInterface(void)
+ ?Disabled@CMemSpyApiEComImplementation@@QBEHXZ @ 132 NONAME ; int CMemSpyApiEComImplementation::Disabled(void) const
+ ?State@CMemSpyApiKernelObjectItem@@QBEEXZ @ 133 NONAME ; unsigned char CMemSpyApiKernelObjectItem::State(void) const
+ ??1CMemSpyApiServer@@QAE@XZ @ 134 NONAME ; CMemSpyApiServer::~CMemSpyApiServer(void)
+ ?SetSwmtMode@RMemSpySession@@QAEXW4TMemSpyEngineSysMemTrackerMode@TMemSpyEngineHelperSysMemTrackerConfig@@@Z @ 135 NONAME ; void RMemSpySession::SetSwmtMode(enum TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode)
+ ?OutputKernelHeapDataL@RMemSpySession@@QAEXXZ @ 136 NONAME ; void RMemSpySession::OutputKernelHeapDataL(void)
+ ?ThreadNumberUsing@CMemSpyApiThread@@QBEHXZ @ 137 NONAME ; int CMemSpyApiThread::ThreadNumberUsing(void) const
+ ?OutputThreadCellListL@RMemSpySession@@QAEXVTThreadId@@@Z @ 138 NONAME ; void RMemSpySession::OutputThreadCellListL(class TThreadId)
+ ?Attributes@CMemSpyApiChunk@@QBEHXZ @ 139 NONAME ; int CMemSpyApiChunk::Attributes(void) const
+ ?SessionCount@CMemSpyApiServer@@QBEHXZ @ 140 NONAME ; int CMemSpyApiServer::SessionCount(void) const
+ ?Connect@RMemSpySession@@QAEHXZ @ 141 NONAME ; int RMemSpySession::Connect(void)
+ ?SID@CMemSpyApiThread@@QBEHXZ @ 142 NONAME ; int CMemSpyApiThread::SID(void) const
+ ?GetKernelObjectItems@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiKernelObjectItem@@@@W4TMemSpyDriverContainerType@@@Z @ 143 NONAME ; int RMemSpySession::GetKernelObjectItems(class RArray<class CMemSpyApiKernelObjectItem *> &, enum TMemSpyDriverContainerType)
+ ?CpuUse@CMemSpyApiThread@@QBEHXZ @ 144 NONAME ; int CMemSpyApiThread::CpuUse(void) const
+ ?GetThreadInfoItemsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiThreadInfoItem@@@@VTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 145 NONAME ; void RMemSpySession::GetThreadInfoItemsL(class RArray<class CMemSpyApiThreadInfoItem *> &, class TThreadId, enum TMemSpyThreadInfoItemType)
+ ?TextSize@CMemSpyApiCodeSegment@@QBEHXZ @ 146 NONAME ; int CMemSpyApiCodeSegment::TextSize(void) const
+ ?TotalOverhead@CMemSpyApiHeap@@QAEHXZ @ 147 NONAME ; int CMemSpyApiHeap::TotalOverhead(void)
+ ?OutputDetailedPhoneInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 148 NONAME ; void RMemSpySession::OutputDetailedPhoneInfo(class TRequestStatus &)
+ ?UniqueID@CMemSpyApiKernelObjectItem@@QBEHXZ @ 149 NONAME ; int CMemSpyApiKernelObjectItem::UniqueID(void) const
+ ?OutputHeapData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 150 NONAME ; void RMemSpySession::OutputHeapData(class TRequestStatus &)
+ ?DocName@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 151 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::DocName(void) const
+ ?VID@CMemSpyApiThread@@QBEHXZ @ 152 NONAME ; int CMemSpyApiThread::VID(void) const
+ ?CodeSize@CMemSpyApiCodeSegment@@QBEHXZ @ 153 NONAME ; int CMemSpyApiCodeSegment::CodeSize(void) const
+ ?OutputStackDataL@RMemSpySession@@QAEXVTThreadId@@W4TMemSpyDriverDomainType@@@Z @ 154 NONAME ; void RMemSpySession::OutputStackDataL(class TThreadId, enum TMemSpyDriverDomainType)
+ ?OutputHeapCellListing@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 155 NONAME ; void RMemSpySession::OutputHeapCellListing(class TRequestStatus &)
+ ?ModuleVersion@CMemSpyApiCodeSegment@@QBEKXZ @ 156 NONAME ; unsigned long CMemSpyApiCodeSegment::ModuleVersion(void) const
+ ?Count@CMemSpyApiKernelObjectItem@@QBEHXZ @ 157 NONAME ; int CMemSpyApiKernelObjectItem::Count(void) const
+ ?Id@CMemSpyApiKernelObjectItem@@QBEHXZ @ 158 NONAME ; int CMemSpyApiKernelObjectItem::Id(void) const
+ ?Restrictions@CMemSpyApiKernelObjectItem@@QBEIXZ @ 159 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Restrictions(void) const
+ ?ControllingOwner@CMemSpyApiKernelObjectItem@@QBEIXZ @ 160 NONAME ; unsigned int CMemSpyApiKernelObjectItem::ControllingOwner(void) const
+ ?SwmtResetTracking@RMemSpySession@@QAEXXZ @ 161 NONAME ; void RMemSpySession::SwmtResetTracking(void)
+ ?ImplementationUid@CMemSpyApiEComImplementation@@QBE?AVTUid@@XZ @ 162 NONAME ; class TUid CMemSpyApiEComImplementation::ImplementationUid(void) const
+ ?WaitCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 163 NONAME ; int CMemSpyApiKernelObjectItem::WaitCount(void) const
+ ?GetKernelObjectsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiKernelObject@@@@@Z @ 164 NONAME ; void RMemSpySession::GetKernelObjectsL(class RArray<class CMemSpyApiKernelObject *> &)
+ ?GetEComCategoriesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiEComCategory@@@@@Z @ 165 NONAME ; void RMemSpySession::GetEComCategoriesL(class RArray<class CMemSpyApiEComCategory *> &)
+ ?OpaqueData@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 166 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::OpaqueData(void) const
+ ?Size@CMemSpyApiKernelObject@@QBE_JXZ @ 167 NONAME ; long long CMemSpyApiKernelObject::Size(void) const
+ ?SetSwmtCategoriesL@RMemSpySession@@QAEXH@Z @ 168 NONAME ; void RMemSpySession::SetSwmtCategoriesL(int)
+ ?GetKernelObjects@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiKernelObject@@@@@Z @ 169 NONAME ; int RMemSpySession::GetKernelObjects(class RArray<class CMemSpyApiKernelObject *> &)
+ ?DataLoadAddress@CMemSpyApiCodeSegment@@QBEKXZ @ 170 NONAME ; unsigned long CMemSpyApiCodeSegment::DataLoadAddress(void) const
+ ?HeaderSizeF@CMemSpyApiHeap@@QAEHXZ @ 171 NONAME ; int CMemSpyApiHeap::HeaderSizeF(void)
+ ?Priority@CMemSpyApiProcess@@QBE?AW4TProcessPriority@@XZ @ 172 NONAME ; enum TProcessPriority CMemSpyApiProcess::Priority(void) const
+ ?MsgLimit@CMemSpyApiKernelObjectItem@@QBEHXZ @ 173 NONAME ; int CMemSpyApiKernelObjectItem::MsgLimit(void) const
+ ?AddressOfDataBssStackChunk@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 174 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfDataBssStackChunk(void)
+ ?Resetting@CMemSpyApiKernelObjectItem@@QBEEXZ @ 175 NONAME ; unsigned char CMemSpyApiKernelObjectItem::Resetting(void) const
+ ?GetWindowGroupsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiWindowGroup@@@@@Z @ 176 NONAME ; void RMemSpySession::GetWindowGroupsL(class RArray<class CMemSpyApiWindowGroup *> &)
+ ?Name@CMemSpyApiEComImplementation@@QBEABVTDesC16@@XZ @ 177 NONAME ; class TDesC16 const & CMemSpyApiEComImplementation::Name(void) const
+ ?Changes@CMemSpyApiKernelObjectItem@@QBEIXZ @ 178 NONAME ; unsigned int CMemSpyApiKernelObjectItem::Changes(void) const
+ ??1CMemSpyApiChunk@@QAE@XZ @ 179 NONAME ; CMemSpyApiChunk::~CMemSpyApiChunk(void)
+ ?Drive@CMemSpyApiEComImplementation@@QBE?AVTDriveUnit@@XZ @ 180 NONAME ; class TDriveUnit CMemSpyApiEComImplementation::Drive(void) const
+ ?OutputUserStackData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 181 NONAME ; void RMemSpySession::OutputUserStackData(class TRequestStatus &)
+ ?AddressOfServer@CMemSpyApiKernelObjectItem@@QAEPAEXZ @ 182 NONAME ; unsigned char * CMemSpyApiKernelObjectItem::AddressOfServer(void)
+ ?NotifyEvent@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 183 NONAME ; void RMemSpySession::NotifyEvent(class TRequestStatus &)
+ ?VendorId@CMemSpyApiEComImplementation@@QBE?AVTVendorId@@XZ @ 184 NONAME ; class TVendorId CMemSpyApiEComImplementation::VendorId(void) const
+ ?Version@CMemSpyApiEComImplementation@@QBEHXZ @ 185 NONAME ; int CMemSpyApiEComImplementation::Version(void) const
+ ?GetServersL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiServer@@@@@Z @ 186 NONAME ; void RMemSpySession::GetServersL(class RArray<class CMemSpyApiServer *> &)
+ ?OwnerId@CMemSpyApiChunk@@QBEIXZ @ 187 NONAME ; unsigned int CMemSpyApiChunk::OwnerId(void) const
+ ?Size@CMemSpyApiHeap@@QAEHXZ @ 188 NONAME ; int CMemSpyApiHeap::Size(void)
+ ??1CMemSpyApiHeap@@QAE@XZ @ 189 NONAME ; CMemSpyApiHeap::~CMemSpyApiHeap(void)
+ ?OutputThreadInfoHandlesL@RMemSpySession@@QAEXVTThreadId@@@Z @ 190 NONAME ; void RMemSpySession::OutputThreadInfoHandlesL(class TThreadId)
+ ?Size@CMemSpyApiKernelObjectItem@@QBEKXZ @ 191 NONAME ; unsigned long CMemSpyApiKernelObjectItem::Size(void) const
+ ?OutputThreadHeapDataL@RMemSpySession@@QAEXABVTDesC16@@@Z @ 192 NONAME ; void RMemSpySession::OutputThreadHeapDataL(class TDesC16 const &)
+ ?Type@CMemSpyApiKernelObject@@QBE?AW4TMemSpyDriverContainerType@@XZ @ 193 NONAME ; enum TMemSpyDriverContainerType CMemSpyApiKernelObject::Type(void) const
+ ?DepCount@CMemSpyApiCodeSegment@@QBEHXZ @ 194 NONAME ; int CMemSpyApiCodeSegment::DepCount(void) const
+ ?Value@CMemSpyApiThreadInfoItem@@QBEABVTDesC16@@XZ @ 195 NONAME ; class TDesC16 const & CMemSpyApiThreadInfoItem::Value(void) const
+ ?SecurityZone@CMemSpyApiKernelObjectItem@@QBEIXZ @ 196 NONAME ; unsigned int CMemSpyApiKernelObjectItem::SecurityZone(void) const
+ ?NameDetail@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 197 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::NameDetail(void) const
+ ?Order@CMemSpyApiKernelObjectItem@@QBEEXZ @ 198 NONAME ; unsigned char CMemSpyApiKernelObjectItem::Order(void) const
+ ?GetProcessesL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiProcess@@@@W4TSortType@@@Z @ 199 NONAME ; void RMemSpySession::GetProcessesL(class RArray<class CMemSpyApiProcess *> &, enum TSortType)
+ ?DebugAllocatorLibrary@CMemSpyApiHeap@@QAEHXZ @ 200 NONAME ; int CMemSpyApiHeap::DebugAllocatorLibrary(void)
+ ?GetSwmtFilter@RMemSpySession@@QAEXAAV?$TBuf@$0IA@@@@Z @ 201 NONAME ; void RMemSpySession::GetSwmtFilter(class TBuf<128> &)
+ ?InterfaceCount@CMemSpyApiEComCategory@@QBEHXZ @ 202 NONAME ; int CMemSpyApiEComCategory::InterfaceCount(void) const
+ ?Overhead@CMemSpyApiHeap@@QAEHXZ @ 203 NONAME ; int CMemSpyApiHeap::Overhead(void)
+ ?ForceSwmtUpdate@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 204 NONAME ; void RMemSpySession::ForceSwmtUpdate(class TRequestStatus &)
+ ?GetSwmtTimerIntervalL@RMemSpySession@@QAEXAAH@Z @ 205 NONAME ; void RMemSpySession::GetSwmtTimerIntervalL(int &)
+ ?OutputKernelStackData@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 206 NONAME ; void RMemSpySession::OutputKernelStackData(class TRequestStatus &)
+ ?SwitchToWindowGroupL@RMemSpySession@@QAEXH@Z @ 207 NONAME ; void RMemSpySession::SwitchToWindowGroupL(int)
+ ?SetAknIconCacheStatusL@RMemSpySession@@QAEXHAA_J@Z @ 208 NONAME ; void RMemSpySession::SetAknIconCacheStatusL(int, long long &)
+ ??1CMemSpyApiCodeSegment@@QAE@XZ @ 209 NONAME ; CMemSpyApiCodeSegment::~CMemSpyApiCodeSegment(void)
+ ?GetHeap@RMemSpySession@@QAEPAVCMemSpyApiHeap@@XZ @ 210 NONAME ; class CMemSpyApiHeap * RMemSpySession::GetHeap(void)
+ ??1CMemSpyApiMemoryTrackingCycle@@QAE@XZ @ 211 NONAME ; CMemSpyApiMemoryTrackingCycle::~CMemSpyApiMemoryTrackingCycle(void)
+ ?MaxLength@CMemSpyApiHeap@@QAEHXZ @ 212 NONAME ; int CMemSpyApiHeap::MaxLength(void)
+ ?MaxSize@CMemSpyApiChunk@@QBEIXZ @ 213 NONAME ; unsigned int CMemSpyApiChunk::MaxSize(void) const
+ ??1CMemSpyApiThreadInfoItem@@QAE@XZ @ 214 NONAME ; CMemSpyApiThreadInfoItem::~CMemSpyApiThreadInfoItem(void)
+ ?RomBased@CMemSpyApiEComImplementation@@QBEHXZ @ 215 NONAME ; int CMemSpyApiEComImplementation::RomBased(void) const
+ ?RomOnly@CMemSpyApiEComImplementation@@QBEHXZ @ 216 NONAME ; int CMemSpyApiEComImplementation::RomOnly(void) const
+ ?SlackFreeSpace@CMemSpyApiHeap@@QAEHXZ @ 217 NONAME ; int CMemSpyApiHeap::SlackFreeSpace(void)
+ ?SwitchOutputToTraceL@RMemSpySession@@QAEXXZ @ 218 NONAME ; void RMemSpySession::SwitchOutputToTraceL(void)
+ ?ForceSwmtUpdateL@RMemSpySession@@QAEXXZ @ 219 NONAME ; void RMemSpySession::ForceSwmtUpdateL(void)
+ ?Caption@CMemSpyApiMemoryTrackingCycle@@QBEABVTDesC16@@XZ @ 220 NONAME ; class TDesC16 const & CMemSpyApiMemoryTrackingCycle::Caption(void) const
+ ?RequestCount@CMemSpyApiThread@@QBEHXZ @ 221 NONAME ; int CMemSpyApiThread::RequestCount(void) const
+ ??1CMemSpyApiProcess@@QAE@XZ @ 222 NONAME ; CMemSpyApiProcess::~CMemSpyApiProcess(void)
+ ?Count@CMemSpyApiKernelObject@@QBEHXZ @ 223 NONAME ; int CMemSpyApiKernelObject::Count(void) const
+ ?OrdinalPosition@CMemSpyApiWindowGroup@@QBEHXZ @ 224 NONAME ; int CMemSpyApiWindowGroup::OrdinalPosition(void) const
+ ?StartPos@CMemSpyApiKernelObjectItem@@QBEHXZ @ 225 NONAME ; int CMemSpyApiKernelObjectItem::StartPos(void) const
+ ?GetEComInterfacesL@RMemSpySession@@QAEXVTUid@@AAV?$RArray@PAVCMemSpyApiEComInterface@@@@@Z @ 226 NONAME ; void RMemSpySession::GetEComInterfacesL(class TUid, class RArray<class CMemSpyApiEComInterface *> &)
+ ?StartSwmtTimerL@RMemSpySession@@QAEXH@Z @ 227 NONAME ; void RMemSpySession::StartSwmtTimerL(int)
+ ?Type@CMemSpyApiHeap@@QAEAAVTDesC16@@XZ @ 228 NONAME ; class TDesC16 & CMemSpyApiHeap::Type(void)
+ ?Id@CMemSpyApiProcess@@QBE?AVTProcessId@@XZ @ 229 NONAME ; class TProcessId CMemSpyApiProcess::Id(void) const
+ ?AllocationOverhead@CMemSpyApiHeap@@QAEHXZ @ 230 NONAME ; int CMemSpyApiHeap::AllocationOverhead(void)
+ ?NameOfOwner@CMemSpyApiKernelObjectItem@@QBEABVTDesC8@@XZ @ 231 NONAME ; class TDesC8 const & CMemSpyApiKernelObjectItem::NameOfOwner(void) const
+ ?CodeLoadAddress@CMemSpyApiCodeSegment@@QBEKXZ @ 232 NONAME ; unsigned long CMemSpyApiCodeSegment::CodeLoadAddress(void) const
+ ?Uid@CMemSpyApiWindowGroup@@QBE?AVTUid@@XZ @ 233 NONAME ; class TUid CMemSpyApiWindowGroup::Uid(void) const
+ ?GetSwmtCyclesCount@RMemSpySession@@QAEHXZ @ 234 NONAME ; int RMemSpySession::GetSwmtCyclesCount(void)
+ ?Bottom@CMemSpyApiKernelObjectItem@@QBEHXZ @ 235 NONAME ; int CMemSpyApiKernelObjectItem::Bottom(void) const
+ ?StartSwmtTimerL@RMemSpySession@@QAEXXZ @ 236 NONAME ; void RMemSpySession::StartSwmtTimerL(void)
+ ?GetKernelObjectItemsL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiKernelObjectItem@@@@W4TMemSpyDriverContainerType@@@Z @ 237 NONAME ; void RMemSpySession::GetKernelObjectItemsL(class RArray<class CMemSpyApiKernelObjectItem *> &, enum TMemSpyDriverContainerType)
+ ?EndProcessL@RMemSpySession@@QAEHVTProcessId@@W4TMemSpyEndType@@@Z @ 238 NONAME ; int RMemSpySession::EndProcessL(class TProcessId, enum TMemSpyEndType)
+ ?IsSystem@CMemSpyApiWindowGroup@@QBEHXZ @ 239 NONAME ; int CMemSpyApiWindowGroup::IsSystem(void) const
+ ?Uids@CMemSpyApiCodeSegment@@QBE?AVTUidType@@XZ @ 240 NONAME ; class TUidType CMemSpyApiCodeSegment::Uids(void) const
+ ?BssSize@CMemSpyApiCodeSegment@@QBEHXZ @ 241 NONAME ; int CMemSpyApiCodeSegment::BssSize(void) const
+ ?Size@CMemSpyApiChunk@@QBEIXZ @ 242 NONAME ; unsigned int CMemSpyApiChunk::Size(void) const
+ ?WindowGroupHandle@CMemSpyApiWindowGroup@@QBEHXZ @ 243 NONAME ; int CMemSpyApiWindowGroup::WindowGroupHandle(void) const
+ ?Id@CMemSpyApiThread@@QBE?AVTThreadId@@XZ @ 244 NONAME ; class TThreadId CMemSpyApiThread::Id(void) const
+ ?OutputPhoneInfo@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 245 NONAME ; void RMemSpySession::OutputPhoneInfo(class TRequestStatus &)
+ ?GetProcessIdByNameL@RMemSpySession@@QAE?AVTProcessId@@ABVTDesC16@@@Z @ 246 NONAME ; class TProcessId RMemSpySession::GetProcessIdByNameL(class TDesC16 const &)
+ ?DataSize@CMemSpyApiCodeSegment@@QBEHXZ @ 247 NONAME ; int CMemSpyApiCodeSegment::DataSize(void) const
+ ?GetThreadsL@RMemSpySession@@QAEXVTProcessId@@AAV?$RArray@PAVCMemSpyApiThread@@@@W4TSortType@@@Z @ 248 NONAME ; void RMemSpySession::GetThreadsL(class TProcessId, class RArray<class CMemSpyApiThread *> &, enum TSortType)
+ ?GetChunksL@RMemSpySession@@QAEXAAV?$RArray@PAVCMemSpyApiChunk@@@@W4TSortType@@@Z @ 249 NONAME ; void RMemSpySession::GetChunksL(class RArray<class CMemSpyApiChunk *> &, enum TSortType)
+ ?Name@CMemSpyApiChunk@@QBEABVTDesC16@@XZ @ 250 NONAME ; class TDesC16 const & CMemSpyApiChunk::Name(void) const
+ ?ProcessId@CMemSpyApiThread@@QBE?AVTProcessId@@XZ @ 251 NONAME ; class TProcessId CMemSpyApiThread::ProcessId(void) const
+ ?SID@CMemSpyApiCodeSegment@@QBEKXZ @ 252 NONAME ; unsigned long CMemSpyApiCodeSegment::SID(void) const
+ ?ChunkSize@CMemSpyApiHeap@@QAEHXZ @ 253 NONAME ; int CMemSpyApiHeap::ChunkSize(void)
+ ?UnitsMask@CMemSpyApiKernelObjectItem@@QBEIXZ @ 254 NONAME ; unsigned int CMemSpyApiKernelObjectItem::UnitsMask(void) const
+ ?Name@CMemSpyApiEComInterface@@QBEABVTDesC16@@XZ @ 255 NONAME ; class TDesC16 const & CMemSpyApiEComInterface::Name(void) const
+ ?Name@CMemSpyApiServer@@QBEABVTDesC16@@XZ @ 256 NONAME ; class TDesC16 const & CMemSpyApiServer::Name(void) const
+ ?Shared@CMemSpyApiHeap@@QAEHXZ @ 257 NONAME ; int CMemSpyApiHeap::Shared(void)
+ ?OutputCompactHeapInfoL@RMemSpySession@@QAEXXZ @ 258 NONAME ; void RMemSpySession::OutputCompactHeapInfoL(void)
+ ?SetSwmtAutoStartProcessList@RMemSpySession@@QAEXPAV?$CArrayFixFlat@VTUid@@@@@Z @ 259 NONAME ; void RMemSpySession::SetSwmtAutoStartProcessList(class CArrayFixFlat<class TUid> *)
+ ??1CMemSpyApiWindowGroup@@UAE@XZ @ 260 NONAME ; CMemSpyApiWindowGroup::~CMemSpyApiWindowGroup(void)
+ ?MapCount@CMemSpyApiKernelObjectItem@@QBEHXZ @ 261 NONAME ; int CMemSpyApiKernelObjectItem::MapCount(void) const
+ ?OpenChannels@CMemSpyApiKernelObjectItem@@QAEHXZ @ 262 NONAME ; int CMemSpyApiKernelObjectItem::OpenChannels(void)
+ ?EntryPtVeneer@CMemSpyApiCodeSegment@@QBEKXZ @ 263 NONAME ; unsigned long CMemSpyApiCodeSegment::EntryPtVeneer(void) const
+ ?ProcessPriority@CMemSpyApiThread@@QBE?AW4TProcessPriority@@XZ @ 264 NONAME ; enum TProcessPriority CMemSpyApiThread::ProcessPriority(void) const
+ ?IsFocused@CMemSpyApiWindowGroup@@QBEHXZ @ 265 NONAME ; int CMemSpyApiWindowGroup::IsFocused(void) const
+ ?OutputAOListL@RMemSpySession@@QAEXVTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 266 NONAME ; void RMemSpySession::OutputAOListL(class TThreadId, enum TMemSpyThreadInfoItemType)
+ ?OutputHeapInfoUserL@RMemSpySession@@QAEXVTThreadId@@@Z @ 267 NONAME ; void RMemSpySession::OutputHeapInfoUserL(class TThreadId)
+ ?GetThreadInfoItems@RMemSpySession@@QAEHAAV?$RArray@PAVCMemSpyApiThreadInfoItem@@@@VTThreadId@@W4TMemSpyThreadInfoItemType@@@Z @ 268 NONAME ; int RMemSpySession::GetThreadInfoItems(class RArray<class CMemSpyApiThreadInfoItem *> &, class TThreadId, enum TMemSpyThreadInfoItemType)
+ ??1CMemSpyApiThread@@QAE@XZ @ 269 NONAME ; CMemSpyApiThread::~CMemSpyApiThread(void)
+ ?Name@CMemSpyApiWindowGroup@@QBEABVTDesC16@@XZ @ 270 NONAME ; class TDesC16 const & CMemSpyApiWindowGroup::Name(void) const
+ ?ProcessHandles@CMemSpyApiThread@@QBEHXZ @ 271 NONAME ; int CMemSpyApiThread::ProcessHandles(void) const
+ ?Name@CMemSpyApiThread@@QBEABVTDesC16@@XZ @ 272 NONAME ; class TDesC16 const & CMemSpyApiThread::Name(void) const
+ ?StartSwmtTimer@RMemSpySession@@QAEXAAVTRequestStatus@@@Z @ 273 NONAME ; void RMemSpySession::StartSwmtTimer(class TRequestStatus &)
+ ?CodeSegmentsListOutputL@RMemSpySession@@QAEXXZ @ 274 NONAME ; void RMemSpySession::CodeSegmentsListOutputL(void)
--- a/perfsrv/memspy/MemSpyClient/eabi/MemSpyClientu.def Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/eabi/MemSpyClientu.def Tue Oct 26 16:20:32 2010 +0300
@@ -24,233 +24,272 @@
_ZN14CMemSpyApiHeapD1Ev @ 23 NONAME
_ZN14CMemSpyApiHeapD2Ev @ 24 NONAME
_ZN14RMemSpySession10EndThreadLE9TThreadId14TMemSpyEndType @ 25 NONAME
- _ZN14RMemSpySession11EndProcessLE10TProcessId14TMemSpyEndType @ 26 NONAME
- _ZN14RMemSpySession11GetServersLER6RArrayIP16CMemSpyApiServerE @ 27 NONAME
- _ZN14RMemSpySession11GetServersLER6RArrayIP16CMemSpyApiServerE9TSortType @ 28 NONAME
- _ZN14RMemSpySession11GetSwmtModeERN38TMemSpyEngineHelperSysMemTrackerConfig30TMemSpyEngineSysMemTrackerModeE @ 29 NONAME
- _ZN14RMemSpySession11GetThreadsLE10TProcessIdR6RArrayIP16CMemSpyApiThreadE9TSortType @ 30 NONAME
- _ZN14RMemSpySession11SetSwmtModeEN38TMemSpyEngineHelperSysMemTrackerConfig30TMemSpyEngineSysMemTrackerModeE @ 31 NONAME
- _ZN14RMemSpySession13GetOutputSinkER15TMemSpySinkType @ 32 NONAME
- _ZN14RMemSpySession13GetProcessesLER6RArrayIP17CMemSpyApiProcessE9TSortType @ 33 NONAME
- _ZN14RMemSpySession13GetSwmtFilterER4TBufILi128EE @ 34 NONAME
- _ZN14RMemSpySession13OutputAOListLE9TThreadId25TMemSpyThreadInfoItemType @ 35 NONAME
- _ZN14RMemSpySession13SetSwmtFilterERK7TDesC16 @ 36 NONAME
- _ZN14RMemSpySession14DumpKernelHeapEv @ 37 NONAME
- _ZN14RMemSpySession14IsSwmtRunningLEv @ 38 NONAME
- _ZN14RMemSpySession14OutputHeapDataER14TRequestStatus @ 39 NONAME
- _ZN14RMemSpySession14OutputHeapDataEv @ 40 NONAME
- _ZN14RMemSpySession14OutputHeapInfoER14TRequestStatus @ 41 NONAME
- _ZN14RMemSpySession14StartSwmtTimerER14TRequestStatus @ 42 NONAME
- _ZN14RMemSpySession14StopSwmtTimerLEv @ 43 NONAME
- _ZN14RMemSpySession14SwitchToThreadE9TThreadIdi @ 44 NONAME
- _ZN14RMemSpySession15ForceSwmtUpdateER14TRequestStatus @ 45 NONAME
- _ZN14RMemSpySession15GetInfoItemTypeEi9TThreadIdR25TMemSpyThreadInfoItemType @ 46 NONAME
- _ZN14RMemSpySession15OutputPhoneInfoER14TRequestStatus @ 47 NONAME
- _ZN14RMemSpySession15OutputPhoneInfoEv @ 48 NONAME
- _ZN14RMemSpySession15OutputStackInfoER14TRequestStatus @ 49 NONAME
- _ZN14RMemSpySession15StartSwmtTimerLEi @ 50 NONAME
- _ZN14RMemSpySession15StartSwmtTimerLEv @ 51 NONAME
- _ZN14RMemSpySession15SwitchToProcessE10TProcessIdi @ 52 NONAME
- _ZN14RMemSpySession16ForceSwmtUpdateLEv @ 53 NONAME
- _ZN14RMemSpySession16GetKernelObjectsER6RArrayIP22CMemSpyApiKernelObjectE @ 54 NONAME
- _ZN14RMemSpySession16GetWindowGroupsLER6RArrayIP21CMemSpyApiWindowGroupE @ 55 NONAME
- _ZN14RMemSpySession16OutputStackDataLE9TThreadId23TMemSpyDriverDomainType @ 56 NONAME
- _ZN14RMemSpySession16OutputStackInfoLE9TThreadId @ 57 NONAME
- _ZN14RMemSpySession17GetKernelObjectsLER6RArrayIP22CMemSpyApiKernelObjectE @ 58 NONAME
- _ZN14RMemSpySession17SwitchOutputSinkLE15TMemSpySinkType @ 59 NONAME
- _ZN14RMemSpySession17SwmtResetTrackingEv @ 60 NONAME
- _ZN14RMemSpySession18GetEComCategoriesLER6RArrayIP22CMemSpyApiEComCategoryE @ 61 NONAME
- _ZN14RMemSpySession18GetEComInterfacesLE4TUidR6RArrayIP23CMemSpyApiEComInterfaceE @ 62 NONAME
- _ZN14RMemSpySession18GetSwmtCategoriesLERi @ 63 NONAME
- _ZN14RMemSpySession18GetSwmtCyclesCountEv @ 64 NONAME
- _ZN14RMemSpySession18GetThreadInfoItemsER6RArrayIP24CMemSpyApiThreadInfoItemE9TThreadId25TMemSpyThreadInfoItemType @ 65 NONAME
- _ZN14RMemSpySession18SetSwmtCategoriesLEi @ 66 NONAME
- _ZN14RMemSpySession18SetThreadPriorityLE9TThreadIdi @ 67 NONAME
- _ZN14RMemSpySession19GetProcessIdByNameLERK7TDesC16 @ 68 NONAME
- _ZN14RMemSpySession19GetThreadInfoItemsLER6RArrayIP24CMemSpyApiThreadInfoItemE9TThreadId25TMemSpyThreadInfoItemType @ 69 NONAME
- _ZN14RMemSpySession19OutputHeapInfoUserLE9TThreadId @ 70 NONAME
- _ZN14RMemSpySession19OutputUserStackDataER14TRequestStatus @ 71 NONAME
- _ZN14RMemSpySession19SwitchOutputToFileLERK7TDesC16 @ 72 NONAME
- _ZN14RMemSpySession20GetKernelObjectItemsER6RArrayIP26CMemSpyApiKernelObjectItemE26TMemSpyDriverContainerType @ 73 NONAME
- _ZN14RMemSpySession20OutputKernelHeapDataER14TRequestStatus @ 74 NONAME
- _ZN14RMemSpySession20OutputKernelObjectsLEv @ 75 NONAME
- _ZN14RMemSpySession20SwitchOutputToTraceLEv @ 76 NONAME
- _ZN14RMemSpySession21GetKernelObjectItemsLER6RArrayIP26CMemSpyApiKernelObjectItemE26TMemSpyDriverContainerType @ 77 NONAME
- _ZN14RMemSpySession21GetSwmtTimerIntervalLERi @ 78 NONAME
- _ZN14RMemSpySession21OutputCompactHeapInfoER14TRequestStatus @ 79 NONAME
- _ZN14RMemSpySession21OutputHeapCellListingER14TRequestStatus @ 80 NONAME
- _ZN14RMemSpySession21OutputKernelHeapDataLEv @ 81 NONAME
- _ZN14RMemSpySession21OutputKernelStackDataER14TRequestStatus @ 82 NONAME
- _ZN14RMemSpySession21OutputThreadCellListLE9TThreadId @ 83 NONAME
- _ZN14RMemSpySession21OutputThreadHeapDataLE9TThreadId @ 84 NONAME
- _ZN14RMemSpySession21OutputThreadHeapDataLERK7TDesC16 @ 85 NONAME
- _ZN14RMemSpySession21SetSwmtTimerIntervalLEi @ 86 NONAME
- _ZN14RMemSpySession22GetProcessIdByThreadIdER10TProcessId9TThreadId @ 87 NONAME
- _ZN14RMemSpySession22OutputCompactHeapInfoLEv @ 88 NONAME
- _ZN14RMemSpySession22OutputCompactStackInfoER14TRequestStatus @ 89 NONAME
- _ZN14RMemSpySession23GetEComImplementationsLE4TUidR6RArrayIP28CMemSpyApiEComImplementationE @ 90 NONAME
- _ZN14RMemSpySession23OutputCompactStackInfoLEv @ 91 NONAME
- _ZN14RMemSpySession23OutputDetailedPhoneInfoER14TRequestStatus @ 92 NONAME
- _ZN14RMemSpySession24GetMemoryTrackingCyclesLER6RArrayIP29CMemSpyApiMemoryTrackingCycleE @ 93 NONAME
- _ZN14RMemSpySession24GetSwmtHeapDumpsEnabledLERi @ 94 NONAME
- _ZN14RMemSpySession24OutputThreadInfoHandlesLE9TThreadId @ 95 NONAME
- _ZN14RMemSpySession24ServerListOutputGenericLEi @ 96 NONAME
- _ZN14RMemSpySession24SetSwmtHeapDumpsEnabledLEi @ 97 NONAME
- _ZN14RMemSpySession26CancelDeviceWideOperationLEv @ 98 NONAME
- _ZN14RMemSpySession26OutputAllContainerContentsEv @ 99 NONAME
- _ZN14RMemSpySession27SetSwmtAutoStartProcessListEP13CArrayFixFlatI4TUidE @ 100 NONAME
- _ZN14RMemSpySession31ThreadSystemPermanentOrCriticalE9TThreadIdi @ 101 NONAME
- _ZN14RMemSpySession32ProcessSystemPermanentOrCriticalE10TProcessIdi @ 102 NONAME
- _ZN14RMemSpySession33NotifyDeviceWideOperationProgressER34TMemSpyDeviceWideOperationProgressR14TRequestStatus @ 103 NONAME
- _ZN14RMemSpySession7ConnectEv @ 104 NONAME
- _ZN14RMemSpySession7GetHeapEv @ 105 NONAME
- _ZN14RMemSpySession8GetHeapLEv @ 106 NONAME
- _ZN14RMemSpySessionC1Ev @ 107 NONAME
- _ZN14RMemSpySessionC2Ev @ 108 NONAME
- _ZN16CMemSpyApiServerD1Ev @ 109 NONAME
- _ZN16CMemSpyApiServerD2Ev @ 110 NONAME
- _ZN16CMemSpyApiThreadD1Ev @ 111 NONAME
- _ZN16CMemSpyApiThreadD2Ev @ 112 NONAME
- _ZN17CMemSpyApiProcessD1Ev @ 113 NONAME
- _ZN17CMemSpyApiProcessD2Ev @ 114 NONAME
- _ZN21CMemSpyApiWindowGroupD0Ev @ 115 NONAME
- _ZN21CMemSpyApiWindowGroupD1Ev @ 116 NONAME
- _ZN21CMemSpyApiWindowGroupD2Ev @ 117 NONAME
- _ZN22CMemSpyApiEComCategoryD0Ev @ 118 NONAME
- _ZN22CMemSpyApiEComCategoryD1Ev @ 119 NONAME
- _ZN22CMemSpyApiEComCategoryD2Ev @ 120 NONAME
- _ZN22CMemSpyApiKernelObjectD1Ev @ 121 NONAME
- _ZN22CMemSpyApiKernelObjectD2Ev @ 122 NONAME
- _ZN23CMemSpyApiEComInterfaceD0Ev @ 123 NONAME
- _ZN23CMemSpyApiEComInterfaceD1Ev @ 124 NONAME
- _ZN23CMemSpyApiEComInterfaceD2Ev @ 125 NONAME
- _ZN24CMemSpyApiThreadInfoItemD1Ev @ 126 NONAME
- _ZN24CMemSpyApiThreadInfoItemD2Ev @ 127 NONAME
- _ZN26CMemSpyApiKernelObjectItem12OpenChannelsEv @ 128 NONAME
- _ZN26CMemSpyApiKernelObjectItem15AddressOfServerEv @ 129 NONAME
- _ZN26CMemSpyApiKernelObjectItem16AddressOfCodeSegEv @ 130 NONAME
- _ZN26CMemSpyApiKernelObjectItem20AddressOfKernelOwnerEv @ 131 NONAME
- _ZN26CMemSpyApiKernelObjectItem21AddressOfOwningThreadEv @ 132 NONAME
- _ZN26CMemSpyApiKernelObjectItem22AddressOfOwningProcessEv @ 133 NONAME
- _ZN26CMemSpyApiKernelObjectItem26AddressOfDataBssStackChunkEv @ 134 NONAME
- _ZN26CMemSpyApiKernelObjectItemD1Ev @ 135 NONAME
- _ZN26CMemSpyApiKernelObjectItemD2Ev @ 136 NONAME
- _ZN28CMemSpyApiEComImplementationD0Ev @ 137 NONAME
- _ZN28CMemSpyApiEComImplementationD1Ev @ 138 NONAME
- _ZN28CMemSpyApiEComImplementationD2Ev @ 139 NONAME
- _ZN29CMemSpyApiMemoryTrackingCycleD1Ev @ 140 NONAME
- _ZN29CMemSpyApiMemoryTrackingCycleD2Ev @ 141 NONAME
- _ZNK16CMemSpyApiServer12SessionCountEv @ 142 NONAME
- _ZNK16CMemSpyApiServer4NameEv @ 143 NONAME
- _ZNK16CMemSpyApiServer8ThreadIdEv @ 144 NONAME
- _ZNK16CMemSpyApiServer9ProcessIdEv @ 145 NONAME
- _ZNK16CMemSpyApiThread10AttributesEv @ 146 NONAME
- _ZNK16CMemSpyApiThread12RequestCountEv @ 147 NONAME
- _ZNK16CMemSpyApiThread13ThreadHandlesEv @ 148 NONAME
- _ZNK16CMemSpyApiThread14ProcessHandlesEv @ 149 NONAME
- _ZNK16CMemSpyApiThread14ThreadPriorityEv @ 150 NONAME
- _ZNK16CMemSpyApiThread15ProcessPriorityEv @ 151 NONAME
- _ZNK16CMemSpyApiThread17ThreadNumberUsingEv @ 152 NONAME
- _ZNK16CMemSpyApiThread18ProcessNumberUsingEv @ 153 NONAME
- _ZNK16CMemSpyApiThread2IdEv @ 154 NONAME
- _ZNK16CMemSpyApiThread3SIDEv @ 155 NONAME
- _ZNK16CMemSpyApiThread3VIDEv @ 156 NONAME
- _ZNK16CMemSpyApiThread4NameEv @ 157 NONAME
- _ZNK16CMemSpyApiThread6CpuUseEv @ 158 NONAME
- _ZNK16CMemSpyApiThread8ExitTypeEv @ 159 NONAME
- _ZNK16CMemSpyApiThread9ProcessIdEv @ 160 NONAME
- _ZNK17CMemSpyApiProcess10ExitReasonEv @ 161 NONAME
- _ZNK17CMemSpyApiProcess11ThreadCountEv @ 162 NONAME
- _ZNK17CMemSpyApiProcess12ExitCategoryEv @ 163 NONAME
- _ZNK17CMemSpyApiProcess2IdEv @ 164 NONAME
- _ZNK17CMemSpyApiProcess3SIDEv @ 165 NONAME
- _ZNK17CMemSpyApiProcess3VIDEv @ 166 NONAME
- _ZNK17CMemSpyApiProcess4NameEv @ 167 NONAME
- _ZNK17CMemSpyApiProcess6IsDeadEv @ 168 NONAME
- _ZNK17CMemSpyApiProcess8ExitTypeEv @ 169 NONAME
- _ZNK17CMemSpyApiProcess8PriorityEv @ 170 NONAME
- _ZNK21CMemSpyApiWindowGroup15OrdinalPositionEv @ 171 NONAME
- _ZNK21CMemSpyApiWindowGroup17WindowGroupHandleEv @ 172 NONAME
- _ZNK21CMemSpyApiWindowGroup2IdEv @ 173 NONAME
- _ZNK21CMemSpyApiWindowGroup3UidEv @ 174 NONAME
- _ZNK21CMemSpyApiWindowGroup4NameEv @ 175 NONAME
- _ZNK21CMemSpyApiWindowGroup6IsBusyEv @ 176 NONAME
- _ZNK21CMemSpyApiWindowGroup7CaptionEv @ 177 NONAME
- _ZNK21CMemSpyApiWindowGroup7DocNameEv @ 178 NONAME
- _ZNK21CMemSpyApiWindowGroup8FullNameEv @ 179 NONAME
- _ZNK21CMemSpyApiWindowGroup8IsHiddenEv @ 180 NONAME
- _ZNK21CMemSpyApiWindowGroup8IsSystemEv @ 181 NONAME
- _ZNK21CMemSpyApiWindowGroup8PriorityEv @ 182 NONAME
- _ZNK21CMemSpyApiWindowGroup8ThreadIdEv @ 183 NONAME
- _ZNK21CMemSpyApiWindowGroup9IsFocusedEv @ 184 NONAME
- _ZNK22CMemSpyApiEComCategory14InterfaceCountEv @ 185 NONAME
- _ZNK22CMemSpyApiEComCategory2IdEv @ 186 NONAME
- _ZNK22CMemSpyApiEComCategory4NameEv @ 187 NONAME
- _ZNK22CMemSpyApiKernelObject4NameEv @ 188 NONAME
- _ZNK22CMemSpyApiKernelObject4SizeEv @ 189 NONAME
- _ZNK22CMemSpyApiKernelObject4TypeEv @ 190 NONAME
- _ZNK22CMemSpyApiKernelObject5CountEv @ 191 NONAME
- _ZNK23CMemSpyApiEComInterface19ImplementationCountEv @ 192 NONAME
- _ZNK23CMemSpyApiEComInterface2IdEv @ 193 NONAME
- _ZNK23CMemSpyApiEComInterface4NameEv @ 194 NONAME
- _ZNK24CMemSpyApiThreadInfoItem5ValueEv @ 195 NONAME
- _ZNK24CMemSpyApiThreadInfoItem7CaptionEv @ 196 NONAME
- _ZNK26CMemSpyApiKernelObjectItem10AttributesEv @ 197 NONAME
- _ZNK26CMemSpyApiKernelObjectItem10NameDetailEv @ 198 NONAME
- _ZNK26CMemSpyApiKernelObjectItem10ProtectionEv @ 199 NONAME
- _ZNK26CMemSpyApiKernelObjectItem10TimerStateEv @ 200 NONAME
- _ZNK26CMemSpyApiKernelObjectItem11AccessCountEv @ 201 NONAME
- _ZNK26CMemSpyApiKernelObjectItem11NameOfOwnerEv @ 202 NONAME
- _ZNK26CMemSpyApiKernelObjectItem11SessionTypeEv @ 203 NONAME
- _ZNK26CMemSpyApiKernelObjectItem12RestrictionsEv @ 204 NONAME
- _ZNK26CMemSpyApiKernelObjectItem12SecurityZoneEv @ 205 NONAME
- _ZNK26CMemSpyApiKernelObjectItem14SvrSessionTypeEv @ 206 NONAME
- _ZNK26CMemSpyApiKernelObjectItem16ControllingOwnerEv @ 207 NONAME
- _ZNK26CMemSpyApiKernelObjectItem16TotalAccessCountEv @ 208 NONAME
- _ZNK26CMemSpyApiKernelObjectItem2IdEv @ 209 NONAME
- _ZNK26CMemSpyApiKernelObjectItem3TopEv @ 210 NONAME
- _ZNK26CMemSpyApiKernelObjectItem4NameEv @ 211 NONAME
- _ZNK26CMemSpyApiKernelObjectItem4SizeEv @ 212 NONAME
- _ZNK26CMemSpyApiKernelObjectItem4TypeEv @ 213 NONAME
- _ZNK26CMemSpyApiKernelObjectItem5CountEv @ 214 NONAME
- _ZNK26CMemSpyApiKernelObjectItem5OrderEv @ 215 NONAME
- _ZNK26CMemSpyApiKernelObjectItem5StateEv @ 216 NONAME
- _ZNK26CMemSpyApiKernelObjectItem6BottomEv @ 217 NONAME
- _ZNK26CMemSpyApiKernelObjectItem6HandleEv @ 218 NONAME
- _ZNK26CMemSpyApiKernelObjectItem7ChangesEv @ 219 NONAME
- _ZNK26CMemSpyApiKernelObjectItem7MapAttrEv @ 220 NONAME
- _ZNK26CMemSpyApiKernelObjectItem7MaxSizeEv @ 221 NONAME
- _ZNK26CMemSpyApiKernelObjectItem7VersionEv @ 222 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8MapCountEv @ 223 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8MsgCountEv @ 224 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8MsgLimitEv @ 225 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8PriorityEv @ 226 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8StartPosEv @ 227 NONAME
- _ZNK26CMemSpyApiKernelObjectItem8UniqueIDEv @ 228 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9ChunkTypeEv @ 229 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9CreatorIdEv @ 230 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9ParseMaskEv @ 231 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9ResettingEv @ 232 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9TimerTypeEv @ 233 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9UnitsMaskEv @ 234 NONAME
- _ZNK26CMemSpyApiKernelObjectItem9WaitCountEv @ 235 NONAME
- _ZNK28CMemSpyApiEComImplementation10OpaqueDataEv @ 236 NONAME
- _ZNK28CMemSpyApiEComImplementation17ImplementationUidEv @ 237 NONAME
- _ZNK28CMemSpyApiEComImplementation4NameEv @ 238 NONAME
- _ZNK28CMemSpyApiEComImplementation5DriveEv @ 239 NONAME
- _ZNK28CMemSpyApiEComImplementation7RomOnlyEv @ 240 NONAME
- _ZNK28CMemSpyApiEComImplementation7VersionEv @ 241 NONAME
- _ZNK28CMemSpyApiEComImplementation8DataTypeEv @ 242 NONAME
- _ZNK28CMemSpyApiEComImplementation8DisabledEv @ 243 NONAME
- _ZNK28CMemSpyApiEComImplementation8RomBasedEv @ 244 NONAME
- _ZNK28CMemSpyApiEComImplementation8VendorIdEv @ 245 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle10FreeMemoryEv @ 246 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle11ChangeCountEv @ 247 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle11CycleNumberEv @ 248 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle11MemoryDeltaEv @ 249 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle17PreviousCycleDiffEv @ 250 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle4TimeEv @ 251 NONAME
- _ZNK29CMemSpyApiMemoryTrackingCycle7CaptionEv @ 252 NONAME
- _ZNK34TMemSpyDeviceWideOperationProgress11DescriptionEv @ 253 NONAME
- _ZNK34TMemSpyDeviceWideOperationProgress8ProgressEv @ 254 NONAME
+ _ZN14RMemSpySession10GetChunksLER6RArrayIP15CMemSpyApiChunkE9TSortType @ 26 NONAME
+ _ZN14RMemSpySession11EndProcessLE10TProcessId14TMemSpyEndType @ 27 NONAME
+ _ZN14RMemSpySession11GetServersLER6RArrayIP16CMemSpyApiServerE @ 28 NONAME
+ _ZN14RMemSpySession11GetServersLER6RArrayIP16CMemSpyApiServerE9TSortType @ 29 NONAME
+ _ZN14RMemSpySession11GetSwmtModeERN38TMemSpyEngineHelperSysMemTrackerConfig30TMemSpyEngineSysMemTrackerModeE @ 30 NONAME
+ _ZN14RMemSpySession11GetThreadsLE10TProcessIdR6RArrayIP16CMemSpyApiThreadE9TSortType @ 31 NONAME
+ _ZN14RMemSpySession11NotifyEventER14TRequestStatus @ 32 NONAME
+ _ZN14RMemSpySession11SetSwmtModeEN38TMemSpyEngineHelperSysMemTrackerConfig30TMemSpyEngineSysMemTrackerModeE @ 33 NONAME
+ _ZN14RMemSpySession13GetOutputSinkER15TMemSpySinkType @ 34 NONAME
+ _ZN14RMemSpySession13GetProcessesLER6RArrayIP17CMemSpyApiProcessE9TSortType @ 35 NONAME
+ _ZN14RMemSpySession13GetSwmtFilterER4TBufILi128EE @ 36 NONAME
+ _ZN14RMemSpySession13OutputAOListLE9TThreadId25TMemSpyThreadInfoItemType @ 37 NONAME
+ _ZN14RMemSpySession13SetSwmtFilterERK7TDesC16 @ 38 NONAME
+ _ZN14RMemSpySession14DumpKernelHeapEv @ 39 NONAME
+ _ZN14RMemSpySession14IsSwmtRunningLEv @ 40 NONAME
+ _ZN14RMemSpySession14OutputHeapDataER14TRequestStatus @ 41 NONAME
+ _ZN14RMemSpySession14OutputHeapDataEv @ 42 NONAME
+ _ZN14RMemSpySession14OutputHeapInfoER14TRequestStatus @ 43 NONAME
+ _ZN14RMemSpySession14StartSwmtTimerER14TRequestStatus @ 44 NONAME
+ _ZN14RMemSpySession14StopSwmtTimerLEv @ 45 NONAME
+ _ZN14RMemSpySession14SwitchToThreadE9TThreadIdi @ 46 NONAME
+ _ZN14RMemSpySession15ForceSwmtUpdateER14TRequestStatus @ 47 NONAME
+ _ZN14RMemSpySession15GetInfoItemTypeEi9TThreadIdR25TMemSpyThreadInfoItemType @ 48 NONAME
+ _ZN14RMemSpySession15OutputPhoneInfoER14TRequestStatus @ 49 NONAME
+ _ZN14RMemSpySession15OutputPhoneInfoEv @ 50 NONAME
+ _ZN14RMemSpySession15OutputStackInfoER14TRequestStatus @ 51 NONAME
+ _ZN14RMemSpySession15StartSwmtTimerLEi @ 52 NONAME
+ _ZN14RMemSpySession15StartSwmtTimerLEv @ 53 NONAME
+ _ZN14RMemSpySession15SwitchToProcessE10TProcessIdi @ 54 NONAME
+ _ZN14RMemSpySession16ChunkListOutputLEv @ 55 NONAME
+ _ZN14RMemSpySession16ForceSwmtUpdateLEv @ 56 NONAME
+ _ZN14RMemSpySession16GetCodeSegmentsLER6RArrayIP21CMemSpyApiCodeSegmentE9TSortType @ 57 NONAME
+ _ZN14RMemSpySession16GetKernelObjectsER6RArrayIP22CMemSpyApiKernelObjectE @ 58 NONAME
+ _ZN14RMemSpySession16GetWindowGroupsLER6RArrayIP21CMemSpyApiWindowGroupE @ 59 NONAME
+ _ZN14RMemSpySession16OutputStackDataLE9TThreadId23TMemSpyDriverDomainType @ 60 NONAME
+ _ZN14RMemSpySession16OutputStackInfoLE9TThreadId @ 61 NONAME
+ _ZN14RMemSpySession17GetKernelObjectsLER6RArrayIP22CMemSpyApiKernelObjectE @ 62 NONAME
+ _ZN14RMemSpySession17SwitchOutputSinkLE15TMemSpySinkType @ 63 NONAME
+ _ZN14RMemSpySession17SwmtResetTrackingEv @ 64 NONAME
+ _ZN14RMemSpySession18GetEComCategoriesLER6RArrayIP22CMemSpyApiEComCategoryE @ 65 NONAME
+ _ZN14RMemSpySession18GetEComInterfacesLE4TUidR6RArrayIP23CMemSpyApiEComInterfaceE @ 66 NONAME
+ _ZN14RMemSpySession18GetSwmtCategoriesLERi @ 67 NONAME
+ _ZN14RMemSpySession18GetSwmtCyclesCountEv @ 68 NONAME
+ _ZN14RMemSpySession18GetThreadInfoItemsER6RArrayIP24CMemSpyApiThreadInfoItemE9TThreadId25TMemSpyThreadInfoItemType @ 69 NONAME
+ _ZN14RMemSpySession18SetSwmtCategoriesLEi @ 70 NONAME
+ _ZN14RMemSpySession18SetThreadPriorityLE9TThreadIdi @ 71 NONAME
+ _ZN14RMemSpySession19GetProcessIdByNameLERK7TDesC16 @ 72 NONAME
+ _ZN14RMemSpySession19GetThreadInfoItemsLER6RArrayIP24CMemSpyApiThreadInfoItemE9TThreadId25TMemSpyThreadInfoItemType @ 73 NONAME
+ _ZN14RMemSpySession19OutputHeapInfoUserLE9TThreadId @ 74 NONAME
+ _ZN14RMemSpySession19OutputUserStackDataER14TRequestStatus @ 75 NONAME
+ _ZN14RMemSpySession19SwitchOutputToFileLERK7TDesC16 @ 76 NONAME
+ _ZN14RMemSpySession20GetKernelObjectItemsER6RArrayIP26CMemSpyApiKernelObjectItemE26TMemSpyDriverContainerType @ 77 NONAME
+ _ZN14RMemSpySession20OutputKernelHeapDataER14TRequestStatus @ 78 NONAME
+ _ZN14RMemSpySession20OutputKernelObjectsLEv @ 79 NONAME
+ _ZN14RMemSpySession20SwitchOutputToTraceLEv @ 80 NONAME
+ _ZN14RMemSpySession20SwitchToWindowGroupLEi @ 81 NONAME
+ _ZN14RMemSpySession21GetKernelObjectItemsLER6RArrayIP26CMemSpyApiKernelObjectItemE26TMemSpyDriverContainerType @ 82 NONAME
+ _ZN14RMemSpySession21GetSwmtTimerIntervalLERi @ 83 NONAME
+ _ZN14RMemSpySession21OutputCompactHeapInfoER14TRequestStatus @ 84 NONAME
+ _ZN14RMemSpySession21OutputHeapCellListingER14TRequestStatus @ 85 NONAME
+ _ZN14RMemSpySession21OutputKernelHeapDataLEv @ 86 NONAME
+ _ZN14RMemSpySession21OutputKernelStackDataER14TRequestStatus @ 87 NONAME
+ _ZN14RMemSpySession21OutputThreadCellListLE9TThreadId @ 88 NONAME
+ _ZN14RMemSpySession21OutputThreadHeapDataLE9TThreadId @ 89 NONAME
+ _ZN14RMemSpySession21OutputThreadHeapDataLERK7TDesC16 @ 90 NONAME
+ _ZN14RMemSpySession21SetSwmtTimerIntervalLEi @ 91 NONAME
+ _ZN14RMemSpySession22GetProcessIdByThreadIdER10TProcessId9TThreadId @ 92 NONAME
+ _ZN14RMemSpySession22OutputCompactHeapInfoLEv @ 93 NONAME
+ _ZN14RMemSpySession22OutputCompactStackInfoER14TRequestStatus @ 94 NONAME
+ _ZN14RMemSpySession22SetAknIconCacheStatusLEiRx @ 95 NONAME
+ _ZN14RMemSpySession23GetEComImplementationsLE4TUidR6RArrayIP28CMemSpyApiEComImplementationE @ 96 NONAME
+ _ZN14RMemSpySession23OutputCompactStackInfoLEv @ 97 NONAME
+ _ZN14RMemSpySession23OutputDetailedPhoneInfoER14TRequestStatus @ 98 NONAME
+ _ZN14RMemSpySession24CancelEventNotificationLEv @ 99 NONAME
+ _ZN14RMemSpySession24GetMemoryTrackingCyclesLER6RArrayIP29CMemSpyApiMemoryTrackingCycleE @ 100 NONAME
+ _ZN14RMemSpySession24GetSwmtHeapDumpsEnabledLERi @ 101 NONAME
+ _ZN14RMemSpySession24OutputThreadInfoHandlesLE9TThreadId @ 102 NONAME
+ _ZN14RMemSpySession24ServerListOutputGenericLEi @ 103 NONAME
+ _ZN14RMemSpySession24SetSwmtHeapDumpsEnabledLEi @ 104 NONAME
+ _ZN14RMemSpySession26CancelDeviceWideOperationLEv @ 105 NONAME
+ _ZN14RMemSpySession26IsAknIconCacheConfigurableERi @ 106 NONAME
+ _ZN14RMemSpySession26OutputAllContainerContentsEv @ 107 NONAME
+ _ZN14RMemSpySession27SetSwmtAutoStartProcessListEP13CArrayFixFlatI4TUidE @ 108 NONAME
+ _ZN14RMemSpySession31ThreadSystemPermanentOrCriticalE9TThreadIdi @ 109 NONAME
+ _ZN14RMemSpySession32ProcessSystemPermanentOrCriticalE10TProcessIdRi @ 110 NONAME
+ _ZN14RMemSpySession33NotifyDeviceWideOperationProgressER34TMemSpyDeviceWideOperationProgressR14TRequestStatus @ 111 NONAME
+ _ZN14RMemSpySession7ConnectEv @ 112 NONAME
+ _ZN14RMemSpySession7GetHeapEv @ 113 NONAME
+ _ZN14RMemSpySession8GetHeapLEv @ 114 NONAME
+ _ZN14RMemSpySessionC1Ev @ 115 NONAME
+ _ZN14RMemSpySessionC2Ev @ 116 NONAME
+ _ZN15CMemSpyApiChunkD1Ev @ 117 NONAME
+ _ZN15CMemSpyApiChunkD2Ev @ 118 NONAME
+ _ZN16CMemSpyApiServerD1Ev @ 119 NONAME
+ _ZN16CMemSpyApiServerD2Ev @ 120 NONAME
+ _ZN16CMemSpyApiThreadD1Ev @ 121 NONAME
+ _ZN16CMemSpyApiThreadD2Ev @ 122 NONAME
+ _ZN17CMemSpyApiProcessD1Ev @ 123 NONAME
+ _ZN17CMemSpyApiProcessD2Ev @ 124 NONAME
+ _ZN21CMemSpyApiCodeSegmentD1Ev @ 125 NONAME
+ _ZN21CMemSpyApiCodeSegmentD2Ev @ 126 NONAME
+ _ZN21CMemSpyApiWindowGroupD0Ev @ 127 NONAME
+ _ZN21CMemSpyApiWindowGroupD1Ev @ 128 NONAME
+ _ZN21CMemSpyApiWindowGroupD2Ev @ 129 NONAME
+ _ZN22CMemSpyApiEComCategoryD0Ev @ 130 NONAME
+ _ZN22CMemSpyApiEComCategoryD1Ev @ 131 NONAME
+ _ZN22CMemSpyApiEComCategoryD2Ev @ 132 NONAME
+ _ZN22CMemSpyApiKernelObjectD1Ev @ 133 NONAME
+ _ZN22CMemSpyApiKernelObjectD2Ev @ 134 NONAME
+ _ZN23CMemSpyApiEComInterfaceD0Ev @ 135 NONAME
+ _ZN23CMemSpyApiEComInterfaceD1Ev @ 136 NONAME
+ _ZN23CMemSpyApiEComInterfaceD2Ev @ 137 NONAME
+ _ZN24CMemSpyApiThreadInfoItemD1Ev @ 138 NONAME
+ _ZN24CMemSpyApiThreadInfoItemD2Ev @ 139 NONAME
+ _ZN26CMemSpyApiKernelObjectItem12OpenChannelsEv @ 140 NONAME
+ _ZN26CMemSpyApiKernelObjectItem15AddressOfServerEv @ 141 NONAME
+ _ZN26CMemSpyApiKernelObjectItem16AddressOfCodeSegEv @ 142 NONAME
+ _ZN26CMemSpyApiKernelObjectItem20AddressOfKernelOwnerEv @ 143 NONAME
+ _ZN26CMemSpyApiKernelObjectItem21AddressOfOwningThreadEv @ 144 NONAME
+ _ZN26CMemSpyApiKernelObjectItem22AddressOfOwningProcessEv @ 145 NONAME
+ _ZN26CMemSpyApiKernelObjectItem26AddressOfDataBssStackChunkEv @ 146 NONAME
+ _ZN26CMemSpyApiKernelObjectItemD1Ev @ 147 NONAME
+ _ZN26CMemSpyApiKernelObjectItemD2Ev @ 148 NONAME
+ _ZN28CMemSpyApiEComImplementationD0Ev @ 149 NONAME
+ _ZN28CMemSpyApiEComImplementationD1Ev @ 150 NONAME
+ _ZN28CMemSpyApiEComImplementationD2Ev @ 151 NONAME
+ _ZN29CMemSpyApiMemoryTrackingCycleD1Ev @ 152 NONAME
+ _ZN29CMemSpyApiMemoryTrackingCycleD2Ev @ 153 NONAME
+ _ZNK15CMemSpyApiChunk10AttributesEv @ 154 NONAME
+ _ZNK15CMemSpyApiChunk11BaseAddressEv @ 155 NONAME
+ _ZNK15CMemSpyApiChunk4NameEv @ 156 NONAME
+ _ZNK15CMemSpyApiChunk4SizeEv @ 157 NONAME
+ _ZNK15CMemSpyApiChunk6HandleEv @ 158 NONAME
+ _ZNK15CMemSpyApiChunk7MaxSizeEv @ 159 NONAME
+ _ZNK15CMemSpyApiChunk7OwnerIdEv @ 160 NONAME
+ _ZNK15CMemSpyApiChunk9ChunkTypeEv @ 161 NONAME
+ _ZNK15CMemSpyApiChunk9OwnerNameEv @ 162 NONAME
+ _ZNK16CMemSpyApiServer12SessionCountEv @ 163 NONAME
+ _ZNK16CMemSpyApiServer4NameEv @ 164 NONAME
+ _ZNK16CMemSpyApiServer8ThreadIdEv @ 165 NONAME
+ _ZNK16CMemSpyApiServer9ProcessIdEv @ 166 NONAME
+ _ZNK16CMemSpyApiThread10AttributesEv @ 167 NONAME
+ _ZNK16CMemSpyApiThread12RequestCountEv @ 168 NONAME
+ _ZNK16CMemSpyApiThread13ThreadHandlesEv @ 169 NONAME
+ _ZNK16CMemSpyApiThread14ProcessHandlesEv @ 170 NONAME
+ _ZNK16CMemSpyApiThread14ThreadPriorityEv @ 171 NONAME
+ _ZNK16CMemSpyApiThread15ProcessPriorityEv @ 172 NONAME
+ _ZNK16CMemSpyApiThread17ThreadNumberUsingEv @ 173 NONAME
+ _ZNK16CMemSpyApiThread18ProcessNumberUsingEv @ 174 NONAME
+ _ZNK16CMemSpyApiThread2IdEv @ 175 NONAME
+ _ZNK16CMemSpyApiThread3SIDEv @ 176 NONAME
+ _ZNK16CMemSpyApiThread3VIDEv @ 177 NONAME
+ _ZNK16CMemSpyApiThread4NameEv @ 178 NONAME
+ _ZNK16CMemSpyApiThread6CpuUseEv @ 179 NONAME
+ _ZNK16CMemSpyApiThread8ExitTypeEv @ 180 NONAME
+ _ZNK16CMemSpyApiThread9ProcessIdEv @ 181 NONAME
+ _ZNK17CMemSpyApiProcess10ExitReasonEv @ 182 NONAME
+ _ZNK17CMemSpyApiProcess11ThreadCountEv @ 183 NONAME
+ _ZNK17CMemSpyApiProcess12ExitCategoryEv @ 184 NONAME
+ _ZNK17CMemSpyApiProcess2IdEv @ 185 NONAME
+ _ZNK17CMemSpyApiProcess3SIDEv @ 186 NONAME
+ _ZNK17CMemSpyApiProcess3VIDEv @ 187 NONAME
+ _ZNK17CMemSpyApiProcess4NameEv @ 188 NONAME
+ _ZNK17CMemSpyApiProcess6IsDeadEv @ 189 NONAME
+ _ZNK17CMemSpyApiProcess8ExitTypeEv @ 190 NONAME
+ _ZNK17CMemSpyApiProcess8PriorityEv @ 191 NONAME
+ _ZNK21CMemSpyApiCodeSegment13Capabilities1Ev @ 192 NONAME
+ _ZNK21CMemSpyApiCodeSegment13Capabilities2Ev @ 193 NONAME
+ _ZNK21CMemSpyApiCodeSegment13EntryPtVeneerEv @ 194 NONAME
+ _ZNK21CMemSpyApiCodeSegment13ModuleVersionEv @ 195 NONAME
+ _ZNK21CMemSpyApiCodeSegment13TotalDataSizeEv @ 196 NONAME
+ _ZNK21CMemSpyApiCodeSegment14FileEntryPointEv @ 197 NONAME
+ _ZNK21CMemSpyApiCodeSegment15CodeLoadAddressEv @ 198 NONAME
+ _ZNK21CMemSpyApiCodeSegment15DataLoadAddressEv @ 199 NONAME
+ _ZNK21CMemSpyApiCodeSegment3SIDEv @ 200 NONAME
+ _ZNK21CMemSpyApiCodeSegment3VIDEv @ 201 NONAME
+ _ZNK21CMemSpyApiCodeSegment4NameEv @ 202 NONAME
+ _ZNK21CMemSpyApiCodeSegment4UidsEv @ 203 NONAME
+ _ZNK21CMemSpyApiCodeSegment7BssSizeEv @ 204 NONAME
+ _ZNK21CMemSpyApiCodeSegment8CodeSizeEv @ 205 NONAME
+ _ZNK21CMemSpyApiCodeSegment8DataSizeEv @ 206 NONAME
+ _ZNK21CMemSpyApiCodeSegment8DepCountEv @ 207 NONAME
+ _ZNK21CMemSpyApiCodeSegment8TextSizeEv @ 208 NONAME
+ _ZNK21CMemSpyApiWindowGroup15OrdinalPositionEv @ 209 NONAME
+ _ZNK21CMemSpyApiWindowGroup17WindowGroupHandleEv @ 210 NONAME
+ _ZNK21CMemSpyApiWindowGroup2IdEv @ 211 NONAME
+ _ZNK21CMemSpyApiWindowGroup3UidEv @ 212 NONAME
+ _ZNK21CMemSpyApiWindowGroup4NameEv @ 213 NONAME
+ _ZNK21CMemSpyApiWindowGroup6IsBusyEv @ 214 NONAME
+ _ZNK21CMemSpyApiWindowGroup7CaptionEv @ 215 NONAME
+ _ZNK21CMemSpyApiWindowGroup7DocNameEv @ 216 NONAME
+ _ZNK21CMemSpyApiWindowGroup8FullNameEv @ 217 NONAME
+ _ZNK21CMemSpyApiWindowGroup8IsHiddenEv @ 218 NONAME
+ _ZNK21CMemSpyApiWindowGroup8IsSystemEv @ 219 NONAME
+ _ZNK21CMemSpyApiWindowGroup8PriorityEv @ 220 NONAME
+ _ZNK21CMemSpyApiWindowGroup8ThreadIdEv @ 221 NONAME
+ _ZNK21CMemSpyApiWindowGroup9IsFocusedEv @ 222 NONAME
+ _ZNK22CMemSpyApiEComCategory14InterfaceCountEv @ 223 NONAME
+ _ZNK22CMemSpyApiEComCategory2IdEv @ 224 NONAME
+ _ZNK22CMemSpyApiEComCategory4NameEv @ 225 NONAME
+ _ZNK22CMemSpyApiKernelObject4NameEv @ 226 NONAME
+ _ZNK22CMemSpyApiKernelObject4SizeEv @ 227 NONAME
+ _ZNK22CMemSpyApiKernelObject4TypeEv @ 228 NONAME
+ _ZNK22CMemSpyApiKernelObject5CountEv @ 229 NONAME
+ _ZNK23CMemSpyApiEComInterface19ImplementationCountEv @ 230 NONAME
+ _ZNK23CMemSpyApiEComInterface2IdEv @ 231 NONAME
+ _ZNK23CMemSpyApiEComInterface4NameEv @ 232 NONAME
+ _ZNK24CMemSpyApiThreadInfoItem5ValueEv @ 233 NONAME
+ _ZNK24CMemSpyApiThreadInfoItem7CaptionEv @ 234 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem10AttributesEv @ 235 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem10NameDetailEv @ 236 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem10ProtectionEv @ 237 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem10TimerStateEv @ 238 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem11AccessCountEv @ 239 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem11NameOfOwnerEv @ 240 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem11SessionTypeEv @ 241 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem12RestrictionsEv @ 242 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem12SecurityZoneEv @ 243 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem14SvrSessionTypeEv @ 244 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem16ControllingOwnerEv @ 245 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem16TotalAccessCountEv @ 246 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem2IdEv @ 247 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem3TopEv @ 248 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem4NameEv @ 249 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem4SizeEv @ 250 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem4TypeEv @ 251 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem5CountEv @ 252 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem5OrderEv @ 253 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem5StateEv @ 254 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem6BottomEv @ 255 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem6HandleEv @ 256 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem7ChangesEv @ 257 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem7MapAttrEv @ 258 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem7MaxSizeEv @ 259 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem7VersionEv @ 260 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8MapCountEv @ 261 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8MsgCountEv @ 262 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8MsgLimitEv @ 263 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8PriorityEv @ 264 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8StartPosEv @ 265 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem8UniqueIDEv @ 266 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9ChunkTypeEv @ 267 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9CreatorIdEv @ 268 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9ParseMaskEv @ 269 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9ResettingEv @ 270 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9TimerTypeEv @ 271 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9UnitsMaskEv @ 272 NONAME
+ _ZNK26CMemSpyApiKernelObjectItem9WaitCountEv @ 273 NONAME
+ _ZNK28CMemSpyApiEComImplementation10OpaqueDataEv @ 274 NONAME
+ _ZNK28CMemSpyApiEComImplementation17ImplementationUidEv @ 275 NONAME
+ _ZNK28CMemSpyApiEComImplementation4NameEv @ 276 NONAME
+ _ZNK28CMemSpyApiEComImplementation5DriveEv @ 277 NONAME
+ _ZNK28CMemSpyApiEComImplementation7RomOnlyEv @ 278 NONAME
+ _ZNK28CMemSpyApiEComImplementation7VersionEv @ 279 NONAME
+ _ZNK28CMemSpyApiEComImplementation8DataTypeEv @ 280 NONAME
+ _ZNK28CMemSpyApiEComImplementation8DisabledEv @ 281 NONAME
+ _ZNK28CMemSpyApiEComImplementation8RomBasedEv @ 282 NONAME
+ _ZNK28CMemSpyApiEComImplementation8VendorIdEv @ 283 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle10FreeMemoryEv @ 284 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle11ChangeCountEv @ 285 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle11CycleNumberEv @ 286 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle11MemoryDeltaEv @ 287 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle17PreviousCycleDiffEv @ 288 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle4TimeEv @ 289 NONAME
+ _ZNK29CMemSpyApiMemoryTrackingCycle7CaptionEv @ 290 NONAME
+ _ZNK34TMemSpyDeviceWideOperationProgress11DescriptionEv @ 291 NONAME
+ _ZNK34TMemSpyDeviceWideOperationProgress8ProgressEv @ 292 NONAME
+ _ZN14RMemSpySession23CodeSegmentsListOutputLEv @ 293 NONAME
--- a/perfsrv/memspy/MemSpyClient/group/MemSpyClient.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/group/MemSpyClient.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -37,7 +37,8 @@
SOURCE memspyapimemorytrackingcycle.cpp
SOURCE memspyapiserver.cpp
SOURCE memspyapiecom.cpp
-SOURCE memspyapiwindowgroup.cpp
+SOURCE memspyapiwindowgroup.cpp
+SOURCE memspyapichunk.cpp memspyapicodesegment.cpp
USERINCLUDE ../inc
--- a/perfsrv/memspy/MemSpyClient/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -28,6 +28,8 @@
../inc/memspymemorytrackingcycledata.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/engine/memspymemorytrackingcycledata.h)
../inc/memspyserverdata.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/engine/memspyserverdata.h)
../inc/memspyecomdata.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/engine/memspyecomdata.h)
+../inc/memspychunkdata.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/engine/memspychunkdata.h)
+../inc/memspycodesegmentdata.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/engine/memspycodesegmentdata.h)
../inc/memspyapiprocess.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapiprocess.h)
../inc/memspyapikernelobject.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapikernelobject.h)
@@ -37,6 +39,8 @@
../inc/memspyapithreadinfoitem.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapithreadinfoitem.h)
../inc/memspyapimemorytrackingcycle.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapimemorytrackingcycle.h)
../inc/memspyapiserver.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapiserver.h)
+../inc/memspyapichunk.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapichunk.h)
+../inc/memspyapicodesegment.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapicodesegment.h)
../inc/memspyapiecom.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapiecom.h)
../inc/memspyapiwindowgroup.h OS_LAYER_PLATFORM_EXPORT_PATH(memspy/api/memspyapiwindowgroup.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/inc/memspyapichunk.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Contains the declaration of CMemSpyChunk class
+*/
+
+#ifndef MEMSPYAPICHUNK_H
+#define MEMSPYAPICHUNK_H
+
+// System includes
+#include <e32base.h>
+
+#include <memspy/driver/memspydriverenumerationsshared.h>
+
+class TMemSpyChunkData;
+
+NONSHARABLE_CLASS( CMemSpyApiChunk )
+ {
+public:
+ IMPORT_C ~CMemSpyApiChunk();
+
+ static CMemSpyApiChunk* NewL(const TMemSpyChunkData& aData);
+
+ static CMemSpyApiChunk* NewLC(const TMemSpyChunkData& aData);
+
+public:
+ IMPORT_C const TDesC& Name() const;
+
+ IMPORT_C const TDesC& OwnerName() const;
+
+ IMPORT_C TUint8* Handle() const;
+
+ IMPORT_C TUint8* BaseAddress() const;
+
+ IMPORT_C TUint Size() const;
+
+ IMPORT_C TUint MaxSize() const;
+
+ IMPORT_C TUint OwnerId() const;
+
+ IMPORT_C TMemSpyDriverChunkType ChunkType() const;
+
+ IMPORT_C TInt Attributes() const;
+
+private:
+ CMemSpyApiChunk();
+
+ void ConstructL(const TMemSpyChunkData& aData);
+
+private:
+ TMemSpyChunkData *iChunkData;
+};
+
+
+#endif // MEMSPYAPICHUNK_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/inc/memspyapicodesegment.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Contains the declaration of CMemSpyCodeSegment class
+*/
+
+#ifndef MEMSPYAPICODESEGMENT_H
+#define MEMSPYAPICODESEGMENT_H
+
+// System includes
+#include <e32base.h>
+
+#include <memspy/driver/memspydriverenumerationsshared.h>
+
+class TMemSpyCodeSegmentData;
+
+NONSHARABLE_CLASS( CMemSpyApiCodeSegment )
+ {
+public:
+ IMPORT_C ~CMemSpyApiCodeSegment();
+
+ static CMemSpyApiCodeSegment* NewL(const TMemSpyCodeSegmentData& aData);
+
+ static CMemSpyApiCodeSegment* NewLC(const TMemSpyCodeSegmentData& aData);
+
+public:
+ IMPORT_C const TDesC& Name() const;
+
+ IMPORT_C TInt CodeSize() const;
+
+ IMPORT_C TInt TotalDataSize() const;
+
+ IMPORT_C TInt TextSize() const;
+
+ IMPORT_C TInt DataSize() const;
+
+ IMPORT_C TInt BssSize() const;
+
+ IMPORT_C TUidType Uids() const;
+
+ IMPORT_C TUint32 ModuleVersion() const;
+
+ IMPORT_C TUint32 SID() const;
+
+ IMPORT_C TUint32 VID() const;
+
+ IMPORT_C TUint32 EntryPtVeneer() const; // address of first instruction to be called
+
+ IMPORT_C TUint32 FileEntryPoint() const; // address of entry point within this code segment
+
+ IMPORT_C TInt DepCount() const;
+
+ IMPORT_C TUint32 CodeLoadAddress() const; // 0 for RAM loaded code, else pointer to TRomImageHeader
+
+ IMPORT_C TUint32 DataLoadAddress() const;
+
+ IMPORT_C TUint32 Capabilities1() const;
+
+ IMPORT_C TUint32 Capabilities2() const;
+
+private:
+ CMemSpyApiCodeSegment();
+
+ void ConstructL(const TMemSpyCodeSegmentData& aData);
+
+private:
+ TMemSpyCodeSegmentData* iCodeSegmentData;
+};
+
+
+#endif // MEMSPYAPICODESEGMENT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/inc/memspychunkdata.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Contains the declaration of TMemSpyChunkData class
+*/
+
+#ifndef MEMSPYCHUNKDATA_H
+#define MEMSPYCHUNKDATA_H
+
+#include <memspy/driver/memspydriverenumerationsshared.h>
+
+// TMemSpyChunkData class holds data to be sent to the UI
+class TMemSpyChunkData
+ {
+public:
+ //constructor & destructor
+ inline TMemSpyChunkData()
+ : iHandle(0), iBaseAddress(0), iSize(0), iMaxSize(0), iOwnerId(0), iAttributes(0)
+ {
+ }
+
+public:
+ TFullName iName;
+ TFullName iOwnerName;
+ TUint8* iHandle;
+ TUint8* iBaseAddress;
+ TUint iSize;
+ TUint iMaxSize;
+ TUint iOwnerId;
+ TMemSpyDriverChunkType iType;
+ TInt iAttributes;
+ };
+
+
+#endif // MEMSPYCHUNKDATA_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/inc/memspycodesegmentdata.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Contains the declaration of TMemSpyChunkData class
+*/
+
+#ifndef MEMSPYCODESEGMENTDATA_H
+#define MEMSPYCODESEGMENTDATA_H
+
+#include <memspy/driver/memspydriverenumerationsshared.h>
+
+// TMemSpyCodeSegmentData class holds data to be sent to the UI
+class TMemSpyCodeSegmentData
+ {
+public:
+ //constructor & destructor
+ inline TMemSpyCodeSegmentData()
+ : iCodeSize(0), iTotalDataSize(0), iTextSize(0), iDataSize(0), iBssSize(0), iSecureId(0), iVendorId(0), iEntryPtVeneer(0),
+ iFileEntryPoint(0), iDepCount(0), iCodeLoadAddress(0), iDataLoadAddress(0), iCapabilities1(0), iCapabilities2(0)
+ {
+ }
+
+public:
+ TFullName iName;
+ TInt iCodeSize;
+ TInt iTotalDataSize;
+ TInt iTextSize;
+ TInt iDataSize;
+ TInt iBssSize;
+ TUidType iUids;
+ TUint32 iModuleVersion;
+ TUint32 iSecureId;
+ TUint32 iVendorId;
+ TUint32 iEntryPtVeneer; // address of first instruction to be called
+ TUint32 iFileEntryPoint; // address of entry point within this code segment
+ TInt iDepCount;
+ TUint32 iCodeLoadAddress; // 0 for RAM loaded code, else pointer to TRomImageHeader
+ TUint32 iDataLoadAddress;
+ TUint32 iCapabilities1;
+ TUint32 iCapabilities2;
+ };
+
+
+#endif // MEMSPYCODESEGMENTDATA_H
--- a/perfsrv/memspy/MemSpyClient/inc/memspysession.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/inc/memspysession.h Tue Oct 26 16:20:32 2010 +0300
@@ -52,6 +52,10 @@
#include <memspy/api/memspyapiwindowgroup.h>
+#include <memspy/api/memspyapichunk.h>
+
+#include <memspy/api/memspyapicodesegment.h>
+
// Constants
const TInt KMemSpyVersion = 2;
@@ -64,7 +68,13 @@
ESortProcByHeapUsage,
ESortProcByStackUsage,
ESortServByName,
- ESortServBySessionCount
+ ESortServBySessionCount,
+ ESortChunkByName,
+ ESortChunkBySize,
+ ESortCodeSegByName,
+ ESortCodeSegBySize,
+ ESortCodeSegByTotalDataSize,
+ ESortCodeSegByUid
};
enum TMemSpyOutputType
@@ -167,7 +177,7 @@
IMPORT_C void GetThreadsL(TProcessId aProcessId, RArray<CMemSpyApiThread*> &aThreads, TSortType aSortType = ESortProcById);
- IMPORT_C TInt ProcessSystemPermanentOrCritical( TProcessId aId, TBool aValue ); //aValue -> return value
+ IMPORT_C TInt ProcessSystemPermanentOrCritical( TProcessId aId, TBool& aValue ); //aValue -> return value
IMPORT_C void SetThreadPriorityL(TThreadId aId, TInt aPriority);
@@ -177,6 +187,10 @@
IMPORT_C void GetProcessIdByThreadId( TProcessId& aPID, TThreadId aTID );
+ IMPORT_C void NotifyEvent(TRequestStatus &aStatus);
+
+ IMPORT_C void CancelEventNotificationL();
+
//SWMT operations
IMPORT_C void GetMemoryTrackingCyclesL(RArray<CMemSpyApiMemoryTrackingCycle*>& aCycles);
@@ -261,6 +275,11 @@
IMPORT_C void DumpKernelHeap();
+ //Chunks
+ IMPORT_C void GetChunksL(RArray<CMemSpyApiChunk*> &aChunks, TSortType aSortType);
+
+ IMPORT_C void ChunkListOutputL();
+
// Servers
IMPORT_C void GetServersL(RArray<CMemSpyApiServer*> &aServers);
@@ -279,6 +298,18 @@
// Window Groups
IMPORT_C void GetWindowGroupsL(RArray<CMemSpyApiWindowGroup*> &aGroups);
+ IMPORT_C void SwitchToWindowGroupL( TInt aId );
+
+ // RAM info
+ IMPORT_C void IsAknIconCacheConfigurable( TBool& aValue );
+
+ IMPORT_C void SetAknIconCacheStatusL( TBool aEnabled, TInt64& aValue );
+
+ //CodeSegments
+ IMPORT_C void GetCodeSegmentsL( RArray<CMemSpyApiCodeSegment*> &aCodeSegments, TSortType aSortType) ;
+
+ IMPORT_C void CodeSegmentsListOutputL();
+
private:
TInt StartServer();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/src/memspyapichunk.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <memspy/api/memspyapichunk.h>
+#include <memspy/engine/memspychunkdata.h>
+
+
+EXPORT_C CMemSpyApiChunk::~CMemSpyApiChunk()
+ {
+ delete iChunkData;
+ }
+
+EXPORT_C const TDesC& CMemSpyApiChunk::Name() const
+ {
+ return iChunkData->iName;
+ }
+
+EXPORT_C const TDesC& CMemSpyApiChunk::OwnerName() const
+ {
+ return iChunkData->iOwnerName;
+ }
+
+EXPORT_C TUint8* CMemSpyApiChunk::Handle() const
+ {
+ return iChunkData->iHandle;
+ }
+
+EXPORT_C TUint8* CMemSpyApiChunk::BaseAddress() const
+ {
+ return iChunkData->iBaseAddress;
+ }
+
+EXPORT_C TUint CMemSpyApiChunk::Size() const
+ {
+ return iChunkData->iSize;
+ }
+
+EXPORT_C TUint CMemSpyApiChunk::MaxSize() const
+ {
+ return iChunkData->iMaxSize;
+ }
+
+EXPORT_C TUint CMemSpyApiChunk::OwnerId() const
+ {
+ return iChunkData->iOwnerId;
+ }
+
+EXPORT_C TMemSpyDriverChunkType CMemSpyApiChunk::ChunkType() const
+ {
+ return iChunkData->iType;
+ }
+
+EXPORT_C TInt CMemSpyApiChunk::Attributes() const
+ {
+ return iChunkData->iAttributes;
+ }
+
+CMemSpyApiChunk::CMemSpyApiChunk() : iChunkData(0)
+ {
+ }
+
+void CMemSpyApiChunk::ConstructL(const TMemSpyChunkData& aData)
+ {
+ iChunkData = new (ELeave) TMemSpyChunkData(aData);
+ }
+
+CMemSpyApiChunk* CMemSpyApiChunk::NewL(const TMemSpyChunkData& aData)
+ {
+ CMemSpyApiChunk* self = CMemSpyApiChunk::NewLC(aData);
+ CleanupStack::Pop(self);
+ return (self);
+ }
+
+CMemSpyApiChunk* CMemSpyApiChunk::NewLC(const TMemSpyChunkData& aData)
+ {
+ CMemSpyApiChunk* self = new (ELeave) CMemSpyApiChunk;
+ CleanupStack::PushL(self);
+ self->ConstructL(aData);
+ return (self);
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/memspy/MemSpyClient/src/memspyapicodesegment.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <memspy/api/memspyapicodesegment.h>
+#include <memspy/engine/memspycodesegmentdata.h>
+
+
+EXPORT_C CMemSpyApiCodeSegment::~CMemSpyApiCodeSegment()
+ {
+ delete iCodeSegmentData;
+ }
+
+EXPORT_C const TDesC& CMemSpyApiCodeSegment::Name() const
+ {
+ return iCodeSegmentData->iName;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::CodeSize() const
+ {
+ return iCodeSegmentData->iCodeSize;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::TotalDataSize() const
+ {
+ return iCodeSegmentData->iTotalDataSize;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::TextSize() const
+ {
+ return iCodeSegmentData->iTextSize;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::DataSize() const
+ {
+ return iCodeSegmentData->iDataSize;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::BssSize() const
+ {
+ return iCodeSegmentData->iBssSize;
+ }
+
+EXPORT_C TUidType CMemSpyApiCodeSegment::Uids() const
+ {
+ return iCodeSegmentData->iUids;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::ModuleVersion() const
+ {
+ return iCodeSegmentData->iModuleVersion;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::SID() const
+ {
+ return iCodeSegmentData->iSecureId;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::VID() const
+ {
+ return iCodeSegmentData->iVendorId;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::EntryPtVeneer() const // address of first instruction to be called
+ {
+ return iCodeSegmentData->iEntryPtVeneer;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::FileEntryPoint() const // address of entry point within this code segment
+ {
+ return iCodeSegmentData->iFileEntryPoint;
+ }
+
+EXPORT_C TInt CMemSpyApiCodeSegment::DepCount() const
+ {
+ return iCodeSegmentData->iDepCount;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::CodeLoadAddress() const // 0 for RAM loaded code, else pointer to TRomImageHeader
+ {
+ return iCodeSegmentData->iCodeLoadAddress;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::DataLoadAddress() const
+ {
+ return iCodeSegmentData->iDataLoadAddress;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::Capabilities1() const
+ {
+ return iCodeSegmentData->iCapabilities1;
+ }
+
+EXPORT_C TUint32 CMemSpyApiCodeSegment::Capabilities2() const
+ {
+ return iCodeSegmentData->iCapabilities2;
+ }
+
+CMemSpyApiCodeSegment::CMemSpyApiCodeSegment() : iCodeSegmentData(0)
+ {
+ }
+
+void CMemSpyApiCodeSegment::ConstructL(const TMemSpyCodeSegmentData& aData)
+ {
+ iCodeSegmentData = new (ELeave) TMemSpyCodeSegmentData(aData);
+ }
+
+CMemSpyApiCodeSegment* CMemSpyApiCodeSegment::NewL(const TMemSpyCodeSegmentData& aData)
+ {
+ CMemSpyApiCodeSegment* self = CMemSpyApiCodeSegment::NewLC(aData);
+ CleanupStack::Pop(self);
+ return (self);
+ }
+
+CMemSpyApiCodeSegment* CMemSpyApiCodeSegment::NewLC(const TMemSpyCodeSegmentData& aData)
+ {
+ CMemSpyApiCodeSegment* self = new (ELeave) CMemSpyApiCodeSegment;
+ CleanupStack::PushL(self);
+ self->ConstructL(aData);
+ return (self);
+ }
--- a/perfsrv/memspy/MemSpyClient/src/memspysession.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/MemSpyClient/src/memspysession.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -33,6 +33,10 @@
#include <memspy/engine/memspyecomdata.h>
// Window groups
#include <memspy/engine/memspyenginehelperwindowserver.h>
+// Chunks
+#include <memspy/engine/memspychunkdata.h>
+// Code Segments
+#include <memspy/engine/memspycodesegmentdata.h>
// IMPLEMENTATION
@@ -110,6 +114,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetProcessCount, TIpcArgs(&count)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyProcessData));
TPtr8 bufferPtr(buffer->Des());
@@ -117,7 +122,7 @@
aProcesses.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyProcessData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyProcessData))
{
TPckgBuf<TMemSpyProcessData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyProcessData));
@@ -136,7 +141,7 @@
return procId();
}
-EXPORT_C TInt RMemSpySession::ProcessSystemPermanentOrCritical( TProcessId aId, TBool aValue )
+EXPORT_C TInt RMemSpySession::ProcessSystemPermanentOrCritical( TProcessId aId, TBool& aValue )
{
TPckgBuf<TProcessId> arg1( aId );
TPckgBuf<TBool> arg2( aValue );
@@ -149,6 +154,17 @@
return error;
}
+EXPORT_C void RMemSpySession::NotifyEvent(TRequestStatus &aStatus)
+ {
+ SendReceive(EMemSpyClientServerOpNotifyEvent | KMemSpyOpFlagsAsyncOperation,
+ TIpcArgs(), aStatus);
+ }
+
+EXPORT_C void RMemSpySession::CancelEventNotificationL()
+ {
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpCancelEventNotification));
+ }
+
EXPORT_C TInt RMemSpySession::EndProcessL( TProcessId aId, TMemSpyEndType aType )
{
TPckgBuf<TProcessId> arg1( aId );
@@ -179,6 +195,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetThreadCount, TIpcArgs(&count, &pid)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyThreadData));
TPtr8 bufferPtr(buffer->Des());
@@ -186,7 +203,7 @@
aThreads.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyThreadData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyThreadData))
{
TPckgBuf<TMemSpyThreadData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyThreadData));
@@ -318,6 +335,7 @@
User::LeaveIfError(SendReceive( EMemSpyClientServerOpGetKernelObjectCount, TIpcArgs(&count) ));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyKernelObjectData));
TPtr8 bufferPtr(buffer->Des());
@@ -326,7 +344,9 @@
aKernelObjects.Reset();
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyKernelObjectData))
+ TInt receivedCount = Min(count(), requestedCount);
+
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyKernelObjectData))
{
TPckgBuf<TMemSpyKernelObjectData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyKernelObjectData));
@@ -350,6 +370,7 @@
User::LeaveIfError(SendReceive( EMemSpyClientServerOpGetKernelObjectItemCount, TIpcArgs(&count, &type) ));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyDriverHandleInfoGeneric));
TPtr8 bufferPtr(buffer->Des());
@@ -357,8 +378,10 @@
User::LeaveIfError(SendReceive( EMemSpyClientServerOpGetKernelObjectItems, args ));
aKernelObjectItems.Reset();
+
+ TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyDriverHandleInfoGeneric))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyDriverHandleInfoGeneric))
{
TPckgBuf<TMemSpyDriverHandleInfoGeneric> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyDriverHandleInfoGeneric));
@@ -380,6 +403,7 @@
User::LeaveIfError(SendReceive( EMemSpyClientServerOpGetMemoryTrackingCycleCount, TIpcArgs(&count) ));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyMemoryTrackingCycleData));
TPtr8 bufferPtr(buffer->Des());
@@ -388,7 +412,9 @@
aCycles.Reset();
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyMemoryTrackingCycleData))
+ TInt receivedCount = Min(count(), requestedCount);
+
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyMemoryTrackingCycleData))
{
TPckgBuf<TMemSpyMemoryTrackingCycleData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyMemoryTrackingCycleData));
@@ -408,9 +434,7 @@
//Heap specific operations
EXPORT_C CMemSpyApiHeap* RMemSpySession::GetHeapL()
- {
- CMemSpyApiHeap* aHeap;
-
+ {
HBufC8* buffer = HBufC8::NewLC( sizeof(TMemSpyHeapData) );
TPtr8 bufferPtr(buffer->Des());
TIpcArgs args( &bufferPtr );
@@ -419,11 +443,11 @@
TPckgBuf<TMemSpyHeapData> data;
data.Copy(bufferPtr.Ptr(), sizeof(TMemSpyHeapData));
- aHeap = CMemSpyApiHeap::NewL( data() );
+ CMemSpyApiHeap* heap = CMemSpyApiHeap::NewL( data() );
CleanupStack::PopAndDestroy(buffer);
- return aHeap;
+ return heap;
}
EXPORT_C CMemSpyApiHeap* RMemSpySession::GetHeap()
@@ -441,6 +465,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetEComCategoryCount, TIpcArgs(&count)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyEComCategoryData));
TPtr8 bufferPtr(buffer->Des());
@@ -448,7 +473,7 @@
aCategories.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyEComCategoryData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyEComCategoryData))
{
TPckgBuf<TMemSpyEComCategoryData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyEComCategoryData));
@@ -465,6 +490,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetEComInterfaceCount, TIpcArgs(&count, &category)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyEComInterfaceData));
TPtr8 bufferPtr(buffer->Des());
@@ -472,7 +498,7 @@
aInterfaces.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyEComInterfaceData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyEComInterfaceData))
{
TPckgBuf<TMemSpyEComInterfaceData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyEComInterfaceData));
@@ -489,6 +515,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetEComImplementationCount, TIpcArgs(&count, &interface)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyEComImplementationData));
TPtr8 bufferPtr(buffer->Des());
@@ -496,7 +523,7 @@
aImplementations.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyEComImplementationData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyEComImplementationData))
{
TPckgBuf<TMemSpyEComImplementationData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyEComImplementationData));
@@ -512,6 +539,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetWindowGroupCount, TIpcArgs(&count)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyEngineWindowGroupDetails));
TPtr8 bufferPtr(buffer->Des());
@@ -519,7 +547,7 @@
aGroups.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyEngineWindowGroupDetails))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyEngineWindowGroupDetails))
{
TPckgBuf<TMemSpyEngineWindowGroupDetails> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyEngineWindowGroupDetails));
@@ -529,6 +557,13 @@
CleanupStack::PopAndDestroy(buffer);
}
+EXPORT_C void RMemSpySession::SwitchToWindowGroupL( TInt aId )
+ {
+ TPckgBuf<TInt> id( aId );
+ TIpcArgs args(&id);
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpSwitchToWindowGroup, args));
+ }
+
EXPORT_C void RMemSpySession::DumpKernelHeap()
{
SendReceive( EMemSpyClientServerOpDumpKernelHeap );
@@ -889,6 +924,10 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetServerCount, TIpcArgs(&count)));
TInt requestedCount = count();
+
+ if( requestedCount < 0 )
+ requestedCount = 0;
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyServerData));
TPtr8 bufferPtr(buffer->Des());
@@ -913,6 +952,7 @@
User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetServerCount, TIpcArgs(&count)));
TInt requestedCount = count();
+
HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyServerData));
TPtr8 bufferPtr(buffer->Des());
@@ -920,7 +960,7 @@
aServers.Reset();
TInt receivedCount = Min(count(), requestedCount);
- for(TInt i=0, offset = 0; i<requestedCount; i++, offset+=sizeof(TMemSpyServerData))
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyServerData))
{
TPckgBuf<TMemSpyServerData> data;
data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyServerData));
@@ -937,3 +977,88 @@
User::LeaveIfError( SendReceive( EMemSpyClientServerOpServerListOutputGeneric, args ) );
}
+// Chunks
+
+EXPORT_C void RMemSpySession::GetChunksL(RArray<CMemSpyApiChunk*> &aChunks, TSortType aSortType)
+ {
+ TPckgBuf<TInt> count;
+ TPckgBuf<TSortType> sort( aSortType );
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetChunksCount, TIpcArgs(&count)));
+
+ TInt requestedCount = count();
+
+ HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyChunkData));
+ TPtr8 bufferPtr(buffer->Des());
+
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetSortedChunks, TIpcArgs(&count, &bufferPtr, &sort)));
+ aChunks.Reset();
+
+ TInt receivedCount = Min(count(), requestedCount);
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyChunkData))
+ {
+ TPckgBuf<TMemSpyChunkData> data;
+ data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyChunkData));
+ aChunks.AppendL(CMemSpyApiChunk::NewLC(data()));
+ }
+ CleanupStack::Pop(aChunks.Count());
+ CleanupStack::PopAndDestroy(buffer);
+ }
+
+EXPORT_C void RMemSpySession::ChunkListOutputL()
+ {
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpChunkListOutput));
+ }
+
+// RAM info
+EXPORT_C void RMemSpySession::IsAknIconCacheConfigurable( TBool& aValue )
+ {
+ TPckgBuf<TBool> arg( aValue );
+ TIpcArgs args( &arg );
+
+ User::LeaveIfError(SendReceive( EMemSpyClientServerOpIsAknIconCacheConfigurable, args ));
+
+ aValue = arg();
+ }
+
+EXPORT_C void RMemSpySession::SetAknIconCacheStatusL( TBool aEnabled, TInt64& aValue )
+ {
+ TPckgBuf<TBool> arg1( aEnabled );
+ TPckgBuf<TInt64> arg2( aValue );
+ TIpcArgs args( &arg1, &arg2 );
+
+ User::LeaveIfError(SendReceive( EMemSpyClientServerOpSetAknIconCacheStatus, args ));
+
+ aValue=arg2();
+ }
+
+// Code Segments
+EXPORT_C void RMemSpySession::GetCodeSegmentsL(RArray<CMemSpyApiCodeSegment*> &aCodeSegments, TSortType aSortType)
+ {
+ TPckgBuf<TInt> count;
+ TPckgBuf<TSortType> sort( aSortType );
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetCodeSegmentsCount, TIpcArgs(&count)));
+
+ TInt requestedCount = count();
+
+ HBufC8* buffer = HBufC8::NewLC(requestedCount * sizeof(TMemSpyCodeSegmentData));
+ TPtr8 bufferPtr(buffer->Des());
+
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpGetSortedCodeSegments, TIpcArgs(&count, &bufferPtr, &sort)));
+ aCodeSegments.Reset();
+
+ TInt receivedCount = Min(count(), requestedCount);
+ for(TInt i=0, offset = 0; i<receivedCount; i++, offset+=sizeof(TMemSpyCodeSegmentData))
+ {
+ TPckgBuf<TMemSpyCodeSegmentData> data;
+ data.Copy(bufferPtr.Ptr()+offset, sizeof(TMemSpyCodeSegmentData));
+ aCodeSegments.AppendL(CMemSpyApiCodeSegment::NewLC(data()));
+ }
+ CleanupStack::Pop(aCodeSegments.Count());
+ CleanupStack::PopAndDestroy(buffer);
+ }
+
+EXPORT_C void RMemSpySession::CodeSegmentsListOutputL()
+ {
+ User::LeaveIfError(SendReceive(EMemSpyClientServerOpCodeSegmentsOutput));
+ }
+
Binary file perfsrv/memspy/doc/S60_MemSpy_Users_Guide.doc has changed
--- a/perfsrv/memspy/group/ReleaseNotes_MemSpy.txt Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/group/ReleaseNotes_MemSpy.txt Tue Oct 26 16:20:32 2010 +0300
@@ -1,7 +1,7 @@
===============================================================================
-RELEASE NOTES - MEMSPY v2.2.2
-RELEASED 21th September 2010
+RELEASE NOTES - MEMSPY v2.3.0
+RELEASED 19th October 2010
SUPPORTS S60 5.0+
@@ -28,12 +28,18 @@
===============================================================================
-What's New in v2.2.2
+What's New in v2.3.0
====================
-- Fix: SWMT crash when heap dumps without filter are enabled.
-- Fix: Memory leaks.
-- UI change: Results subview removed from SMWT view.
-- UI change: Wait dialog when opening KernelContainers and KernelObjects Avkon view.
+- New Feature: MemSpyUI sends the Exit command to processes.
+- UI change: Ecom view for Avkon
+- UI change: Window Groups for Avkon
+- UI change: Chunks view for Orbit&Avkon
+- UI change: Autorefresh of the Processes & Threads view for Avkon
+- UI change: RAM info, ROM info and System Config view for Avkon
+- UI change: Code segments view for Orbit&Avkon
+- Fix: SWMT Kernel handles category crases the application.
+- Fix: CLI to show help when only "memspy" command without parameters is used
+- RHybridHeap v2 support
===============================================================================
@@ -96,6 +102,13 @@
Version History:
================
+Version 2.2.2 - 21st September 2010
+-----------------------------------
+- Fix: SWMT crash when heap dumps without filter are enabled.
+- Fix: Memory leaks.
+- UI change: Results subview removed from SMWT view.
+- UI change: Wait dialog when opening KernelContainers and KernelObjects Avkon view.
+
Version 2.2.1 - 7th September 2010
----------------------------------
- Feature: Window Groups view to display window server items.
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/MemSpyEngineClientInterface.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/MemSpyEngineClientInterface.h Tue Oct 26 16:20:32 2010 +0300
@@ -361,12 +361,20 @@
//Servers methods
EMemSpyClientServerOpGetServerCount,
- EMemSpyClientServerOpGetServers,
+ EMemSpyClientServerOpGetServers,
EMemSpyClientServerOpGetSortedServers,
EMemSpyClientServerOpServerListOutputGeneric,
+ //Chunks methods
+ EMemSpyClientServerOpGetChunksCount,
+
+ EMemSpyClientServerOpGetSortedChunks,
+
+ EMemSpyClientServerOpChunkListOutput,
+
+ //ECom methods
EMemSpyClientServerOpGetEComCategoryCount,
EMemSpyClientServerOpGetEComCategories,
@@ -383,6 +391,25 @@
EMemSpyClientServerOpGetWindowGroups,
+ EMemSpyClientServerOpSwitchToWindowGroup,
+
+ //RAM info
+ EMemSpyClientServerOpIsAknIconCacheConfigurable,
+
+ EMemSpyClientServerOpSetAknIconCacheStatus,
+
+ //Code Segments
+ EMemSpyClientServerOpGetCodeSegmentsCount,
+
+ EMemSpyClientServerOpGetSortedCodeSegments,
+
+ EMemSpyClientServerOpCodeSegmentsOutput,
+
+ //Others
+ EMemSpyClientServerOpNotifyEvent,
+
+ EMemSpyClientServerOpCancelEventNotification,
+
EMemSpyClientServerOpMarkerUiLast,
/**
@@ -396,7 +423,8 @@
{
ETerminate,
EKill,
- EPanic
+ EPanic,
+ EExit
};
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/driver/shared/MemSpyDriverObjectsShared.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/driver/shared/MemSpyDriverObjectsShared.h Tue Oct 26 16:20:32 2010 +0300
@@ -351,6 +351,7 @@
ETypeUnknown = 0,
ETypeRHeap = 1,
ETypeRHybridHeap = 2,
+ ETypeRHybridHeapV2 = 3,
};
public: // Constructor & destructor
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Helpers/MemSpyEngineHelperChunk.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Helpers/MemSpyEngineHelperChunk.h Tue Oct 26 16:20:32 2010 +0300
@@ -160,6 +160,8 @@
TAny* BaseAddress() const;
TAny* UpperAddress() const;
TUint OwnerId() const;
+ TMemSpyDriverChunkType Type() const;
+ TInt Attributes() const;
public: // API
IMPORT_C void OwnerName( TDes& aDes ) const;
@@ -184,4 +186,4 @@
-#endif
\ No newline at end of file
+#endif
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Helpers/MemSpyEngineHelperWindowServer.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Helpers/MemSpyEngineHelperWindowServer.h Tue Oct 26 16:20:32 2010 +0300
@@ -89,6 +89,7 @@
virtual void GetWindowGroupListL( RArray<TMemSpyEngineWindowGroupBasicInfo>& aWindowGroups ) = 0;
virtual void GetWindowGroupDetailsL( TInt aWindowGroupId, TMemSpyEngineWindowGroupDetails& aWindowGroupDetails ) = 0;
virtual void SwitchToL( TInt aWindowGroupId ) = 0;
+ virtual void EndTaskL( const TDesC& aProcessName ) = 0;
};
#endif
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/MemSpyEngineUtils.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/MemSpyEngineUtils.h Tue Oct 26 16:20:32 2010 +0300
@@ -54,7 +54,8 @@
EMemSpyEnginePanicTrackerNull3 = 9,
EMemSpyEnginePanicTrackerNull4 = 10,
EMemSpyEnginePanicSinkFileEntireFileBufferNull = 11,
- EMemSpyEnginePanicSinkFileWorkingFileBufferIsNull = 11,
+ EMemSpyEnginePanicSinkFileWorkingFileBufferIsNull = 12,
+ EMemSpyEnginePanicUnsupportedHeapType = 13,
};
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Sink/MemSpyEngineOutputList.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Sink/MemSpyEngineOutputList.h Tue Oct 26 16:20:32 2010 +0300
@@ -75,6 +75,9 @@
void PrintL();
void PrintL( CMemSpyEngineOutputSink& aSink );
+public: // API - flush
+ void FlushL();
+
public: // API - access
CMemSpyEngineOutputListItem& Item( TInt aPos );
const CMemSpyEngineOutputListItem& Item( TInt aPos ) const;
@@ -91,4 +94,4 @@
};
-#endif
\ No newline at end of file
+#endif
--- a/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Sink/MemSpyEngineOutputSink.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/memspy/memspy_plat/memspy_api/include/memspy/engine/Sink/MemSpyEngineOutputSink.h Tue Oct 26 16:20:32 2010 +0300
@@ -98,7 +98,8 @@
virtual void DataStreamBeginL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite ) = 0;
virtual void DataStreamBeginL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseTimeStamp ) = 0;
virtual void DataStreamEndL() = 0;
-
+ virtual void FlushL() = 0;
+
public:
virtual void ProcessSuspendedL( TProcessId aId );
virtual void ProcessResumed( TProcessId aId );
Binary file perfsrv/piprofiler/doc/S60_Performance_Investigator_Profiler_Users_Guide.doc has changed
--- a/perfsrv/piprofiler/engine/group/ProfilerEngine.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/group/ProfilerEngine.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
SMPSAFE
+UNPAGED
EPOCSTACKSIZE 0x10000
EPOCHEAPSIZE 0x100000 0x2000000 // Min 1MB, Max 32MB
--- a/perfsrv/piprofiler/engine/group/ProfilerEshell.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/group/ProfilerEshell.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
SMPSAFE
+UNPAGED
EPOCSTACKSIZE 0x10000
--- a/perfsrv/piprofiler/engine/inc/ProfilerEngine.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/inc/ProfilerEngine.h Tue Oct 26 16:20:32 2010 +0300
@@ -158,7 +158,7 @@
{
public:
- static CProfiler* NewLC(const TDesC& aSettingsFile);
+ static CProfiler* NewLC(const TDesC& aSettingsFile, TBool aBootMode=EFalse);
/**
* Method for control commands, i.e. start, stop and exit
@@ -199,7 +199,7 @@
void HandleError(TInt aErr);
static TBool CheckLocationSanity(RFs& fs, const TDesC8& aLocation);
private:
- CProfiler(const TDesC& aSettingsFile);
+ CProfiler(const TDesC& aSettingsFile, TBool aBootmode);
~CProfiler();
void ConstructL();
TInt LoadSettingsL(/*const TDesC& configFile*/);
@@ -251,6 +251,7 @@
TBool iSettingsFileLoaded;
CProfilerErrorChecker* iErrorChecker;
CProfilerTimer* iTimer;
+ TBool iBootMode;
};
#include <piprofiler/ProfilerGenericClassesUsr.h>
--- a/perfsrv/piprofiler/engine/inc/SamplerController.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/inc/SamplerController.h Tue Oct 26 16:20:32 2010 +0300
@@ -48,10 +48,10 @@
{
public:
- static CSamplerController* NewL(CProfilerSampleStream& aStream);
+ static CSamplerController* NewL(CProfilerSampleStream& aStream, TBool aBootMode);
void ConstructL();
- CSamplerController(CProfilerSampleStream& aStream);
+ CSamplerController(CProfilerSampleStream& aStream, TBool aBootMode);
~CSamplerController();
/**
@@ -130,6 +130,9 @@
private:
MSamplerControllerObserver* iObserver;
+ TBool iScBootMode;
+ RLibrary* iLibrary;
+ CSamplerPluginInterface* iPlug;
};
/**
--- a/perfsrv/piprofiler/engine/inc/SamplerPluginLoader.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/inc/SamplerPluginLoader.h Tue Oct 26 16:20:32 2010 +0300
@@ -56,7 +56,7 @@
*
* @param aAppUi Pointer to application UI. Does not take ownership.
*/
- static CSamplerPluginLoader* NewL();
+ static CSamplerPluginLoader* NewL(TBool aBootMode);
/**
* Destructor
@@ -68,7 +68,7 @@
/**
* Default C++ contructor
*/
- CSamplerPluginLoader();
+ CSamplerPluginLoader(TBool aBootMode);
/**
* Symbian OS default constructor
@@ -114,7 +114,8 @@
*/
void AbortAsyncLoad();
-
+ void LoadRlibraryL(CArrayPtrFlat<CSamplerPluginInterface>* aPluginArray);
+
/**
* Sorts the plugin array.
*
@@ -248,6 +249,7 @@
// Number of RunL calls.
TInt iRunLDebugCount;
+ TBool iBootMode;
};
--- a/perfsrv/piprofiler/engine/inc/WriterController.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/inc/WriterController.h Tue Oct 26 16:20:32 2010 +0300
@@ -47,10 +47,10 @@
{
public:
- static CWriterController* NewL(CProfilerSampleStream& aStream);
+ static CWriterController* NewL(CProfilerSampleStream& aStream, TBool aBootMode);
void ConstructL();
- CWriterController(CProfilerSampleStream& aStream);
+ CWriterController(CProfilerSampleStream& aStream, TBool aBootMode);
~CWriterController();
/**
@@ -109,6 +109,10 @@
TUid iSelectedPluginUid;
CProfilerSampleStream& iStream;
+private:
+ TBool iBootMode;
+ RLibrary* iLibrary;
+ CWriterPluginInterface* iPlug;
};
--- a/perfsrv/piprofiler/engine/inc/WriterPluginLoader.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/inc/WriterPluginLoader.h Tue Oct 26 16:20:32 2010 +0300
@@ -58,7 +58,7 @@
*
* @param aAppUi Pointer to application UI. Does not take ownership.
*/
- static CWriterPluginLoader* NewL();
+ static CWriterPluginLoader* NewL(TBool aBootMode);
/**
* Destructor
@@ -70,7 +70,7 @@
/**
* Default C++ contructor
*/
- CWriterPluginLoader();
+ CWriterPluginLoader(TBool aBootMode);
/**
* Symbian OS default constructor
@@ -128,6 +128,8 @@
* @param aPlugins The array which will be sorted.
*/
void SortPluginsL( CArrayPtrFlat<CWriterPluginInterface>* aPlugins );
+
+ void LoadRlibraryL( CArrayPtrFlat<CWriterPluginInterface>* aPluginArray );
private: // Internal methods
@@ -260,6 +262,7 @@
// Number of RunL calls.
TInt iRunLDebugCount;
+ TBool iBootMode;
};
--- a/perfsrv/piprofiler/engine/src/ProfilerEngine.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/ProfilerEngine.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -95,17 +95,20 @@
*
*/
// --------------------------------------------------------------------------------------------
-CProfiler* CProfiler::NewLC(const TDesC& aSettingsFile)
+CProfiler* CProfiler::NewLC(const TDesC& aSettingsFile, TBool aBootMode)
{
- CProfiler* self = new(ELeave) CProfiler(aSettingsFile);
+ CProfiler* self = new(ELeave) CProfiler(aSettingsFile ,aBootMode);
CleanupStack::PushL(self);
self->ConstructL();
+
+ LOGTEXT(_L("CProfiler::NewLC - done"));
return self;
}
// --------------------------------------------------------------------------------------------
-CProfiler::CProfiler(const TDesC& aSettingsFile) :
- iSettingsFileLocation(aSettingsFile)
+CProfiler::CProfiler(const TDesC& aSettingsFile, TBool aBootMode) :
+ iSettingsFileLocation(aSettingsFile),
+ iBootMode(aBootMode)
{
// define property for Profiler Engine status, UI may read it for control purposes
if ( RProperty::Define(KEngineStatusPropertyCat,
@@ -190,15 +193,18 @@
// close engine status property
iEngineStatus.Close();
- if (RProperty::Delete(KEngineStatusPropertyCat, EProfilerEngineStatus) != KErrNotFound)
+ TInt ret = RProperty::Delete(KEngineStatusPropertyCat, EProfilerEngineStatus);
+ if ( ret != KErrNone)
{
- LOGTEXT(_L("CProfiler::~CProfiler - cannot close status property"));
+ LOGSTRING2("CProfiler::~CProfiler - cannot close status property %d", ret);
+
}
// close engine update property
iUpdateStatus.Close();
- if (RProperty::Delete(KEngineStatusPropertyCat, EProfilerErrorStatus) != KErrNotFound)
+ ret = RProperty::Delete(KEngineStatusPropertyCat, EProfilerErrorStatus);
+ if (ret != KErrNone)
{
- LOGTEXT(_L("CProfiler::~CProfiler - cannot close update property"));
+ LOGSTRING2("CProfiler::~CProfiler - cannot close update property %d",ret);
}
// close server process
@@ -222,8 +228,17 @@
void CProfiler::ConstructL()
{
LOGTEXT(_L("CProfiler::ConstructL - Enter"));
- TInt err(0);
+ TInt err(0);
TLex lex;
+
+ if(iBootMode)
+ {
+ LOGSTRING("boot mode enabled");
+ }
+ else
+ {
+ LOGSTRING("normal mode enabled");
+ }
if ( iSettingsFileLocation.CompareF(KNullDesC) != 0 )
{
@@ -236,15 +251,12 @@
// there is another item in the list
TPtrC filename = lex.MarkedToken();
LOGSTRING2("filename %S", &filename);
- lex.SkipSpace();
- lex.Mark();
- lex.SkipCharacters();
- if(lex.TokenLength() != 0)
- {
- TPtrC boot = lex.MarkedToken();
- LOGTEXT(_L("boot mode"));
- }
- }
+
+ }
+ }
+ else
+ {
+ LOGSTRING("CProfiler::ConstructL - Enter - settingsfilelocation null");
}
// create new sampler stream instance
@@ -259,12 +271,13 @@
iErrorChecker = CProfilerErrorChecker::NewL();
iErrorChecker->SetObserver(this);
- // create and initiate plug-in controller instances
- iSamplerHandler = CSamplerController::NewL(*iUserStream);
- iWriterHandler = CWriterController::NewL(*iUserStream);
-
+ // create and initiate plug-in controller instances
+ iSamplerHandler = CSamplerController::NewL(*iUserStream, iBootMode);
+ LOGSTRING("CSamplerController started from ProfilerEngine");
+ iWriterHandler = CWriterController::NewL(*iUserStream, iBootMode);
+ LOGSTRING("CWriterController started from ProfilerEngine");
iWriterHandler->InitialiseWriterListL();
-
+ LOGSTRING("WriterList initialised started from ProfilerEngine");
// set engine as an observer to sampler controller to get the notification of plugin load has ended
iSamplerHandler->SetObserver(this);
@@ -299,6 +312,11 @@
else break;
}
+ if(err != KErrNone)
+ {
+ User::Leave(err);
+ }
+
// set settings file loading preferences
iSettingsFileLoaded = EFalse;
@@ -342,7 +360,7 @@
iSettingsFileLoaded = ETrue;
}
-
+ LOGSTRING("CProfiler::HandleSamplerControllerReadyL rendezvous");
// notify engine's launcher(UI or PIProfilerLauncher) to continue launch
RProcess::Rendezvous(KErrNone);
}
@@ -381,7 +399,7 @@
// ----------------------------------------------------------------------------
void CProfiler::DoGetValueFromSettingsArray(CDesC8ArrayFlat* aLineArray, const TDesC8& aAttribute, TDes8& aValue)
{
- LOGTEXT(_L("CProfiler::DoGetValueFromSettingsFile()"));
+ LOGTEXT(_L("CProfiler::DoGetValueFromSettingsArray()"));
_LIT8(KSettingItemSeparator, "=");
// read a line of given array
@@ -404,7 +422,7 @@
void CProfiler::DoGetValueFromSettingsArray(CDesC8ArrayFlat* aLineArray, const TDesC8& aAttribute, TInt& aValue)
{
- LOGTEXT(_L("CProfiler::DoGetValueFromSettingsFile()"));
+ LOGTEXT(_L("CProfiler::DoGetValueFromSettingsFile() TLex"));
_LIT8(KSettingItemSeparator, "=");
// read a line of given array
@@ -686,6 +704,7 @@
void CProfiler::UpdateSavedGeneralAttributes(CDesC8ArrayFlat* aSavedAttributes)
{
// get saved general settings
+ LOGSTRING("CProfiler::UpdateSavedGeneralAttributes");
DoGetValueFromSettingsArray(aSavedAttributes, KGenericTraceOutput, iGeneralAttributes.iTraceOutput);
DoGetValueFromSettingsArray(aSavedAttributes, KGenericTraceFilePrefix, iGeneralAttributes.iTraceFilePrefix);
DoGetValueFromSettingsArray(aSavedAttributes, KGenericTraceFileSaveDrive, iGeneralAttributes.iSaveFileDrive);
@@ -896,10 +915,11 @@
// connect to file server
err = fs.Connect();
if( err != KErrNone )
- {
+ {
// failed to write settings to settings file
+ RDebug::Printf("FS connect failed");
return;
- }
+ }
// create and set the private path
fs.CreatePrivatePath(EDriveC);
@@ -908,10 +928,12 @@
// create the new settings file
err = settingsFile.Replace(fs, iSettingsFileLocation, EFileWrite);
if(err != KErrNone)
- return;
+ {
+ RDebug::Printf("Settingsfile replace failed");
+ fs.Close();
+ return;
+ }
- CleanupClosePushL(settingsFile);
-
// write the header
line.Copy(KPIProfilerSettingsHeader);
line.Append(KNewLineSeparator);
@@ -996,7 +1018,7 @@
// call CSamplerController to write all sampler settings
iSamplerHandler->ComposeAttributesToSettingsFileFormat(settingsFile, iDefaultSamplerAttributesArray);
- CleanupStack::PopAndDestroy(); //settingsFile
+ settingsFile.Close();
// close file
fs.Close();
}
@@ -1394,7 +1416,7 @@
CleanupStack::PushL(self);
self->StartL(KProfilerName);
CleanupStack::Pop();
- LOGTEXT(_L("CPSession::NewL - Exit"));
+ LOGTEXT(_L("CPServer::NewL - Exit "));
return self;
}
@@ -1424,16 +1446,20 @@
*
*/
// --------------------------------------------------------------------------------------------
-static void RunEngineServerL(const TDesC& aSettingsFile)
+static void RunEngineServerL(const TDesC& aSettingsFile, TBool aBoot)
{
- RDebug::Print(_L("Profiler: RunEngineServerL() - Install active scheduler"));
+ LOGSTRING("Profiler: RunEngineServerL() - Install active scheduler");
CActiveScheduler* pS = new CActiveScheduler;
CActiveScheduler::Install(pS);
- CProfiler* p = CProfiler::NewLC(aSettingsFile);
+ CProfiler* p = CProfiler::NewLC(aSettingsFile, aBoot);
+
+ LOGSTRING("Profiler: RunEngineServerL() - Starting active scheduler");
CActiveScheduler::Start();
p->Finalise();
+ LOGSTRING("Profiler: RunEngineServerL() - profiler finalised");
CleanupStack::PopAndDestroy(p);
delete pS;
+ LOGSTRING("Profiler: RunEngineServerL() - done");
}
// --------------------------------------------------------------------------------------------
@@ -1477,35 +1503,74 @@
// --------------------------------------------------------------------------------------------
GLDEF_C TInt E32Main()
{
+ LOGSTRING("Profiler: E32Main()");
// parse command line arguments
TBuf<256> c;
TInt err(KErrNone);
+ _LIT(KBootMeasurement,"*boot");
+ TBool myBoot(EFalse);
// copy the full command line with arguments into a buffer
User::CommandLine(c);
+ // parse command line for boot mode. filename boot
+
+
+ if (c.Match(KBootMeasurement) != KErrNotFound)
+ {
+ LOGTEXT(_L("ParseCommandAndExecute Found keyword boot"));
+ myBoot = ETrue;
+ }
+
+ TBuf<256> temp;
+ temp.Append(c);
+ TLex lex(temp);
+ lex.Mark();
+ lex.SkipCharacters();
+
+ TPtrC token;
TBuf<256> fileName;
- fileName.Append(c); // only one settings param should be
- LOGSTRING3("Filename is %S, response %d 1", &fileName, err);
- err = TestSettingsFile(fileName);
- if(err != KErrNone)
+
+ if(lex.TokenLength() != 0)
{
- LOGSTRING3("Filename is %S, response %d 2", &fileName, err);
- // settings file does not exist, copy null desc to file name
- fileName.Copy(KNullDesC);
+ TPtrC token = lex.MarkedToken();
+ LOGSTRING2("E32 Main Token 1 %S",&token);
+ fileName.Append(token); // only one settings param should be
+ LOGSTRING3("Filename is #%S#, response %d 1", &fileName, err);
+ err = TestSettingsFile(fileName);
+ if(err != KErrNone)
+ {
+ LOGSTRING3("Filename is #%S#, response %d 2", &fileName, err);
+ // settings file does not exist, copy null desc to file name
+ fileName.Copy(KNullDesC);
+ }
+ }
+ else
+ {
+ LOGTEXT(_L("E32 Main Problem 1 in parsing command line"));
}
- LOGSTRING3("Filename is %S, response %d 3", &fileName, err);
-
// if no command line arguments found just start the profiler process
__UHEAP_MARK;
CTrapCleanup* cleanup = CTrapCleanup::New();
TInt ret(KErrNoMemory);
+ err = KErrNoMemory;
if( cleanup )
{
- TRAPD( ret, RunEngineServerL(fileName) );
- RDebug::Print(_L("Profiler: E32Main() - ret %d"), ret);
- delete cleanup;
+ TRAPD(err ,RunEngineServerL(fileName, myBoot));
+ LOGSTRING3("Profiler: E32Main() - ret %d err %d", ret,err);
+ if(err != KErrNone)
+ {
+ RDebug::Print(_L("if Profiler: E32Main() - ret %d err %d"), ret,err);
+ ret = err;
+ delete cleanup;
+ }
+ else
+ {
+ LOGSTRING3("else Profiler: E32Main() - ret %d err %d", ret,err);
+ ret = err;
+ delete cleanup;
+ }
}
__UHEAP_MARKEND;
--- a/perfsrv/piprofiler/engine/src/ProfilerEshell.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/ProfilerEshell.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -35,7 +35,7 @@
static void PrintUsageInfo(const TDesC& aAdditionalInfo)
{
_LIT(KConsoleName, "Console");
- _LIT(KLegalNote, "PIProfiler Version 2.2.2 Copyright @ 2009 Nokia\n");
+ _LIT(KLegalNote, "PIProfiler Version 2.2.0.3 Copyright @ 2009 Nokia\n");
_LIT(KUsageNote, "Usage: PIProfiler [start/end/timed] settingsfile [time to run]\n");
_LIT(KExample, "Example: PIProfiler timed C:\\data\\piprofilersettings.txt 60\n");
@@ -96,11 +96,12 @@
conf.Append(configFile);
if(aBootTime)
{
- RDebug::Printf("boot time measurement");
+ RDebug::Printf("PIProfiler: StartProfilerProcess: boot time measurement");
conf.Append(_L(" "));
conf.Append(_L("boot"));
}
RDebug::RawPrint(conf);
+ RDebug::Printf("PIProfiler: StartProfilerProcess run time is %d", aRunTimeInSeconds);
// check if process exists
err = FindProcess();
LOGSTRING2("PIProfiler: tried to find process, response %d", err);
@@ -116,20 +117,22 @@
// check if RProcess::Create() succeeded
if( err == KErrNone )
{
+ LOGSTRING("PI Profiler start rendezvous ");
// Trigger rendezvous on the supplied TRequestStatus object
proc.Rendezvous(status);
-
+ LOGSTRING("PI Profiler start resume ");
// kick off the engine process
proc.Resume();
-
+ LOGSTRING("PI Profiler start waitforrequest ");
// wait for the constructor to complete
User::WaitForRequest(status);
-
+ LOGSTRING("PI Profiler start close ");
// just lose the handle
proc.Close();
-
+ LOGSTRING("PI Profiler start: closed");
// start sampling, using settings found in settings file or if not found the default settings
err = RProfiler::StartSampling();
+ LOGSTRING2("PI Profiler start: err %d", err);
// check if command succesful
if( err != KErrNone )
{
@@ -273,7 +276,7 @@
TBool myBoot=false;
// copy the full command line with arguments into a buffer
User::CommandLine(c);
- LOGSTRING2("command: %S", &c);
+ LOGSTRING2("ParseCommandAndExecute command: %S", &c);
// try to match with each of the literals defined above
// (commands in atf format)
@@ -282,11 +285,11 @@
match = c.Match(KAutomatedTestStart);
if (match != KErrNotFound)
{
- LOGTEXT(_L("Found keyword start"));
+ LOGTEXT(_L("ParseCommandAndExecute Found keyword start"));
TBuf<256> fileName;
fileName.Append(c.Right(c.Length()-6));
- LOGSTRING2("Filename is %S", &fileName);
+ LOGSTRING2("ParseCommandAndExecute Filename is %S", &fileName);
if(TestSettingsFile(fileName) != KErrNone)
{
_LIT(KSettingsFileFailed, "False settings file");
@@ -321,12 +324,12 @@
// command "timed" or " boot" found, need for finding settings file and run time next
if(bootmatch != KErrNotFound)
{
- LOGTEXT(_L("Found keyword boot"));
+ LOGTEXT(_L("ParseCommandAndExecute Found keyword boot"));
myBoot = TRUE;
}
if(match != KErrNotFound)
{
- LOGTEXT(_L("Found keyword timed"));
+ LOGTEXT(_L("ParseCommandAndExecute Found keyword timed"));
}
TBuf<256> temp;
--- a/perfsrv/piprofiler/engine/src/SamplerController.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/SamplerController.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -32,9 +32,13 @@
_LIT(KEquals, "=");
_LIT(KCommentSeparator, " ; ");
-CSamplerController* CSamplerController::NewL(CProfilerSampleStream& aStream)
+// forward declarations
+
+
+
+CSamplerController* CSamplerController::NewL(CProfilerSampleStream& aStream, TBool aBootMode)
{
- CSamplerController* self = new( ELeave ) CSamplerController(aStream);
+ CSamplerController* self = new( ELeave ) CSamplerController(aStream, aBootMode);
CleanupStack::PushL( self );
self->ConstructL( );
CleanupStack::Pop( self );
@@ -48,26 +52,37 @@
}
-CSamplerController::CSamplerController(CProfilerSampleStream& aStream) :
- iStream(aStream)
+CSamplerController::CSamplerController(CProfilerSampleStream& aStream, TBool aBootMode) :
+ iStream(aStream),
+ iScBootMode(aBootMode)
{
+
}
void CSamplerController::InitialiseSamplerListL()
{
- // create new sampler plugin array
- iPluginArray = new (ELeave) CArrayPtrFlat<CSamplerPluginInterface>( KMaxSamplerPluginCount );
-
- // create plugin loader instance
- iPluginLoader = CSamplerPluginLoader::NewL();
-
- // register sampler controller to get notifications of succesfull plugin load
- iPluginLoader->SetObserver( this );
-
- // load sampler plugins asynchronously
- iPluginLoader->LoadAsyncL( iPluginArray );
-
- LOGTEXT(_L(" RSamplerController::InitialiseUserSideSamplerList - exit"));
+ // create new sampler plugin array
+ iPluginArray = new (ELeave) CArrayPtrFlat<CSamplerPluginInterface>( KMaxSamplerPluginCount );
+
+ // create plugin loader instance
+ iPluginLoader = CSamplerPluginLoader::NewL(iScBootMode);
+
+ // register sampler controller to get notifications of succesfull plugin load
+ iPluginLoader->SetObserver( this );
+ if (iScBootMode)
+ {
+ LOGSTRING("CSamplerController boot mode");
+ // load sampler rlibrary
+ iPluginLoader->LoadRlibraryL(iPluginArray);
+ }
+ else
+ {
+ LOGSTRING("CSamplerController not boot mode");
+
+ // load sampler plugins asynchronously
+ iPluginLoader->LoadAsyncL( iPluginArray );
+ }
+ LOGTEXT(_L("CSamplerController::InitialiseUserSideSamplerList - exit"));
}
CSamplerController::~CSamplerController()
@@ -97,7 +112,22 @@
delete iPluginLoader;
iPluginLoader = NULL;
}
-
+
+ if( iPlug )
+ {
+ iPlug->StopSampling();
+ delete iPlug;
+ iPlug= NULL;
+ LOGSTRING("iPlug deleted, sampling stopped");
+ }
+ if ( iLibrary )
+ {
+ iLibrary->Close();
+ delete iLibrary;
+ iLibrary = NULL;
+ }
+ REComSession::FinalClose();
+
LOGTEXT(_L("CSamplerController::~CSamplerController - exit" ));
}
@@ -108,24 +138,27 @@
TInt CSamplerController::UpdateSavedSamplerAttributesL(CDesC8ArrayFlat* aSavedLineArray, CArrayFixFlat<TSamplerAttributes>* aAttributes)
{
+ LOGSTRING("CSamplerController::UpdateSavedSamplerAttributesL");
TInt err(KErrNone);
- TInt count(iPluginArray->Count());
- // all plugins get their own settings among whole lump of setting strings
- CSamplerPluginInterface* plugin = NULL;
-
- // loop through the plugin array
- for(TInt i(0);i<count;i++)
+ if( iPluginArray )
{
- // get each plugin at a time
- plugin = iPluginArray->At(i);
+ TInt count(iPluginArray->Count());
+ // all plugins get their own settings among whole lump of setting strings
+ CSamplerPluginInterface* plugin = NULL;
- // call each plugin to sort out its own settings
- err = plugin->ConvertRawSettingsToAttributes(aSavedLineArray);
-
- // get plugin specific attributes, array may contain attributes of several sub samplers
- plugin->GetAttributesL(aAttributes);
+ // loop through the plugin array
+ for(TInt i(0);i<count;i++)
+ {
+ // get each plugin at a time
+ plugin = iPluginArray->At(i);
+
+ // call each plugin to sort out its own settings
+ err = plugin->ConvertRawSettingsToAttributes(aSavedLineArray);
+
+ // get plugin specific attributes, array may contain attributes of several sub samplers
+ plugin->GetAttributesL(aAttributes);
+ }
}
-
return err;
}
@@ -169,7 +202,7 @@
TBuf<384> settingLine;
TBuf8<384> settingLine8;
TInt itemCount(0);
- TBuf<266> tBuf;
+ //TBuf<266> tBuf;
TSamplerAttributes attr;
@@ -369,20 +402,20 @@
void CSamplerController::HandlePluginLoaded( KSamplerPluginLoaderStatus aStatus )
{
-
+ LOGSTRING("CSamplerController::HandlePluginLoaded");
// process status value
switch(aStatus)
{
- case 0:
+ case ESamplerSuccess:
LOGSTRING2("RSamplerController - one plugin loaded, status: %d", aStatus);
break;
- case 1:
+ case ESamplerFail:
LOGSTRING2("RSamplerController - a plugin load failed: %d", aStatus);
break;
- case 2:
+ case ESamplerAborted:
LOGSTRING2("RSamplerController - plugin loading aborted: %d", aStatus);
break;
- case 3:
+ case ESamplerFinished:
LOGSTRING2("RSamplerController - all plugins loaded: %d", aStatus);
TRAPD(err, iPluginLoader->SortPluginsL(iPluginArray));
if(err != KErrNone)
@@ -397,7 +430,7 @@
LOGTEXT(_L("Failed to notify engine"));
}
break;
- case 4:
+ case ESamplerError:
LOGSTRING2("RSamplerController - error in loading plugins: %d", aStatus);
break;
default:
@@ -473,8 +506,7 @@
{
plugin = iPluginArray->At(i);
TUint32 id = plugin->Id(-1).iUid;
- LOGSTRING2(" CSamplerController::StopSamplerPlugins - traceId = %d",
- id);
+ LOGSTRING2(" CSamplerController::StopSamplerPlugins - traceId = 0x%x",id);
// stop only started samplers
if(plugin->Enabled())
{
@@ -487,6 +519,10 @@
plugin->Flush();
}
}
+ else
+ {
+ LOGSTRING2("CSamplerController::StopSamplerPlugins - plugin id 0x%x not enabled",id);
+ }
count++;
}
}
--- a/perfsrv/piprofiler/engine/src/SamplerPluginLoader.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/SamplerPluginLoader.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -30,9 +30,9 @@
// EPOC two-phased constructor
// ----------------------------------------------------------------------------
//
-CSamplerPluginLoader* CSamplerPluginLoader::NewL()
+CSamplerPluginLoader* CSamplerPluginLoader::NewL(TBool aBootMode)
{
- CSamplerPluginLoader* self = new( ELeave ) CSamplerPluginLoader;
+ CSamplerPluginLoader* self = new( ELeave ) CSamplerPluginLoader(aBootMode);
CleanupStack::PushL( self );
self->ConstructL( );
CleanupStack::Pop( self );
@@ -47,9 +47,11 @@
// might leave.
// ----------------------------------------------------------------------------
//
-CSamplerPluginLoader::CSamplerPluginLoader() : CActive( EPriorityStandard )
+CSamplerPluginLoader::CSamplerPluginLoader(TBool aBootMode) :
+ CActive( EPriorityStandard )
{
LOGSTRING( "CSamplerPluginLoader()::CSamplerPluginLoader()" );
+ iBootMode = aBootMode;
}
@@ -82,6 +84,10 @@
AbortAsyncLoad();
Cancel();
+ if ( iPluginArray )
+ {
+ iPluginArray = NULL;
+ }
// reset ECOM implementation info array
iImplInfoArray.ResetAndDestroy(); // This is needed
@@ -109,7 +115,45 @@
CompleteOwnRequest();
}
+// ----------------------------------------------------------------------------
+// CSamplerPluginLoader::LoadRlibraryL
+// ----------------------------------------------------------------------------
+//
+void CSamplerPluginLoader::LoadRlibraryL(CArrayPtrFlat<CSamplerPluginInterface>* aPluginArray)
+ {
+ LOGSTRING("CSamplerPluginLoader rlibrary loading");
+ // Load dll
+ iPluginArray = aPluginArray;
+ RLibrary aLib;
+ TInt ret = aLib.Load(_L("PIProfilerGenerals.dll"),_L("c:\\sys\\bin"));
+ LOGSTRING2("RLibrary load returns %d", ret);
+ User::LeaveIfError(ret);
+ const TInt KNewLOrdinal = 2;
+ TLibraryFunction NewL =aLib.Lookup(KNewLOrdinal);
+
+ if(!NewL)
+ {
+ RDebug::Printf("library.lookup returns null");
+ }
+ else
+ {
+ LOGSTRING2("library.lookup returns 0x%x", NewL);
+ //CGeneralsPlugin* mydll=(CGeneralsPlugin*)NewL();
+ CSamplerPluginInterface* mydll=(CSamplerPluginInterface*)NewL();
+ //Generals plugin loaded, samplers enabled.
+ CleanupStack::PushL( mydll );
+ //InsertPluginInOrderL( mydll, aPluginArray);
+ CleanupStack::Pop(mydll);
+ // call engine to finalize the startup
+ //TRAPD(result, iObserver->HandleSamplerControllerReadyL(););
+ NotifyProgress();
+
+ //Begin CActive asynchronous loop.
+ CompleteOwnRequest();
+ }
+ LOGSTRING("RLibrary and plugins loaded");
+ }
// ----------------------------------------------------------------------------
// CSamplerPluginLoader::LoadSyncL
// ----------------------------------------------------------------------------
@@ -170,6 +214,7 @@
//
void CSamplerPluginLoader::RunL()
{
+ LOGSTRING("CSamplerPluginLoader::RunL");
iRunLDebugCount++;
LoadNextPluginL();
@@ -364,16 +409,22 @@
TInt error(KErrNone);
// Create plugin. Trap leave for debugging purposes.
TRAP( error, plugin = &CreatePluginInstanceL( *info ); );
-
- if( error == KErrNone )
+ if (plugin != NULL)
{
- // Plugin ownership is transfered to iPluginArray
- InsertPluginInOrderL( plugin, iPluginArray );
+ if( error == KErrNone )
+ {
+ // Plugin ownership is transfered to iPluginArray
+ InsertPluginInOrderL( plugin, iPluginArray );
+ }
+ else
+ {
+ // Error note is displayed even if plugin is not loaded
+ LOGSTRING2("CSamplerPluginLoader::LoadNextPluginL() - plugin load failed, error %d", error);
+ }
}
else
{
- // Error note is displayed even if plugin is not loaded
- LOGSTRING2("CSamplerPluginLoader::LoadNextPluginL() - plugin load failed, error %d", error);
+ delete plugin;
}
// Wait for next round
break;
@@ -394,19 +445,21 @@
const TUid implUid = aImpInfo.ImplementationUid();
CSamplerPluginInterface* plugin = CSamplerPluginInterface::NewL( implUid , (TAny*)&aImpInfo.DisplayName() );
- CleanupStack::PushL ( plugin );
+ if(plugin != NULL)
+ {
+ CleanupStack::PushL ( plugin );
- // Parse plugin's order number from opaque_data:
- TInt orderNumber(0);
- const TInt orderErr = ParseOrderNumber( aImpInfo.OpaqueData(), orderNumber );
+ // Parse plugin's order number from opaque_data:
+ TInt orderNumber(0);
+ const TInt orderErr = ParseOrderNumber( aImpInfo.OpaqueData(), orderNumber );
- if ( orderErr == KErrNone && orderNumber >= 0 )
- {
- plugin->iOrder = orderNumber;
+ if ( orderErr == KErrNone && orderNumber >= 0 )
+ {
+ plugin->iOrder = orderNumber;
+ }
+ CleanupStack::Pop( plugin ); // CSamplerController is now responsible for this memory.
}
- CleanupStack::Pop( plugin ); // CSamplerController is now responsible for this memory.
-
- return *plugin;
+ return *plugin;
}
// ----------------------------------------------------------------------------
@@ -432,6 +485,7 @@
{
aPlugins->AppendL( plugins[i] );
}
+ plugins.Close();
}
--- a/perfsrv/piprofiler/engine/src/WriterController.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/WriterController.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -24,37 +24,44 @@
const TInt KMaxWriterPluginCount = 10;
-CWriterController* CWriterController::NewL(CProfilerSampleStream& aStream)
+CWriterController* CWriterController::NewL(CProfilerSampleStream& aStream, TBool aBootMode)
{
- CWriterController* self = new( ELeave ) CWriterController(aStream);
+ CWriterController* self = new( ELeave ) CWriterController(aStream, aBootMode);
CleanupStack::PushL( self );
self->ConstructL( );
CleanupStack::Pop( self );
return self;
}
-CWriterController::CWriterController(CProfilerSampleStream& aStream) :
- iStream(aStream)
+CWriterController::CWriterController(CProfilerSampleStream& aStream, TBool aBootMode) :
+ iStream(aStream),
+ iBootMode(aBootMode)
{
}
void CWriterController::ConstructL()
{
// initiate writer plugin list
-
+ LOGSTRING2("boot mode %d", iBootMode);
}
void CWriterController::InitialiseWriterListL()
{
// create new writer plugin array
- iPluginArray = new(ELeave) CArrayPtrFlat<CWriterPluginInterface>( KMaxWriterPluginCount );
-
- // create new writer plugin loader
- iPluginLoader = CWriterPluginLoader::NewL();
- iPluginLoader->SetObserver( this );
- iPluginLoader->LoadAsyncL( iPluginArray );
-
+ iPluginArray = new(ELeave) CArrayPtrFlat<CWriterPluginInterface>( KMaxWriterPluginCount );
+
+ // create new writer plugin loader
+ iPluginLoader = CWriterPluginLoader::NewL(iBootMode);
+ iPluginLoader->SetObserver( this );
+ if ( iBootMode )
+ {
+ iPluginLoader->LoadRlibraryL( iPluginArray );
+ }
+ else
+ {
+ iPluginLoader->LoadAsyncL( iPluginArray );
+ }
LOGTEXT(_L(" RWriterController::InitialiseWriterList - exit"));
}
@@ -84,7 +91,8 @@
delete iPluginLoader;
iPluginLoader = NULL;
}
-
+
+ REComSession::FinalClose();
}
--- a/perfsrv/piprofiler/engine/src/WriterPluginLoader.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/engine/src/WriterPluginLoader.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -30,9 +30,9 @@
// EPOC two-phased constructor
// ----------------------------------------------------------------------------
//
-CWriterPluginLoader* CWriterPluginLoader::NewL()
+CWriterPluginLoader* CWriterPluginLoader::NewL(TBool aBootMode)
{
- CWriterPluginLoader* self = new( ELeave ) CWriterPluginLoader;
+ CWriterPluginLoader* self = new( ELeave ) CWriterPluginLoader(aBootMode);
CleanupStack::PushL( self );
self->ConstructL( );
CleanupStack::Pop( self );
@@ -47,7 +47,9 @@
// might leave.
// ----------------------------------------------------------------------------
//
-CWriterPluginLoader::CWriterPluginLoader() : CActive( EPriorityStandard )
+CWriterPluginLoader::CWriterPluginLoader(TBool aBootMode) :
+ CActive( EPriorityStandard ),
+ iBootMode(aBootMode)
{
LOGTEXT(_L("CWriterPluginLoader()::CWriterPluginLoader()" ));
}
@@ -134,15 +136,18 @@
if ( info->ImplementationUid() == aImplementationUid )
{
TRAPD(ret, plugin = &CreatePluginInstanceL( *info ); );
- if( ret == KErrNone )
+ if(plugin != NULL)
{
- // Plugin ownership is transfered to iPluginArray
- InsertPluginInOrderL( plugin, iPluginArray );
- }
- else
- {
- // Error note is displayed even if plugin is not loaded
- LOGSTRING2("CWriterPluginLoader::LoadSyncL() - plugin load failed, error %d", ret);
+ if( ret == KErrNone )
+ {
+ // Plugin ownership is transfered to iPluginArray
+ InsertPluginInOrderL( plugin, iPluginArray );
+ }
+ else
+ {
+ // Error note is displayed even if plugin is not loaded
+ LOGSTRING2("CWriterPluginLoader::LoadSyncL() - plugin load failed, error %d", ret);
+ }
}
break;
}
@@ -178,20 +183,28 @@
void CWriterPluginLoader::RunL()
{
iRunLDebugCount++;
- LoadNextPluginL();
-
- // Check if there are still more plugins to be loaded:
- if ( iImplInfoArrayIterator < iImplInfoArray.Count() )
+ if (iBootMode)
{
- NotifyProgress();
- // Continue CActive asynchronous loop.
- CompleteOwnRequest();
+ LOGTEXT(_L("CWriterPluginLoader() Rlibrary has been loaded." ));
+ NotifyFinished();
}
else
{
- // All plugins loaded:
- LOGTEXT(_L("CWriterPluginLoader()::Loading plugins finished." ));
- NotifyFinished();
+ LoadNextPluginL();
+
+ // Check if there are still more plugins to be loaded:
+ if ( iImplInfoArrayIterator < iImplInfoArray.Count() )
+ {
+ NotifyProgress();
+ // Continue CActive asynchronous loop.
+ CompleteOwnRequest();
+ }
+ else
+ {
+ // All plugins loaded:
+ LOGTEXT(_L("CWriterPluginLoader()::Loading plugins finished." ));
+ NotifyFinished();
+ }
}
}
@@ -548,6 +561,86 @@
}
+void CWriterPluginLoader::LoadRlibraryL(CArrayPtrFlat<CWriterPluginInterface>* aPluginArray )
+ {
+ LOGTEXT(_L("CWriterPluginLoader::InitialiseWriterListL BOOT" ));
+ iPluginArray = aPluginArray;
+
+ // Reset iterator:
+ iImplInfoArrayIterator = 0;
+
+ LOGSTRING("CWriterPluginLoader rlibrary loading");
+ // Load dll
+ RLibrary aLib;
+
+ // need to know wether to load diskwriter or debugwriter plugin.
+ // for now, lets just load both.
+ TInt ret = aLib.Load(_L("PIProfilerDiskWriter.dll"),_L("c:\\sys\\bin"));
+ LOGSTRING2("RLibrary diskwriter load returns %d", ret);
+ if(ret != KErrNone)
+ {
+ User::LeaveIfError(ret);
+ }
+ const TInt KNewLOrdinal = 2;
+ TLibraryFunction NewL =aLib.Lookup(KNewLOrdinal);
+
+ if(!NewL)
+ {
+ RDebug::Printf("library.lookup returns null");
+ }
+ else
+ {
+ LOGSTRING2("library.lookup returns 0x%x", NewL);
+ //CGeneralsPlugin* mydll=(CGeneralsPlugin*)NewL();
+ CWriterPluginInterface* mydll=(CWriterPluginInterface*)NewL();
+ if (mydll != NULL)
+ {
+ //Generals plugin loaded, samplers enabled.
+ CleanupStack::PushL( mydll );
+ InsertPluginInOrderL( mydll, aPluginArray);
+ CleanupStack::Pop(mydll);
+ }
+ else
+ {
+ RDebug::Printf("mydll was null");
+ }
+ }
+
+ ret = aLib.Load(_L("PIProfilerDebugWriter.dll"),_L("c:\\sys\\bin"));
+ if (ret != KErrNone)
+ {
+ RDebug::Printf("RLibrary debugwriter load returns %d", ret);
+ User::LeaveIfError(ret);
+ }
+ TLibraryFunction DbgNewL =aLib.Lookup(KNewLOrdinal);
+ if(!DbgNewL)
+ {
+ RDebug::Printf("library.lookup returns null");
+ }
+ else
+ {
+ LOGSTRING2("library.lookup returns 0x%x", DbgNewL);
+ //CGeneralsPlugin* mydll=(CGeneralsPlugin*)NewL();
+ CWriterPluginInterface* dbgdll=(CWriterPluginInterface*)DbgNewL();
+ if (dbgdll != NULL)
+ {
+ //Generals plugin loaded, samplers enabled.
+ CleanupStack::PushL( dbgdll );
+ InsertPluginInOrderL( dbgdll , aPluginArray);
+ CleanupStack::Pop(dbgdll );
+ }
+ else
+ {
+ RDebug::Printf("dbgdll was NULL");
+ }
+ }
+
+ NotifyProgress();
+
+ //Begin CActive asynchronous loop.
+ CompleteOwnRequest();
+ }
+
// ----------------------------------------------------------------------------
// CWriterPluginLoader::GetDocument
//
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+piprofilertest.mmp
+piprofilertest_allcaps.mmp
+piprofilertest_powermgmt.mmp
+piprofilertest_allcaps_uid.mmp
+name_allcaps_uid.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/name_allcaps_uid.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+SMPSAFE
+
+TARGET name_allcaps_uid.exe
+TARGETTYPE exe
+
+UID 0x100039CE 0x2001E5AD
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE piprofilertest.cpp
+
+CAPABILITY PowerMgmt AllFiles
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/piprofilertest.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+SMPSAFE
+
+TARGET piprofilertest.exe
+TARGETTYPE exe
+UID 0 0xE337E3F7
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE piprofilertest.cpp
+
+CAPABILITY ALL -TCB
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/piprofilertest_allcaps.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+SMPSAFE
+
+TARGET piprofilertest_allcaps.exe
+TARGETTYPE exe
+UID 0 0xE337E3F7
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE piprofilertest.cpp
+
+CAPABILITY ALL
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/piprofilertest_allcaps_uid.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+SMPSAFE
+
+TARGET piprofilertest_allcaps_uid.exe
+TARGETTYPE exe
+//UID 0 0xE337E3F7
+UID 0x10009D8D 0x2001E5B2
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE piprofilertest.cpp
+
+CAPABILITY ALL -TCB
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/group/piprofilertest_powermgmt.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+SMPSAFE
+
+TARGET piprofilertest_powermgmt.exe
+TARGETTYPE exe
+UID 0 0xE337E3F7
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE piprofilertest.cpp
+
+CAPABILITY PowerMgmt AllFiles
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/inc/RTestSampler.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef RTESTSAMPLER_H
+#define RTESTSAMPLER_H
+
+#ifndef __KERNEL_MODE__
+#include <utf.h>
+#endif
+
+#include <piprofiler/PluginSampler.h>
+
+class RtestSampler : public RBusLogicalChannel
+{
+public:
+#ifndef __KERNEL_MODE__
+ inline TInt Open();
+#endif
+};
+_LIT(KName,"PIProfilerGeneralsSampler");
+
+#ifndef __KERNEL_MODE__
+ inline TInt RtestSampler::Open()
+ {
+ return DoCreate(KName,TVersion(1,0,1),KNullUnit,NULL,NULL);
+ }
+#endif
+
+
+#endif //RTESTSAMPLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/inc/piprofilertest.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __PIPROFILERTEST_H__
+#define __PIPROFILERTEST_H__
+
+// Include Files
+
+#include <e32base.h>
+
+class CSamplerPluginInterface;
+
+// Function Prototypes
+
+GLDEF_C TInt E32Main();
+LOCAL_C TInt LoadProfilerLDD();
+LOCAL_C TInt LoadProfilerDLL();
+
+#endif // __PIPROFILERTEST_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/sis/piprofilertest_EKA2.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,30 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+
+;
+; UID is the exe's UID
+;
+#{"piprofilertest EXE"},(0xE337E3F7),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\piprofilertest.exe" -"!:\sys\bin\piprofilertest.exe"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/engine/test/piprofilertest/src/piprofilertest.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// Include Files
+
+#include "piprofilertest.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <e32cons.h> // Console
+#include <e32debug.h>
+#include "rtestsampler.h"
+
+// Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+// Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+// Local Functions
+
+LOCAL_C void MainL()
+ {
+ //
+ // add your program code here, example code below
+ //
+ //console->Write(_L("Hello, world!\n"));
+ RDebug::Printf("hallo welt\n");
+ //LoadProfilerLDD();
+
+ RDebug::Printf("hallo ldd\n");
+ LoadProfilerDLL();
+ RDebug::Printf("hallo2\n");
+ }
+
+LOCAL_C void DoStartL()
+ {
+ // Create active scheduler (to run active objects)
+ CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+ CleanupStack::PushL(scheduler);
+ CActiveScheduler::Install(scheduler);
+
+ MainL();
+
+ // Delete active scheduler
+ CleanupStack::PopAndDestroy(scheduler);
+ }
+
+// Global Functions
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+ // Create output console
+// TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+// KConsFullScreen, KConsFullScreen)));
+// if (createError)
+// {
+// delete cleanup;
+// return createError;
+// }
+
+ // Run application code inside TRAP harness, wait keypress when terminated
+ TRAPD(mainError, DoStartL());
+ if (mainError)
+// console->Printf(KTextFailed, mainError);
+// console->Printf(KTextPressAnyKey);
+// console->Getch();
+
+// delete console;
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
+LOCAL_C TInt LoadProfilerLDD()
+ {
+ RDebug::Printf("LoadProfilerLDD >");
+ TInt err;
+ _LIT(KPluginSamplerName,"PIProfilerGeneralsSampler");
+ err = User::LoadLogicalDevice(KPluginSamplerName);
+ RDebug::Printf("Err2 : %d", err);
+ if(err == KErrAlreadyExists)
+ {
+ err = User::FreeLogicalDevice(KPluginSamplerName);
+ RDebug::Printf("Err2.1 : %d", err);
+ err = User::LoadLogicalDevice(KPluginSamplerName);
+ RDebug::Printf("Err2.2 : %d", err);
+ }
+ RtestSampler aGeneralsSampler;
+ err = aGeneralsSampler.Open();
+ RDebug::Printf("Err3 : %d", err);
+ if(err = KErrNone)
+ {
+ RDebug::Printf("test - Could not open sampler device: %d", err);
+ // Sets test case result and description(Maximum size is KStifMaxResultDes)
+ _LIT( KDescription, "Could not open sampler device" );
+ //aResult.SetResult( KErrNone, KDescription );
+ }
+
+ // Case was executed
+ err = User::FreeLogicalDevice(KPluginSamplerName);
+ RDebug::Printf("Err4 : %d", err);
+
+ RDebug::Printf("LoadProfilerLDD <");
+ return KErrNone;
+ }
+
+LOCAL_C TInt LoadProfilerDLL()
+ {
+ RDebug::Printf("LoadProfilerDLL >");
+ RLibrary lib;
+ TInt err = lib.Load(_L("PIProfilerGenerals.dll"), _L("c:\\sys\\bin"));
+ RDebug::Printf("Err0 : %d", err);
+
+ const TInt KNewLOrdinal = 2;
+ TLibraryFunction NewL =lib.Lookup(KNewLOrdinal);
+ RDebug::Printf("library.lookup returns 0x%x", NewL);
+ CSamplerPluginInterface* mydll;
+ //STF_ASSERT_LEAVES_WITH (KErrPermissionDenied, (mydll=(CSamplerPluginInterface*)NewL()));
+ mydll=(CSamplerPluginInterface*)NewL();
+
+ if( mydll )
+ {
+ // Sets test case result and description(Maximum size is KStifMaxResultDes)
+ _LIT( KDescription, "mydll exists" );
+ //aResult.SetResult( KErrAccessDenied, KDescription );
+
+ }
+ else
+ {
+ // Sets test case result and description(Maximum size is KStifMaxResultDes)
+ _LIT( KDescription, "passed" );
+ //aResult.SetResult( KErrNone, KDescription );
+ }
+
+ // Case was executed
+ RDebug::Printf("LoadProfilerDLL <");
+ return KErrNone;
+ }
+
Binary file perfsrv/piprofiler/group/ReleaseNotes_PIProfiler.txt has changed
--- a/perfsrv/piprofiler/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -26,15 +26,11 @@
#include "../plugins/DebugOutputWriterPlugin/group/bld.inf"
#include "../plugins/DiskWriterPlugin/group/bld.inf"
-#if ( SYMBIAN_VERSION_SUPPORT >= SYMBIAN_3 )
- #include "../plugins/PWRPlugin/group/bld.inf"
+#if (SYMBIAN_VERSION_SUPPORT >= SYMBIAN_3)
+ #include "../plugins/PWRplugin/group/bld.inf"
#endif
PRJ_EXPORTS
-#if ( SYMBIAN_VERSION_SUPPORT >= SYMBIAN_3 )
- ../rom/piprofiler.iby CORE_IBY_EXPORT_PATH(tools,piprofiler.iby)
-#else
- ../rom/piprofiler_s2.iby CORE_IBY_EXPORT_PATH(tools,piprofiler.iby)
-#endif
+../rom/piprofiler.iby CORE_IBY_EXPORT_PATH(tools,piprofiler.iby)
../rom/piprofiler_ldd.iby CORE_IBY_EXPORT_PATH(tools/rom,piprofiler_ldd.iby)
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerConfig.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerConfig.h Tue Oct 26 16:20:32 2010 +0300
@@ -19,10 +19,6 @@
#ifndef PI_PROFILER_CONFIG_H
#define PI_PROFILER_CONFIG_H
-// NCP release process will move the PIProfiler flags as Carbon feature flags
-// where the product responsibles can choose the right settings for PI Profiler
-// compilation.
-
/*** NOTE!!!
* Uncomment the following definition if compiling the Profiler by your own
***/
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesKrn.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesKrn.h Tue Oct 26 16:20:32 2010 +0300
@@ -19,71 +19,77 @@
#ifndef PROFILERGENERICCLASSESKRN_H
#define PROFILERGENERICCLASSESKRN_H
- #include <piprofiler/ProfilerGenericClassesCommon.h>
- #include <piprofiler/ProfilerTraces.h>
+ #include <piprofiler/ProfilerGenericClassesCommon.h>
+ #include <piprofiler/ProfilerTraces.h>
- #include <e32cmn.h>
+ #include <e32cmn.h>
- #define PROFILER_KERNEL_MODE
+ #define PROFILER_KERNEL_MODE
#ifdef PROFILER_KERNEL_MODE
+
+#ifdef __SMP__
+static TSpinLock BufferStateSpinLock = TSpinLock(TSpinLock::EOrderGenericIrqLow3);
+static TSpinLock WriteSpinLock = TSpinLock(TSpinLock::EOrderGenericIrqLow3);
+#endif
+
class DProfilerSampleBuffer;
class DProfilerSampleStream
{
public:
- DProfilerSampleStream();
- ~DProfilerSampleStream();
+ DProfilerSampleStream();
+ ~DProfilerSampleStream();
- void InsertCurrentClient(DThread* aClient);
- void AddSampleBuffer(TBapBuf* aBuffer,TRequestStatus* aStatus);
- void ReleaseIfPending();
+ void InsertCurrentClient(DThread* aClient);
+ void AddSampleBuffer(TBapBuf* aBuffer,TRequestStatus* aStatus);
+ void ReleaseIfPending();
- void AddSamples(DProfilerSampleBuffer& aBuffer, TInt aSamplerId);
- TInt EndSampling(DProfilerSampleBuffer& aBuffer,TInt aSamplerId);
+ void AddSamples(DProfilerSampleBuffer& aBuffer, TInt aSamplerId);
+ TInt EndSampling(DProfilerSampleBuffer& aBuffer,TInt aSamplerId);
- void PerformCopy(TUint8 aSamplerId,TUint8* aSrc,TPtr8* dst,TInt aOffset,TInt aAmount);
+ void PerformCopy(TUint8 aSamplerId,TUint8* aSrc,TPtr8* dst,TInt aOffset,TInt aAmount);
private:
- TBapBuf* iCurrentBuffer;
- TRequestStatus* iPendingRequest;
- DThread* iClient;
- TInt iAddingSamples;
+ TBapBuf* iCurrentBuffer;
+ TRequestStatus* iPendingRequest;
+ DThread* iClient;
+ TInt iAddingSamples;
};
class DProfilerSampleBuffer : public DBase
{
- friend class DProfilerSampleStream;
+ friend class DProfilerSampleStream;
public:
- enum ProfilerBufferStatus
- {
- BufferOk,
- BufferCopyAsap,
- BufferBeingCopied,
- BufferFull,
- BufferDataEnd
- };
+ enum ProfilerBufferStatus
+ {
+ BufferOk,
+ BufferCopyAsap,
+ BufferBeingCopied,
+ BufferFull,
+ BufferDataEnd
+ };
- DProfilerSampleBuffer(TUint8* aBuffer, TUint8* aDblBuffer, TUint32 aSize);
- ~DProfilerSampleBuffer();
- TInt AddSample(TUint8* aSample, TUint32 aLength);
- TUint32 GetBufferStatus();
- void ClearBuffer();
- void EndSampling();
- void DataCopied();
+ DProfilerSampleBuffer(TUint8* aBuffer, TUint8* aDblBuffer, TUint32 aSize);
+ ~DProfilerSampleBuffer();
+ TInt AddSample(TUint8* aSample, TUint32 aLength);
+ TUint32 GetBufferStatus();
+ void ClearBuffer();
+ void EndSampling();
+ void DataCopied();
- TUint32 iBufferStatus;
private:
- TUint32 iBytesWritten;
- TUint32 iDblBytesWritten;
- TUint32 iDblBytesRead;
+ TUint32 iBufferStatus;
+ TUint32 iBytesWritten;
+ TUint32 iDblBytesWritten;
+ TUint32 iDblBytesRead;
- TUint32 iBufferDataSize;
- TUint32 iBufferRealSize;
+ TUint32 iBufferDataSize;
+ TUint32 iBufferRealSize;
- TProfilerSampleBufStruct* iDblBufStruct;
- TProfilerSampleBufStruct* iBufStruct;
+ TProfilerSampleBufStruct* iDblBufStruct;
+ TProfilerSampleBufStruct* iBufStruct;
};
#endif
@@ -91,44 +97,44 @@
/*
- *
- * Abstract class CProfilerSamplerBase definition
- *
+ *
+ * Abstract class CProfilerSamplerBase definition
+ *
*/
#ifdef PROFILER_KERNEL_MODE
class DProfilerSamplerBase : public DBase
{
public:
- DProfilerSamplerBase();
- virtual ~DProfilerSamplerBase();
+ DProfilerSamplerBase();
+ virtual ~DProfilerSamplerBase();
- virtual TInt Initialise() = 0;
- virtual void Sample() = 0;
- virtual TBool PostSampleNeeded() = 0;
- virtual TInt PostSample() = 0;
- virtual TInt EndSampling() = 0;
+ virtual TInt Initialise() = 0;
+ virtual void Sample(TAny* aPtr) = 0;
+ virtual TBool PostSampleNeeded() = 0;
+ virtual TInt PostSample() = 0;
+ virtual TInt EndSampling() = 0;
- virtual TInt Reset(DProfilerSampleStream* aStream = 0, TUint32 aSyncOffset = 0) = 0;
+ virtual TInt Reset(DProfilerSampleStream* aStream = 0, TUint32 aSyncOffset = 0) = 0;
- virtual void SetEnabledFlag(TBool aFlag) = 0;
- virtual TBool GetEnabledFlag() = 0;
- virtual void SetOutputCombination(TInt aSettings) = 0;
- virtual void SetSamplingPeriod(TInt aSettings) = 0;
- virtual void SetAdditionalSettings(TInt aSettings) = 0;
- virtual void SetAdditionalSettings2(TInt aSettings) = 0;
- virtual void SetAdditionalSettings3(TInt aSettings) = 0;
- virtual void SetAdditionalSettings4(TInt aSettings) = 0;
+ virtual void SetEnabledFlag(TBool aFlag) = 0;
+ virtual TBool GetEnabledFlag() = 0;
+ virtual void SetOutputCombination(TInt aSettings) = 0;
+ virtual void SetSamplingPeriod(TInt aSettings) = 0;
+ virtual void SetAdditionalSettings(TInt aSettings) = 0;
+ virtual void SetAdditionalSettings2(TInt aSettings) = 0;
+ virtual void SetAdditionalSettings3(TInt aSettings) = 0;
+ virtual void SetAdditionalSettings4(TInt aSettings) = 0;
- TInt iSamplerId;
- TInt iOutputCombination;
- TBool iEnabled;
+ TInt iSamplerId;
+ TInt iOutputCombination;
+ TBool iEnabled;
};
/*
- *
- * Template abstract class CProfilerGenericSampler definition
- *
+ *
+ * Template abstract class CProfilerGenericSampler definition
+ *
*/
// size parameter given defines the explicit buffer size in bytes for this sampler
@@ -136,89 +142,90 @@
class DProfilerGenericSampler : public DProfilerSamplerBase
{
public:
- DProfilerGenericSampler(TInt aSamplerId);
- virtual ~DProfilerGenericSampler();
+ DProfilerGenericSampler(TInt aSamplerId);
+ virtual ~DProfilerGenericSampler();
- TInt Initialise();
- virtual void Sample() = 0;
- TBool PostSampleNeeded();
- TInt PostSample();
- TInt EndSampling();
- virtual TInt Reset(DProfilerSampleStream* aStream = 0, TUint32 aSyncOffset = 0);
+ TInt Initialise();
+ virtual void Sample(TAny* aPtr) = 0;
+ TBool PostSampleNeeded();
+ TInt PostSample();
+ TInt EndSampling();
+ virtual TInt Reset(DProfilerSampleStream* aStream = 0, TUint32 aSyncOffset = 0);
- void SetEnabledFlag(TBool aFlag);
- TBool GetEnabledFlag();
- void SetOutputCombination(TInt aComb);
- void SetSamplingPeriod(TInt aSettings);
- void SetAdditionalSettings(TInt aSettings);
- void SetAdditionalSettings2(TInt aSettings);
- void SetAdditionalSettings3(TInt aSettings);
- void SetAdditionalSettings4(TInt aSettings);
+ void SetEnabledFlag(TBool aFlag);
+ TBool GetEnabledFlag();
+ void SetOutputCombination(TInt aComb);
+ void SetSamplingPeriod(TInt aSettings);
+ void SetAdditionalSettings(TInt aSettings);
+ void SetAdditionalSettings2(TInt aSettings);
+ void SetAdditionalSettings3(TInt aSettings);
+ void SetAdditionalSettings4(TInt aSettings);
- DProfilerSampleBuffer* iSampleBuffer;
- DProfilerSampleStream* iStream;
+ DProfilerSampleBuffer* iSampleBuffer;
+ DProfilerSampleStream* iStream;
- // for right alignment
- TUint8 iBuffer[BufferSize+4];
- TUint8 iDblBuffer[BufferSize+4];
-
- TInt iSamplingPeriod;
- TInt iAdditionalSettings;
- TInt iAdditionalSettings2;
- TInt iAdditionalSettings3;
- TInt iAdditionalSettings4;
+ // for right alignment
+ TUint8 iBuffer[BufferSize+4];
+ TUint8 iDblBuffer[BufferSize+4];
+
+ TInt iSamplingPeriod;
+ TInt iAdditionalSettings;
+ TInt iAdditionalSettings2;
+ TInt iAdditionalSettings3;
+ TInt iAdditionalSettings4;
};
/*
- *
- * Template abstract class CProfilerGenericSampler implementation
+ *
+ * Template abstract class CProfilerGenericSampler implementation
*
*/
template <int BufferSize>
DProfilerGenericSampler<BufferSize>::DProfilerGenericSampler(TInt aSamplerId)
{
- iSamplerId = aSamplerId;
- iEnabled = false;
- iSampleBuffer = 0;
- iAdditionalSettings = 0;
- iAdditionalSettings2 = 0;
+ iSamplerId = aSamplerId;
+ iEnabled = false;
+ iSampleBuffer = 0;
+ iAdditionalSettings = 0;
+ iAdditionalSettings2 = 0;
iAdditionalSettings3 = 0;
iAdditionalSettings4 = 0;
- iStream = 0;
- Initialise();
+ iStream = 0;
+ Initialise();
}
template <int BufferSize>
DProfilerGenericSampler<BufferSize>::~DProfilerGenericSampler()
{
- LOGSTRING2("CProfilerGenericSampler<%d>::CProfilerGenericSampler",BufferSize);
-
- if(iSampleBuffer != 0)
- delete iSampleBuffer;
-
+ LOGSTRING2("DProfilerGenericSampler<%d>::CProfilerGenericSampler",BufferSize);
+
+ if(iSampleBuffer != 0)
+ {
+ delete iSampleBuffer;
+ }
}
template <int BufferSize>
TInt DProfilerGenericSampler<BufferSize>::Initialise()
{
- LOGSTRING2("CProfilerGenericSampler<%d>::Initialise - chunk option",BufferSize);
+ LOGSTRING2("DProfilerGenericSampler<%d>::Initialise - chunk option",BufferSize);
- // stream is not used in chunk mode
- iStream = 0;
+ // stream is not used in chunk mode
+ iStream = 0;
- // create the sample buffer object with the buffers
- if(iSampleBuffer == 0)
- {
- iSampleBuffer = new DProfilerSampleBuffer(iBuffer,iDblBuffer,BufferSize);
+ // create the sample buffer object with the buffers
+ if(iSampleBuffer == 0)
+ {
+ iSampleBuffer = new DProfilerSampleBuffer(iBuffer,iDblBuffer,BufferSize);
}
- else
- {
- LOGSTRING2("CProfilerGenericSampler<%d>::Initialise - ERROR 1",BufferSize);
+ else
+ {
+ LOGSTRING2("DProfilerGenericSampler<%d>::Initialise - ERROR 1",BufferSize);
}
- return KErrNone;
+ return KErrNone;
}
@@ -226,73 +233,75 @@
template <int BufferSize>
TInt DProfilerGenericSampler<BufferSize>::Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset)
{
- LOGSTRING4("CProfilerGenericSampler<%d>::Reset %d, sync offset %d",BufferSize,aStream,aSyncOffset);
- // reset the sample buffer and resolve the chunk again
+ LOGSTRING4("DProfilerGenericSampler<%d>::Reset %d, sync offset %d",BufferSize,aStream,aSyncOffset);
+ // reset the sample buffer and resolve the chunk again
- // CURRENT VERSION SUPPORTS ONLY STREAM MODE!
- LOGSTRING2("CProfilerGenericSampler<%d>::Reset - stream option",BufferSize);
+ // CURRENT VERSION SUPPORTS ONLY STREAM MODE!
+ LOGSTRING2("DProfilerGenericSampler<%d>::Reset - stream option",BufferSize);
- // initialise the sampler with the stream option
- iStream = aStream;
+ // initialise the sampler with the stream option
+ iStream = aStream;
- // clear the sample buffer
- if(iSampleBuffer != 0)
- {
- iSampleBuffer->ClearBuffer();
+ // clear the sample buffer
+ if(iSampleBuffer != 0)
+ {
+ iSampleBuffer->ClearBuffer();
}
- else
- {
- LOGSTRING2("CProfilerGenericSampler<%d>::Initialise - ERROR no buffer",BufferSize);
+ else
+ {
+ LOGSTRING2("DProfilerGenericSampler<%d>::Initialise - ERROR no buffer",BufferSize);
}
- return KErrNone;
+ return KErrNone;
}
template <int BufferSize>
TBool DProfilerGenericSampler<BufferSize>::PostSampleNeeded()
{
- LOGSTRING4("CProfilerGenericSampler<%d>::PostSampleNeeded - ID %d, state %d",iSamplerId,BufferSize,iSampleBuffer->GetBufferStatus());
+ LOGSTRING4("DProfilerGenericSampler<%d>::PostSampleNeeded - ID %d, state %d",BufferSize ,iSamplerId ,iSampleBuffer->GetBufferStatus());
- TUint32 status = iSampleBuffer->iBufferStatus;
+ TUint32 status(iSampleBuffer->GetBufferStatus());
- if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull)
- {
- return true;
+ if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull)
+ {
+ return true;
}
-
- return false;
+
+ return false;
}
template <int BufferSize>
TInt DProfilerGenericSampler<BufferSize>::PostSample()
{
- LOGSTRING4("CProfilerGenericSampler<%d>::PostSample - ID %d, state %d",iSamplerId,BufferSize,iSampleBuffer->GetBufferStatus());
+ LOGSTRING4("DProfilerGenericSampler<%d>::PostSample - ID %d, state %d",BufferSize,iSamplerId,iSampleBuffer->GetBufferStatus());
- TUint32 status = iSampleBuffer->iBufferStatus;
+ TUint32 status(iSampleBuffer->GetBufferStatus());
- if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull)
- {
+ if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull)
+ {
// write data to the stream
- iStream->AddSamples(*iSampleBuffer,iSamplerId);
- }
-
- return KErrNone;
+ iStream->AddSamples(*iSampleBuffer,iSamplerId);
+ }
+
+ return KErrNone;
}
template <int BufferSize>
TInt DProfilerGenericSampler<BufferSize>::EndSampling()
{
- LOGSTRING3("CProfilerGenericSampler<%d>::EndSampling, ID %d",BufferSize,iSamplerId);
+ LOGSTRING3("DProfilerGenericSampler<%d>::EndSampling, ID %d",BufferSize,iSamplerId);
// only if write to stream option is selected
if(iStream->EndSampling(*iSampleBuffer,iSamplerId) == 0)
{
+ LOGSTRING3("DProfilerGenericSampler<%d>::EndSampling, ID %d - ok",BufferSize,iSamplerId);
return KErrNone;
}
else
{
+ LOGSTRING3("DProfilerGenericSampler<%d>::EndSampling, ID %d - still data to copy",BufferSize,iSamplerId);
// there is still data to copy
return KErrNotReady;
}
@@ -301,117 +310,117 @@
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetEnabledFlag(TBool aFlag)
{
- LOGSTRING2("CProfilerGenericSampler<%d>::SetEnabledFlag",BufferSize);
- iEnabled = aFlag;
+ LOGSTRING2("CProfilerGenericSampler<%d>::SetEnabledFlag",BufferSize);
+ iEnabled = aFlag;
}
template <int BufferSize>
TBool DProfilerGenericSampler<BufferSize>::GetEnabledFlag()
{
- LOGSTRING2("CProfilerGenericSampler<%d>::GetEnabledFlag",BufferSize);
- return iEnabled;
+ LOGSTRING2("CProfilerGenericSampler<%d>::GetEnabledFlag",BufferSize);
+ return iEnabled;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetOutputCombination(TInt aComb)
{
- LOGSTRING2("CProfilerGenericSampler<%d>::SetOutputCombination",BufferSize);
- iOutputCombination = aComb;
+ LOGSTRING2("CProfilerGenericSampler<%d>::SetOutputCombination",BufferSize);
+ iOutputCombination = aComb;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetAdditionalSettings(TInt aSettings)
{
- LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings to 0x%x",BufferSize,aSettings);
- iAdditionalSettings = aSettings;
+ LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings to 0x%x",BufferSize,aSettings);
+ iAdditionalSettings = aSettings;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetAdditionalSettings2(TInt aSettings)
{
- LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings2 to 0x%x",BufferSize,aSettings);
- iAdditionalSettings2 = aSettings;
+ LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings2 to 0x%x",BufferSize,aSettings);
+ iAdditionalSettings2 = aSettings;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetAdditionalSettings3(TInt aSettings)
{
- LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings3 to 0x%x",BufferSize,aSettings);
- iAdditionalSettings3 = aSettings;
+ LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings3 to 0x%x",BufferSize,aSettings);
+ iAdditionalSettings3 = aSettings;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetAdditionalSettings4(TInt aSettings)
{
- LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings4 to 0x%x",BufferSize,aSettings);
- iAdditionalSettings4 = aSettings;
+ LOGSTRING3("CProfilerGenericSampler<%d>::SetAdditionalSettings4 to 0x%x",BufferSize,aSettings);
+ iAdditionalSettings4 = aSettings;
}
template <int BufferSize>
void DProfilerGenericSampler<BufferSize>::SetSamplingPeriod(TInt aSettings)
{
- LOGSTRING3("CProfilerGenericSampler<%d>::SetSamplingPeriod to 0x%x",BufferSize,aSettings);
- iSamplingPeriod = aSettings;
+ LOGSTRING3("CProfilerGenericSampler<%d>::SetSamplingPeriod to 0x%x",BufferSize,aSettings);
+ iSamplingPeriod = aSettings;
}
/*
- *
- * Just a test class that is derived from CProfilerGenericSampler
- *
+ *
+ * Just a test class that is derived from CProfilerGenericSampler
+ *
*/
template <int BufferSize>
class DProfilerExampleSampler : public DProfilerGenericSampler<BufferSize>
{
public:
- TUint32 iSampleNumber;
+ TUint32 iSampleNumber;
- DProfilerExampleSampler(TInt aSamplerId);
- ~DProfilerExampleSampler();
+ DProfilerExampleSampler(TInt aSamplerId);
+ ~DProfilerExampleSampler();
- void Sample();
- void Sample(TInt aCount, TInt aLastPc);
+ void Sample();
+ void Sample(TInt aCount, TInt aLastPc);
};
/*
- *
- * Just a test class that is derived from CProfilerGenericSampler
- *
+ *
+ * Just a test class that is derived from CProfilerGenericSampler
+ *
*/
template <int BufferSize>
DProfilerExampleSampler<BufferSize>::DProfilerExampleSampler(TInt aSamplerId) :
- DProfilerGenericSampler<BufferSize>(aSamplerId)
+ DProfilerGenericSampler<BufferSize>(aSamplerId)
{
iSampleNumber = 0;
- LOGSTRING2("CProfilerExampleSampler<%d>::CProfilerExampleSampler",BufferSize);
+ LOGSTRING2("CProfilerExampleSampler<%d>::CProfilerExampleSampler",BufferSize);
}
template <int BufferSize>
void DProfilerExampleSampler<BufferSize>::Sample()
{
- LOGSTRING2("CProfilerExampleSampler<%d>::Sample",BufferSize);
- TBuf8<20>* testiBuf = new TBuf8<20>;
+ LOGSTRING2("CProfilerExampleSampler<%d>::Sample",BufferSize);
+ TBuf8<20>* testiBuf = new TBuf8<20>;
- testiBuf->AppendNum((TInt)iSampleNumber);
- iSampleNumber++;
+ testiBuf->AppendNum((TInt)iSampleNumber);
+ iSampleNumber++;
- this->iSampleBuffer->AddSample((TUint8*)testiBuf->Ptr(),testiBuf->Length());
- delete testiBuf;
- return;
+ this->iSampleBuffer->AddSample((TUint8*)testiBuf->Ptr(),testiBuf->Length());
+ delete testiBuf;
+ return;
}
template <int BufferSize>
void DProfilerExampleSampler<BufferSize>::Sample(TInt aCount, TInt aLastPc)
{
- return;
+ return;
}
template <int BufferSize>
DProfilerExampleSampler<BufferSize>::~DProfilerExampleSampler()
{
- LOGSTRING2("CProfilerExampleSampler<%d>::~CProfilerExampleSampler",BufferSize);
+ LOGSTRING2("CProfilerExampleSampler<%d>::~CProfilerExampleSampler",BufferSize);
}
#include <piprofiler/ProfilerGenericClassesKrn.inl>
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesKrn.inl Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesKrn.inl Tue Oct 26 16:20:32 2010 +0300
@@ -77,7 +77,9 @@
inline TInt DProfilerSampleBuffer::AddSample(TUint8* aSample, TUint32 aLength)
{
TUint32 bytesTotal;
-
+#ifdef __SMP__
+ TInt intState(0);
+#endif
// check whether the buffer status is
switch (iBufferStatus)
{
@@ -87,7 +89,13 @@
if(bytesTotal < iBufferDataSize)
{
+#ifdef __SMP__
+ __SPIN_LOCK_IRQ(WriteSpinLock);
+#endif
memcpy((&(iBufStruct->iDataStart))+iBytesWritten,aSample,aLength);
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQ(WriteSpinLock);
+#endif
iBytesWritten+=aLength;
return 0;
}
@@ -96,16 +104,27 @@
// the sample does not fit to the buffer
// first copy as much data as we can fit to the first buffer
- TUint32 fitsToBuffer = iBufferDataSize-iBytesWritten;
- TUint32 remaining = aLength-fitsToBuffer;
-
+ TUint32 fitsToBuffer(iBufferDataSize-iBytesWritten);
+ TUint32 remaining(aLength-fitsToBuffer);
+ LOGSTRING2("DProfilerSampleBuffer::AddSample sample does not fit to buffer, cpu %d", NKern::CurrentCpu());
+#ifdef __SMP__
+ __SPIN_LOCK_IRQ(WriteSpinLock);
+#endif
memcpy((&(iBufStruct->iDataStart))+iBytesWritten,aSample,fitsToBuffer);
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQ(WriteSpinLock);
+#endif
iBytesWritten = iBufferDataSize;
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
// ->switch to the double buffer
iBufferStatus = DProfilerSampleBuffer::BufferCopyAsap;
-
- TProfilerSampleBufStruct* tmpPtr = iBufStruct;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
+ TProfilerSampleBufStruct* tmpPtr(iBufStruct);
iBufStruct = iDblBufStruct;
iDblBufStruct = tmpPtr;
@@ -123,8 +142,14 @@
// there should be room - in case the single sample
// is smaller than the whole buffer! so we don't
// bother to check
-
+ //Kern::Printf("DProfilerSampleBuffer::AddSample else 2");
+#ifdef __SMP__
+ __SPIN_LOCK_IRQ(WriteSpinLock);
+#endif
memcpy((&(iBufStruct->iDataStart)),aSample,remaining);
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQ(WriteSpinLock);
+#endif
iBytesWritten = remaining;
return 0;
}
@@ -139,7 +164,14 @@
if(bytesTotal < iBufferDataSize)
{
+ LOGSTRING2("DProfilerSampleBuffer::BufferCopyAsap, cpu %d", NKern::CurrentCpu());
+#ifdef __SMP__
+ __SPIN_LOCK_IRQ(WriteSpinLock);
+#endif
memcpy((&(iBufStruct->iDataStart))+iBytesWritten,aSample,aLength);
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQ(WriteSpinLock);
+#endif
iBytesWritten+=aLength;
return 0;
}
@@ -148,8 +180,14 @@
// the double buffer is now also full - there is no
// place to put the data -> we have to waste it!
// this is an indication of a too small buffer size
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
iBufferStatus = DProfilerSampleBuffer::BufferFull;
- LOGSTRING("DProfilerSampleBuffer::AddSample - double buffer full1!!");
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
+ Kern::Printf("DProfilerSampleBuffer::AddSample - double buffer full1!! cpu %d", NKern::CurrentCpu());
return -1;
}
@@ -160,7 +198,14 @@
if(bytesTotal < iBufferDataSize)
{
+ LOGSTRING2("DProfilerSampleBuffer::BufferBeingCopied iBufferDataSize, cpu %d", NKern::CurrentCpu());
+#ifdef __SMP__
+ __SPIN_LOCK_IRQ(WriteSpinLock);
+#endif
memcpy((&(iBufStruct->iDataStart))+iBytesWritten,aSample,aLength);
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQ(WriteSpinLock);
+#endif
iBytesWritten+=aLength;
return 0;
}
@@ -169,8 +214,7 @@
// the double buffer is now also full - there is no
// place to put the data -> we have to waste it!
// this is an indication of a too small buffer size
- LOGSTRING("DProfilerSampleBuffer::AddSample - double buffer full2!!");
-
+ Kern::Printf("DProfilerSampleBuffer::AddSample - double buffer full2!! cpu %d", NKern::CurrentCpu());
// don't change the state to CProfilerSampleBuffer::BufferFull, since it is
// already being copied
return -1;
@@ -179,17 +223,20 @@
case DProfilerSampleBuffer::BufferFull:
// the buffer is still full, there is noting we can do
// about it -> return
- LOGSTRING("DProfilerSampleBuffer::AddSample - double buffer full3!!");
+ Kern::Printf("DProfilerSampleBuffer::AddSample - double buffer full3!! cpu %d", NKern::CurrentCpu());
return -1;
default:
- LOGSTRING("DProfilerSampleBuffer::AddSample - wrong switch!!");
+ Kern::Printf("DProfilerSampleBuffer::AddSample - wrong switch!!");
return -1;
}
}
inline void DProfilerSampleBuffer::EndSampling()
{
+#ifdef __SMP__
+ TInt intState(0);
+#endif
LOGSTRING("DProfilerSampleBuffer::EndSampling");
// this will switch to the dbl buffer even though
// the buffer is not full, so that data can be copied
@@ -203,9 +250,14 @@
{
// ->switch to the double buffer
LOGSTRING("DProfilerSampleBuffer::EndSampling - switching to double buffer");
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
iBufferStatus = DProfilerSampleBuffer::BufferCopyAsap;
-
- TProfilerSampleBufStruct* tmpPtr = iBufStruct;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
+ TProfilerSampleBufStruct* tmpPtr(iBufStruct);
iBufStruct = iDblBufStruct;
iDblBufStruct = tmpPtr;
@@ -225,12 +277,14 @@
inline void DProfilerSampleBuffer::ClearBuffer()
{
LOGSTRING2("CProfilerSampleBuffer::ClearBuffer - %d",iBufferDataSize);
-
+#ifdef __SMP__
+ TInt intState(0);
+#endif
// the buffers are of same size
- TUint8* ptr1 = (TUint8*)&(iBufStruct->iDataStart);
- TUint8* ptr2 = (TUint8*)&(iDblBufStruct->iDataStart);
+ TUint8* ptr1((TUint8*)&(iBufStruct->iDataStart));
+ TUint8* ptr2((TUint8*)&(iDblBufStruct->iDataStart));
- for(TUint32 i=0;i<iBufferDataSize;i++)
+ for(TUint32 i(0);i<iBufferDataSize;i++)
{
ptr1[i] = 0;
ptr2[i] = 0;
@@ -244,15 +298,29 @@
iBytesWritten = 0;
iDblBytesWritten = 0;
iDblBytesRead = 0;
-
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
iBufferStatus = DProfilerSampleBuffer::BufferOk;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
}
inline void DProfilerSampleBuffer::DataCopied()
{
+#ifdef __SMP__
+ TInt intState(0);
+#endif
iDblBytesRead = 0;
iDblBytesWritten = 0;
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
iBufferStatus = DProfilerSampleBuffer::BufferOk;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
}
/*
@@ -287,7 +355,7 @@
{
if(iCurrentBuffer != 0 || iPendingRequest != 0)
{
- LOGSTRING("DProfilerSampleStream::AddSampleBuffer - ERROR 1");
+ Kern::Printf("DProfilerSampleStream::AddSampleBuffer - ERROR 1");
return;
}
@@ -319,7 +387,7 @@
inline void DProfilerSampleStream::AddSamples(DProfilerSampleBuffer& aBuffer, TInt aSamplerId)
{
- LOGSTRING3("DProfilerSampleStream::AddSamples - entry ID: %d, currentbuffer: 0x%x", aSamplerId,iCurrentBuffer);
+ LOGSTRING4("DProfilerSampleStream::AddSamples - entry ID: %d, currentbuffer: 0x%x, cpu %d", aSamplerId,iCurrentBuffer, NKern::CurrentCpu());
if(iCurrentBuffer != 0)
{
// the following will perform simple mutual exclusion
@@ -327,7 +395,7 @@
if(iAddingSamples > 1)
{
// there is someone else adding samples to the buffer
- LOGSTRING("DProfilerSampleStream::AddSamples - mutex in use");
+ Kern::Printf("DProfilerSampleStream::AddSamples - mutex in use");
iAddingSamples--;
return;
}
@@ -351,14 +419,14 @@
realBuf.iDataSize);
// get the address of the source buffer data
- TUint8* src = (TUint8*)&(aBuffer.iDblBufStruct->iDataStart);
+ TUint8* src((TUint8*)&(aBuffer.iDblBufStruct->iDataStart));
src += aBuffer.iDblBytesRead;
// the amount of data to copy is the 4 header bytes +
// the remaining data in the buffer
- TInt amount = aBuffer.iDblBytesWritten-aBuffer.iDblBytesRead;
+ TInt amount(aBuffer.iDblBytesWritten-aBuffer.iDblBytesRead);
- TUint8* dst = realBuf.iBuffer;
+ TUint8* dst(realBuf.iBuffer);
LOGSTRING4("DProfilerSampleStream::AddSamples - s:0x%x d:0x%x a:%d",src,dst,amount);
@@ -395,7 +463,7 @@
// there is data in the client buffer
dst += realBuf.iDataSize;
- TInt remainingSpace = realBuf.iBufferSize-realBuf.iDataSize;
+ TInt remainingSpace(realBuf.iBufferSize-realBuf.iDataSize);
if( remainingSpace >= (amount+4) )
{
@@ -458,7 +526,9 @@
inline TInt DProfilerSampleStream::EndSampling(DProfilerSampleBuffer& aBuffer,TInt aSamplerId)
{
LOGSTRING2("DProfilerSampleStream::EndSampling, sampler ID: %d",aSamplerId);
-
+#ifdef __SMP__
+ TInt intState(0);
+#endif
// switch the buffer to double buffer
// even though it would not be full yet
// the switch is done only once / end sampling procedure
@@ -488,7 +558,13 @@
// now we have to change the status of the buffer to BufferDataEnd, so
// we know that the particular buffer has no more data to copy
LOGSTRING("DProfilerSampleStream::EndSampling - switch to BufferDataEnd");
+#ifdef __SMP__
+ intState = __SPIN_LOCK_IRQSAVE(BufferStateSpinLock);
+#endif
aBuffer.iBufferStatus = DProfilerSampleBuffer::BufferDataEnd;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(BufferStateSpinLock, intState);
+#endif
}
}
@@ -512,7 +588,11 @@
LOGSTRING2("DProfilerSampleStream::PerformCopy - start header copy HDR = 0x%x",header);
// write the header
- Kern::ThreadDesWrite(iClient,(TAny*)aDst,ptr,aOffset,KChunkShiftBy0);
+ TInt err(Kern::ThreadDesWrite(iClient,(TAny*)aDst,ptr,aOffset,KChunkShiftBy0));
+ if (err != KErrNone)
+ {
+ Kern::Printf(("DProfilerSampleStream::PerformCopy() - thread des write error, %d"), err);
+ }
LOGSTRING2("DProfilerSampleStream::PerformCopy - copied header %d bytes",ptr.Size());
aOffset+=4;
@@ -522,8 +602,11 @@
ptr.Set(aSrc,aAmount,aAmount);
ptr.SetLength(aAmount);
- Kern::ThreadDesWrite(iClient,(TAny*)aDst,ptr,aOffset,KChunkShiftBy0);
-
+ err = Kern::ThreadDesWrite(iClient,(TAny*)aDst,ptr,aOffset,KChunkShiftBy0);
+ if (err != KErrNone)
+ {
+ Kern::Printf(("DProfilerSampleStream::PerformCopy() - thread des write error, %d"), err);
+ }
LOGSTRING2("DProfilerSampleStream::PerformCopy - copied data %d bytes",ptr.Size());
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesUsr.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesUsr.h Tue Oct 26 16:20:32 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesUsr.inl Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerGenericClassesUsr.inl Tue Oct 26 16:20:32 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -56,7 +56,7 @@
LOGTEXT(_L("CProfilerBufferHandler::ConstructL - entry"));
iBufferInProcess = 0;
iEndOfStreamDetected = false;
-
+
iFinished = 0;
// add the buffer handler to the active scheduler
CActiveScheduler::Add(this);
@@ -93,14 +93,14 @@
inline void CProfilerBufferHandler::HandleEndOfStream()
{
- LOGTEXT(_L("CProfilerBufferHandler::RunError - entry"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - entry"));
// Cancel has been called, the stream should be about to end now,
// we will wait for the rest of the buffers to be filled synchronously
// the end of the stream will be indicated through an empty buffer
// at first, complete the ongoing request
if(iStatus == KRequestPending && iBufferInProcess != 0)
{
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - case 1"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - case 1"));
// wait for the buffer to be filled synchronously
User::WaitForRequest(iStatus);
@@ -122,7 +122,7 @@
}
else if (iBufferInProcess != 0)
{
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - case 2"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - case 2"));
// add the buffer into filled, i.e. ready-to-write buffers
iObserver.AddToFilledBuffers(iBufferInProcess);
@@ -131,13 +131,15 @@
if(iBufferInProcess->iDataSize == 0)
{
// a buffer with size 0 was received
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - case 2.1"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - case 2.1"));
iEndOfStreamDetected = true;
}
// there will be no more asynchronous requests
- iBufferInProcess = 0;
+ iBufferInProcess = 0;
+ //delete iBufferInProcess;
+ //iBufferInProcess = NULL;
+ //iObserver.AddToFreeBuffers(iBufferInProcess);
}
-
// then, continue until end of stream has been reached
while(iEndOfStreamDetected == false)
{
@@ -146,10 +148,10 @@
if(iStatus == KRequestPending)
{
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - ERROR 1"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - ERROR 1"));
}
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - case 3"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - case 3"));
TBapBuf* nextFree = iObserver.GetNextFreeBuffer();
iSampler.FillThisStreamBuffer(nextFree,iStatus);
@@ -163,18 +165,17 @@
// check if end-of-data message (i.e. data size is 0 sized) received
if(nextFree->iDataSize == 0)
{
- LOGTEXT(_L("CProfilerBufferHandler::DoCancel - case 3.1"));
+ LOGTEXT(_L("CProfilerBufferHandler::HandleEndOfStream - case 3.1"));
// a buffer with size 0 was received
iEndOfStreamDetected = true;
nextFree = 0;
}
- }
+ }
}
inline void CProfilerBufferHandler::RunL()
{
LOGTEXT(_L("CProfilerBufferHandler::RunL - entry"));
-
// is called by the active scheduler
// when a buffer has been received
@@ -184,26 +185,31 @@
LOGTEXT(_L("CProfilerBufferHandler::RunL - buffer received"));
TBapBuf* nextFree = iObserver.GetNextFreeBuffer();
-
- LOGSTRING5("CProfilerBufferHandler::RunL - 0x%x -> b:0x%x s:%d d:%d",
+ if(nextFree == 0)
+ {
+ LOGTEXT(_L("CProfilerSampleStream::RunL - GetNextFreeBuffer failed!!"));
+ }
+ else{
+ LOGSTRING5("CProfilerBufferHandler::RunL - 0x%x -> b:0x%x s:%d d:%d",
nextFree,
nextFree->iBuffer,
nextFree->iBufferSize,
nextFree->iDataSize);
- iSampler.FillThisStreamBuffer(nextFree,iStatus);
-
- LOGTEXT(_L("CProfilerBufferHandler::RunL - issued new sample command"));
-
- // add the received buffer to the list of filled buffers
- iObserver.AddToFilledBuffers(iBufferInProcess);
- iObserver.NotifyWriter();
-
- // the empty buffer is now the one being processed
- iBufferInProcess = nextFree;
-
- LOGTEXT(_L("CProfilerBufferHandler::RunL - SetActive"));
- SetActive();
+ iSampler.FillThisStreamBuffer(nextFree,iStatus);
+ SetActive();
+
+ LOGTEXT(_L("CProfilerBufferHandler::RunL - issued new sample command"));
+
+ // add the received buffer to the list of filled buffers
+ iObserver.AddToFilledBuffers(iBufferInProcess);
+ iObserver.NotifyWriter();
+
+ // the empty buffer is now the one being processed
+ iBufferInProcess = nextFree;
+ }
+// LOGTEXT(_L("CProfilerBufferHandler::RunL - SetActive"));
+// SetActive();
}
else
{
@@ -252,7 +258,7 @@
{
LOGTEXT(_L("CProfilerSampleStream::CProfilerSampleStream - entry"));
- iFilledBuffers = 0;
+ iFilledBuffers = 0;
iFreeBuffers = 0;
iFinished = 0;
@@ -265,6 +271,10 @@
// empty all buffers
EmptyBuffers();
+ User::Free(iFilledBuffers);
+ User::Free(iFreeBuffers);
+ //delete iFilledBuffers;
+ //delete iFreeBuffers;
LOGTEXT(_L("CProfilerSampleStream::~CProfilerSampleStream - exit"));
}
@@ -308,17 +318,34 @@
{
// alloc new buffer
TBapBuf* newBuf = (TBapBuf*)User::Alloc(sizeof(TBapBuf));
- newBuf->iBuffer = (TUint8*)User::Alloc(iBufferSize);
-
- // initialize the new buffer
- newBuf->iBufferSize = iBufferSize;
- newBuf->iDataSize = 0;
- newBuf->iNext = 0;
- newBuf->iDes = new TPtr8((TUint8*)newBuf,sizeof(TBapBuf));
- newBuf->iDes->SetLength(sizeof(TBapBuf));
- newBuf->iBufDes = new TPtr8((TUint8*)newBuf->iBuffer,iBufferSize);
- newBuf->iBufDes->SetLength(iBufferSize);
- AddToFreeBuffers(newBuf);
+ if(newBuf != 0)
+ {
+ newBuf->iBuffer = (TUint8*)User::Alloc(iBufferSize);
+ if(newBuf->iBuffer != 0)
+ {
+ // initialize the new buffer
+ newBuf->iBufferSize = iBufferSize;
+ newBuf->iDataSize = 0;
+ newBuf->iNext = 0;
+ newBuf->iDes = new TPtr8((TUint8*)newBuf,sizeof(TBapBuf));
+ newBuf->iDes->SetLength(sizeof(TBapBuf));
+ newBuf->iBufDes = new TPtr8((TUint8*)newBuf->iBuffer,iBufferSize);
+ newBuf->iBufDes->SetLength(iBufferSize);
+ LOGSTRING3("CProfilerSampleStream::InitialiseBuffers - newBuf 0x%x newBuf->iNext 0x%x",newBuf, newBuf->iNext);
+ AddToFreeBuffers(newBuf);
+ }
+ else
+ {
+ delete newBuf->iBuffer;
+ delete newBuf;
+ LOGTEXT(_L("CProfilerSampleStream::InitialiseBuffers - Out of memory (1)!!"));
+ }
+ }
+ else
+ {
+ LOGTEXT(_L("CProfilerSampleStream::InitialiseBuffers - Out of memory (2)!!"));
+ delete newBuf;
+ }
}
}
@@ -337,17 +364,35 @@
delete iFreeBuffers->iBufDes;
delete iFreeBuffers->iDes;
delete iFreeBuffers->iBuffer;
- delete iFreeBuffers;
+ //delete iFreeBuffers;
+ User::Free(iFreeBuffers);
// set the list start to the next buffer
iFreeBuffers = nextFree;
}
iFreeBuffers = 0;
+ // delete all filled buffers
+ while(iFilledBuffers != 0)
+ {
+ LOGSTRING2("CProfilerSampleStream::EmptyBuffers - deleting 0x%x",iFilledBuffers);
+
+ // store the next buffer in the list
+ TBapBuf* nextFilled = iFilledBuffers->iNext;
+ // delete the first one in the list
+ delete iFilledBuffers->iBufDes;
+ delete iFilledBuffers->iDes;
+ delete iFilledBuffers->iBuffer;
+ delete iFilledBuffers;
+ User::Free(iFilledBuffers);
+ // set the list start to the next buffer
+ iFilledBuffers = nextFilled;
+ }
+ iFilledBuffers = 0;
LOGTEXT(_L("CProfilerSampleStream::EmptyBuffers - exit"));
}
inline TBapBuf* CProfilerSampleStream::GetNextFreeBuffer()
- {
- LOGTEXT(_L("CProfilerSampleStream::GetNextFreeBuffer - entry"));
+ {
+ LOGTEXT(_L("CProfilerSampleStream::GetNextFreeBuffer - entry"));
// get a new buffer from the free buffers list
TBapBuf* nextFree = iFreeBuffers;
@@ -375,6 +420,11 @@
}
else
{
+ delete newBuf->iBufDes;
+ delete newBuf->iDes;
+ delete newBuf->iBuffer;
+ delete newBuf;
+ delete nextFree;
LOGTEXT(_L("CProfilerSampleStream::GetNextFreeBuffer - Out of memory (1)!!"));
return 0;
}
@@ -383,12 +433,14 @@
{
LOGTEXT(_L("CProfilerSampleStream::GetNextFreeBuffer - Out of memory (2)!!"));
delete newBuf;
+ delete nextFree;
return 0;
}
- }
+ }// nextFree != 0
else
{
// set the list to point to next free buffer
+ LOGSTRING3("CProfilerSampleStream::GetNextFreeBuffer 0x%x buf 0x%x inext", nextFree, nextFree->iNext);
iFreeBuffers = nextFree->iNext;
}
@@ -398,11 +450,12 @@
inline void CProfilerSampleStream::AddToFilledBuffers(TBapBuf* aFilledBuffer)
{
- LOGSTRING2("CProfilerSampleStream::AddToFilledBuffers - entry, size %d", aFilledBuffer->iDataSize);
-
+ LOGSTRING4("CProfilerSampleStream::AddToFilledBuffers - entry, size %d aFilledBuffer* 0x%x iNext 0x%x", aFilledBuffer->iDataSize, aFilledBuffer, aFilledBuffer->iNext);
+ //LOGSTRING3("CProfilerSampleStream::AddToFilledBuffers iFilledBuffers* 0x%x iNext 0x%x",iFilledBuffers, iFilledBuffers->iNext);
// add this buffer to the list of filled buffers
if(iFilledBuffers == 0)
{
+ LOGSTRING("CProfilerSampleStream::AddToFilledBuffers iFilledBuffers == 0");
// the list is empty, so add the the beginning of the list
// there is no next buffer in the list at the moment
aFilledBuffer->iNext = 0;
@@ -410,17 +463,31 @@
}
else
{
+ LOGSTRING("CProfilerSampleStream::AddToFilledBuffers iFilledBuffers != 0");
// there are buffers in the list, add this buffer to the beginning of the list
- aFilledBuffer->iNext = iFilledBuffers;
- iFilledBuffers = aFilledBuffer;
+ if(aFilledBuffer == iFilledBuffers)
+ {
+ LOGSTRING("CProfilerSampleStream::AddToFilledBuffers iFilledBuffers same");
+ }
+ else
+ {
+ LOGSTRING("CProfilerSampleStream::AddToFilledBuffers iFilledBuffers different");
+ LOGSTRING3("iFilledBuffers 0x%x iFilledBuffers->iNext 0x%x", iFilledBuffers, iFilledBuffers->iNext);
+ if(iFilledBuffers->iNext != 0)
+ {
+ LOGSTRING3("next buf 0x%x ->iNext 0x%x", iFilledBuffers->iNext,iFilledBuffers->iNext->iNext );
+ }
+ }
+ aFilledBuffer->iNext = iFilledBuffers;
+ iFilledBuffers = aFilledBuffer;
}
- LOGTEXT(_L("CProfilerSampleStream::AddToFilledBuffers - exit"));
+ LOGSTRING3("CProfilerSampleStream::AddToFilledBuffers - exit, iFilledBuffer* 0x%x ->iNext 0x%x", iFilledBuffers, iFilledBuffers->iNext);
+ //LOGTEXT(_L("CProfilerSampleStream::AddToFilledBuffers - exit "));
}
TBapBuf* CProfilerSampleStream::GetNextFilledBuffer()
{
LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - entry"));
-
if(iFilledBuffers == 0)
{
// there are no filled buffers in the list
@@ -432,30 +499,37 @@
// get a buffer from the end of the list
TBapBuf* buf = iFilledBuffers;
TBapBuf* prev = 0;
-
- if(buf->iNext == 0)
- {
- // this was the last (and only) buffer
- iFilledBuffers = 0;
- LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - last filled"));
- return buf;
- }
- else
+ if(buf)
{
- LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - searching last filled"));
- while(buf->iNext != 0)
+ LOGSTRING3("CProfilerSampleStream::GetNextFilledBuffer buf 0x%x, inext 0x%x", buf, buf->iNext);
+ if(buf->iNext == 0)
+ {
+ // this was the last (and only) buffer
+ iFilledBuffers = 0;
+ LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - last filled"));
+ return buf;
+ }
+ else
{
- // there are two or more buffers in the list
- // proceed until the end of the list is found
- prev = buf;
- buf = buf->iNext;
+ LOGSTRING2("CProfilerSampleStream::GetNextFilledBuffer - searching last filled, inext 0x%x ", buf->iNext);
+ while(buf->iNext != 0)
+ {
+ // there are two or more buffers in the list
+ // proceed until the end of the list is found
+ LOGSTRING3("CProfilerSampleStream::GetNextFilledBuffer - searching. buf 0x%x, inext 0x%x", buf, buf->iNext);
+ prev = buf;
+ buf = buf->iNext;
+ }
+ // now buf->next is 0, return buf and set the next
+ // element of prev to NULL
+ prev->iNext = 0;
+ LOGSTRING3("CProfilerSampleStream::GetNextFilledBuffer - found last. buf 0x%x, iNext 0x%x", buf, buf->iNext);
+ return buf;
}
- // now buf->next is 0, return buf and set the next
- // element of prev to NULL
- prev->iNext = 0;
- LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - found last"));
- return buf;
}
+ else{
+ LOGTEXT(_L("CProfilerSampleStream::GetNextFilledBuffer - nullihan se siellä"));
+ }
}
}
@@ -481,7 +555,7 @@
// set this buffer to be the first one in the list
iFreeBuffers = aFreeBuffer;
- LOGTEXT(_L("CProfilerSampleStream::AddToFreeBuffers - exit"));
+ LOGSTRING3("CProfilerSampleStream::AddToFreeBuffers - exit iFreeBuffers 0x%x iFreeBuffers->iNext 0x%x",iFreeBuffers, iFreeBuffers->iNext);
}
void CProfilerSampleStream::NotifyWriter()
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerSession.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerSession.h Tue Oct 26 16:20:32 2010 +0300
@@ -303,10 +303,11 @@
}
p.RSessionBase::Close();
-
+ delete buffer;
+ buffer = NULL;
if(r != KErrNone)
{
- LOGSTRING2("Profiler responded with an error - code %d !!",r);
+ LOGSTRING2("Profiler responded with an error - code %d !!",r);
return r;
}
else
--- a/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerVersion.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/piprofiler_plat/inc/ProfilerVersion.h Tue Oct 26 16:20:32 2010 +0300
@@ -25,10 +25,10 @@
*
*/
- #define PROFILER_VERSION "PI Profiler v2.1.0"
+ #define PROFILER_VERSION "PI Profiler v2.3.1"
#define PROFILER_VERSION_SHORT _L("2.00.0")
#define PROFILER_SAMPLER_VERSION _L("2.00.0")
- #define PROFILER_RELEASE_DATE _L("23rd February 2009. ")
+ #define PROFILER_RELEASE_DATE _L("11th October 2010. ")
#define PROFILER_GPP_SAMPLER_VERSION _L("2.00") // SMPfied v2.00
#define PROFILER_GFC_SAMPLER_VERSION _L8("1.10")
@@ -38,8 +38,8 @@
#define PROFILER_BUP_SAMPLER_VERSION _L8("1.20")
#define PROFILER_IRQ_SAMPLER_VERSION _L8("1.20")
#define PROFILER_TIP_SAMPLER_VERSION _L8("1.10")
- #define PROFILER_PEC_SAMPLER_VERSION _L8("1.24")
- #define PROFILER_PWR_SAMPLER_VERSION _L8("1.57")
+ #define PROFILER_PEC_SAMPLER_VERSION _L8("1.25")
+ #define PROFILER_PWR_SAMPLER_VERSION _L8("1.58")
#define PROFILER_SCR_SAMPLER_VERSION _L8("1.57")
#define PROFILER_IPC_SAMPLER_VERSION _L8("1.59")
#define PROFILER_GPU_SAMPLER_VERSION _L8("1.00")
--- a/perfsrv/piprofiler/plugins/BUPplugin/group/BUPPlugin.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/BUPplugin/group/BUPPlugin.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
SMPSAFE
+UNPAGED
OS_LAYER_SYSTEMINCLUDE
USERINCLUDE ../inc
--- a/perfsrv/piprofiler/plugins/BUPplugin/group/TouchAnimDll.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/BUPplugin/group/TouchAnimDll.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -26,6 +26,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB // -AllFiles -NetworkControl -DiskAdmin -MultimediaDD -TCB -DRM
SMPSAFE
+UNPAGED
OS_LAYER_SYSTEMINCLUDE
USERINCLUDE ../inc
--- a/perfsrv/piprofiler/plugins/BUPplugin/inc/BupPlugin.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/BUPplugin/inc/BupPlugin.h Tue Oct 26 16:20:32 2010 +0300
@@ -68,7 +68,7 @@
class CSamplerPluginInterface;
class CBupPlugin : public CSamplerPluginInterface
-{
+ {
public:
static CBupPlugin* NewL(const TUid aImplementationUid, TAny* aInitParams);
~CBupPlugin();
@@ -110,8 +110,7 @@
CArrayFixFlat<TSamplerAttributes>* iSamplerAttributes;
public:
TUint32* iSampleTime;
-};
-
+ };
/*
*
@@ -126,64 +125,28 @@
CWsScreenDevice* iScreen;
RWsSession iWs;
public:
- void ConstructL();
+ void ConstructL(CBupPlugin* aSampler);
// destruct
~CWsClient();
// main window
virtual void ConstructMainWindowL();
- // terminate cleanly
void Exit();
// active object protocol
void IssueRequest(); // request an event
void DoCancel(); // cancel the request
- virtual TInt RunError(TInt aError) = 0;
virtual void RunL() = 0; // handle completed request
virtual void HandleKeyEventL (TKeyEvent& aKeyEvent) = 0;
-
+ virtual void HandleEvent(TInt c) = 0;
RWindowGroup Group() {return iGroup;};
-
+ CBupPlugin* GetSampler();
private:
- RWindowGroup iGroup;
- CWindowGc* iGc;
- friend class CWindow; // needs to get at session
- RProperty iProperty;
-
+ RWindowGroup iGroup;
+ CWindowGc* iGc;
+ friend class CWindow; // needs to get at session
+ RProperty iProperty;
+ CBupPlugin* iSampler;
};
-
-
-class CWindow;
-
-class CProfilerButtonListener : public CWsClient
-{
-public:
- static CProfilerButtonListener* NewL(CBupPlugin* aSamplerm);
- ~CProfilerButtonListener();
-private:
- CProfilerButtonListener(CBupPlugin* aSampler);
-
-
-public:
- void ConstructMainWindowL();
- void HandleKeyEventL (TKeyEvent& aKeyEvent);
- void RunL();
- TInt RunError(TInt aError);
- TInt StartL();
- TInt Stop();
-
-private:
- TUint8 iSample[8];
-
- CBupPlugin* iSampler;
- RProfilerTouchEventAnim* iAnim;
- RAnimDll* iAnimDll;
- CWindow* iMainWindow; // main window
-
- TInt iSampleStartTime;
-};
-
-
-
/*
*
* CWindow declaration
@@ -191,21 +154,51 @@
*/
class CWindow : public CBase
{
- protected:
- RWindow iWindow; // window server window
- TRect iRect; // rectangle re owning window
- public:
- CWindow(CWsClient* aClient);
- void ConstructL (const TRect& aRect, CWindow* aParent=0);
- ~CWindow();
- // access
- RWindow& Window(); // our own window
- CWindowGc* SystemGc(); // system graphics context
-
- CWsClient* Client() {return iClient;};
- private:
- CWsClient* iClient; // client including session and group
+protected:
+ RWindow iWindow; // window server window
+ TRect iRect; // rectangle re owning window
+public:
+ CWindow(CWsClient* aClient);
+ void ConstructL (const TRect& aRect, CWindow* aParent=0);
+ ~CWindow();
+ // access
+ RWindow& Window(); // our own window
+ CWindowGc* SystemGc(); // system graphics context
+ // empty drawing functions
+ virtual void Draw(const TRect& aRect) = 0;
+ virtual void HandlePointerEvent (TPointerEvent& aPointerEvent) = 0;
+
+ CWsClient* Client() {return iClient;};
+private:
+ CWsClient* iClient; // client including session and group
};
+class CMainWindow : public CWindow
+ {
+public:
+ CMainWindow (CWsClient* aClient);
+ void Draw (const TRect& aRect);
+ ~CMainWindow ();
+ void HandlePointerEvent (TPointerEvent& aPointerEvent);
+ void ConstructL (const TRect& aRect, CWindow* aParent=0);
+ };
+
+class CProfilerButtonListener : public CWsClient
+ {
+public:
+ CProfilerButtonListener();
+ void ConstructMainWindowL();
+ ~CProfilerButtonListener();
+ void RunL();
+ void DoCancel();
+ void HandleKeyEventL (TKeyEvent& aKeyEvent);
+ void HandleEvent(TInt c);
+private:
+ CMainWindow* iMainWindow; // main window
+ TInt iSampleStartTime;
+ TUint8 iSample[8];
+ RProfilerTouchEventAnim* iAnim;
+ RAnimDll* iAnimDll;
+ };
#endif
--- a/perfsrv/piprofiler/plugins/BUPplugin/src/BupPlugin.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/BUPplugin/src/BupPlugin.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -75,7 +75,7 @@
if(Enabled())
{
// stop profiling
- iButtonListener->Stop();
+ iButtonListener->Cancel();
}
delete iButtonListener;
}
@@ -228,11 +228,6 @@
// check if sampler enabled
if(iSamplerAttributes->At(0).iEnabled)
{
- // create first the listener instance
- iButtonListener = CProfilerButtonListener::NewL(this);
-
- LOGTEXT(_L("CBupPlugin::ResetAndActivate() - listener created"));
-
iStream = &aStream;
TInt length = this->CreateFirstSample();
iVersion[0] = (TUint8)length;
@@ -240,9 +235,11 @@
ret = AddSample(iVersion, length+1, 0);
if(ret != KErrNone)
return ret;
-
- // activate button listener
- ret = iButtonListener->StartL();
+
+ // create first the listener instance
+ iButtonListener = new (ELeave)CProfilerButtonListener;
+ iButtonListener->ConstructL(this);
+ LOGTEXT(_L("CBupPlugin::ResetAndActivate() - listener created"));
iEnabled = ETrue;
@@ -264,16 +261,22 @@
TInt CBupPlugin::StopSampling()
{
+ LOGTEXT(_L("CBupPlugin::StopSampling() - Start"));
+
if(iButtonListener)
{
- iButtonListener->Stop();
+ LOGTEXT(_L("CBupPlugin::StopSampling() - Cancelling listener..."));
+ iButtonListener->Cancel();
+ LOGTEXT(_L("CBupPlugin::StopSampling() - deleting listener..."));
delete iButtonListener; // delete listener after every trace
+ LOGTEXT(_L("CBupPlugin::StopSampling() - finalizing listener..."));
iButtonListener = NULL;
}
// set disabled
iEnabled = EFalse;
+ LOGTEXT(_L("CBupPlugin::StopSampling() - Exit"));
return KErrNone;
}
@@ -281,167 +284,6 @@
{
}
-/*
- *
- * Implementation of class CProfilerButtonListener
- *
- */
-CProfilerButtonListener::CProfilerButtonListener(CBupPlugin* aSampler)
- {
- LOGTEXT(_L("CProfilerButtonListener::CProfilerButtonListener() - konstuktori"));
- this->iSampler = aSampler;
- iSampleStartTime = 0;
- LOGTEXT(_L("CProfilerButtonListener::CProfilerButtonListener() - konstuktori exit"));
- }
-
-CProfilerButtonListener* CProfilerButtonListener::NewL(CBupPlugin* aSampler)
- {
- LOGTEXT(_L("CProfilerButtonListener::NewL() - entry"));
- CProfilerButtonListener* self = new (ELeave) CProfilerButtonListener(aSampler);
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- LOGTEXT(_L("CProfilerButtonListener::NewL() - exit"));
- return self;
- }
-
-CProfilerButtonListener::~CProfilerButtonListener()
- {
- LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener() - entry af"));
-
- if(iMainWindow)
- {
- LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener(): flushing iWs"));
- iWs.Flush();
- LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener(): finishing"));
- }
- delete iMainWindow;
- LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener() - exit"));
- }
-
-void CProfilerButtonListener::ConstructMainWindowL()
- {
- LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - Entry"));
-
- CWindow* window = new (ELeave) CWindow(this);
- CleanupStack::PushL( window );
- window->ConstructL(TRect(TPoint(0,0), TSize(0,0)));
- delete iMainWindow;
- iMainWindow = window;
- CleanupStack::Pop( window );
-
- LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - Exit"));
- }
-
-void CProfilerButtonListener::HandleKeyEventL (TKeyEvent& /*aKeyEvent*/)
- {
- LOGTEXT(_L("CProfilerButtonListener::HandleKeyEventL() - Start"));
- LOGTEXT(_L("CProfilerButtonListener::HandleKeyEventL() - End"));
- }
-
-
-TInt CProfilerButtonListener::RunError(TInt aError)
- {
- // get rid of everything we allocated
- // deactivate the anim dll before killing window, otherwise anim dll dies too early
- iAnim->Deactivate();
- iAnim->Close();
-
- iAnimDll->Close();
-
- return aError;
- }
-
-void CProfilerButtonListener::RunL()
- {
- // resubscribe before processing new value to prevent missing updates
- IssueRequest();
-
- TInt c = 0;
- if(RProperty::Get(KProfilerKeyEventPropertyCat, EProfilerKeyEventPropertySample, c) == KErrNone)
- {
- // do something with event
- LOGSTRING2("CProfilerButtonListener::RunL() - event [%d] received",c);
-
- iSample[0] = c;
- iSample[1] = c >> 8;
- iSample[2] = c >> 16;
- iSample[3] = c >> 24;
-
- // Space for GPP sample time
- TUint32 sampleTime = User::NTickCount() - iSampleStartTime;
- LOGSTRING2("CProfilerButtonListener::RunL() - sample time is %d",sampleTime);
-
- iSample[4] = sampleTime;
- iSample[5] = sampleTime >> 8;
- iSample[6] = sampleTime >> 16;
- iSample[7] = sampleTime >> 24;
-
- iSampler->AddSample(iSample, 8, 0xb0);
- }
- }
-
-TInt CProfilerButtonListener::StartL()
- {
- LOGTEXT(_L("CProfilerButtonListener::StartL() - Activate touch server dll"));
- TInt err(KErrNone);
-
- // get the property value
- TInt r = RProperty::Get(KGppPropertyCat, EGppPropertySyncSampleNumber, iSampleStartTime);
- if(r != KErrNone)
- {
- LOGSTRING2("CProfilerButtonListener::StartL() - getting iSyncOffset failed, error %d", r);
- }
-
- iAnimDll = new (ELeave) RAnimDll(iWs);
- LOGTEXT(_L("CProfilerButtonListener::StartL() - #1"));
-
- TParse* fp = new (ELeave) TParse();
- CleanupStack::PushL(fp);
- fp->Set( KDllName, &KDC_SHARED_LIB_DIR , NULL );
- LOGSTRING2("CProfilerButtonListener::StartL() - touch event server: %S" , &(fp->FullName()));
-
- err = iAnimDll->Load(fp->FullName());
- // check if anim dll load failed
- if(err != KErrNone)
- {
- CleanupStack::PopAndDestroy(fp);
- // stop plugin if failed
- iAnimDll->Close();
- return KErrGeneral;
- }
- CleanupStack::PopAndDestroy(fp);
- LOGTEXT(_L("CProfilerButtonListener::StartL() - #2"));
-
- iAnim = new (ELeave) RProfilerTouchEventAnim(*iAnimDll);
- LOGTEXT(_L("CProfilerButtonListener::StartL() - #3"));
- iAnim->ConstructL(iMainWindow->Window());
-
- // activate the animation dll for collecting touch and key events
- iAnim->Activate();
-
- // wait for a new sample
- IssueRequest();
-
- // hide this window group from the app switcher
- iMainWindow->Client()->Group().SetOrdinalPosition(-1);
- iMainWindow->Client()->Group().EnableReceiptOfFocus(EFalse);
- return KErrNone;
- }
-
-TInt CProfilerButtonListener::Stop()
- {
- LOGTEXT(_L("CProfilerButtonListener::Stop() - enter"));
- // deactivate the anim dll before killing window, otherwise anim dll dies too early
- iAnim->Deactivate();
- iAnim->Close();
-
- iAnimDll->Close();
-
- Cancel();
- LOGTEXT(_L("CProfilerButtonListener::Stop() - exit"));
- return KErrNone;
- }
///////////////////////////////////////////////////////////////////////////////
@@ -499,17 +341,21 @@
LOGTEXT(_L("CWsClient::CWsClient()"));
}
-void CWsClient::ConstructL()
+void CWsClient::ConstructL(CBupPlugin* aSampler)
{
LOGTEXT(_L("CWsClient::ConstructL() - Start"));
+ // pointer to parent, for collecting the trace data to the data stream
+ iSampler = aSampler;
+
+ // add to the active scheduler
+ CActiveScheduler::Add(this);
+
TInt r = RProperty::Define(EProfilerKeyEventPropertySample, RProperty::EInt, KAllowAllPolicy, KCapabilityNone);
if (r!=KErrAlreadyExists)
{
User::LeaveIfError(r);
}
- CActiveScheduler::Add(this);
-
// attach to
User::LeaveIfError(iProperty.Attach(KProfilerKeyEventPropertyCat,EProfilerKeyEventPropertySample));
@@ -528,35 +374,42 @@
// construct main window
ConstructMainWindowL();
- LOGTEXT(_L("CWsClient::CWsClient() - End"));
+ // wait for a new sample
+ IssueRequest();
+
+ LOGTEXT(_L("CWsClient::ConstructL() - End"));
}
CWsClient::~CWsClient()
{
LOGTEXT(_L("CWsClient::~CWsClient() - Start"));
-
- // get rid of everything we allocated
- delete iGc;
- delete iScreen;
-
- iGroup.Close();
- // finish with window server
- iWs.Close();
-
+
+ // finish with window server
+ iWs.Close();
+
+ // neutralize us as an active object
+ Deque();
LOGTEXT(_L("CWsClient::~CWsClient() - Exit"));
}
-void CWsClient::Exit()
- {
- LOGTEXT(_L("CWsClient::Exit() - Start"));
+CBupPlugin* CWsClient::GetSampler()
+ {
+ return iSampler;
+ }
- // destroy window group
- iGroup.Close();
- // finish with window server
+void CWsClient::Exit()
+ {
+ LOGTEXT(_L("CWsClient::Exit(): Start"));
+ // get rid of everything we allocated
+ delete iGc;
+ delete iScreen;
+ // destroy the window group
+ iGroup.Close();
+ // close the key event P&S object
iProperty.Close();
- iWs.Close();
- LOGTEXT(_L("CWsClient::Exit() - Exit"));
- }
+
+ LOGTEXT(_L("CWsClient::Exit(): End"));
+ }
void CWsClient::IssueRequest()
{
@@ -569,9 +422,6 @@
void CWsClient::DoCancel()
{
LOGTEXT(_L("CWsClient::DoCancel() - Start"));
- // clean up the sample property
- iProperty.Cancel();
- iProperty.Close();
LOGTEXT(_L("CWsClient::DoCancel() - Exit"));
}
@@ -580,3 +430,203 @@
LOGTEXT(_L("CWsClient::ConstructMainWindowL()"));
}
+
+/****************************************************************************\
+| Function: Constructor/Destructor for CMainWindow
+| Doesn't do much, as most initialisation is done by the
+| CWindow base class.
+| Input: aClient Client application that owns the window
+\****************************************************************************/
+CMainWindow::CMainWindow (CWsClient* aClient)
+: CWindow (aClient)
+ {
+ LOGTEXT(_L("CMainWindow::CMainWindow()"));
+ }
+
+CMainWindow::~CMainWindow ()
+ {
+ LOGTEXT(_L("CMainWindow::~CMainWindow(): Start"));
+ LOGTEXT(_L("CMainWindow::~CMainWindow(): End"));
+ }
+
+void CMainWindow::ConstructL (const TRect& aRect, CWindow* aParent)
+ {
+ LOGTEXT(_L("CMainWindow::ConstructL(): Start"));
+ CWindow::ConstructL(aRect, aParent);
+ LOGTEXT(_L("CMainWindow::ConstructL(): End"));
+ }
+
+/****************************************************************************\
+| Function: CMainWindow::Draw
+| Purpose: Redraws the contents of CMainWindow within a given
+| rectangle. As CMainWindow has no contents, it simply
+| clears the redraw area. A blank window could be used here
+| instead. The Clear() is needed because a redraw should
+| always draw to every pixel in the redraw rectangle.
+| Input: aRect Rectangle that needs redrawing
+| Output: None
+\****************************************************************************/
+void CMainWindow::Draw(const TRect& aRect)
+ {
+ LOGTEXT(_L("CMainWindow::Draw(): Start"));
+ // empty
+ LOGTEXT(_L("CMainWindow::Draw(): End"));
+}
+
+/****************************************************************************\
+| Function: CMainWindow::HandlePointerEvent
+| Purpose: Handles pointer events for CMainWindow. Doesn't do
+| anything except get the co-ordinates where the pointer
+| event occurred.
+| Input: aPointerEvent The pointer event
+| Output: None
+\****************************************************************************/
+void CMainWindow::HandlePointerEvent (TPointerEvent& /*aPointerEvent*/)
+ {
+ LOGTEXT(_L("CMainWindow::HandlePointerEvent(): Start"));
+ // TPoint point = aPointerEvent.iPosition;
+ // (void)point;
+ LOGTEXT(_L("CMainWindow::HandlePointerEvent(): End"));
+ }
+
+/*
+ *
+ * Implementation of class CProfilerButtonListener
+ *
+ */
+CProfilerButtonListener::CProfilerButtonListener()
+ {
+ LOGTEXT(_L("CProfilerButtonListener::CProfilerButtonListener() - konstuktori"));
+ iSampleStartTime = 0;
+ LOGTEXT(_L("CProfilerButtonListener::CProfilerButtonListener() - konstuktori exit"));
+ }
+
+CProfilerButtonListener::~CProfilerButtonListener()
+ {
+ LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener() - entry"));
+
+ // clean up the main window
+ if(iMainWindow)
+ {
+ LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener(): flushing iWs"));
+ iWs.Flush();
+ LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener(): finishing"));
+ }
+ delete iMainWindow;
+ LOGTEXT(_L("CProfilerButtonListener::~CProfilerButtonListener() - exit"));
+ }
+
+void CProfilerButtonListener::ConstructMainWindowL()
+ {
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - Entry"));
+
+ CMainWindow* window = new (ELeave) CMainWindow(this);
+ CleanupStack::PushL( window );
+ window->ConstructL(TRect(TPoint(0,0), TSize(0,0)));
+ //window->Client()->Group().SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront + 1); // in front of the Status Bar
+ // hide this window group from the app switcher
+ window->Client()->Group().SetOrdinalPosition(-1);
+ window->Client()->Group().EnableReceiptOfFocus(EFalse);
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - Activate touch server dll"));
+
+ delete iMainWindow;
+ iMainWindow = window;
+ CleanupStack::Pop( window );
+
+ // animation dll, the key event listener start
+ TInt err(KErrNone);
+
+ // get the property value
+ TInt r = RProperty::Get(KGppPropertyCat, EGppPropertySyncSampleNumber, iSampleStartTime);
+ if(r != KErrNone)
+ {
+ LOGSTRING2("CProfilerButtonListener::ConstructMainWindowL() - getting iSyncOffset failed, error %d", r);
+ }
+
+ iAnimDll = new (ELeave) RAnimDll(iWs);
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - #1"));
+
+ TParse* fp = new (ELeave) TParse();
+ CleanupStack::PushL(fp);
+ fp->Set( KDllName, &KDC_SHARED_LIB_DIR , NULL );
+ LOGSTRING2("CProfilerButtonListener::ConstructMainWindowL() - touch event server: %S" , &(fp->FullName()));
+
+ err = iAnimDll->Load(fp->FullName());
+ // check if anim dll load failed
+ if(err != KErrNone)
+ {
+ CleanupStack::PopAndDestroy(fp);
+ // stop plugin if failed
+ iAnimDll->Close();
+ User::Leave(err);
+ }
+ CleanupStack::PopAndDestroy(fp);
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - #2"));
+
+ iAnim = new (ELeave) RProfilerTouchEventAnim(*iAnimDll);
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - #3"));
+ iAnim->ConstructL(iMainWindow->Window());
+
+ // activate the animation dll for collecting touch and key events
+ iAnim->Activate();
+
+ LOGTEXT(_L("CProfilerButtonListener::ConstructMainWindowL() - Exit"));
+ }
+
+void CProfilerButtonListener::DoCancel()
+ {
+ LOGTEXT(_L("CProfilerButtonListener::DoCancel() - Start"));
+ // animation dll deactivation, stopping key listener
+ iAnim->Deactivate();
+ iAnim->Close();
+ iAnimDll->Close();
+
+ // exiting the parent
+ Exit();
+ LOGTEXT(_L("CProfilerButtonListener::DoCancel() - Exit"));
+ }
+
+void CProfilerButtonListener::RunL()
+ {
+ // resubscribe before processing new value to prevent missing updates
+ IssueRequest();
+
+ TInt c(0);
+ if(RProperty::Get(KProfilerKeyEventPropertyCat, EProfilerKeyEventPropertySample, c) == KErrNone)
+ {
+ // do something with event
+ LOGSTRING2("CProfilerButtonListener::RunL() - event [%d] received",c);
+ HandleEvent(c);
+ }
+ }
+
+void CProfilerButtonListener::HandleKeyEventL (TKeyEvent& /*aKeyEvent*/)
+ {
+ LOGTEXT(_L("CProfilerButtonListener::HandleKeyEventL() - Start"));
+ LOGTEXT(_L("CProfilerButtonListener::HandleKeyEventL() - End"));
+ }
+
+void CProfilerButtonListener::HandleEvent(TInt c)
+ {
+ LOGTEXT(_L("CProfilerButtonListener::HandleEvent() - Start"));
+ if(c >= 0)
+ {
+ // put the event to a sample and finally in to the data stream
+ iSample[0] = c;
+ iSample[1] = c >> 8;
+ iSample[2] = c >> 16;
+ iSample[3] = c >> 24;
+
+ // Space for GPP sample time
+ TUint32 sampleTime(User::NTickCount() - iSampleStartTime);
+ LOGSTRING2("CProfilerButtonListener::RunL() - sample time is %d",sampleTime);
+
+ iSample[4] = sampleTime;
+ iSample[5] = sampleTime >> 8;
+ iSample[6] = sampleTime >> 16;
+ iSample[7] = sampleTime >> 24;
+
+ GetSampler()->AddSample(iSample, 8, 0xb0);
+ }
+ LOGTEXT(_L("CProfilerButtonListener::HandleEvent() - End"));
+ }
--- a/perfsrv/piprofiler/plugins/DebugOutputWriterPlugin/group/DebOutWriterPlugin.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/DebugOutputWriterPlugin/group/DebOutWriterPlugin.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -29,6 +29,7 @@
#endif
CAPABILITY ALL -TCB // AllFiles ReadDeviceData ReadUserData UserEnvironment WriteDeviceData WriteUserData
SMPSAFE
+UNPAGED
OS_LAYER_SYSTEMINCLUDE
USERINCLUDE ../inc ../traces
--- a/perfsrv/piprofiler/plugins/DebugOutputWriterPlugin/src/DebOutWriterPlugin.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/DebugOutputWriterPlugin/src/DebOutWriterPlugin.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -46,7 +46,7 @@
*
*/
-CDebOutWriterPlugin* CDebOutWriterPlugin::NewL(const TUid /*aImplementationUid*/, TAny* /*aInitParams*/)
+EXPORT_C CDebOutWriterPlugin* CDebOutWriterPlugin::NewL(const TUid /*aImplementationUid*/, TAny* /*aInitParams*/)
{
LOGTEXT(_L("CDebOutWriterPlugin::NewL() - entry"));
CDebOutWriterPlugin* self = new (ELeave) CDebOutWriterPlugin(KDebOutWriterPluginUid);
--- a/perfsrv/piprofiler/plugins/DiskWriterPlugin/group/DiskWriterPlugin.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/DiskWriterPlugin/group/DiskWriterPlugin.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -29,6 +29,7 @@
#endif
CAPABILITY ALL -TCB // AllFiles ReadDeviceData ReadUserData UserEnvironment WriteDeviceData WriteUserData
SMPSAFE
+UNPAGED
OS_LAYER_SYSTEMINCLUDE
USERINCLUDE ../inc
--- a/perfsrv/piprofiler/plugins/DiskWriterPlugin/src/DiskWriterPlugin.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/DiskWriterPlugin/src/DiskWriterPlugin.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -41,7 +41,7 @@
*/
// Member Functions
-CDiskWriterPlugin* CDiskWriterPlugin::NewL(const TUid /*aImplementationUid*/, TAny* /*aInitParams*/)
+EXPORT_C CDiskWriterPlugin* CDiskWriterPlugin::NewL(const TUid /*aImplementationUid*/, TAny* /*aInitParams*/)
{
LOGTEXT(_L("CDiskWriterPlugin::NewL() - entry"));
CDiskWriterPlugin* self = new (ELeave) CDiskWriterPlugin(KDiskWriterPluginUid);
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/group/GeneralsPlugin.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/group/GeneralsPlugin.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
SMPSAFE
+UNPAGED
EPOCSTACKSIZE 0x10000
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/group/GeneralsSampler.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/group/GeneralsSampler.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
UID 0x100000AF 0x2001E5B3
VENDORID VID_DEFAULT
SMPSAFE
+UNPAGED
OS_LAYER_KERNEL_SYSTEMINCLUDE
USERINCLUDE ../inc
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,8 +15,8 @@
*
*/
-//PRJ_PLATFORMS
-//DEFAULT ARMV5SMP
+PRJ_PLATFORMS
+DEFAULT ARMV5SMP
PRJ_MMPFILES
#ifdef MARM
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GeneralsConfig.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GeneralsConfig.h Tue Oct 26 16:20:32 2010 +0300
@@ -19,6 +19,21 @@
#ifndef GENERALS_CONFIG_H
#define GENERALS_CONFIG_H
+/* Inspired from nomadik.h to use a free interrupt id */
+// For HREFED
+//const TInt KBridgeProfilerInterruptId = 108;
+// For HREFv1
+const TInt KBridgeProfilerInterruptId = 117;
+const TInt KDefaultInterruptNumber = 99;
+/* Bridge Machine Unique ID in variant.cpp */
+const TUint KBridgeMachineUID = 0x101FF810;
+
+/* Naviengine Machine Unique ID in variant.cpp */
+const TUint KNaviengineMachineUID = 0x4956414E;
+
+const TUint32 KStateSamplingEnding = 999999;
+
+const TInt KValueZero = 0;
// change this to reflect the ISA task amount
#define PROFILER_ISA_OS_TASK_AMOUNT 50
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GfcSamplerImpl.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GfcSamplerImpl.h Tue Oct 26 16:20:32 2010 +0300
@@ -44,7 +44,7 @@
DProfilerGfcSampler(struct TProfilerGppSamplerData* );
~DProfilerGfcSampler();
- void Sample();
+ void Sample(TAny* aPtr);
TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset);
private:
struct TProfilerGppSamplerData* gppSamplerData;
@@ -101,7 +101,7 @@
}
template <int BufferSize>
-void DProfilerGfcSampler<BufferSize>::Sample()
+void DProfilerGfcSampler<BufferSize>::Sample(TAny* aPtr)
{
LOGSTRING2("CProfilerGfcSampler<%d>::Sample",BufferSize);
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GppSamplerImpl.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/GppSamplerImpl.h Tue Oct 26 16:20:32 2010 +0300
@@ -96,6 +96,7 @@
TInt iIsaEnd;
TUint32 iMask;
TUint32 iCpuSelector;
+ TInt iPrevTS; // previous sample's timestamp
};
struct TProfilerGppSamplerData
@@ -118,13 +119,13 @@
~DProfilerGppSampler();
struct TProfilerGppSamplerData* GetExportData();
- void Sample();
+ void Sample(TAny* aPtr);
TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset);
TInt GetPeriod();
private:
- DGppSamplerImpl gppSamplerImpl;
- struct TProfilerGppSamplerData exportData;
+ DGppSamplerImpl iGppSamplerImpl;
+ struct TProfilerGppSamplerData iExportData;
#ifdef __SMP__
TInt iCpuNumber;
#endif
@@ -140,97 +141,91 @@
DProfilerGppSampler<BufferSize>::DProfilerGppSampler() :
DProfilerGenericSampler<BufferSize>(PROFILER_GPP_SAMPLER_ID)
{
- LOGSTRING2("CProfilerGppSampler<%d>::CProfilerGppSampler",BufferSize);
+ LOGSTRING2("DProfilerGppSampler<%d>::CProfilerGppSampler",BufferSize);
}
#else
template <int BufferSize>
DProfilerGppSampler<BufferSize>::DProfilerGppSampler(TInt aCpuNumber) :
DProfilerGenericSampler<BufferSize>(PROFILER_GPP_SAMPLER_ID+(aCpuNumber*20)), iCpuNumber(aCpuNumber)
{
- LOGSTRING2("CProfilerGppSampler<%d>::CProfilerGppSampler",BufferSize);
+ LOGSTRING3("DProfilerGppSampler<%d>::DProfilerGppSampler, cpu %d",BufferSize, iCpuNumber);
}
#endif
template <int BufferSize>
DProfilerGppSampler<BufferSize>::~DProfilerGppSampler()
{
- LOGSTRING2("CProfilerGppSampler<%d>::~CProfilerGppSampler",BufferSize);
+ LOGSTRING2("DProfilerGppSampler<%d>::~CProfilerGppSampler",BufferSize);
}
template <int BufferSize>
TInt DProfilerGppSampler<BufferSize>::Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset)
{
- LOGSTRING2("CProfilerGppSampler<%d>::Reset - calling superclass reset",BufferSize);
+ LOGSTRING2("DProfilerGppSampler<%d>::Reset - calling superclass reset",BufferSize);
DProfilerGenericSampler<BufferSize>::Reset(aStream, 0);
- LOGSTRING2("CProfilerGppSampler<%d>::Reset - called superclass reset",BufferSize);
+ LOGSTRING2("DProfilerGppSampler<%d>::Reset - called superclass reset",BufferSize);
- this->gppSamplerImpl.Reset();
+ iGppSamplerImpl.Reset();
#ifdef __SMP__
- this->gppSamplerImpl.iCpuNumber = this->iCpuNumber;
+ iGppSamplerImpl.iCpuNumber = iCpuNumber;
// set common start time for all CPU samplers
- this->gppSamplerImpl.iStartTime = aSyncOffset;
+ iGppSamplerImpl.iStartTime = aSyncOffset;
#endif
- this->gppSamplerImpl.iGppSamplingPeriod = this->iSamplingPeriod;
- this->gppSamplerImpl.iSampleCount = 0;
- this->exportData.sampleNumber = 0;
- this->exportData.lastPcValue = 0;
- this->exportData.samplingPeriod = this->gppSamplerImpl.iGppSamplingPeriod;
+ iGppSamplerImpl.iGppSamplingPeriod = DProfilerGenericSampler<BufferSize>::iSamplingPeriod;
+ iGppSamplerImpl.iSampleCount = 0;
+ iExportData.sampleNumber = 0;
+ iExportData.lastPcValue = 0;
+ iExportData.samplingPeriod = iGppSamplerImpl.iGppSamplingPeriod;
- TInt length = gppSamplerImpl.CreateFirstSample();
- LOGSTRING3("CProfilerGPPSampler<%d>::Reset - got first sample, size %d",BufferSize,length);
+ TInt length = iGppSamplerImpl.CreateFirstSample();
+
+ LOGSTRING3("DProfilerGPPSampler<%d>::Reset - got first sample, size %d",BufferSize,length);
- this->iSampleBuffer->AddSample(gppSamplerImpl.tempBuf,length);
+ //DProfilerGenericSampler<BufferSize>::iSampleBuffer->AddSample(iGppSamplerImpl.tempBuf,length);
+ this->iSampleBuffer->AddSample(iGppSamplerImpl.tempBuf,length);
// check if sampling period > 1 ms
// NOTE: feature supported in Performance Investigator 2.01 and above
- if(this->gppSamplerImpl.iGppSamplingPeriod > 1)
+ if(iGppSamplerImpl.iGppSamplingPeriod > 1)
{
// For Address/Thread (GPP) version 2.01 or above, the first word is the sampling period in milliseconds
- TUint8* w = gppSamplerImpl.tempBuf;
+ TUint8* w(iGppSamplerImpl.tempBuf);
- (*w++) = (this->gppSamplerImpl.iGppSamplingPeriod >> 24) & 0xFF;
- (*w++) = (this->gppSamplerImpl.iGppSamplingPeriod >> 16) & 0xFF;
- (*w++) = (this->gppSamplerImpl.iGppSamplingPeriod >> 8) & 0xFF;
- (*w++) = (this->gppSamplerImpl.iGppSamplingPeriod) & 0xFF;
+ (*w++) = (iGppSamplerImpl.iGppSamplingPeriod >> 24) & 0xFF;
+ (*w++) = (iGppSamplerImpl.iGppSamplingPeriod >> 16) & 0xFF;
+ (*w++) = (iGppSamplerImpl.iGppSamplingPeriod >> 8) & 0xFF;
+ (*w++) = (iGppSamplerImpl.iGppSamplingPeriod) & 0xFF;
- this->iSampleBuffer->AddSample(gppSamplerImpl.tempBuf,4);
+ //DProfilerGenericSampler<BufferSize>::iSampleBuffer->AddSample(iGppSamplerImpl.tempBuf,4);
+ this->iSampleBuffer->AddSample(iGppSamplerImpl.tempBuf,4);
}
- LOGSTRING2("CProfilerGPPSampler<%d>::Reset finished",BufferSize);
+ LOGSTRING2("DProfilerGPPSampler<%d>::Reset finished",BufferSize);
return KErrNone;
}
template <int BufferSize>
-void DProfilerGppSampler<BufferSize>::Sample()
+void DProfilerGppSampler<BufferSize>::Sample(TAny* aPtr)
{
- LOGSTRING2("CProfilerGppSampler<%d>::Sample",BufferSize);
-// if(this->gppSamplerImpl.iSampleCount % 1000 == 0)
-// {
-//#ifdef __SMP__
-// if(this->iCpuNumber == 0) // print sample tick only from CPU 0 context
-// {
-//#endif
-// Kern::Printf(("PIPROF SAMPLE TICK, #%d"),exportData.sampleNumber);
-//#ifdef __SMP__
-// }
-//#endif
-// }
-
- TInt length(gppSamplerImpl.SampleImpl());
+ LOGSTRING2("DProfilerGppSampler<%d>::Sample",BufferSize);
+
+ TInt length(iGppSamplerImpl.SampleImpl());
- this->gppSamplerImpl.iSampleCount++;
- this->exportData.sampleNumber += this->gppSamplerImpl.iGppSamplingPeriod;
- this->exportData.lastPcValue = gppSamplerImpl.iLastPc;
+ iGppSamplerImpl.iSampleCount++;
+ iExportData.sampleNumber += iGppSamplerImpl.iGppSamplingPeriod;
+ iExportData.lastPcValue = iGppSamplerImpl.iLastPc;
if(length > 0)
{
- this->iSampleBuffer->AddSample(gppSamplerImpl.tempBuf,length);
+ TInt ret(this->iSampleBuffer->AddSample(iGppSamplerImpl.tempBuf,length));
+ if (ret != 0)
+ {
+ Kern::Printf(("DProfilerGppSampler<%d>::Sample() - add to sample buffer failed, loosing data, error = %d"),BufferSize,ret);
+ }
}
-
- LOGSTRING3("CProfilerGppSampler<%d>::Sample - length %d",BufferSize,length);
-
+ LOGSTRING3("DProfilerGppSampler<%d>::Sample - length %d",BufferSize,length);
return;
}
@@ -238,14 +233,14 @@
template <int BufferSize>
struct TProfilerGppSamplerData* DProfilerGppSampler<BufferSize>::GetExportData()
{
- LOGSTRING2("CProfilerGppSampler<%d>::GetExportData",BufferSize);
- return &(this->exportData);
+ LOGSTRING2("DProfilerGppSampler<%d>::GetExportData",BufferSize);
+ return &(iExportData);
}
template <int BufferSize>
TInt DProfilerGppSampler<BufferSize>::GetPeriod()
{
- return this->gppSamplerImpl.iGppSamplingPeriod;
+ return iGppSamplerImpl.iGppSamplingPeriod;
}
#endif
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/IttEventHandler.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/IttEventHandler.h Tue Oct 26 16:20:32 2010 +0300
@@ -41,6 +41,7 @@
TBool Tracking() {return iTracking;}
TBool SampleNeeded();
+ void SampleHandled();
private:
static TUint EventHandler(TKernelEvent aEvent, TAny* a1, TAny* a2, TAny* aThis);
@@ -55,11 +56,12 @@
TBool iTracking;
DProfilerSampleBuffer* iSampleBuffer;
- TUint32 iCount;
-
+ //TUint32 iCount;
+ //TUint32 iPreviousCount;
TUint8 iSample[KITTBufferSize];
TPtr8 iSampleDescriptor;
TProfilerGppSamplerData* gppSamplerData;
+ TBool iSampleAvailable;
};
#endif //__PI_ITT_EVENT_HANDLER__
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/IttSamplerImpl.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/IttSamplerImpl.h Tue Oct 26 16:20:32 2010 +0300
@@ -55,20 +55,30 @@
void Reset();
TInt ProcessEvent();
+ TInt HandleLibs(TUint32 sampleNum);
+ TInt HandleSegs(TUint32 sampleNum);
+
TUint8* itt_sample;
TInt iIttSamplingPeriod;
TInt iIttSamplingPeriodDiv2;
TBool iTimeToSample;
#ifdef ITT_EVENT_HANDLER
TBool iEventReceived;
- TBool iFirstSampleTaken;
+ TBool iInitialLibsTaken;
+ TBool iInitialSegsTaken;
#endif
private:
+ enum {
+ KIttHandlingLibs=0,
+ KIttHandlingCodeSegs
+ };
#ifdef ITT_EVENT_HANDLER
TInt iCount;
#endif
- TInt currentLibCount;
+ TInt iCurrentLibCount;
+ TInt iLibsCount;
+ TInt iCodeSegsCount;
TInt currentProcCount;
TUint8 sample[KITTSampleBufferSize ];
@@ -76,7 +86,8 @@
TBuf8<64> iVersionData;
SDblQue* codeSegList;
-
+ TUint8 iInitState;
+ SDblQueLink* iLatestCodeseg;
};
/*
@@ -90,12 +101,13 @@
DProfilerIttSampler(struct TProfilerGppSamplerData* gppSamplerDataIn);
~DProfilerIttSampler();
- void Sample();
+ void Sample(TAny* aPtr);
TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset);
TInt PostSample();
TBool PostSampleNeeded();
private:
+
#ifdef ITT_EVENT_HANDLER
DIttEventHandler* iEventHandler;
#endif
@@ -103,6 +115,7 @@
struct TProfilerGppSamplerData* gppSamplerData;
TBool sampleInProgress;
TBool sampleNeeded;
+ TUint32 iSyncOffset;
};
/*
@@ -112,11 +125,12 @@
template <int BufferSize>
DProfilerIttSampler<BufferSize>::DProfilerIttSampler(struct TProfilerGppSamplerData* gppSamplerDataIn) :
DProfilerGenericSampler<BufferSize>(PROFILER_ITT_SAMPLER_ID)
-{
+ {
this->gppSamplerData = (struct TProfilerGppSamplerData*)gppSamplerDataIn;
this->sampleInProgress = false;
- LOGSTRING2("CProfilerIttSampler<%d>::CProfilerIttSampler",BufferSize);
-}
+ iSyncOffset = 0;
+ LOGSTRING2("DProfilerIttSampler<%d>::DProfilerIttSampler",BufferSize);
+ }
/*
* DProfilerIttSampler::Reset()
@@ -126,13 +140,12 @@
*/
template <int BufferSize>
TInt DProfilerIttSampler<BufferSize>::Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset)
-{
- Kern::Printf("DProfilerIttSampler<%d>::Reset - calling superclass reset",BufferSize);
- DProfilerGenericSampler<BufferSize>::Reset(aStream);
-
+ {
+ iSyncOffset = aSyncOffset;
// check if reset called in stop (by driver)
- if(aSyncOffset != 999999)
+ if(iSyncOffset != KStateSamplingEnding)
{
+ DProfilerGenericSampler<BufferSize>::Reset(aStream);
#ifdef ITT_EVENT_HANDLER
// Itt event handler
if(iEventHandler)
@@ -140,15 +153,11 @@
// stop previous sampling if still running
Kern::Printf("Stopping DIttEventHandler");
iEventHandler->Stop();
- iEventHandler->Close();
- iEventHandler = NULL;
}
- Kern::Printf("Initiating DIttEventHandler");
iEventHandler = new DIttEventHandler(this->iSampleBuffer, this->gppSamplerData);
if(iEventHandler)
{
- Kern::Printf("Creating DIttEventHandler");
TInt err(iEventHandler->Create());
if(err != KErrNone)
{
@@ -163,12 +172,12 @@
}
// set first sample at the 10 ms, should be enough
- this->ittSamplerImpl.iIttSamplingPeriod = 10;
+ this->ittSamplerImpl.iIttSamplingPeriod = 8;
#else
this->ittSamplerImpl.iIttSamplingPeriod = this->iSamplingPeriod;
#endif
this->ittSamplerImpl.iIttSamplingPeriodDiv2 = (TInt)(this->ittSamplerImpl.iIttSamplingPeriod / 2);
- LOGSTRING3("CProfilerIttSampler<%d>::Reset - set ITT sampling period to %d",
+ LOGSTRING3("DProfilerIttSampler<%d>::Reset - set ITT sampling period to %d",
BufferSize,this->ittSamplerImpl.iIttSamplingPeriod);
}
else
@@ -180,8 +189,6 @@
{
// stop previous sampling if still running
iEventHandler->Stop();
- iEventHandler->Close();
- iEventHandler = NULL;
}
#endif
return KErrNone; // return if reset called in stop
@@ -196,7 +203,7 @@
this->ittSamplerImpl.Reset();
return KErrNone;
-}
+ }
/*
* DProfilerIttSampler::PostSample
@@ -205,53 +212,52 @@
*/
template <int BufferSize>
TInt DProfilerIttSampler<BufferSize>::PostSample()
-{
+ {
#ifdef ITT_EVENT_HANDLER
- if(!ittSamplerImpl.iFirstSampleTaken) // if we haven't read the initial state
- {
+ if(!ittSamplerImpl.iInitialSegsTaken || !ittSamplerImpl.iInitialLibsTaken) // if we haven't read the initial state
+ {
#endif
if(sampleNeeded)
- {
+ {
this->sampleNeeded = false;
- //LOGSTRING3("CProfilerIttSampler<%d>::PostSample - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
- //Kern::Printf("DProfilerIttSampler<%d>::PostSample - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
+ LOGSTRING3("DProfilerIttSampler<%d>::PostSample - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
TInt length = this->ittSamplerImpl.SampleImpl(this->gppSamplerData->lastPcValue,
this->gppSamplerData->sampleNumber);
if(length != 0)
- {
+ {
LOGSTRING("ITT sampler PostSample - starting to sample");
-
while(length > 0)
- {
+ {
this->iSampleBuffer->AddSample(ittSamplerImpl.itt_sample,length);
length = this->ittSamplerImpl.SampleImpl( this->gppSamplerData->lastPcValue,
this->gppSamplerData->sampleNumber );
if(length == 0)
- {
- LOGSTRING("MEM sampler PostSample - all samples generated!");
+ {
+ LOGSTRING("ITT sampler PostSample - done for this round!");
+ }
}
+ LOGSTRING("ITT sampler PostSample - finished sampling");
}
- LOGSTRING("ITT sampler PostSample - finished sampling");
+ this->sampleInProgress = false;
}
- this->sampleInProgress = false;
- }
#ifdef ITT_EVENT_HANDLER
- }
- if(!iEventHandler->Tracking())
- {
- iEventHandler->Start();
- Kern::Printf("DProfilerITTSampler<%d>::PostSample - ITT handler started",BufferSize);
- }
-
-#endif
+ }
+#endif
LOGSTRING2("ITT sampler PostSample - finished sampling, time: %d", gppSamplerData->sampleNumber);
// finally perform superclass postsample
TInt i(this->DProfilerGenericSampler<BufferSize>::PostSample());
+#ifdef ITT_EVENT_HANDLER
+ // notify event handler
+ if(iEventHandler)
+ {
+ iEventHandler->SampleHandled();
+ }
+#endif
return i;
-}
+ }
/*
* DProfilerIttSampler::PostSampleNeeded()
@@ -260,18 +266,28 @@
*/
template <int BufferSize>
TBool DProfilerIttSampler<BufferSize>::PostSampleNeeded()
-{
- LOGSTRING3("CProfilerIttSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
-
- TUint32 status = this->iSampleBuffer->iBufferStatus;
+ {
+ LOGSTRING3("DProfilerIttSampler<%d>::PostSampleNeeded - buffer status %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
- if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull || this->sampleNeeded == true)
- {
+ TUint32 status(this->iSampleBuffer->GetBufferStatus());
+#ifdef ITT_EVENT_HANDLER
+ if(iEventHandler)
+ {
+ if(iEventHandler->Tracking())
+ {
+ this->sampleNeeded = iEventHandler->SampleNeeded();
+ }
+ }
+#endif
+ if(status == DProfilerSampleBuffer::BufferCopyAsap ||
+ status == DProfilerSampleBuffer::BufferFull ||
+ this->sampleNeeded == true)
+ {
+ LOGSTRING2("DProfilerIttSampler<%d>::PostSampleNeeded - buffer needs emptying or sample is needed",BufferSize);
return true;
- }
-
+ }
return false;
-}
+ }
/*
* DProfilerIttSampler::Sample
@@ -279,40 +295,49 @@
* Function for initiating sampling
*/
template <int BufferSize>
-void DProfilerIttSampler<BufferSize>::Sample()
-{
- LOGSTRING2("CProfilerIttSampler<%d>::Sample",BufferSize);
-
- //#ifdef ITT_TEST
- LOGSTRING2("CProfilerIttSampler<%d>::Sample",BufferSize);
-
- if(ittSamplerImpl.SampleNeeded(this->gppSamplerData->sampleNumber) && this->sampleInProgress == false)
- {
- this->sampleInProgress = true;
- this->sampleNeeded = true;
+void DProfilerIttSampler<BufferSize>::Sample(TAny* aPtr)
+ {
+ LOGSTRING2("DProfilerIttSampler<%d>::Sample - entry",BufferSize);
+ if(iEventHandler)
+ {
+ if(!iEventHandler->Tracking())
+ {
+ if(ittSamplerImpl.SampleNeeded(this->gppSamplerData->sampleNumber) && this->sampleInProgress == false)
+ {
+ this->sampleInProgress = true;
+ this->sampleNeeded = true;
+
+ LOGSTRING2("DProfilerIttSampler<%d>::Sample - sample needed 1",BufferSize);
+ }
+
+ if(ittSamplerImpl.iInitialSegsTaken && ittSamplerImpl.iInitialLibsTaken)
+ {
+ iEventHandler->Start();
+ }
+ }
+ }
+ else
+ {
+ if(ittSamplerImpl.SampleNeeded(this->gppSamplerData->sampleNumber) && this->sampleInProgress == false)
+ {
+ this->sampleInProgress = true;
+ this->sampleNeeded = true;
+
+ LOGSTRING2("DProfilerIttSampler<%d>::Sample - sample needed 2",BufferSize);
+ }
+ }
- LOGSTRING2("CProfilerIttSampler<%d>::Sample - sample needed",BufferSize);
- }
-#ifdef ITT_EVENT_HANDLER
- // call this to increase the time stamp
- else if(iEventHandler->SampleNeeded())
- {
- // set the flag for post sampling
- this->sampleNeeded = true;
- }
-#endif
-
- LOGSTRING2("CProfilerIttSampler<%d>::Sample",BufferSize);
+ LOGSTRING2("DProfilerIttSampler<%d>::Sample - exit",BufferSize);
return;
-}
+ }
/*
* Destructor
*/
template <int BufferSize>
DProfilerIttSampler<BufferSize>::~DProfilerIttSampler()
-{
- LOGSTRING2("CProfilerIttSampler<%d>::~CProfilerIttSampler",BufferSize);
+ {
+ LOGSTRING2("DProfilerIttSampler<%d>::~DProfilerIttSampler",BufferSize);
#ifdef ITT_EVENT_HANDLER
if(iEventHandler)
{
@@ -322,6 +347,6 @@
iEventHandler = NULL;
}
#endif
-}
+ }
#endif
// end of file
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/MemSamplerImpl.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/MemSamplerImpl.h Tue Oct 26 16:20:32 2010 +0300
@@ -40,8 +40,10 @@
const TInt KProfilerTotalMemorySamplePeriod = 100;
// flags
+//#ifndef __SMP__
#define MEM_EVENT_HANDLER
//#define MEM_EVENT_HANDLER_LIBRARY_EVENTS
+//#endif
/*
*
@@ -61,21 +63,20 @@
EProcessingData,
ENothingToProcess
};
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+
enum ESampleType
{
ESampleChunks,
ESampleThreads,
ESampleLibraries
};
-#endif
DMemSamplerImpl();
~DMemSamplerImpl();
TInt CreateFirstSample();
- TInt SampleImpl();
- TBool SampleNeeded();
+ TInt SampleImpl(TUint32 sampleNum);
+ TBool SampleNeeded(TUint32 sampleNum);
void Reset();
TInt ProcessChunks();
TInt ProcessThreads();
@@ -104,7 +105,7 @@
DChunk* heapChunksToSample[KProfilerMaxChunksAmount];
DChunk* heapChunkNamesToReport[KProfilerMaxChunksAmount];
- TInt iCount;
+ TUint32 iCount;
TInt iChunkCount;
TInt iNewChunkCount;
TBuf8<0x50> name;
@@ -112,6 +113,11 @@
DThread* threadNamesToReport[KProfilerMaxThreadsAmount];
TInt iThreadCount;
TInt iNewThreadCount;
+
+ TInt iHandledThreads;
+ TInt iHandledChunks;
+ TInt iHandledLibs;
+
#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
DLibrary* librariesToSample[KProfilerMaxLibrariesAmount];
DLibrary* libraryNamesToReport[KProfilerMaxLibrariesAmount];
@@ -123,26 +129,21 @@
TInt iChunksProcessing;
TInt iThreadsProcessing;
TInt iMemSamplingPeriod;
- TInt iMemSamplingPeriodDiv2;
- TInt iMemSamplingPeriodDiv3;
+ //TInt iMemSamplingPeriodDiv2;
+ //TInt iMemSamplingPeriodDiv3;
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+
ESampleType iSampleType;
-#else
- TBool iSampleThreads;
-#endif
-
+
TBool iTimeToSample;
-
TBool iTotalMemoryOk;
TBool iTotalMemoryNameOk;
TUint8 sample[KSampleBufferSize];
TPtr8 sampleDescriptor;
-
- // test
+ TInt iThreadsHandled;
+ TInt iChunksHandled;
#ifdef MEM_EVENT_HANDLER
-// DMemoryEventHandler* iEventHandler;
TBool iChunksGathered;
TBool iThreadsGathered;
#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
@@ -159,7 +160,7 @@
DProfilerMemSampler(struct TProfilerGppSamplerData*, TInt id);
~DProfilerMemSampler();
- void Sample();
+ void Sample(TAny* aPtr);
TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset);
TInt PostSample();
TBool PostSampleNeeded();
@@ -171,6 +172,7 @@
DMemSamplerImpl memSamplerImpl;
struct TProfilerGppSamplerData* gppSamplerData;
TBool sampleNeeded;
+ TUint32 iSyncOffset;
};
/*
@@ -185,18 +187,18 @@
{
LOGSTRING2("DProfilerMemSampler<%d>::CProfilerMemSampler",BufferSize);
this->gppSamplerData = gppSamplerDataIn;
+#ifndef MEM_EVENT_HANDLER
this->iSamplingPeriod = 3000; // set default setting
+#endif
+ iSyncOffset = 0;
}
template <int BufferSize>
TInt DProfilerMemSampler<BufferSize>::Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset)
{
-//#ifdef MEM_EVENT_HANDLER
-// Kern::Printf("DProfilerMemSampler<%d>::Reset - calling superclass reset",BufferSize);
-
-//#endif
+ iSyncOffset = aSyncOffset;
// check if reset called in stop (by driver)
- if(aSyncOffset != 999999)
+ if(iSyncOffset != KStateSamplingEnding)
{
DProfilerGenericSampler<BufferSize>::Reset(aStream);
memSamplerImpl.Reset();
@@ -213,17 +215,15 @@
if(iEventHandler)
{
// stop previous sampling if still running
-// Kern::Printf("Stopping DMemoryEventHandler");
iEventHandler->Stop();
- iEventHandler->Close();
- iEventHandler = NULL;
}
-
-// Kern::Printf("Initiating DMemoryEventHandler");
- iEventHandler = new DMemoryEventHandler(this->iSampleBuffer);
+ else
+ {
+ iEventHandler = new DMemoryEventHandler(this->iSampleBuffer, this->gppSamplerData);
+ }
+
if(iEventHandler)
{
-// Kern::Printf("Creating DMemoryEventHandler");
TInt err(iEventHandler->Create());
if(err != KErrNone)
{
@@ -239,23 +239,23 @@
// set first chunk&thread memory lookup at the 5 ms, should be enough
#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
- this->memSamplerImpl.iMemSamplingPeriod = 45;
+ this->memSamplerImpl.iMemSamplingPeriod = 10;
#else
this->memSamplerImpl.iMemSamplingPeriod = 10;
#endif
-
-#else
+
+#else // ifdef mem event handler
this->memSamplerImpl.iMemSamplingPeriod = this->iSamplingPeriod;
#endif
- this->memSamplerImpl.iMemSamplingPeriodDiv2 = (TInt)(this->memSamplerImpl.iMemSamplingPeriod / 2);
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
- this->memSamplerImpl.iMemSamplingPeriodDiv3 = (TInt)(this->memSamplerImpl.iMemSamplingPeriod / 3);
-#endif
+// this->memSamplerImpl.iMemSamplingPeriodDiv2 = (TInt)(this->memSamplerImpl.iMemSamplingPeriod / 2);
+//#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+// this->memSamplerImpl.iMemSamplingPeriodDiv3 = (TInt)(this->memSamplerImpl.iMemSamplingPeriod / 3);
+//#endif
LOGSTRING3("CProfilerMemSampler<%d>::Reset - set mem sampling period to %d",
BufferSize,this->memSamplerImpl.iMemSamplingPeriod);
}
- else
+ else // iSyncOffset == KStateSamplingEnding
{
LOGSTRING2("DProfilerMemSampler<%d>::Reset - reset in stop", BufferSize);
#ifdef MEM_EVENT_HANDLER
@@ -263,10 +263,8 @@
if(iEventHandler)
{
// stop previous sampling if still running
-// Kern::Printf("Stopping DMemoryEventHandler");
+ LOGSTRING("Stopping DMemoryEventHandler");
iEventHandler->Stop();
- iEventHandler->Close();
- iEventHandler = NULL;
}
#endif
return KErrNone; // return if reset called in stop
@@ -276,6 +274,9 @@
TInt length(memSamplerImpl.CreateFirstSample());
this->iSampleBuffer->AddSample(memSamplerImpl.sample,length);
+ TUint8 memSamplerId(4); // mem sampler id
+ this->iSampleBuffer->AddSample(&memSamplerId,1);
+ this->iSampleBuffer->AddSample((TUint8*)&(gppSamplerData->sampleNumber),4);
this->sampleNeeded = false;
LOGSTRING("DProfilerMemSampler::Reset - exit");
return KErrNone;
@@ -299,25 +300,47 @@
#endif
// disable interrupts for checking the kernel containers (EChunk, EThread)
// TInt interruptLevel(NKern::DisableInterrupts(0));
-
// first collect chunk data
- TInt length(this->memSamplerImpl.SampleImpl());
+ TInt length(this->memSamplerImpl.SampleImpl(this->gppSamplerData->sampleNumber));
+ LOGSTRING2("DProfilerMemSampler<>::PostSample - in post sample, clock %d", this->memSamplerImpl.iCount );
if(length != 0)
{
// then, encode the sample to the buffer until no further data available
while(length > 0)
{
- this->iSampleBuffer->AddSample(memSamplerImpl.sample,length);
- length = this->memSamplerImpl.SampleImpl();
+ TInt ret =this->iSampleBuffer->AddSample(memSamplerImpl.sample,length);
+ if (ret != 0)
+ {
+ Kern::Printf(("DProfilerMemSampler<>::PostSample() - add to sample buffer failed, loosing data, error = %d"),ret); }
+ length = this->memSamplerImpl.SampleImpl(this->gppSamplerData->sampleNumber);
+ LOGSTRING("DProfilerMemSampler<>::PostSample - in post sample again");
// indicate that the whole MEM sample ends by having a 0x00 in the end
if(length == 0)
{
- TUint8 number(0);
+ TUint8 endMark(0);
LOGSTRING("MEM sampler PostSample - all samples generated!");
- this->iSampleBuffer->AddSample(&number,1);
+ this->iSampleBuffer->AddSample(&endMark,1);
LOGSTRING2("MEM sampler PostSample - end mark added, time: %d", gppSamplerData->sampleNumber);
+
+ if (memSamplerImpl.iThreadsGathered && !memSamplerImpl.iChunksGathered)
+ {
+ LOGSTRING("MEM sampler PostSample - creating timestamp for chunks!");
+ // add start marker for chunks
+ TUint8 memSamplerId(4); // mem sampler id
+ this->iSampleBuffer->AddSample(&memSamplerId,1);
+ this->iSampleBuffer->AddSample((TUint8*)&(gppSamplerData->sampleNumber),4);
+ }
+#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+ if (memSamplerImpl.iThreadsGathered && memSamplerImpl.iChunksGathered)
+ {
+ // add start marker for chunks
+ TUint8 memSamplerId(4); // mem sampler id
+ this->iSampleBuffer->AddSample(&memSamplerId,1);
+ this->iSampleBuffer->AddSample((TUint8*)&(gppSamplerData->sampleNumber),4);
+ }
+#endif
}
}
}
@@ -332,13 +355,17 @@
if(memSamplerImpl.iThreadsGathered && memSamplerImpl.iChunksGathered)
#endif
{
- // start memory event tracking after checking the current memory status
- if(!iEventHandler->Tracking())
+ if(iSyncOffset != KStateSamplingEnding)
{
- iEventHandler->Start();
-// Kern::Printf("DProfilerMemSampler<%d>::PostSample - memory event handler started",BufferSize);
+ // start memory event tracking after checking the current memory status
+ if(!iEventHandler->Tracking())
+ {
+ LOGSTRING2("MEM sampler PostSample - Starting event handler timestamp : %x", gppSamplerData->sampleNumber);
+ memSamplerImpl.iTimeToSample = false;
+ iEventHandler->Start();
+ LOGSTRING2("DProfilerMemSampler<%d>::PostSample - memory event handler started",BufferSize);
+ }
}
-
}
#endif
@@ -346,6 +373,8 @@
// finally perform superclass postsample
TInt i(this->DProfilerGenericSampler<BufferSize>::PostSample());
+ // notify event handler
+ //iEventHandler->SampleHandled();
return i;
}
@@ -354,57 +383,54 @@
{
LOGSTRING3("DProfilerMemSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
- TUint32 status(this->iSampleBuffer->iBufferStatus);
-
- if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull || this->sampleNeeded == true)
- {
- return true;
- }
-
- return false;
+ TUint32 status(this->iSampleBuffer->GetBufferStatus());
+ if(iEventHandler)
+ {
+ if(iEventHandler->Tracking())
+ {
+ this->sampleNeeded = iEventHandler->SampleNeeded();
+ }
+ }
+ if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull || this->sampleNeeded == true)
+ {
+ return true;
+ }
+
+ return false;
}
template <int BufferSize>
-void DProfilerMemSampler<BufferSize>::Sample()
+void DProfilerMemSampler<BufferSize>::Sample(TAny* aPtr)
{
- LOGSTRING2("DProfilerMemSampler<%d>::Sample",BufferSize);
-
- // check if sample is needed, i.e. the sampling interval is met
- if(memSamplerImpl.SampleNeeded())
- {
- // set the flag for post sampling
- this->sampleNeeded = true;
-
- // start the MEM sample with the sample time
- TUint8 number(4); // mem sampler id
- this->iSampleBuffer->AddSample(&number,1);
- this->iSampleBuffer->AddSample((TUint8*)&(gppSamplerData->sampleNumber),4);
-
- // leave the rest of the processing for PostSample()
- }
-
-#ifdef MEM_EVENT_HANDLER
- // call this to increase the time stamp
- else if(iEventHandler->SampleNeeded())
- {
- // set the flag for post sampling
- this->sampleNeeded = true;
- }
-
-// // check if time stamp is divibable with
-// if((memSamplerImpl.iCount % KProfilerTotalMemorySamplePeriod) == 0 &&
-// memSamplerImpl.iCount > 0)
+ LOGSTRING3("DProfilerMemSampler<%d>::Sample, time %d",BufferSize, this->memSamplerImpl.iCount);
+ if(iEventHandler)
+ {
+ if(!iEventHandler->Tracking())
+ {
+ // check if sample is needed, i.e. the sampling interval is met
+ if(memSamplerImpl.SampleNeeded(gppSamplerData->sampleNumber))
+ {
+ // set the flag for post sampling
+ this->sampleNeeded = true;
+ /*
+ LOGSTRING2("timestamp : 0x%04x", gppSamplerData->sampleNumber);
+ // start the MEM sample with the sample time
+ TUint8 memSamplerId(4); // mem sampler id
+ this->iSampleBuffer->AddSample(&memSamplerId,1);
+ this->iSampleBuffer->AddSample((TUint8*)&(gppSamplerData->sampleNumber),4);
+ */
+ // leave the rest of the processing for PostSample()
+ }
+ }
+//#ifdef MEM_EVENT_HANDLER
+// // call this to increase the time stamp
+// if(iEventHandler->SampleNeeded())
// {
-// // sample total memory once per 100 ms
-// memSamplerImpl.EncodeTotalMemory();
-//
-// // add end mark
-// TUint8 number(0);
-// this->iSampleBuffer->AddSample(&number,1);
+// // set the flag for post sampling
+// this->sampleNeeded = true;
// }
-#endif
-
- LOGSTRING2("CProfilerMemSampler<%d>::Sample",BufferSize);
+//#endif
+ }
return;
}
@@ -417,7 +443,7 @@
if(iEventHandler)
{
// stop previous sampling if still running
-// Kern::Printf("Stopping DMemoryEventHandler");
+ LOGSTRING("Stopping DMemoryEventHandler");
iEventHandler->Stop();
iEventHandler->Close();
iEventHandler = NULL;
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/MemoryEventHandler.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/MemoryEventHandler.h Tue Oct 26 16:20:32 2010 +0300
@@ -30,7 +30,7 @@
{
public:
// constructor
- DMemoryEventHandler(DProfilerSampleBuffer* aSampleBuffer);
+ DMemoryEventHandler(DProfilerSampleBuffer* aSampleBuffer, TProfilerGppSamplerData* aGppSamplerDataIn);
TInt Create();
~DMemoryEventHandler();
TInt Start();
@@ -38,6 +38,7 @@
TBool Tracking() {return iTracking;}
TBool SampleNeeded();
+ void SampleHandled();
private:
static TUint EventHandler(TKernelEvent aEvent, TAny* a1, TAny* a2, TAny* aThis);
@@ -80,12 +81,14 @@
DProfilerSampleBuffer* iSampleBuffer;
TInt iCounters[EEventLimit];
- TUint32 iCount;
+ //TUint32 iCount;
TUint8 iSample[KEventBufferSize];
TPtr8 iSampleDescriptor;
TUint32 iPreviousCount;
+ TBool iSampleAvailable;
+ TProfilerGppSamplerData* gppSamplerData;
};
#endif
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/PriSamplerImpl.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/inc/PriSamplerImpl.h Tue Oct 26 16:20:32 2010 +0300
@@ -89,7 +89,7 @@
DProfilerPriSampler(struct TProfilerGppSamplerData*, TInt id);
~DProfilerPriSampler();
- void Sample();
+ void Sample(TAny* aPtr);
TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset);
TInt PostSample();
TBool PostSampleNeeded();
@@ -164,7 +164,7 @@
{
this->sampleNeeded = false;
- LOGSTRING3("CProfilerPriSampler<%d>::PostSample - state %d",BufferSize,this->sampleBuffer->GetBufferStatus());
+ LOGSTRING3("CProfilerPriSampler<%d>::PostSample - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
//TInt interruptLevel = NKern::DisableInterrupts(0);
@@ -203,11 +203,13 @@
template <int BufferSize>
TBool DProfilerPriSampler<BufferSize>::PostSampleNeeded()
{
- LOGSTRING3("CProfilerPriSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->sampleBuffer->GetBufferStatus());
+ LOGSTRING3("CProfilerPriSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus());
+
+ TUint32 status = this->iSampleBuffer->GetBufferStatus();
- TUint32 status = this->iSampleBuffer->iBufferStatus;
-
- if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull || this->sampleNeeded == true)
+ if(status == DProfilerSampleBuffer::BufferCopyAsap ||
+ status == DProfilerSampleBuffer::BufferFull ||
+ this->sampleNeeded == true)
{
return true;
}
@@ -217,7 +219,7 @@
template <int BufferSize>
-void DProfilerPriSampler<BufferSize>::Sample()
+void DProfilerPriSampler<BufferSize>::Sample(TAny* aPtr)
{
LOGSTRING2("CProfilerPriSampler<%d>::Sample",BufferSize);
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsDriver.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsDriver.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -23,6 +23,7 @@
#include <kern_priv.h>
#include <platform.h>
#include <arm.h>
+#include <kernel/kpower.h>
#ifdef __SMP__
#include <assp/naviengine/naviengine.h>
@@ -51,36 +52,24 @@
static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
static _LIT_SECURITY_POLICY_FAIL( KDenyAllPolicy );
-#define SEPARATE_DFC_QUEUE
// CONSTANTS
-
//_LIT(DProfilerThread,"DProfilerThread");
-//const TInt KDProfilerThreadPriority = 27;
+const TInt KDSamplerThreadPriority = 27;
-#ifdef SEPARATE_DFC_QUEUE
const TInt KGeneralsDriverThreadPriority = 24;
_LIT(KGeneralsDriverThread, "PIGeneralsDriver");
-#endif
-
// global Dfc Que
-//TDynamicDfcQue* gDfcQ;
+TDynamicDfcQue* gDfcQ;
-//#ifdef __SMP__
-//
-//enum TNaviEngineAsspInterruptIdExtension
-//{
-// KIntProfilerBase = 99 // Sampling profiler interrupt base.
-// // Each CPU is assigned a sampling interrupt from this base
-// // CPU-0's sampling interrupt is KIntIdSamplingBase + 0
-// // CPU-n's sampling interrupt is KIntIdSamplingBase + n
-//};
-//#endif
+#ifdef __SMP__
+static TSpinLock PiSpinLock = TSpinLock(TSpinLock::EOrderGenericIrqLow2);
+#endif
/*
*
*
- * Class DGfcProfilerFactory definition
+ * Class DGeneralsProfilerFactory definition
*
*
*/
@@ -100,11 +89,12 @@
/*
*
*
- * Class DGfcDriver definition
+ * Class DGeneralsDriver definition
*
*
*/
class DPluginDriver;
+class DSamplerPowerHandler;
class DGeneralsDriver : public DPluginDriver
{
@@ -112,20 +102,22 @@
public:
DGeneralsDriver();
~DGeneralsDriver();
-
+ TInt StartSampling(TInt aRate, TInt aInterruptNumber);
+ TInt StopSampling();
private:
- TInt NewStart(TInt aRate);
+ TInt isExecuted;
+ TInt NewStart(TInt aRate);
+ void IncrementSampleNeededState(TInt aId);
+ void DecrementSampleNeededState();
static void NewDoProfilerProfile(TAny*);
static void NewDoDfc(TAny*);
// called by each core
- static void Sample(TAny*);
+ static void Sample(TAny* aPtr);
TInt GetSampleTime(TUint32* time);
//TInt Test(TUint32 testCase);
- TInt StartSampling();
- TInt StopSampling();
void InitialiseSamplerList();
@@ -169,7 +161,7 @@
#endif
DProfilerGfcSampler<10000> gfcSampler;
DProfilerIttSampler<10000> ittSampler;
- DProfilerMemSampler<40000> memSampler;
+ DProfilerMemSampler<10000> memSampler;
DProfilerPriSampler<10000> priSampler;
#ifdef __SMP__
// DProfilerPriSampler<10000> priSampler2;
@@ -183,13 +175,46 @@
static const TInt KSamplerAmount = 8;
#endif
DProfilerSamplerBase* iSamplers[KSamplerAmount];
+ TUint iInterruptCounter[KMaxCpus];
TInt iMaxCpus;
TUint32 iStartTime;
-
-#ifdef SEPARATE_DFC_QUEUE
- TDynamicDfcQue* iDfcQ;
-#endif
+ TInt8 postSampleNeeded;
+ DSamplerPowerHandler* iPowerHandler;
+
+ /* using the HAL machine UID we determine the platform Bridge/Naviengine */
+ enum TPlatform
+ {
+ /* Bridge Platform STE500*/
+ EBridge,
+ /* Naviengine Platform NE1_TB */
+ ENaviengine,
+ /* Not recognised platform */
+ ENotRecognised,
+ /* Spare */
+ ESpare
+ };
+ TPlatform iPlatform;
+
+public:
+ TUint8 iStarted;
+ TUint8 iOff;
+ TInt iRate;
+ TInt iIntNo; // Interrupt Number
};
+/*
+ * PowerHandler
+ */
+class DSamplerPowerHandler : public DPowerHandler
+ {
+public: // from DPowerHandler
+ void PowerUp();
+ void PowerDown(TPowerState);
+public:
+ DSamplerPowerHandler(DGeneralsDriver* aChannel);
+public:
+ DGeneralsDriver* iChannel;
+ };
+
/*
*
@@ -219,14 +244,21 @@
DGeneralsProfilerFactory::~DGeneralsProfilerFactory()
{
-// if (gDfcQ)
-// {
-// gDfcQ->Destroy();
-// }
+ if (gDfcQ)
+ {
+ gDfcQ->Destroy();
+ }
}
TInt DGeneralsProfilerFactory::Install()
{
+ // Allocate a kernel thread to run the DFC
+ TInt r = Kern::DynamicDfcQCreate(gDfcQ, KDSamplerThreadPriority, KGeneralsDriverThread);
+ if (r != KErrNone)
+ {
+ return r;
+ }
+
return(SetName(&KPluginSamplerName));
}
@@ -275,6 +307,7 @@
sampleRunning = 0;
iSyncOffset = 0;
iStartTime = 0;
+ postSampleNeeded = 0;
InitialiseSamplerList();
}
@@ -306,6 +339,11 @@
#ifdef __SMP__
// get the number of cpus
iMaxCpus = NKern::NumberOfCpus();
+ for(TInt nCpu(0); nCpu < iMaxCpus; nCpu++)
+ {
+ iInterruptCounter[nCpu] = 0;
+ }
+
#else
iMaxCpus = 0;
#endif
@@ -315,14 +353,14 @@
TInt r(iSampleStartTimeProp.Attach(KGppPropertyCat, EGppPropertySyncSampleNumber));
if (r!=KErrNone)
{
- LOGSTRING2("DGeneralsDriver::InitialiseSamplerList() - error in attaching counter property, error %d", r);
+ Kern::Printf("DGeneralsDriver::InitialiseSamplerList() - error in attaching counter property, error %d", r);
}
LOGSTRING("DGeneralsDriver::InitialiseSamplerList() - defining properties");
r = iSampleStartTimeProp.Define(RProperty::EInt, KAllowAllPolicy, KDenyAllPolicy, 0, NULL);
if (r!=KErrNone)
{
- LOGSTRING2("DGeneralsDriver::InitialiseSamplerList() - error in defining counter property, error %d", r);
- }
+ Kern::Printf("DGeneralsDriver::InitialiseSamplerList() - error in defining counter property, error %d", r);
+ }
}
@@ -341,7 +379,7 @@
TInt DGeneralsDriver::DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer)
{
TUint8 err(KErrNone);
-
+ LOGSTRING("DGeneralsDriver::DoCreate()");
if (!Kern::QueryVersionSupported(TVersion(1,0,1),aVer))
return KErrNotSupported;
@@ -361,13 +399,20 @@
//Require Power Management and All Files to use this driver
// Not ideal, but better than nothing
if(!Kern::CurrentThreadHasCapability(ECapabilityPowerMgmt,__PLATSEC_DIAGNOSTIC_STRING("Checked by GeneralsDriver.ldd")))
+ {
+ Kern::Printf("DGeneralsDriver::CurrentThreadHasCapability - denied");
return KErrPermissionDenied;
+ }
if(!Kern::CurrentThreadHasCapability(ECapabilityAllFiles,__PLATSEC_DIAGNOSTIC_STRING("Checked by GeneralsDriver.ldd")))
- return KErrPermissionDenied;
+ {
+ Kern::Printf("DGeneralsDriver::CurrentThreadHasCapability - denied");
+ return KErrPermissionDenied;
+ }
SSecurityInfo secureInfo = clientProcess->iS;
if (secureInfo.iSecureId != KProfilerExeSecurUid)
{
+ Kern::Printf("DGeneralsDriver::security - denied");
return KErrPermissionDenied;
}
}
@@ -378,22 +423,20 @@
iTimer.Cancel();
iNewDfc.Cancel();
- Kern::SetThreadPriority(24);
+ Kern::SetThreadPriority(KGeneralsDriverThreadPriority);
-#ifdef SEPARATE_DFC_QUEUE
- err = Kern::DynamicDfcQCreate(iDfcQ, KGeneralsDriverThreadPriority, TBuf8<32>( KGeneralsDriverThread ));
- if (KErrNone == err)
+ SetDfcQ(gDfcQ);
+ iNewDfc.SetDfcQ(iDfcQ);
+ iMsgQ.Receive();
+
+ // create the power handler
+ iPowerHandler = new DSamplerPowerHandler(this);
+ if (!iPowerHandler)
{
- SetDfcQ(iDfcQ);
- iNewDfc.SetDfcQ(iDfcQ);
- iMsgQ.Receive();
- return err;
+ Kern::Printf("DGeneralsDriver::DoCreate() : new DSamplerPowerHandler(this) failed");
+ return KErrNoMemory;
}
-#else
- SetDfcQ(Kern::DfcQue0());
- iNewDfc.SetDfcQ(iDfcQ);
- iMsgQ.Receive();
-#endif
+ iPowerHandler->Add();
return err;
}
@@ -403,11 +446,6 @@
iTimer.Cancel();
iNewDfc.Cancel();
-#ifdef SEPARATE_DFC_QUEUE
- if(iDfcQ)
- iDfcQ->Destroy();
-#endif
-
iSampleStartTimeProp.Close();
Kern::SafeClose((DObject*&)iClient,NULL);
}
@@ -450,48 +488,39 @@
#ifdef __SMP__
/*
- * Bind and enable the sampling interupts associated with each core.
+ * Bind and enable the sampling interrupts
*/
TInt err(0);
-
- TUint32 flags = NKern::EIrqBind_Count;
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase - 32=%d", KIntProfilerBase -32 );
- err = NKern::InterruptBind( KIntProfilerBase - 32 , DGeneralsDriver::Sample, this, flags, 0);
- if(err < 0)
- Kern::Printf(" InterruptBind KIntProfilerBase - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 1 - 32=%d", KIntProfilerBase + 1-32 );
- err = NKern::InterruptBind( KIntProfilerBase + 1 - 32 , DGeneralsDriver::Sample, this, flags, 0);
- if(err < 0)
- Kern::Printf(" InterruptBind KIntProfilerBase + 1 - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 2 - 32=%d", KIntProfilerBase + 2 - 32 );
- err = NKern::InterruptBind(KIntProfilerBase + 2 - 32 , DGeneralsDriver::Sample, this, flags, 0);
- if(err < 0)
- Kern::Printf(" InterruptBind KIntProfilerBase + 2 - 32 ret = %d", err );
+ TUint32 flags(NKern::EIrqBind_Count);
+ TInt noofCpu(NKern::NumberOfCpus());
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 3 - 32=%d", KIntProfilerBase + 3 - 32 );
- err = NKern::InterruptBind(KIntProfilerBase + 3 - 32 , DGeneralsDriver::Sample, this, flags, 0);
- if(err < 0)
- Kern::Printf(" InterruptBind KIntProfilerBase + 3 - 32 ret = %d", err );
-
-
- err = NKern::InterruptEnable(KIntProfilerBase - 32);
- if(err < 0)
- Kern::Printf(" InterruptEnable KIntProfilerBase - 32 ret = %d", err );
-
- err = NKern::InterruptEnable(KIntProfilerBase + 1 - 32);
- if(err < 0)
- Kern::Printf(" InterruptEnable KIntProfilerBase + 1 - 32 ret = %d", err );
-
- err = NKern::InterruptEnable(KIntProfilerBase + 2 - 32);
- if(err < 0)
- Kern::Printf(" InterruptEnable KIntProfilerBase + 2 - 32 ret = %d", err );
-
- err = NKern::InterruptEnable(KIntProfilerBase + 3 - 32);
- if(err < 0)
- Kern::Printf(" InterruptEnable KIntProfilerBase + 3 - 32 ret = %d", err );
+ //Binding to the interrupt(s)
+ for( TInt nCpu(0); nCpu < noofCpu; nCpu++ )
+ {
+ LOGSTRING3(" > Interrupt::InterruptBind %d + %d - 32", iIntNo, nCpu );
+ err = NKern::InterruptBind( (iIntNo + nCpu - 32) , DGeneralsDriver::Sample, this, flags, 0);
+ if(err < 0)
+ {
+ Kern::Printf(" InterruptBind %d + %d - 32 Error = 0x%x", iIntNo, nCpu, err );
+ return err;
+ }
+ }
+
+ //Enabling Interrupt(s)
+ for( TInt nCpu(0); nCpu < noofCpu; nCpu++ )
+ {
+ LOGSTRING3(" > NKern::InterruptEnable %d + %d - 32", iIntNo, nCpu );
+ err = NKern::InterruptEnable(iIntNo + nCpu - 32);
+ if(err < 0)
+ {
+ Kern::Printf(" InterruptEnable %d + %d - 32 ret = 0x%x", iIntNo, nCpu, err );
+ return err;
+ }
+
+ /* For Bridge we enable one single interrupt for CPU 1 */
+ if(iPlatform == EBridge)
+ break;
+ }
#endif
@@ -502,6 +531,33 @@
return KErrNone;
}
+void DGeneralsDriver::IncrementSampleNeededState(TInt aId)
+ {
+ LOGSTRING2("DGeneralsDriver::IncrementSampleNeededState() - incrementing sample needed state, caller id: %d", (aId+1));
+#ifdef __SMP__
+ TInt intState(0);
+ intState = __SPIN_LOCK_IRQSAVE(PiSpinLock);
+#endif
+ postSampleNeeded++;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(PiSpinLock, intState);
+#endif
+ }
+
+void DGeneralsDriver::DecrementSampleNeededState()
+ {
+ LOGSTRING("DGeneralsDriver::DecrementSampleNeededState() - decrementing sample needed state");
+#ifdef __SMP__
+ TInt intState(0);
+ intState = __SPIN_LOCK_IRQSAVE(PiSpinLock);
+#endif
+ postSampleNeeded--;
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(PiSpinLock, intState);
+#endif
+ }
+
+
/*
* This function is run in each interrupt
*/
@@ -510,83 +566,147 @@
void DGeneralsDriver::NewDoProfilerProfile(TAny* aPtr)
{
LOGSTRING("DGeneralsDriver::NewDoProfilerProfile - entry");
-
+ DGeneralsDriver& d=*(DGeneralsDriver*)aPtr;
#ifdef __SMP__
TInt currCpu(NKern::CurrentCpu());
#endif
- TInt8 postSampleNeeded(0);
- DGeneralsDriver& d=*(DGeneralsDriver*)aPtr;
+
+ if(!d.iOff)
+ {
+ if (d.iState == ERunning && d.sampleRunning == 0)
+ {
+ // start timer again
+ d.iTimer.Again(d.iPeriod);
+ d.sampleRunning++;
+
+#ifdef __SMP__
+ // print out the sample tick
+ if(d.gppSampler.GetExportData()->sampleNumber% 1000 == 0)
+ {
+ Kern::Printf(("PIPROF SAMPLE TICK, #%d"), d.gppSampler.GetExportData()->sampleNumber);
+ }
+
+ // call the actual CPU sampling function for CPU 0 (in NaviEngine), later may be on any of the CPUs
+ Sample(aPtr);
+
+ /*
+ This is the master sampler from the watchdog timer, so
+ send interrupts to the other CPU(s)
+ */
+ TScheduler *theSched = TScheduler::Ptr();
+// GicDistributor* gicDist = (GicDistributor* )theSched->i_GicDistAddr;
+ GicDistributor* gicDist = (GicDistributor* )(theSched->iSX.iGicDistAddr);
+
+ // post-sampling for NTimer interrupted CPU
+ //d.postSampleNeeded += d.iSamplers[currCpu]->PostSampleNeeded();
+
+ if (d.iPlatform == EBridge)
+ {
+ /* The Interrupt ID is hardcoded for Bridge to be 108/117, using SPI on ARM GIC
+ * Programming the GIC Distributor Set-Pending Register to raise an interrupt
+ * Programming the GIC Distributor Target Register to set an interrupt in CPU 1
+ */
+
+ /* Interrupt Processor Targets Registers (ICDIPTRn)
+ * target register ICDIPTR number, M, is given by M = N DIV 4
+ * so M is 27 for N = 108/117
+ * NTimer interrupt is always defaulted to CPU 0 so we have to interrupt CPU 1
+ * setting 0bxxxxxx1x CPU interface 1
+ */
+// gicDist->iTarget[27] |= 0x00000002;
+// gicDist->iTarget[27] &= 0xFE;
+ gicDist->iTarget[29] |= 0x00000200;
+ gicDist->iTarget[29] &= 0xFFFFFEFF;
- if (d.iState == ERunning && d.sampleRunning == 0)
- {
- // start timer again
- d.iTimer.Again(d.iPeriod);
- d.sampleRunning++;
-
-#ifdef __SMP__
- // print out the sample tick
- if(d.gppSampler.GetExportData()->sampleNumber% 1000 == 0)
- {
- Kern::Printf(("PIPROF SAMPLE TICK, #%d"), d.gppSampler.GetExportData()->sampleNumber);
- }
- // call the actual CPU sampling function for CPU 0 (in NaviEngine), later may be on any of the CPUs
- Sample(aPtr);
+ /* Interrupt Set-Pending Registers (ICDISPRn)
+ * the corresponding ICDISPR number, M, is given by M = N DIV 32
+ * M = 3 for N being 108/117
+ * the bit number of the required Set-pending bit in this register is N MOD 32
+ * which in this case is 12
+ */
+// gicDist->iPendingSet[3] = 1<<((12)); // N = 108
+ gicDist->iPendingSet[3] = 1<<((21)); // N = 117
+
+ arm_dsb();
+
+ }
+ else if (d.iPlatform == ENaviengine) //naviengine platform
+ {
+ for( TInt nCpu(0); nCpu < NKern::NumberOfCpus(); nCpu++ )
+ {
+ if( nCpu != currCpu )
+ {
+ //Kern::Printf(("DProfile::TimerSampleIsr() > iSoftIrq: to cpu%d, 0x%08X"), nCpu, ( 0x10000 << nCpu ) | (d.iIntNo + nCpu));
+ gicDist->iSoftIrq = ( 0x10000 << nCpu ) | (d.iIntNo + nCpu);
+ }
+ // post-sampling for CPUs with specifically generated interrupts
+ //d.postSampleNeeded += d.iSamplers[nCpu]->PostSampleNeeded();
+ }
+ arm_dsb();
+
+ }
+ else
+ {
+ Kern::Printf("DGeneralsDriver::NewDoProfilerProfile - SMP Platform not recognised " );
+ }
+
+#endif
+ // then sample the rest of non-cpu samplers
+ for(TInt i(0);i<KSamplerAmount;i++)
+ {
+ if(d.iSamplers[i]->iEnabled)
+ {
+ d.iSamplers[i]->Sample(aPtr);
+ if(d.iSamplers[i]->PostSampleNeeded())
+ {
+ d.IncrementSampleNeededState(i);
+ }
+ }
+ }
+
+// // check if post sampling is needed for samplers
+// for(TInt i(0);i<KSamplerAmount;i++)
+// {
+// if(d.iSamplers[i]->iEnabled)
+// {
+// if(d.iSamplers[i]->PostSampleNeeded())
+// {
+// d.IncrementSampleNeededState(i);
+// }
+// }
+// }
+
+ if(d.postSampleNeeded > 0 && d.doingDfc == 0)
+ //if(d.postSampleNeeded > 0)
+ {
+ LOGSTRING2("DGeneralsDriver::NewDoProfilerProfile - postSampleNeeded count %d ", d.postSampleNeeded );
+ d.doingDfc++;
+ d.iNewDfc.Add();
- // post-sampling for NTimer interrupted CPU
- postSampleNeeded += d.iSamplers[currCpu]->PostSampleNeeded();
+ d.sampleRunning--;
- /*
- This is the master sampler from the watchdog timer, so
- send interrupts to the other CPUs
- */
- TScheduler *theSched = TScheduler::Ptr();
- GicDistributor* gicDist = (GicDistributor* )theSched->i_GicDistAddr;
-
- for( TInt nCpu(0); nCpu < d.iMaxCpus; nCpu++ )
+ return;
+ }
+ d.sampleRunning--;
+ } // if (d.iState == ERunning && d.sampleRunning == 0)
+ else if (d.iState == EStopping && d.sampleRunning == 0)
{
- if( nCpu != currCpu )
- {
- gicDist->iSoftIrq = ( 0x10000 << nCpu ) | (KIntProfilerBase + nCpu);
- }
- // post-sampling for CPUs with specifically generated interrupts
- postSampleNeeded += d.iSamplers[nCpu]->PostSampleNeeded();
+ // add a dfc for this final time
+ d.iNewDfc.Add();
+ LOGSTRING("DGeneralsDriver::NewDoProfilerProfile - sampling added to dfc queue");
}
- arm_dsb();
-#endif
- // then sample the rest of non-cpu samplers
- for(TInt i(d.iMaxCpus);i<KSamplerAmount;i++)
+ else
{
- if(d.iSamplers[i]->iEnabled)
- {
- d.iSamplers[i]->Sample();
- postSampleNeeded += d.iSamplers[i]->PostSampleNeeded();
- }
+ // the previous sample has not finished,
+ Kern::Printf("DGeneralsDriver::NewDoProfilerProfile - Profiler Sampler Error - interrupted before finished sampling!!");
}
-
- if(postSampleNeeded > 0 && d.doingDfc == 0)
- {
- d.doingDfc++;
- d.iNewDfc.Add();
-
- d.sampleRunning--;
- return;
- }
- d.sampleRunning--;
+ LOGSTRING("DGeneralsDriver::NewDoProfilerProfile - exit");
+ } // iOff
+ else
+ {
+ Kern::Printf("DGeneralsDriver::iOff");
}
- else if (d.iState == EStopping && d.sampleRunning == 0)
- {
- // add a dfc for this final time
- d.iNewDfc.Add();
- Kern::Printf("DGeneralsDriver::Sample - sampling added to dfc queue");
- }
- else
- {
- // the previous sample has not finished,
- Kern::Printf("DGeneralsDriver::NewDoProfilerProfile - Profiler Sampler Error - interrupted before finished sampling!!");
- }
- LOGSTRING("DGeneralsDriver::NewDoProfilerProfile - exit");
- }
-
+}
void DGeneralsDriver::Sample(TAny* aPtr)
@@ -596,17 +716,14 @@
#ifdef __SMP__
DGeneralsDriver& d=*(DGeneralsDriver*)aPtr;
-// TInt currCpu(NKern::CurrentCpu());
+ TInt currCpu(NKern::CurrentCpu());
+ ++d.iInterruptCounter[currCpu];
- // sample the current cpu load
-// if(d.iSamplers[currCpu]->iEnabled)
-// {
- d.iSamplers[NKern::CurrentCpu()]->Sample();
-// postSampleNeeded += d.iSamplers[currCpu]->PostSampleNeeded();
-// }
+ d.iSamplers[currCpu]->Sample(aPtr);
#endif
LOGSTRING("DGeneralsDriver::Sample - exit");
}
+
/*
* This function is run when any of the samplers
* requires post sampling
@@ -625,7 +742,10 @@
{
if(d.iSamplers[i]->PostSampleNeeded())
{
- d.iSamplers[i]->PostSample();
+ LOGSTRING3("DGeneralsDriver::NewDoDfc iSamplers[%d] PostSampleNeeded count %d", i, d.postSampleNeeded);
+ d.iSamplers[i]->PostSample();
+ d.DecrementSampleNeededState();
+ LOGSTRING3("DGeneralsDriver::NewDoDfc iSamplers[%d] PostSampleNeeded count %d", i, d.postSampleNeeded);
}
}
}
@@ -634,6 +754,7 @@
else if(d.iState == EStopping)
{
+ LOGSTRING("DGeneralsDriver::NewDoDfc state Stopping()");
// for all enabled samplers,
// perform end sampling
TBool releaseBuffer(false);
@@ -641,18 +762,23 @@
{
if(d.iSamplers[i]->iEnabled)
{
- LOGSTRING("DGeneralsDriver::NewDoDfc() - ending");
+ LOGSTRING("DGeneralsDriver::NewDoDfc() - ending");
+ if(d.iSamplers[i]->PostSampleNeeded())
+ {
+ LOGSTRING2("DGeneralsDriver::NewDoDfc iSamplers[%d] PostSampleNeeded still", i);
+ d.iSamplers[i]->PostSample();
+ }
// perform end sampling for all samplers
// stream mode samplers may be pending, if they
// are still waiting for another client buffer
if(d.iSamplers[i]->EndSampling() == KErrNotReady)
{
- LOGSTRING("DGeneralsDriver::NewDoDfc() - stream data pending");
+ LOGSTRING("DGeneralsDriver::NewDoDfc() - stream data pending");
releaseBuffer = true;
}
else
{
- LOGSTRING("DGeneralsDriver::NewDoDfc() - no data pending");
+ LOGSTRING("DGeneralsDriver::NewDoDfc() - no data pending");
releaseBuffer = true;
}
}
@@ -661,7 +787,7 @@
// At the end, once all the samplers are gone through, the buffer should be released
if (true == releaseBuffer)
{
- LOGSTRING("DGeneralsDriver::NewDoDfc() - release the buffer");
+ LOGSTRING("DGeneralsDriver::NewDoDfc() - release the buffer");
d.iSampleStream.ReleaseIfPending();
}
@@ -670,6 +796,7 @@
{
// sampling has ended
Kern::RequestComplete(d.iClient,d.iEndRequestStatus,KErrNone);
+ LOGSTRING("DGeneralsDriver::NewDoDfc() - request complete, stopped");
}
}
}
@@ -746,8 +873,10 @@
break;
case RPluginSampler::EStartSampling:
- LOGSTRING("DGeneralsDriver::HandleMsg - EStartSampling");
- r = StartSampling();
+ LOGSTRING("DGeneralsDriver::HandleMsg - EStartSampling");
+ iStarted = (TUint8)ETrue;
+ r=StartSampling(m.Int0(),m.Int1());
+ //r = StartSampling();
break;
case RPluginSampler::EGetSampleTime:
@@ -770,7 +899,7 @@
// Requests are handled here
case ~RPluginSampler::EStopAndWaitForEnd:
- LOGSTRING("DGeneralsDriver::HandleMsg - EStopAndWaitForEnd");
+ LOGSTRING("DGeneralsDriver::HandleMsg - EStopAndWaitForEnd");
iEndRequestStatus = reinterpret_cast<TRequestStatus*>(m.Ptr0());
r = StopSampling();
#ifdef __SMP__
@@ -785,7 +914,7 @@
break;
default:
- LOGSTRING2("DGeneralsDriver::HandleMsg - ERROR, unknown command %d",id);
+ Kern::Printf("DGeneralsDriver::HandleMsg - ERROR, unknown command %d",id);
r = KErrNotSupported;
break;
}
@@ -798,44 +927,30 @@
inline void DGeneralsDriver::UnbindInterrupts()
{
TInt err(0);
-
- // disable interrupts when sampling stops, enabled again on start
- err = NKern::InterruptDisable(KIntProfilerBase - 32);
- if(err < 0)
- Kern::Printf(" InterruptDisable KIntProfilerBase - 32 ret = %d", err );
-
- err = NKern::InterruptDisable(KIntProfilerBase + 1 - 32);
- if(err < 0)
- Kern::Printf(" InterruptDisable KIntProfilerBase + 1 - 32 ret = %d", err );
-
- err = NKern::InterruptDisable(KIntProfilerBase + 2 - 32);
- if(err < 0)
- Kern::Printf(" InterruptDisable KIntProfilerBase + 2 - 32 ret = %d", err );
-
- err = NKern::InterruptDisable(KIntProfilerBase + 3 - 32);
- if(err < 0)
- Kern::Printf(" InterruptDisable KIntProfilerBase + 3 - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase - 32=%d", KIntProfilerBase -32 );
- err = NKern::InterruptUnbind( KIntProfilerBase - 32);
- if(err < 0)
- Kern::Printf(" InterruptUnbind KIntProfilerBase - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 1 - 32=%d", KIntProfilerBase + 1-32 );
- err = NKern::InterruptUnbind( KIntProfilerBase + 1 - 32);
- if(err < 0)
- Kern::Printf(" InterruptUnbind KIntProfilerBase + 1 - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 2 - 32=%d", KIntProfilerBase + 2 - 32 );
- err = NKern::InterruptUnbind(KIntProfilerBase + 2 - 32);
- if(err < 0)
- Kern::Printf(" InterruptUnbind KIntProfilerBase + 2 - 32 ret = %d", err );
-
-// Kern::Printf(" > Interrupt::InterruptBind KIntProfilerBase + 3 - 32=%d", KIntProfilerBase + 3 - 32 );
- err = NKern::InterruptUnbind(KIntProfilerBase + 3 - 32);
- if(err < 0)
- Kern::Printf(" InterruptUnbind KIntProfilerBase + 3 - 32 ret = %d", err );
-
+ /*
+ * Disable and unbind the sampling interrupts associated with each core.
+ */
+ TInt noofCpu(NKern::NumberOfCpus());
+ //Disabling Interrupt(s)
+ for( TInt nCpu(0); nCpu < noofCpu; nCpu++ )
+ {
+ err = NKern::InterruptDisable(iIntNo + nCpu - 32);
+ if(err < 0)
+ {
+ Kern::Printf(" Interrupt Disable iIntNo + %d - 32 ret = %d", nCpu, err );
+ }
+ }
+
+ //UnBinding to the interrupt(s)
+ for( TInt nCpu(0); nCpu < noofCpu; nCpu++ )
+ {
+ LOGSTRING3(" > Interrupt::InterruptUnBind + %d -32 =%d", nCpu, iIntNo + nCpu -32 );
+ err = NKern::InterruptUnbind( (iIntNo + nCpu - 32) );
+ if(err < 0)
+ {
+ Kern::Printf(" InterruptUnBind iIntNo + %d - 32 Error = %d", nCpu, err );
+ }
+ }
}
#endif
@@ -865,12 +980,12 @@
// in that case, the request should be completed already
if(iSamplers[i]->EndSampling() == KErrNotReady)
{
- LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - still data pending");
- releaseBuffer = true;
+ LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - still data pending");
+ releaseBuffer = false;
}
else
{
- LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - no data pending");
+ LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - no data pending");
releaseBuffer = true;
}
}
@@ -878,7 +993,7 @@
// At the end, once all the samplers are gone through, the buffer should be released
if (true == releaseBuffer)
{
- LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - all data copied, release the buffer");
+ LOGSTRING("DGeneralsDriver::ProcessStreamReadRequest - all data copied, release the buffer");
iSampleStream.ReleaseIfPending();
}
}
@@ -903,10 +1018,10 @@
if( samplerIdToActivate == PROFILER_GPP_SAMPLER_ID )
{
for(TInt cpu(0);cpu<cpus;cpu++)
- {
- Kern::Printf("DGeneralsDriver::MarkTraceActive - activating CPU %d",cpu);
- iSamplers[cpu]->SetEnabledFlag(true);
- }
+ {
+ LOGSTRING2("DGeneralsDriver::MarkTraceActive - activating CPU %d",cpu);
+ iSamplers[cpu]->SetEnabledFlag(true);
+ }
return KErrNone;
}
#endif
@@ -919,7 +1034,7 @@
}
}
- LOGSTRING2("DGeneralsDriver::MarkTraceActive - %d not supported",samplerIdToActivate);
+ Kern::Printf("DGeneralsDriver::MarkTraceActive - %d not supported",samplerIdToActivate);
return KErrNotSupported;
}
@@ -948,7 +1063,7 @@
}
}
- LOGSTRING2("DGeneralsDriver::MarkTraceInactive - %d not supported",samplerIdToDisable);
+ Kern::Printf("DGeneralsDriver::MarkTraceInactive - %d not supported",samplerIdToDisable);
return KErrNotSupported;
}
@@ -1077,7 +1192,7 @@
* only if sampling is not running
*/
-TInt DGeneralsDriver::StartSampling()
+TInt DGeneralsDriver::StartSampling(TInt aRate, TInt aInterruptNumber)
{
LOGSTRING("DGeneralsDriver::StartSampling");
@@ -1086,6 +1201,7 @@
// reset iSampleStartTimeProp property value
iSampleStartTime = NKern::TickCount(); // get the system tick value for sync purposes
#ifdef __SMP__
+ TInt err;
iStartTime = (iSampleStartTime & 0xfffffff0);
#endif
TInt r(iSampleStartTimeProp.Set(iSampleStartTime));
@@ -1099,15 +1215,55 @@
{
// reset with stream option
#ifndef __SMP__
- Kern::Printf(("DGeneralsDriver::StartSampling - stream reset for generals driver, sync offset %d"), 0);
+ LOGSTRING2(("DGeneralsDriver::StartSampling - stream reset for generals driver, sync offset %d"), 0);
iSamplers[i]->Reset(&iSampleStream, 0);
#else
- Kern::Printf(("DGeneralsDriver::StartSampling - stream reset for generals driver, start time %d"), iStartTime);
+ LOGSTRING2(("DGeneralsDriver::StartSampling - stream reset for generals driver, start time %d"), iStartTime);
iSamplers[i]->Reset(&iSampleStream, iStartTime);
#endif
}
}
-
+#ifdef __SMP__
+ iRate = aRate;
+ iIntNo = aInterruptNumber;
+ // use HAL to understand the underlying hardware
+ // not so elegant but used for two SMP pltaforms Bridge and Naviengine
+ TVariantInfoV01 info;
+ TPckg<TVariantInfoV01> infoPckg(info);
+ err = Kern::HalFunction(EHalGroupVariant, EVariantHalVariantInfo, (TAny*)&infoPckg, NULL);
+
+ if(err != KErrNone)
+ {
+ Kern::Printf("Error in reading HAL Entry EVariantHalVariantInfo %r ", err);
+ }
+ if (info.iMachineUniqueId.iData[0] == KBridgeMachineUID)
+ {
+ iPlatform = EBridge;
+ LOGSTRING("DGeneralsDriver::StartSampling() - Bridge HW");
+ }
+ else if (info.iMachineUniqueId.iData[0] == KNaviengineMachineUID)
+ {
+ iPlatform = ENaviengine;
+ LOGSTRING("DGeneralsDriver::StartSampling() - NaviEngine HW");
+ }
+ else
+ {
+ Kern::Printf("DGeneralsDriver::StartSampling() - Unknown HW, 0x%x", info.iMachineUniqueId.iData[0]);
+ }
+
+ //users are restricted to use the default Interrupt Number for Bridge
+ if ((iPlatform == EBridge) && (aInterruptNumber != KValueZero) && (aInterruptNumber != KBridgeProfilerInterruptId) )
+ {
+ Kern::Printf("Invalid Interrupt Number for Bridge used %d interrupt...Please use %d Interrupt Number", iIntNo, KBridgeProfilerInterruptId);
+ return KErrNotSupported;
+ }
+ if (aInterruptNumber == KValueZero)
+ iIntNo = KDefaultInterruptNumber;
+
+ if (iPlatform == EBridge)
+ /* By default for Bridge we are using KBridgeProfilerInterruptId */
+ iIntNo = KBridgeProfilerInterruptId;
+#endif
NewStart(gppSampler.GetPeriod());
return KErrNone;
}
@@ -1124,7 +1280,8 @@
TInt DGeneralsDriver::StopSampling()
{
- LOGSTRING("DGeneralsDriver::StopSampling");
+ LOGSTRING2("DGeneralsDriver::StopSampling - iState %", iState);
+ TInt noofCpu(NKern::NumberOfCpus());
if(iState == ERunning)
{
@@ -1132,14 +1289,26 @@
// reset all enabled samplers
for(TInt i(0);i<KSamplerAmount;i++)
{
- // do the reset only for memory sampler
- if(iSamplers[i]->iEnabled && iSamplers[i]->iSamplerId == 4)
+ // do the reset only for memory and itt samplers
+ if(iSamplers[i]->iEnabled &&
+ (iSamplers[i]->iSamplerId == PROFILER_ITT_SAMPLER_ID ||
+ iSamplers[i]->iSamplerId == PROFILER_MEM_SAMPLER_ID ))
{
// reset with stream option
- LOGTEXT(("DGeneralsDriver::StopSampling - stream reset for samplers"));
- iSamplers[i]->Reset(&iSampleStream, 999999);
+ LOGSTRING(("DGeneralsDriver::StopSampling - stream reset for samplers"));
+ iSamplers[i]->Reset(&iSampleStream, KStateSamplingEnding);
}
}
+ LOGSTRING2("\nDGeneralsDriver::StopSampling - Number of times the Timer counter expired on CPU 0 = %d ", iInterruptCounter[0]);
+
+ for(TInt nCpu(1); nCpu < noofCpu; nCpu++)
+ {
+ Kern::Printf( "\n Number of times we interrupted CPU[%d] = %d and Number of Missed CPU interrupts = %d", nCpu, iInterruptCounter[nCpu],(iInterruptCounter[0] - iInterruptCounter[nCpu]));
+ Kern::Printf( "\n Number of times CPU sampler[0] accessed: %d", gppSampler.GetExportData()->sampleNumber);
+#ifdef __SMP__
+ Kern::Printf( "\n Number of times CPU sampler[1] accessed: %d", gppSampler2.GetExportData()->sampleNumber);
+#endif
+ }
return KErrNone;
}
@@ -1149,4 +1318,31 @@
}
}
+DSamplerPowerHandler::DSamplerPowerHandler(DGeneralsDriver* aChannel)
+ : DPowerHandler(KPluginSamplerName),
+ iChannel(aChannel)
+ {
+ LOGSTRING("DSamplerPowerHandler::DSamplerPowerHandler\n");
+ }
+
+void DSamplerPowerHandler::PowerUp()
+ {
+ LOGSTRING("DSamplerPowerHandler::PowerUp()1\n");
+ iChannel->iOff = (TUint8)EFalse;
+ if (iChannel->iStarted)
+ {
+ LOGSTRING("DSamplerPowerHandler::PowerUp()2\n");
+ iChannel->StartSampling(iChannel->iRate, iChannel->iIntNo);
+ }
+ PowerUpDone();
+ }
+
+void DSamplerPowerHandler::PowerDown(TPowerState)
+ {
+ LOGSTRING("DSamplerPowerHandler::PowerDown()\n");
+ iChannel->iOff = (TUint8)ETrue;
+ //iChannel->iState = EStopped;
+ iChannel->StopSampling();
+ PowerDownDone();
+ }
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsPlugin.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsPlugin.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -50,7 +50,7 @@
*
*/
-CGeneralsPlugin* CGeneralsPlugin::NewL(const TUid aImplementationUid, TAny* /*aInitParams*/)
+EXPORT_C CGeneralsPlugin* CGeneralsPlugin::NewL(const TUid aImplementationUid, TAny* /*aInitParams*/)
{
LOGTEXT(_L("CGeneralsPlugin::NewL() - entry"));
CGeneralsPlugin* self = new (ELeave) CGeneralsPlugin();
@@ -555,22 +555,22 @@
TInt CGeneralsPlugin::StopSampling()
{
- // RDebug::Print(_L("CGeneralsPlugin::StopSampling() - Stopping sampler LDD"));
- iGeneralsSampler.StopSampling();
- // RDebug::Print(_L("CGeneralsPlugin::StopSampling() - Sampler LDD stopped"));
-
- // check if bufferhandler has died
- if(iBufferHandler)
+ LOGSTRING("CGeneralsPlugin::StopSampling() - Stopping sampler LDD");
+ iGeneralsSampler.StopSampling();
+ LOGSTRING("CGeneralsPlugin::StopSampling() - Sampler LDD stopped");
+
+ // check if bufferhandler has died
+ if(iBufferHandler)
{
- // RDebug::Print(_L("CGeneralsPlugin::StopSampling() - Canceling the buffer handler"));
- iBufferHandler->Cancel();
- delete iBufferHandler;
- iBufferHandler = NULL;
+ LOGSTRING("CGeneralsPlugin::StopSampling() - Canceling the buffer handler");
+ iBufferHandler->Cancel();
+ delete iBufferHandler;
+ iBufferHandler = NULL;
}
- // set enabled
- iEnabled = EFalse;
- // RDebug::Print(_L("CGeneralsPlugin::StopSampling() - exit"));
- return KErrNone;
+ // set enabled
+ iEnabled = EFalse;
+ LOGSTRING("CGeneralsPlugin::StopSampling() - exit");
+ return KErrNone;
}
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsSampler.cia Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GeneralsSampler.cia Tue Oct 26 16:20:32 2010 +0300
@@ -88,4 +88,29 @@
__JUMP(,lr);
}
+// This will return 1 if it was iDFC interrupted (0 otherwise).
+// As there is no Kernel interface for that, we have to 'fake' Kernel by
+// setting SVC mode before calling NKern::CurrentContext.
+// Without that, CurrentContext would always return EInterrupt.
+__NAKED__ TUint IDFCRunning()
+ {
+ asm("stmfd sp!, {r4-r5} ");
+
+ asm("mrs r5, cpsr"); // r5 = cpsr_irq
+ asm("bic r4, r5, #0xdf "); // clear interrupt mask & CPU mode
+ asm("orr r4, r4, #0xd3 "); // disable all interrupts and set SVC mode
+
+ asm("msr CPSR_cf, r4"); // switch to SVC, (dissable FIQ, IRQ)
+
+ // NKern::CurrentContext does not use sp (only r0,r1,r2)
+ // It is just lr in svc mode we need to preserve.
+ asm("mov r4, lr"); // r4 = lr_svc
+ asm("bl " CSM__ZN5NKern14CurrentContextEv ); // r0 = 1 if iDFC was running, 0 if a thread was running
+ asm("mov lr, r4"); // lr_svc is back to original state
+
+ asm("msr CPSR_cf, r5"); // return to IRQ mode
+
+ asm("ldmfd sp!, {r4-r5} ");
+ __JUMP(,lr);
+ }
#endif
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GppSamplerImpl.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/GppSamplerImpl.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -26,6 +26,14 @@
extern TUint* IntStackPtr();
#define TAG(obj) (*(TUint32*)&(obj.iAsyncDeleteNext))
+#ifndef __SMP__
+extern TUint IDFCRunning();
+#endif
+
+#ifdef __SMP__
+static TSpinLock CpuSpinLock = TSpinLock(TSpinLock::EOrderGenericIrqLow3);
+#endif
+
// properties for ISA task parsing
const TUid KIsaPropertyCat={0x2001E5AD};
enum TIsaPropertyKeys
@@ -42,11 +50,13 @@
DGppSamplerImpl::DGppSamplerImpl()
{
LOGTEXT("GppSamplerImpl::GppSamplerImpl");
+#ifndef __SMP__
iInterruptStack = (TUint*)IntStackPtr();
-
+#endif
+
LOGTEXT("GppSamplerImpl::GppSamplerImpl - attaching to properties");
- TInt err = iIsaStartAddr.Attach(KIsaPropertyCat, EIsaPropertyIsaTaskAddressStart);
+ TInt err(iIsaStartAddr.Attach(KIsaPropertyCat, EIsaPropertyIsaTaskAddressStart));
if(err != KErrNone)
LOGTEXT("GppSamplerImpl::GppSamplerImpl() - Property EIsaPropertyIsaTaskAddressStart not available");
err = iIsaEndAddr.Attach(KIsaPropertyCat, EIsaPropertyIsaTaskAddressEnd);
@@ -61,6 +71,15 @@
PROFILER_ISA_TASK_NAMES
+ NKern::LockSystem();
+ // get status of ISA plug-in
+ TPropertyStatus status;
+ if(iIsaPluginStatus.GetStatus(status))
+ {
+ iIsaPluginStatus.Get(iIsaStatus);
+ LOGSTRING2("GppSamplerImpl::Reset - ISA plug-in status %d", iIsaStatus);
+ }
+ NKern::UnlockSystem();
Reset();
}
@@ -74,7 +93,7 @@
void DGppSamplerImpl::Reset()
{
- LOGTEXT("GppSamplerImpl::Reset");
+ LOGSTRING("GppSamplerImpl::Reset() - entry");
iLastPc = 0;
iLastThread = 0xfffffffe;
iRepeat = 0;
@@ -82,41 +101,36 @@
iIsaStart = 0;
iIsaEnd = 0;
// isaOsTaskRunningAddr = 0;
+ iPrevTS = NKern::TickCount(); // get the system tick value for sync purposes
// in SMP start time common with all CPUs, provided by DGeneralsDriver class
#ifndef __SMP__
- iStartTime = ( NKern::TickCount() & 0xfffffffc );
+ iStartTime = ( iPrevTS & 0xfffffffc );
+#else
+ iStartTime = ( iPrevTS & 0xfffffff0 );
#endif
- TPropertyStatus status;
- TInt osAddr = 0;
-
- LOGTEXT("GppSamplerImpl::Reset - getting status");
+ TInt osAddr(0);
- // get status of ISA plug-in
- if(iIsaPluginStatus.GetStatus(status))
- {
- iIsaPluginStatus.Get(iIsaStatus);
- LOGSTRING2("GppSamplerImpl::Reset - ISA plug-in status %d", iIsaStatus);
- }
+ LOGSTRING("GppSamplerImpl::Reset - getting status");
if(iIsaStatus > 0)
{
- LOGTEXT("GppSamplerImpl::Reset - get isa start address");
+ LOGSTRING("GppSamplerImpl::Reset - get isa start address");
iIsaStartAddr.Get(iIsaStart);
- LOGTEXT("GppSamplerImpl::Reset - get isa end address");
+ LOGSTRING("GppSamplerImpl::Reset - get isa end address");
iIsaEndAddr.Get(iIsaEnd);
- LOGTEXT("GppSamplerImpl::Reset - get isa os_task_running address");
+ LOGSTRING("GppSamplerImpl::Reset - get isa os_task_running address");
iIsaOsTaskRunning.Get(osAddr);
isaOsTaskRunningAddr = reinterpret_cast<TInt*>(osAddr);
LOGSTRING2("GppSamplerImpl::Reset - got isa os_task_running address 0x%X", osAddr);
}
- LOGTEXT("GppSamplerImpl::Reset - initializing isa task list");
+ LOGSTRING("GppSamplerImpl::Reset - initializing isa task list");
iIsaSample = false;
- for(TInt i=0;i<256;i++)
+ for(TInt i(0);i<256;i++)
knownIsaTasks[i] = -1;
knownIsaTaskCount = 0;
@@ -142,6 +156,7 @@
break;
}
#endif
+ LOGSTRING("GppSamplerImpl::Reset() - exit");
}
TUint8* DGppSamplerImpl::EncodeTag(TUint8* aPtr)
@@ -178,7 +193,10 @@
LOGSTRING2("Encoding int 0x%x",aPtr);
LOGSTRING2("TIint = 0x%x",aValue);
-
+#ifdef __SMP__
+ TInt intState(0);
+ intState = __SPIN_LOCK_IRQSAVE(CpuSpinLock);
+#endif
TUint byte;
for (;;)
{
@@ -189,7 +207,9 @@
*aPtr++ = byte;
}
*aPtr++ = byte | 0x80;
-
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(CpuSpinLock, intState);
+#endif
LOGSTRING2("Encoded int 0x%x",aPtr);
return aPtr;
@@ -201,7 +221,10 @@
LOGSTRING2("TUint = 0x%x",aValue);
-
+#ifdef __SMP__
+ TInt intState(0);
+ intState = __SPIN_LOCK_IRQSAVE(CpuSpinLock);
+#endif
TUint byte;
for (;;)
{
@@ -212,7 +235,9 @@
*aPtr++ = byte;
}
*aPtr++ = byte | 0x80;
-
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(CpuSpinLock, intState);
+#endif
LOGSTRING2("Encoded Uint 0x%x",aPtr);
return aPtr;
@@ -226,14 +251,20 @@
//
{
LOGSTRING2("Encoding text 0x%x",aPtr);
- TInt len=aDes.Length();
+ TInt len(aDes.Length());
+#ifdef __SMP__
+ TInt intState(0);
+ intState = __SPIN_LOCK_IRQSAVE(CpuSpinLock);
+#endif
*aPtr++ = TUint8(len);
const TText* p = aDes.Ptr();
while (--len >= 0)
{
*aPtr++ = TUint8(*p++);
}
-
+#ifdef __SMP__
+ __SPIN_UNLOCK_IRQRESTORE(CpuSpinLock, intState);
+#endif
LOGSTRING2("Encoded text 0x%x",aPtr);
return aPtr;
}
@@ -247,7 +278,8 @@
LOGSTRING2("Encoding name 0x%x",aPtr);
TBuf8<0x5f> name;
aObject.TraceAppendName(name,false);
-
+ LOGSTRING2("DGppSamplerImpl::EncodeName() - new process/thread found: %S", &name);
+
if(id != 0xffffffff)
{
name.Append('[');
@@ -276,7 +308,7 @@
{
LOGSTRING2("Encoding thread 0x%x",aPtr);
- DProcess& p = *aThread.iOwningProcess;
+ DProcess& p(*aThread.iOwningProcess);
aPtr = EncodeUint(aPtr, p.iId);
@@ -297,6 +329,10 @@
// The thread is 'unknown' to this sample, so encode the thread name
aPtr = EncodeName(aPtr, p, p.iId);
}
+ else
+ {
+
+ }
#else
if (TAG(p) != iStartTime)
{
@@ -333,10 +369,10 @@
LOGTEXT("GppSamplerImpl::CreateFirstSample");
Reset();
- TUint8* w = this->tempBuf;
+ TUint8* w(this->tempBuf);
w = EncodeTag(w);
- TInt length = w-tempBuf;
+ TInt length(w-tempBuf);
LOGSTRING2("TAG encoded, length %d",length);
return length;
@@ -344,7 +380,7 @@
TBool DGppSamplerImpl::IsaTaskKnown(TUint8 task)
{
- for(TInt i=0;i<256;i++)
+ for(TInt i(0);i<256;i++)
{
if(knownIsaTasks[i] == -1)
{
@@ -386,7 +422,6 @@
{
TBuf8<256> aDes;
-// #ifdef NCP_COMMON_PROFILER_ISA_TASKS
if(iIsaStatus > 0)
{
// resolve the isa task name from the task name array
@@ -409,9 +444,9 @@
aDes.Append(']');
LOGSTRING2("Encoding ISA name 0x%x",aPtr);
- TInt len=aDes.Length();
+ TInt len(aDes.Length());
*aPtr++ = TUint8(len);
- const TText* p = aDes.Ptr();
+ const TText* p(aDes.Ptr());
while (--len >= 0)
{
*aPtr++ = TUint8(*p++);
@@ -430,143 +465,177 @@
// DFC is triggered to complete a read request
//
{
- TUint8* w(this->tempBuf);
-
-// Kern::Printf(("Got thread 0x%08x"), &t);
-#ifdef __SMP__
- // get the program counter of irq mode
- TUint32 pc = (TUint32)Arm::IrqReturnAddress();
-#else
- // get program counter of irq mode
- TUint32 pc = iInterruptStack[-1];
-#endif
- //LOGSTRING3("pc value 0x%x sp 0x%x",pc,iInterruptStack);
+ NThread* pN(NKern::CurrentThread());
+ TUint8* w(this->tempBuf);
+ //TInt currCpu(NKern::CurrentCpu());
+ TInt mySampleStartTime(NKern::TickCount()); // get the system tick value for sync purposes, in ms
+// TInt tickdiff(mySampleStartTime-iPrevTS);
+
+ if (Kern::NThreadToDThread(pN)==NULL)
+ {
+ LOGSTRING("Kern::NThreadToDThread is null");
+ }
- // ignore the low bit being set for THUMB mode - we use for something else
- pc &= ~1;
- TInt diff = pc - iLastPc;
- iLastPc = pc;
+ else
+ {
+ // check timestamp & compare to previous
+ // if out of sync, encode unknown::unknown thread
- if(iIsaStatus > 0)
- {
- if((TUint32)pc > (TUint32)iIsaStart && (TUint32)pc < (TUint32)iIsaEnd)
- {
- LOGSTRING2("Identified ISA execution at 0x%x",pc);
- iIsaSample = true;
- }
- else
- {
- LOGSTRING2("Normal sample at 0x%x",pc);
- iIsaSample = false;
- }
- }
-
- // request for current thread from kernel
- DThread& t = ((DThread&)*Kern::NThreadToDThread(NKern::CurrentThread()));
-
- TUint tid;
- TUint8 isaTask = 0;
- if(iIsaSample)
- {
- LOGSTRING2("Reading ISA task number from 0x%x",isaOsTaskRunningAddr);
-
- // if we don't get reasonable ISA address to read, skip ISA task handling
- if(isaOsTaskRunningAddr == 0)
- {
- tid = 100000; // to tell the difference from SOS threads
- iIsaSample = false;
- }
- else // normal ISA task parsing process
- {
- isaTask = *isaOsTaskRunningAddr;
- LOGSTRING2("ISA task = %d",isaTask);
- tid = isaTask;
- // this will make sure we don't mix ISA tasks and normal tasks
- tid += 100000;
- }
-
- }
- else
- {
- tid = t.iId;
- }
+/*
+// In SMP environment there have been missing ticks. These prints are for helping debug this issue
+// but solution might not work.
+ if(tickdiff > 1)
+ {
+ Kern::Printf(("DGppSamplerImpl::SampleImpl() - Current time tick %d"), mySampleStartTime);
+ Kern::Printf(("DGppSamplerImpl::SampleImpl() - Previous time tick %d"), iPrevTS);
+// Kern::Printf(("DGppSamplerImpl::SampleImpl() - Tick period %d"),NKern::TickPeriod());
+ Kern::Printf(("DGppSamplerImpl::SampleImpl() - Tick difference %d"),tickdiff);
+ Kern::Printf(("DGppSamplerImpl::SampleImpl() - Current cpu %d"),NKern::CurrentCpu());
+ }
+// else
+// {
+// Kern::Printf(("DGppSamplerImpl::SampleImpl() - Tick differance <= 1: %d"),tickdiff);
+// }
+*/
- if (tid != iLastThread)
- {
- // Change of thread is marked in the low bit of the PC difference
- diff |= 1;
- }
- TUint rp = iRepeat;
- if (diff == 0)
- {
- // Identical sample, bump up the repeat count
- iRepeat = rp + 1;
- }
- else
- {
- if (rp)
- {
- // Encode the repeat data
- w = EncodeRepeat(w);
- }
- // Encode the PC difference
- w = EncodeInt(w, diff);
- if (diff & 1)
- {
- // Encode the new thread ID
- if(iIsaSample)
- {
- iLastThread = tid;
- w = EncodeUint(w,tid);
+ TLinAddr pC;
+
+#ifdef __SMP__
+ pC = Arm::IrqReturnAddress();
+#else
+ // get program counter of irq mode
+ pC = iInterruptStack[-1]; // ignore the low bit being set for THUMB mode - we use for something else
+#endif
+ //Kern::Printf(("pc value 0x%x sp 0x%x"),pc,iInterruptStack);
+ pC &= ~1;
+ TInt diff(pC - iLastPc);
+ iLastPc = pC;
+
+ if(iIsaStatus > 0)
+ {
+ if((TUint32)pC > (TUint32)iIsaStart && (TUint32)pC < (TUint32)iIsaEnd)
+ {
+ iIsaSample = true;
+ }
+ else
+ {
+ iIsaSample = false;
+ }
+ }
+
+// if((TUint32)pC < 0x80000000 || (TUint32)pC > 0x8FFFFFFF)
+// {
+// //Kern::Printf("DGppSamplerImpl::SampleImpl() - wrong PC value, 0x%x", (TUint32)pC);
+// iIsaSample = true;
+// }
+
+ // request for current thread from kernel
+ DThread& t(((DThread&)*Kern::NThreadToDThread(pN)));
+
+ TUint tid;
+ TUint8 isaTask(0);
+ if(iIsaSample)
+ {
+ //Kern::Printf(("Reading ISA task number from 0x%x"),isaOsTaskRunningAddr);
+ // if we don't get reasonable ISA address to read, skip ISA task handling
+ if(isaOsTaskRunningAddr == 0)
+ {
+ tid = 100000; // to tell the difference from SOS threads
+ iIsaSample = false;
+ }
+ else // normal ISA task parsing process
+ {
+ isaTask = *isaOsTaskRunningAddr;
+ LOGSTRING2("ISA task = %d",isaTask);
+ tid = isaTask;
+ // this will make sure we don't mix ISA tasks and normal tasks
+ tid += 100000;
+ }
+ }
+ else
+ {
+ tid = t.iId;
+ }
+
+ if (tid != iLastThread)
+ {
+ diff |= 1; // Change of thread is marked in the low bit of the PC difference
+ }
+ TUint rp(iRepeat);
+ if (diff == 0)
+ {
+ iRepeat = rp + 1; // Identical sample, bump up the repeat count
+ }
+ else
+ {
+ if (rp)
+ {
+ w = EncodeRepeat(w); // Encode the repeat data
+ }
+ w = EncodeInt(w, diff); // Encode the PC difference
+ //if (diff & 0x1 == 1)
+ if (diff & 1)
+ {
+// LOGSTRING3("Encode pc diff curr cpu %d diff %d", currCpu, diff);
+ if(iIsaSample) // Encode the new thread ID
+ {
+ iLastThread = tid;
+// LOGSTRING2("Encode thread id UINT curr cpu %d", currCpu);
+ w = EncodeUint(w,tid);
+ if(!this->IsaTaskKnown(isaTask))
+ {
+ //Kern::Printf("Encode isa task");
+ w = EncodeIsaTask(w,iLastThread);
+ }
+ //LOGSTRING2("Sample total length: %d",w-tempBuf);
+ TInt length = w-tempBuf;
+ return length; // encoded isa task, return here
+ }
+ iLastThread = tid;
+// LOGSTRING2("Encode lastthread id UinT curr cpu %d", currCpu);
+ w = EncodeUint(w, tid);
+
+#ifdef __SMP__
+ // iStartTime format: 0xXXXXXXX0, the last byte set to zero
+ // iMask = 0xfffffff0(0b111....1110000), last bits reserved for the CPUs bit0=CPU0 etc.
+ // iCpuSelector = 0x1(0b0001), 0x2(0b0010), 0x4(0b0100) or 0x8(0b1000), to use against the mask
+ //#define TAG(obj) (*(TUint32*)&(obj.iAsyncDeleteNext))
+ // check first time founding
+ LOGSTRING4("TAG(t) 0x%x, iMask 0x%x, AND 0x%x ",TAG(t),iMask, (TAG(t)& iMask));
+ if ((TAG(t) & iMask) != iStartTime)
+ {
+ // mark tagged for this CPU
+ TAG(t) = (iStartTime | iCpuSelector);
+
+ // The thread is 'unknown' to this sample, so encode the thread name
+// LOGSTRING2("Encode SMP thread start time curr cpu %d", currCpu);
+ w = EncodeThread(w, t);
+ }
+ // check if thread appeared on this CPU
+ else if((TAG(t) & iCpuSelector) != iCpuSelector)
+ {
+ TAG(t) = (TAG(t) | iCpuSelector);
+ // The thread is 'unknown' to this sample, so encode the thread name
+// LOGSTRING2("Encode SMP thread cpu selector curr cpu %d", currCpu);
+ w = EncodeThread(w, t);
+ }
+#else
+ // check if tag has not been set, neither original nor
+ if ((TAG(t) & 0xfffffffc) != iStartTime)
+ {
+ TAG(t) = ((TAG(t) & 0x3) | iStartTime);
+ // The thread is 'unknown' to this sample, so encode the thread name
+ w = EncodeThread(w, t);
+ }
+
+#endif
+ }
+ }
+ }
- if(!this->IsaTaskKnown(isaTask))
- {
- w = EncodeIsaTask(w,iLastThread);
- }
- //LOGSTRING2("Sample total length: %d",w-tempBuf);
- TInt length = w-tempBuf;
- // encoded isa task, return here
- return length;
- }
-
- iLastThread = tid;
- w = EncodeUint(w, tid);
+ TInt length(w-tempBuf);
+ LOGSTRING2("Sample total length: %d",length);
+ iPrevTS = mySampleStartTime; // get the system tick value for sync purposes
+ return length;
+ }
-#ifdef __SMP__
- // iStartTime format: 0xXXXXXXX0, the last byte set to zero
- // iMask = 0xfffffff0(0b111....1110000)
- // iCpuSelector = 0x1(0b0001), 0x2(0b0010), 0x4(0b0100) or 0x8(0b1000)
-
- // check first time founding
- if ((TAG(t) & iMask) != iStartTime)
- {
- // mark tagged for this CPU
- TAG(t) = (iStartTime | iCpuSelector);
-
- // The thread is 'unknown' to this sample, so encode the thread name
- w = EncodeThread(w, t);
- }
- // check if thread appeared on this CPU
- else if((TAG(t) & iCpuSelector) != iCpuSelector)
- {
- TAG(t) = (TAG(t) | iCpuSelector);
- // The thread is 'unknown' to this sample, so encode the thread name
- w = EncodeThread(w, t);
- }
-#else
- // check if tag has not been set, neither original nor
- if ((TAG(t) & 0xfffffffc) != iStartTime)
- {
- TAG(t) = ((TAG(t) & 0x3) | iStartTime);
- // The thread is 'unknown' to this sample, so encode the thread name
- w = EncodeThread(w, t);
- }
-#endif
- }
- }
- LOGSTRING2("Sample total length: %d",w-tempBuf);
- TInt length = w-tempBuf;
-
- return length;
-}
-
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/IttEventHandler.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/IttEventHandler.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -35,8 +35,7 @@
iSampleDescriptor(&(this->iSample[1]),0,KITTBufferSize),
gppSamplerData(aGppSamplerDataIn)
{
- //Kern::Printf("DIttEventHandler::DIttEventHandler()");
-
+ iSampleAvailable = false;
}
/*
@@ -44,8 +43,6 @@
*/
TInt DIttEventHandler::Create()
{
- Kern::Printf("DIttEventHandler::Create()");
-
TInt err(Kern::MutexCreate(iLock, _L("IttEventHandlerLock"), KMutexOrdDebug));
if (err != KErrNone)
return err;
@@ -58,7 +55,7 @@
*/
DIttEventHandler::~DIttEventHandler()
{
- //Kern::Printf("DIttEventHandler::~DIttEventHandler()");
+ LOGSTRING("DIttEventHandler::~DIttEventHandler()");
if (iLock)
iLock->Close(NULL);
@@ -67,7 +64,7 @@
TInt DIttEventHandler::Start()
{
- //Kern::Printf("DIttEventHandler::Start()");
+ LOGSTRING("DIttEventHandler::Start()");
iTracking = ETrue;
return KErrNone;
@@ -76,30 +73,41 @@
TInt DIttEventHandler::Stop()
{
- //Kern::Printf("DIttEventHandler::Stop()");
+ LOGSTRING("DIttEventHandler::Stop()");
iTracking = EFalse;
+ LOGSTRING2("ITT - gpp sample counter %d", this->gppSamplerData->sampleNumber);
return KErrNone;
}
TBool DIttEventHandler::SampleNeeded()
{
- LOGTEXT("DIttEventHandler::SampleNeeded()");
-
- // increase the counter by one on each round
- iCount++;
+ //LOGSTRING("DIttEventHandler::SampleNeeded()");
// check if event handler was not running
if(!iTracking)
- return false;
-
- return true;
+ {
+ return false;
+ }
+ // check if a new sample is available
+ if(iSampleAvailable)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
+void DIttEventHandler::SampleHandled()
+ {
+ iSampleAvailable = false;
+ }
TUint DIttEventHandler::EventHandler(TKernelEvent aType, TAny* a1, TAny* a2, TAny* aThis)
{
- //Kern::Printf("DIttEventHandler::EventHandler()");
+ //LOGSTRING("DIttEventHandler::EventHandler()");
return ((DIttEventHandler*)aThis)->HandleEvent(aType, a1, a2);
}
@@ -107,21 +115,18 @@
TUint DIttEventHandler::HandleEvent(TKernelEvent aType, TAny* a1, TAny* a2)
{
- //Kern::Printf("DIttEventHandler::HandleEvent()");
- //Kern::Printf("New kernel event received, %d", aType);
- if (iTracking/* && iCount != iPreviousCount*/)
+ if (iTracking)
{
switch (aType)
{
-
case EEventAddCodeSeg:
- //Kern::Printf("DCodeSeg added: 0x%08x", (DCodeSeg*)a1);
+ LOGSTRING("DIttEventHandler::HandleEvent() EEventAddCodeSeg received");
HandleAddCodeSeg((DCodeSeg*)a1);
break;
case EEventRemoveCodeSeg:
- //Kern::Printf("DCodeSeg deleted: 0x%08x", (DCodeSeg*)a1);
+ LOGSTRING("DIttEventHandler::HandleEvent() EEventRemoveCodeSeg received");
HandleRemoveCodeSeg((DCodeSeg*)a1);
break;
@@ -129,11 +134,6 @@
break;
}
}
-// else if(iTracking && iCount == iPreviousCount)
-// {
-// // if time stamp is not updated profiling has stopped
-// Stop();
-// }
return DKernelEventHandler::ERunNext;
}
@@ -142,33 +142,48 @@
*/
TBool DIttEventHandler::HandleAddCodeSeg(DCodeSeg* aSeg)
{
+ LOGSTRING("DIttEventHandler::HandleAddCodeSeg()");
iSampleDescriptor.Zero();
//Kern::Printf("DLL ADD: NM %S : RA:0x%x SZ:0x%x SN:0x%x",aSeg->iFileName,aSeg->iRunAddress,aSeg->iSize, this->gppSamplerData->sampleNumber);
+ NKern::ThreadEnterCS();
+ Kern::MutexWait(*iLock);
iSample[0] = aSeg->iFileName->Length();
iSampleDescriptor.Append(*aSeg->iFileName);
iSampleDescriptor.Append((TUint8*)&(aSeg->iRunAddress),4);
iSampleDescriptor.Append((TUint8*)&(aSeg->iSize),4);
iSampleDescriptor.Append((TUint8*)&(this->gppSamplerData->sampleNumber),4);
iSample[0] = iSampleDescriptor.Size();
+
+ iSampleBuffer->AddSample(iSample,iSampleDescriptor.Size()+1);
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
- iSampleBuffer->AddSample(iSample,iSampleDescriptor.Size()+1);
+ iSampleAvailable = true;
return ETrue;
}
TBool DIttEventHandler::HandleRemoveCodeSeg(DCodeSeg* aSeg)
{
+ LOGSTRING("DIttEventHandler::HandleRemoveCodeSeg()");
iSampleDescriptor.Zero();
//Kern::Printf("DLL REM: NM %S : RA:0x%x SZ:0x%x SN:0x%x",aSeg->iFileName,aSeg->iRunAddress,aSeg->iSize, this->gppSamplerData->sampleNumber);
+ NKern::ThreadEnterCS();
+ Kern::MutexWait(*iLock);
+
iSample[0] = aSeg->iFileName->Length();
iSampleDescriptor.Append(*aSeg->iFileName);
iSampleDescriptor.Append((TUint8*)&(aSeg->iRunAddress),4);
iSampleDescriptor.Append((TUint8*)&(aSeg->iSize),4);
iSampleDescriptor.Append((TUint8*)&(this->gppSamplerData->sampleNumber),4);
iSample[0] = iSampleDescriptor.Size();
-
+
iSampleBuffer->AddSample(iSample,iSampleDescriptor.Size()+1);
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
+
+ iSampleAvailable = true;
return ETrue;
}
// end of file
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/IttSamplerImpl.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/IttSamplerImpl.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -36,8 +36,11 @@
IttSamplerImpl::IttSamplerImpl():
sampleDescriptor(&(this->sample[1]),0,KITTSampleBufferSize)
{
- this->currentLibCount = 0;
- iTimeToSample = EFalse;
+ iCurrentLibCount = 0;
+ iLibsCount = 0;
+ iCodeSegsCount = 0;
+ iTimeToSample = ETrue;
+ iInitState = KIttHandlingLibs;
this->Reset();
}
@@ -46,7 +49,7 @@
*/
IttSamplerImpl::~IttSamplerImpl()
{
-
+ LOGSTRING("IttSamplerImpl::~IttSamplerImpl()");
}
/*
@@ -56,7 +59,6 @@
*/
TInt IttSamplerImpl::CreateFirstSample()
{
- Kern::Printf("ittSamplerImpl::createFirstSample\n");
this->iVersionData.Zero();
this->iVersionData.Append(_L8("Bappea_ITT_V"));
this->iVersionData.Append(KIttVersion);
@@ -71,26 +73,16 @@
*
*/
TBool IttSamplerImpl::SampleNeeded(TUint32 sampleNum)
-{
-#ifdef ITT_EVENT_HANDLER
- iCount++;
- if (iCount <= iIttSamplingPeriod && ((iCount % iIttSamplingPeriod) == 0 || (iCount % iIttSamplingPeriodDiv2) == 0))
{
- LOGSTRING2("IttSamplerImpl::SampleNeeded - time: %d", iCount);
- iTimeToSample = true;
-#else
- // no need to do anything, always a good time to sample.
- // Sample time filtering is done in IttSamplerImpl:SampleImpl() function
-#endif
+ iCount = sampleNum;
+ LOGSTRING2("IttSamplerImpl::SampleNeeded - time: %d", iCount);
+
+ if ((iCount % iIttSamplingPeriod) == 0)
+ {
return true;
-#ifdef ITT_EVENT_HANDLER
+ }
+ return false;
}
- else
- {
- return false;
- }
-#endif
-}
/*
* IttSamplerImpl::SampleImpl(TUint32 pc, TUint32 sampleNum)
@@ -99,102 +91,91 @@
* @param TUint32 sample number
*/
TInt IttSamplerImpl::SampleImpl(TUint32 pc,TUint32 sampleNum)
-{
+ {
+ //LOGSTRING3("IttSamplerImpl::SampleImpl pc %d samplenum %d",pc, sampleNum);
// in order to avoid overloading the interrupt
// only one dynamic file in each 50ms is added to the stream
// with the application of the tool in mind, this is
// a reasonable measure
-
+ TInt ret(0);
// encode a process binary
- sampleDescriptor.Zero();
- // original
- if((sampleNum % 20) != 0) return 0;
- if((sampleNum % 40) == 0)
- {
+
+ //sampleDescriptor.Zero();
+ if(iTimeToSample)
+ {
// encode a library binary
- sampleDescriptor.Zero();
- DObjectCon* libs = Kern::Containers()[ELibrary];
- TInt libCount = libs->Count();
-
- // go 20 binaries through at a time
- for(TInt i=0;i<20;i++)
- {
- if(currentLibCount >= libCount)
- {
- currentLibCount = 0;
- }
-
- DLibrary* lib = (DLibrary*)(*libs)[currentLibCount];
- currentLibCount++;
-
- DCodeSeg* seg = lib->iCodeSeg;
- if(seg != 0)
- {
- if( (seg->iMark & 0x80) == 0)
- {
- this->sample[0] = seg->iFileName->Length();
- sampleDescriptor.Append(*(seg->iFileName));
- sampleDescriptor.Append((TUint8*)&(seg->iRunAddress),4);
- sampleDescriptor.Append((TUint8*)&(seg->iSize),4);
-#ifdef ITT_EVENT_HANDLER
- sampleDescriptor.Append((TUint8*)&(sampleNum),4);
- //Kern::Printf("DLL: NM %S : RA:0x%x SZ:0x%x, SN:0x%x",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
- this->iFirstSampleTaken = ETrue;
-#else
- //Kern::Printf("DLL: NM %S : RA:0x%x SZ:0x%x",seg->iFileName,seg->iRunAddress,seg->iSize);
-#endif
- seg->iMark = (seg->iMark | 0x80);
-
- this->sample[0] = sampleDescriptor.Size();
- return sampleDescriptor.Size()+1;
- }
- }
- }
- } else
- {
- SDblQue* codeSegList = Kern::CodeSegList();
- //Kern::Printf("PI");
- //TUint c = 0;
- // the global list
- for (SDblQueLink* codeseg= codeSegList->First(); codeseg!=(SDblQueLink*) codeSegList; codeseg=codeseg->iNext)
- {
- DCodeSeg* seg = _LOFF(codeseg, DCodeSeg, iLink);
- if(seg != 0)
- {
- if( (seg->iMark & 0x80) == 0)
- {
- this->sample[0] = seg->iFileName->Length();
- sampleDescriptor.Append(*(seg->iFileName));
- sampleDescriptor.Append((TUint8*)&(seg->iRunAddress),4);
- sampleDescriptor.Append((TUint8*)&(seg->iSize),4);
-#ifdef ITT_EVENT_HANDLER
- sampleDescriptor.Append((TUint8*)&(sampleNum),4);
- //Kern::Printf("EXE2: NM %S : RA:0x%x SZ:0x%x, time: %d",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
- this->iFirstSampleTaken = ETrue;
-#else
- //Kern::Printf("EXE2: NM %S : RA:0x%x SZ:0x%x, time: %d",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
-#endif
- seg->iMark = (seg->iMark | 0x80);
-
- this->sample[0] = sampleDescriptor.Size();
- return sampleDescriptor.Size()+1;
- }
- }
- }
+ //sampleDescriptor.Zero();
+ if(iInitState == KIttHandlingLibs)
+ {
+ if(iLibsCount < 20)
+ {
+ ret = HandleLibs(sampleNum);
+ iLibsCount++;
+ while(ret == KErrAlreadyExists)
+ {
+ ret = HandleLibs(sampleNum);
+ iLibsCount++;
+ }
+ }
+ else
+ {
+ iLibsCount = 0;
+ return 0;
+ }
+ }
+ //LOGSTRING2("IttSamplerImpl::SampleImpl HandledLibs %d", ret);
+ // one library has been read to sample, needs to be written to file
+
+ else if(iInitState == KIttHandlingCodeSegs)
+ {
+ if(iCodeSegsCount < 20)
+ {
+ ret = HandleSegs(sampleNum);
+ iCodeSegsCount++;
+ while(ret == KErrAlreadyExists)
+ {
+ ret = HandleSegs(sampleNum);
+ iCodeSegsCount++;
+ }
+ }
+
+ else
+ {
+ iCodeSegsCount = 0;
+ return 0;
+ }
+ }
+
+ //LOGSTRING2("IttSamplerImpl::SampleImpl HandledSegs %d", ret);
+ else
+ {
+ // nothing to do
+ Kern::Printf("IttSamplerImpl::SampleImpl - should not be here");
+ return 0;
+ }
+ }
+ else
+ {
+ LOGSTRING("IttSamplerImpl::SampleImpl Not time to sample");
}
- return 0;
+
+ return ret;
}
/*
* IttSamplerImpl::Reset()
*/
void IttSamplerImpl::Reset()
-{
- iTimeToSample = EFalse;
+ {
+ iTimeToSample = ETrue;
#ifdef ITT_EVENT_HANDLER
- iFirstSampleTaken = EFalse;
+ iInitialLibsTaken= EFalse;
+ iInitialSegsTaken= EFalse;
#endif
- this->currentLibCount = 0;
+ iCurrentLibCount = 0;
+ iLibsCount = 0;
+ iCodeSegsCount = 0;
+ iLatestCodeseg = NULL;
this->itt_sample = (TUint8*)&(this->sample[0]);
sampleDescriptor.Zero();
@@ -202,43 +183,151 @@
SDblQue* codeSegList = Kern::CodeSegList();
// the global list
for (SDblQueLink* codeseg= codeSegList->First(); codeseg!=(SDblQueLink*) codeSegList; codeseg=codeseg->iNext)
- {
+ {
DCodeSeg* seg = _LOFF(codeseg,DCodeSeg, iLink);
//if(seg != 0)
- {
+ {
if( (seg->iMark & 0x80) > 0)
- {
+ {
seg->iMark = (seg->iMark & ~0x80);
- }
- }
- }
+ }
+ }
+ }
// the garbage list
+
+ NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
DObjectCon* libs = Kern::Containers()[ELibrary];
+ libs->Wait();
TInt libCount = libs->Count();
for(TInt i=0;i<libCount;i++)
- {
+ {
DLibrary* lib = (DLibrary*)(*libs)[i];
DCodeSeg* seg = lib->iCodeSeg;
if( (seg->iMark & 0x80) > 0)
- {
+ {
seg->iMark = (seg->iMark & ~0x80);
- }
- }
-
- DObjectCon* procs = Kern::Containers()[EProcess];
- TInt procCount = procs->Count();
- for(TInt i=0;i<procCount;i++)
- {
- DProcess* pro = (DProcess*)(*procs)[i];
- DCodeSeg* seg = pro->iCodeSeg;
- if(seg != 0)
- {
- if( (seg->iMark & 0x80) > 0)
- {
- seg->iMark = (seg->iMark & ~0x80);
- }
- }
- }
+ }
+ }
+ libs->Signal();
+ NKern::ThreadLeaveCS();
//#endif //ITT_TEST
}
+/*
+ *
+ */
+TInt IttSamplerImpl::HandleLibs(TUint32 sampleNum)
+ {
+ NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
+ DObjectCon* libs = Kern::Containers()[ELibrary];
+ libs->Wait();
+ TInt libCount(libs->Count());
+ sampleDescriptor.Zero();
+
+ // go 20 binaries through at a time
+ //for(TInt i=0;i<libCount;i++)
+ if (iCurrentLibCount < libCount)
+ {
+ // get libs from
+ DLibrary* lib = (DLibrary*)(*libs)[iCurrentLibCount];
+ libs->Signal();
+ NKern::ThreadLeaveCS();
+ iCurrentLibCount++;
+
+ DCodeSeg* seg = lib->iCodeSeg;
+ if(seg != 0)
+ {
+ if( (seg->iMark & 0x80) == 0)
+ {
+ this->sample[0] = seg->iFileName->Length();
+ sampleDescriptor.Append(*(seg->iFileName));
+ sampleDescriptor.Append((TUint8*)&(seg->iRunAddress),4);
+ sampleDescriptor.Append((TUint8*)&(seg->iSize),4);
+
+#ifdef ITT_EVENT_HANDLER
+ sampleDescriptor.Append((TUint8*)&(sampleNum),4);
+ //Kern::Printf("DLL: NM %S : RA:0x%x SZ:0x%x, SN:0x%x",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
+ //this->iFirstSampleTaken = ETrue;
+#else
+ //Kern::Printf("DLL: NM %S : RA:0x%x SZ:0x%x",seg->iFileName,seg->iRunAddress,seg->iSize);
+#endif
+ seg->iMark = (seg->iMark | 0x80);
+ this->sample[0] = sampleDescriptor.Size();
+ return sampleDescriptor.Size()+1;
+ }
+ else
+ {
+ //Kern::Printf("Already met DLL: NM %S : RA:0x%x SZ:0x%x, SN:0x%x",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
+ return KErrAlreadyExists;
+ }
+ }
+ }
+ else
+ {
+ // check if list gone through
+ iInitState = KIttHandlingCodeSegs;
+ iInitialLibsTaken = ETrue;
+ }
+ libs->Signal();
+ NKern::ThreadLeaveCS();
+ return 0;
+ }
+/*
+ *
+ */
+TInt IttSamplerImpl::HandleSegs(TUint32 sampleNum)
+ {
+ SDblQue* codeSegList = Kern::CodeSegList();
+ //Kern::Printf("PI");
+ TUint count(0);
+ sampleDescriptor.Zero();
+ if(iLatestCodeseg == NULL)
+ {
+ iLatestCodeseg = codeSegList->First();
+ }
+ else
+ {
+ iLatestCodeseg = iLatestCodeseg->iNext;
+ }
+
+ // search the global code segment list
+ //for (; iLatestCodeseg!=(SDblQueLink*) codeSegList; iLatestCodeseg=iLatestCodeseg->iNext)
+ if (iLatestCodeseg != (SDblQueLink*) codeSegList)
+ {
+ DCodeSeg* seg = _LOFF(iLatestCodeseg, DCodeSeg, iLink);
+ if(seg != 0)
+ {
+ if( (seg->iMark & 0x80) == 0)
+ {
+ this->sample[0] = seg->iFileName->Length();
+ sampleDescriptor.Append(*(seg->iFileName));
+ sampleDescriptor.Append((TUint8*)&(seg->iRunAddress),4);
+ sampleDescriptor.Append((TUint8*)&(seg->iSize),4);
+#ifdef ITT_EVENT_HANDLER
+ sampleDescriptor.Append((TUint8*)&(sampleNum),4);
+ //Kern::Printf("EXE2: NM %S : RA:0x%x SZ:0x%x, time: %d",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
+#else
+ //Kern::Printf("EXE2: NM %S : RA:0x%x SZ:0x%x, time: %d",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
+#endif
+ seg->iMark = (seg->iMark | 0x80);
+ count++;
+ this->sample[0] = sampleDescriptor.Size();
+ return sampleDescriptor.Size()+1;
+ }
+ else
+ {
+ //Kern::Printf("Already met EXE2: NM %S : RA:0x%x SZ:0x%x, time: %d",seg->iFileName,seg->iRunAddress,seg->iSize, sampleNum);
+ return KErrAlreadyExists;
+ }
+ }
+ }
+ // check if list gone through
+ else //if (count == 0)
+ {
+ iInitialSegsTaken = ETrue;
+ iTimeToSample = false;
+ LOGSTRING("ITT sampler - all initial samples generated!");
+ }
+ return 0;
+ }
+
// end of file
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/MemSamplerImpl.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/MemSamplerImpl.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -56,13 +56,10 @@
iCount = 0;
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
iSampleType = ESampleThreads;
-#else
- iSampleThreads = true;
-#endif
- iTimeToSample = false;
-
+ //iSampleType = ESampleChunks;
+
+ iTimeToSample = true;
iTotalMemoryOk = false;
iTotalMemoryNameOk = false;
@@ -71,6 +68,9 @@
iChunksProcessing = ENothingToProcess;
iThreadsProcessing = ENothingToProcess;
+ iChunksGathered = false;
+ iThreadsGathered = false;
+
iNewThreadCount = 0;
iThreadCount = 0;
@@ -118,205 +118,143 @@
this->sampleDescriptor.Append(KMemVersion);
this->sampleDescriptor.Append(_L8("_MEM"));
- sample[0] = this->sampleDescriptor.Size();
+ LOGSTRING2("timestamp : 0x%04x", iCount);
- LOGSTRING("MemSamplerImpl::CreateFirstSample - exit");
-
- return (TInt)(sample[0]+1);
+ LOGSTRING("MemSamplerImpl::CreateFirstSample - exit");
+ sample[0] = this->sampleDescriptor.Size();
+
+ return (TInt)(sample[0]+1);
}
-TBool DMemSamplerImpl::SampleNeeded()
+TBool DMemSamplerImpl::SampleNeeded(TUint32 sampleNum)
{
- iCount++;
+ TBool ret(false);
+ iCount = sampleNum;
#ifdef MEM_EVENT_HANDLER
// make the collection of chunks/threads only once, rest will be collected with mem event handler
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
- if (iCount <= iMemSamplingPeriod && ((iCount % iMemSamplingPeriod) == 0 || (iCount % iMemSamplingPeriodDiv3) == 0))
-#else
- if (iCount <= iMemSamplingPeriod && ((iCount % iMemSamplingPeriod) == 0 || (iCount % iMemSamplingPeriodDiv2) == 0))
-#endif
+
+// #ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+// if (iCount <= iMemSamplingPeriod && ((iCount % iMemSamplingPeriod) == 0 || (iCount % iMemSamplingPeriodDiv3) == 0))
+// #else
+ if (iCount % iMemSamplingPeriod == 0)
+// #endif
+
#else
if ((iCount % iMemSamplingPeriod) == 0 || (iCount % iMemSamplingPeriodDiv2) == 0)
#endif
{
LOGSTRING2("MemSamplerImpl::SampleNeeded - time: %d", iCount);
- iTimeToSample = true;
- return true;
+ ret= true;
}
- else
+ else
{
- return false;
+ ret=false;
}
+ return ret;
+ }
- }
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
-TInt DMemSamplerImpl::SampleImpl()
- {
- // Sample threads:
- if( iSampleType == ESampleThreads )
- {
- if(this->iThreadsProcessing == ENothingToProcess )
- {
- if(!iTimeToSample)
+/*
+ * When returns 0, means that all samples done.
+ * Should return length of sample available in iSample
+ */
+TInt DMemSamplerImpl::SampleImpl(TUint32 sampleNum)
+ {
+ if(iTimeToSample)
+ {
+ // Sample threads:
+ if( iSampleType == ESampleThreads && !iThreadsGathered )
+ {
+ if(this->iThreadsProcessing == ENothingToProcess )
{
- return 0;
+ // gather first all thread stacks
+ return GatherThreads();
}
else
{
- iTimeToSample = false;
- // gather first all thread stacks
- return GatherThreads();
+ // process now thread stack list
+ TInt length = this->ProcessThreads();
+ if(length == 0)
+ {
+ this->iThreadsProcessing = ENothingToProcess;
+ // switch to collect chunk data
+ iSampleType = ESampleChunks;
+ iThreadsGathered = ETrue;
+ }
+ return length;
}
}
- else
+ // Sample chunks:
+ else if( iSampleType == ESampleChunks && !iChunksGathered)
{
- // process now thread stack list
- TInt length = this->ProcessThreads();
-
- if(length == 0)
+ if(this->iChunksProcessing == ENothingToProcess)
{
- this->iThreadsProcessing = ENothingToProcess;
- // switch to collect chunk data
- iSampleType = ESampleChunks;
- }
- return length;
- }
- }
-
- // Sample chunks:
- if( iSampleType == ESampleChunks )
- {
- if(this->iChunksProcessing == ENothingToProcess)
- {
- if(!iTimeToSample)
- {
- return 0;
- }
- else
- {
- iTimeToSample = false;
// gather first all chunks
return GatherChunks();
}
- }
- else
- {
- // still something to go through in lists
- TInt length = this->ProcessChunks();
-
- if(length == 0)
- {
- this->iChunksProcessing = ENothingToProcess;
- // switch to collect library data
- iSampleType = ESampleLibraries;
- //iSampleThreads = true;
- }
- return length;
- }
- }
-
- // Sample libraries:
- if( iSampleType == ESampleLibraries )
- {
- if(this->iLibrariesProcessing == ENothingToProcess )
- {
- if(!iTimeToSample)
- {
- return 0;
- }
else
{
- iTimeToSample = false;
+ // still something to go through in lists
+ TInt length = this->ProcessChunks();
+ if(length == 0)
+ {
+ this->iChunksProcessing = ENothingToProcess;
+ // switch to collect library data
+ iSampleType = ESampleLibraries;
+ iChunksGathered = ETrue;
+ iThreadsGathered = ETrue;
+ //iSampleThreads = true;
+ }
+ return length;
+ }
+ }
+
+ #ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+ // Sample libraries:
+ else if( iSampleType == ESampleLibraries )
+ {
+ if(this->iLibrariesProcessing == ENothingToProcess )
+ {
// gather libraries
return GatherLibraries();
}
+ else
+ {
+ // process now thread stack list
+ TInt length = this->ProcessLibraries();
+ if(length == 0)
+ {
+ this->iLibrariesProcessing = ENothingToProcess;
+ // switch to collect chunk data
+ iSampleType = ESampleThreads;
+ iLibrariesGathered = ETrue;
+ }
+ return length;
+ }
}
+ #endif
else
{
- // process now thread stack list
- TInt length = this->ProcessLibraries();
- if(length == 0)
- {
- this->iLibrariesProcessing = ENothingToProcess;
- // switch to collect chunk data
- iSampleType = ESampleThreads;
- }
- return length;
+ // Will not be executed. Ever. PostSample handles the state change and starting of
+ // memory event handler.
+ iChunksGathered = ETrue;
+ iThreadsGathered = ETrue;
+ iTimeToSample = false;
+ Kern::Printf("MEM sampler - all initial samples generated but we should not be here...!");
}
}
-
+ else // not time to sample
+ {
+ LOGSTRING("MEM sampler - not time to sample!");
+ }
// should not reach this point...
return 0;
}
-#else
-TInt DMemSamplerImpl::SampleImpl()
- {
- // check if either chunk or thread lists have unprocessed items
- if(this->iChunksProcessing == ENothingToProcess && !iSampleThreads)
- {
- if(!iTimeToSample)
- {
- return 0;
- }
- else
- {
- iTimeToSample = false;
- // gather first all chunks
- return GatherChunks();
- }
- }
- else if(!iSampleThreads)
- {
- // still something to go through in lists
- TInt length = this->ProcessChunks();
-
- if(length == 0)
- {
- this->iChunksProcessing = ENothingToProcess;
- // switch to collect thread data
- iSampleThreads = true;
- }
- return length;
- }
-
- if(this->iThreadsProcessing == ENothingToProcess && iSampleThreads)
- {
- if(!iTimeToSample)
- {
- return 0;
- }
- else
- {
- iTimeToSample = false;
- // gather first all thread stacks
- return GatherThreads();
- }
- }
-
- else if(iSampleThreads)
- {
- // process now thread stack list
- TInt length = this->ProcessThreads();
- if(length == 0)
- {
- this->iThreadsProcessing = ENothingToProcess;
- // switch to collect chunk data
- iSampleThreads = false;
- }
- return length;
- }
-
- // should not reach this point...
- return 0;
- }
-#endif
inline TInt DMemSamplerImpl::GatherChunks()
{
// encode a process binary
name.Zero();
-
NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
DObjectCon& chunks = *Kern::Containers()[EChunk];
chunks.Wait(); // Obtain the container mutex so the list does get changed under us
@@ -326,16 +264,16 @@
this->iTotalMemoryOk = false;
TInt totalChunkCount(chunks.Count());
DChunk* c;
-
+ LOGSTRING2("DMemSamplerImpl::GatherChunks() chunk count %d",totalChunkCount);
for(TInt i(0);i<totalChunkCount;i++)
{
c = (DChunk*)(chunks)[i];
- LOGSTRING3("Processing chunk %d, tag: 0x%x",i,TAG(c));
+ //LOGSTRING3("Processing chunk %d, tag: 0x%x",i,TAG(c));
if( (TAG(c) & 0x0000ffff) != PROFILER_CHUNK_MARK)
{
- LOGSTRING4("Marking chunk %d/%d, old tag 0x%x",i,(totalChunkCount-1), TAG(c));
+ //LOGSTRING4("Marking chunk %d/%d, old tag 0x%x",i,(totalChunkCount-1), TAG(c));
// this chunk has not been tagged yet
name.Zero();
c->TraceAppendName(name,false);
@@ -348,8 +286,8 @@
// the chunk has been tagged, add heap chunks to the list
this->heapChunksToSample[this->iChunkCount] = c;
this->iChunkCount++;
- LOGSTRING2("Added chunk %d to Chunks",i);
}
+ LOGSTRING2("Added %d Chunks", totalChunkCount);
if(this->iChunkCount > 0 || this->iNewChunkCount > 0)
{
@@ -357,7 +295,6 @@
// process the first sample
TInt length = this->ProcessChunks();
-
if(length == 0)
{
this->iChunksProcessing = ENothingToProcess;
@@ -377,7 +314,6 @@
inline TInt DMemSamplerImpl::GatherThreads()
{
// The thread memory consumption
-
NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
DObjectCon& threads = *Kern::Containers()[EThread];
threads.Wait(); // Obtain the container mutex so the list does get changed under us
@@ -387,16 +323,16 @@
this->iTotalMemoryOk = false;
TInt totalThreadCount = threads.Count();
-
+ LOGSTRING2("DMemSamplerImpl::GatherThreads() thread count %d",totalThreadCount);
for(TInt i(0);i<totalThreadCount;i++)
{
DThread* t = (DThread*)(threads)[i];
- LOGSTRING3("Processing thread %d, tag: 0x%x",i,TAG(t));
+ //LOGSTRING3("Processing thread %d, tag: 0x%x",i,TAG(t));
if( (TAG(t) & PROFILER_MEM_THREAD_MARK) == 0)
{
- LOGSTRING4("Marking thread %d/%d, old tag 0x%x",i,(totalThreadCount-1), TAG(t));
+ //LOGSTRING4("Marking thread %d/%d, old tag 0x%x",i,(totalThreadCount-1), TAG(t));
// this thread's chunk has not been reported yet
this->threadNamesToReport[iNewThreadCount] = t;
iNewThreadCount++;
@@ -407,16 +343,16 @@
// the chunk has been tagged, add heap chunks to the list
this->threadsToSample[this->iThreadCount] = t;
this->iThreadCount++;
- LOGSTRING2("Added thread %d to threads to sample",i);
+ //LOGSTRING2("Added thread %d to threads to sample",i);
}
-
+
+ LOGSTRING3("Added %d threads. ithreadcount %d",totalThreadCount, iThreadCount);
+
if(this->iThreadCount > 0 || this->iNewThreadCount > 0)
{
this->iThreadsProcessing = EStartingToProcess;
-
- // process the first sample
+ // process the first sample
TInt length = this->ProcessThreads();
-
if(length == 0)
{
this->iThreadsProcessing = ENothingToProcess;
@@ -426,7 +362,7 @@
return length;
}
- LOGTEXT("MemSamplerImpl::SampleImpl - Error, no threads");
+ LOGTEXT("DMemSamplerImpl::GatherThreads() - Error, no threads");
threads.Signal(); // Release the container mutex
NKern::ThreadLeaveCS(); // End of critical section
return 0;
@@ -500,131 +436,164 @@
inline TInt DMemSamplerImpl::ProcessChunks()
{
- if(iNewChunkCount > 0)
+ if(iHandledChunks < 50)
+ {
+ if(iNewChunkCount > 0)
+ {
+ if(this->iChunksProcessing == EStartingToProcess)
+ {
+ // this is the first sample, encode a code for names
+ this->iChunksProcessing = EProcessingNames;
+ iHandledChunks++;
+ return EncodeNameCode();
+ }
+
+ if(iTotalMemoryNameOk == false)
+ {
+ iHandledChunks++;
+ return EncodeTotalMemoryName();
+ }
+ iNewChunkCount--;
+ DChunk* c = this->heapChunkNamesToReport[iNewChunkCount];
+ iHandledChunks++;
+ return EncodeChunkName(*c);
+ }
+ else if(iChunkCount > 0)
+ {
+ if(this->iChunksProcessing == EProcessingNames || this->iChunksProcessing == EStartingToProcess)
+ {
+ // this is the first data sample, encode a code for data
+ this->iChunksProcessing = EProcessingData;
+ iHandledChunks++;
+ return EncodeDataCode();
+ }
+
+ if(this->iTotalMemoryOk == false)
+ {
+ iHandledChunks++;
+ return EncodeTotalMemory();
+ }
+
+ // there are no new chunks to report
+ // thus generate the real report
+ iChunkCount--;
+ DChunk* c = this->heapChunksToSample[iChunkCount];
+ iHandledChunks++;
+ return EncodeChunkData(*c);
+ }
+ else
+ {
+ // everything is processed
+ LOGSTRING2("MemSamplerImpl::ProcessChunks() Chunks processed! Chunk count = %d", iChunkCount);
+ #ifdef MEM_EVENT_HANDLER
+ this->iChunksGathered = ETrue;
+ LOGSTRING2("MemSamplerImpl::ProcessChunks() - chunks gathered! Time: %d",iCount);
+ #endif
+ return 0;
+ }
+ }
+ else
+ {
+ LOGSTRING("MemSamplerImpl::ProcessChunks() 0");
+ iHandledChunks =0;
+ }
+ return -1;
+ }
+
+inline TInt DMemSamplerImpl::ProcessThreads()
+ {
+ if(iHandledThreads < 50)
{
- if(this->iChunksProcessing == EStartingToProcess)
+ if(iNewThreadCount > 0)
+ {
+ if(this->iThreadsProcessing == EStartingToProcess)
+ {
+ // this is the first sample, encode a code for names
+ this->iThreadsProcessing = EProcessingNames;
+ iHandledThreads++;
+ return EncodeNameCode();
+ }
+
+ if(iTotalMemoryNameOk == false)
+ {
+ LOGSTRING("MemSamplerImpl::ProcessThreads() Encoding total memory name!");
+ iHandledThreads++;
+ return EncodeTotalMemoryName();
+ }
+ iNewThreadCount--;
+ DThread* t = this->threadNamesToReport[iNewThreadCount];
+ iHandledThreads++;
+ return EncodeChunkName(*t);
+ }
+ else if(iThreadCount > 0)
+ {
+ if(this->iThreadsProcessing == EProcessingNames || this->iThreadsProcessing == EStartingToProcess)
+ {
+ // this is the first data sample, encode a code for data
+ this->iThreadsProcessing = EProcessingData;
+ iHandledThreads++;
+ return EncodeDataCode();
+ }
+
+ if(this->iTotalMemoryOk == false)
+ {
+ iHandledThreads++;
+ return EncodeTotalMemory();
+ }
+
+ // there are no new threads to report
+ // thus generate the real report
+ iThreadCount--;
+ DThread* t = this->threadsToSample[iThreadCount];
+ iHandledThreads++;
+ return EncodeChunkData(*t);
+ }
+ else
+ {
+ // everything is processed
+ LOGSTRING2("MemSamplerImpl::ProcessThreads() Threads processed! Thread count = %d", iThreadCount);
+#ifdef MEM_EVENT_HANDLER
+ this->iThreadsGathered = true;
+ LOGSTRING2("MemSamplerImpl::ProcessThreads() - threads gathered! Time: %d", iCount);
+#endif
+ return 0;
+ }
+ }
+ else
+ {
+ LOGSTRING("MemSamplerImpl::ProcessThreads() 0");
+ iHandledThreads=0;
+ }
+ return -1;
+ }
+
+#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
+inline TInt DMemSamplerImpl::ProcessLibraries()
+ {
+ LOGTEXT("ProcessLibraries - entry");
+
+ if(iHandledLibs < 50)
+ {
+ if(iNewLibraryCount > 0)
+ {
+ if(this->iLibrariesProcessing == EStartingToProcess)
{
// this is the first sample, encode a code for names
- this->iChunksProcessing = EProcessingNames;
+ this->iLibrariesProcessing = EProcessingNames;
+ iHandledLibs++;
return EncodeNameCode();
}
if(iTotalMemoryNameOk == false)
{
- return EncodeTotalMemoryName();
- }
-
- // there are new chunk names to report
- iNewChunkCount--;
- DChunk* c = this->heapChunkNamesToReport[iNewChunkCount];
- return EncodeChunkName(*c);
-
- }
- else if(iChunkCount > 0)
- {
- if(this->iChunksProcessing == EProcessingNames || this->iChunksProcessing == EStartingToProcess)
- {
- // this is the first data sample, encode a code for data
- this->iChunksProcessing = EProcessingData;
- return EncodeDataCode();
- }
-
- if(this->iTotalMemoryOk == false)
- {
- return EncodeTotalMemory();
- }
-
- // there are no new chunks to report
- // thus generate the real report
- iChunkCount--;
- DChunk* c = this->heapChunksToSample[iChunkCount];
- return EncodeChunkData(*c);
- }
- else
- {
- // everything is processed
- LOGSTRING2(" Chunks processed! Chunk count = %d", iChunkCount);
-#ifdef MEM_EVENT_HANDLER
- this->iChunksGathered = true;
- Kern::Printf("MemSamplerImpl::ProcessChunks() - chunks gathered! Time: %d",iCount);
-#endif
- return 0;
- }
- }
-
-inline TInt DMemSamplerImpl::ProcessThreads()
- {
-
- if(iNewThreadCount > 0)
- {
- if(this->iThreadsProcessing == EStartingToProcess)
- {
- // this is the first sample, encode a code for names
- this->iThreadsProcessing = EProcessingNames;
- return EncodeNameCode();
- }
-
- if(iTotalMemoryNameOk == false)
- {
- return EncodeTotalMemoryName();
- }
-
- iNewThreadCount--;
- DThread* t = this->threadNamesToReport[iNewThreadCount];
- return EncodeChunkName(*t);
- }
- else if(iThreadCount > 0)
- {
- if(this->iThreadsProcessing == EProcessingNames || this->iThreadsProcessing == EStartingToProcess)
- {
- // this is the first data sample, encode a code for data
- this->iThreadsProcessing = EProcessingData;
- return EncodeDataCode();
- }
-
- if(this->iTotalMemoryOk == false)
- {
- return EncodeTotalMemory();
- }
-
- // there are no new threads to report
- // thus generate the real report
- iThreadCount--;
- DThread* t = this->threadsToSample[iThreadCount];
- return EncodeChunkData(*t);
- }
- else
- {
- // everything is processed
- LOGSTRING2(" Threads processed! Thread count = %d", iThreadCount);
-#ifdef MEM_EVENT_HANDLER
- this->iThreadsGathered = true;
- Kern::Printf("MemSamplerImpl::ProcessThreads() - threads gathered! Time: %d", iCount);
-#endif
- return 0;
- }
- }
-#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
-inline TInt DMemSamplerImpl::ProcessLibraries()
- {
- LOGTEXT("ProcessLibraries - entry");
- if(iNewLibraryCount > 0)
- {
- if(this->iLibrariesProcessing == EStartingToProcess)
- {
- // this is the first sample, encode a code for names
- this->iLibrariesProcessing = EProcessingNames;
- return EncodeNameCode();
- }
-
- if(iTotalMemoryNameOk == false)
- {
+ iHandledLibs++;
return EncodeTotalMemoryName();
}
// there are new library names to report
iNewLibraryCount--;
DLibrary* l = this->libraryNamesToReport[iNewLibraryCount];
+ iHandledLibs++;
return EncodeChunkName(*l);
}
@@ -634,11 +603,13 @@
{
// this is the first data sample, encode a code for data
this->iLibrariesProcessing = EProcessingData;
+ iHandledLibs++;
return EncodeDataCode();
}
if(this->iTotalMemoryOk == false)
{
+ iHandledLibs++;
return EncodeTotalMemory();
}
@@ -646,6 +617,7 @@
// thus generate the real report
iLibraryCount--;
DLibrary* l = this->librariesToSample[iLibraryCount];
+ iHandledLibs++;
return EncodeChunkData(*l);
}
else
@@ -654,12 +626,20 @@
LOGSTRING2(" Libraries processed! Library count = %d", iLibraryCount);
this->iLibrariesGathered = true;
- Kern::Printf("MemSamplerImpl::ProcessLibraries() - libraries gathered! Time: %d",iCount);
+ LOGSTRING2("MemSamplerImpl::ProcessLibraries() - libraries gathered! Time: %d",iCount);
return 0;
}
}
+ else
+ {
+ LOGSTRING("MemSamplerImpl::ProcessLibs() 0");
+ iHandledLibs =0;
+ }
+ return -1;
+ }
#endif
+
inline TInt DMemSamplerImpl::EncodeNameCode()
{
sample[0] = 1;
@@ -697,7 +677,6 @@
inline TInt DMemSamplerImpl::EncodeTotalMemory()
{
-
TUint8* size = &sample[0];
*size = 0;
@@ -753,7 +732,7 @@
// the size is the descriptor length + the size field
LOGSTRING2("Non-Heap Chunk Name - %d",*size);
- return ((TInt)(*size))+1;
+ return ((TInt)(*size))+1;
}
inline TInt DMemSamplerImpl::EncodeChunkName(DThread& t)
@@ -803,14 +782,14 @@
// the size of the following name is in the first byte
TUint8* size = &sample[0];
*size = 0;
+
+ TInt zero(0);
this->sampleDescriptor.Zero();
- TInt zero(0);
-
TUint32 address((TUint32)&c);
this->sampleDescriptor.Append((TUint8*)&address,sizeof(TUint32));
- *size += sizeof(TUint);
-
+ *size += sizeof(TUint32);
+ LOGSTRING2("address - 0x%04x",&address);
// copy the total amount of memory allocated
this->sampleDescriptor.Append((TUint8*)&(c.iSize),sizeof(TInt));
*size += sizeof(TInt);
@@ -827,22 +806,18 @@
this->sampleDescriptor.Append((TUint8*)&(zero),sizeof(TInt));
*size += sizeof(TInt);
- LOGSTRING2("Data - %d",*size);
+ LOGSTRING2("chunk Data - %d",*size);
return ((TInt)(*size))+1;
-
}
inline TInt DMemSamplerImpl::EncodeChunkData(DThread& t)
{
- LOGTEXT("MemSamplerImpl::EncodeChunkData - entry");
- //LOGSTRING2("MemSamplerImpl::EncodeChunkData - processing thread 0x%x ",&t);
-
// the size of the following name is in the first byte
TUint8* size = &sample[0];
*size = 0;
+ TInt zero(0);
this->sampleDescriptor.Zero();
-
- LOGTEXT("MemSamplerImpl::EncodeChunkData - cleared");
+ //LOGTEXT("MemSamplerImpl::EncodeChunkData - cleared");
this->sampleDescriptor.Append((TUint8*)&(t.iId),sizeof(TUint));
*size += sizeof(TUint);
@@ -851,7 +826,7 @@
this->sampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt));
*size += sizeof(TInt);
- TInt zero(0);
+
// append the cell amount allocated (zero, not in use here)
this->sampleDescriptor.Append((TUint8*)&zero,sizeof(TInt));
*size += sizeof(TInt);
@@ -901,9 +876,9 @@
#endif
void DMemSamplerImpl::Reset()
{
- Kern::Printf("MemSamplerImpl::Reset");
+ LOGSTRING("MemSamplerImpl::Reset - entry");
iCount = 0; // sample threads 1 cycle after actual MEM sample time...
- this->iTimeToSample = false;
+ this->iTimeToSample = true;
this->iChunkCount = 0;
this->iNewChunkCount = 0;
@@ -914,14 +889,13 @@
this->iThreadsProcessing = ENothingToProcess;
#ifdef MEM_EVENT_HANDLER_LIBRARY_EVENTS
this->iLibrariesProcessing = ENothingToProcess;
+#else
this->iSampleType = ESampleThreads;
-#else
- this->iSampleThreads = true;
+ //this->iSampleType = ESampleChunks;
+ //this->iSampleThreads = true;
#endif
-
- this->sampleDescriptor.Zero();
-
- // clear all chunk tags
+ this->sampleDescriptor.Zero();
+ // clear all chunk tags
NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
DObjectCon* chunks = Kern::Containers()[EChunk];
chunks->Wait(); // Obtain the container mutex so the list does get changed under us
@@ -934,12 +908,12 @@
}
chunks->Signal(); // Release the container mutex
- Kern::Printf("MemSamplerImpl::Reset");
+ LOGSTRING("MemSamplerImpl::Reset");
this->iThreadCount = 0;
this->iNewThreadCount = 0;
this->sampleDescriptor.Zero();
- // clear all chunk tags
+ // clear all thread tags
DObjectCon* threads = Kern::Containers()[EThread];
threads->Wait(); // Obtain the container mutex so the list does get changed under us
@@ -972,3 +946,5 @@
NKern::ThreadLeaveCS(); // End of critical section
}
+
+// end of file
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/MemoryEventHandler.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/MemoryEventHandler.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -25,22 +25,20 @@
#include "MemoryEventHandler.h"
-DMemoryEventHandler::DMemoryEventHandler(DProfilerSampleBuffer* aSampleBuffer)
+DMemoryEventHandler::DMemoryEventHandler(DProfilerSampleBuffer* aSampleBuffer, TProfilerGppSamplerData* aGppSamplerDataIn)
: DKernelEventHandler(EventHandler, this),
iSampleBuffer(aSampleBuffer),
- iSampleDescriptor(&(this->iSample[1]),0,256)
+ iSampleDescriptor(&(this->iSample[1]),0,256),
+ gppSamplerData(aGppSamplerDataIn)
{
-// Kern::Printf("DMemoryEventHandler::DMemoryEventHandler()");
- iCount = 0;
iPreviousCount = 0;
+ iSampleAvailable = false;
}
TInt DMemoryEventHandler::Create()
{
-// Kern::Printf("DMemoryEventHandler::Create()");
-
- TInt err(Kern::MutexCreate(iLock, _L("MemoryEventHandlerLock"), KMutexOrdGeneral0));
+ TInt err(Kern::MutexCreate(iLock, _L("MemoryEventHandlerLock"), KMutexOrdResourceManager));
if (err != KErrNone)
return err;
@@ -50,8 +48,6 @@
DMemoryEventHandler::~DMemoryEventHandler()
{
-// Kern::Printf("DMemoryEventHandler::~DMemoryEventHandler()");
-
if (iLock)
iLock->Close(NULL);
@@ -60,8 +56,6 @@
TInt DMemoryEventHandler::Start()
{
-// Kern::Printf("DMemoryEventHandler::Start()");
-
iTracking = ETrue;
return KErrNone;
}
@@ -69,8 +63,6 @@
TInt DMemoryEventHandler::Stop()
{
-// Kern::Printf("DMemoryEventHandler::Stop()");
-
iTracking = EFalse;
return KErrNone;
}
@@ -79,14 +71,22 @@
{
LOGTEXT("DMemoryEventHandler::SampleNeeded()");
- // increase the coutner by one on each round
- iCount++;
-
// check if event handler was not running
-// if(!iTracking)
-// return false; // return false
-
- return true;
+ if(!iTracking)
+ return false; // return false
+ // check if a new sample is available
+ if(iSampleAvailable)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+void DMemoryEventHandler::SampleHandled()
+ {
+ iSampleAvailable = false;
}
@@ -100,11 +100,10 @@
TUint DMemoryEventHandler::HandleEvent(TKernelEvent aType, TAny* a1, TAny* a2)
{
// debug
-// Kern::Printf("New kernel event received, %d", aType);
+ // Kern::Printf("New kernel event received, %d", aType);
- if (iTracking/* && iCount != iPreviousCount*/)
+ if (iTracking)
{
-// iPreviousCount = iCount;
iCounters[aType]++;
switch (aType)
{
@@ -163,11 +162,6 @@
break;
}
}
-// else if(iTracking && iCount == iPreviousCount)
-// {
-// // if time stamp is not updated profiling has stopped
-// Stop();
-// }
return DKernelEventHandler::ERunNext;
}
@@ -208,12 +202,12 @@
TInt err(KErrNone);
TUint8 number(4); // mem sampler id
-
+ TUint32 sampleNum= this->gppSamplerData->sampleNumber;
// check if iCount bigger than previous, i.e. at least 1 ms has passed from the previous sample
- if(iCount > iPreviousCount)
+ if(sampleNum > iPreviousCount)
{
err = this->iSampleBuffer->AddSample(&number,1);
- err = this->iSampleBuffer->AddSample((TUint8*)&(iCount),4);
+ err = this->iSampleBuffer->AddSample((TUint8*)&(sampleNum),4);
// add data chunk header
TInt length(EncodeUpdateCode());
@@ -224,11 +218,12 @@
err = iSampleBuffer->AddSample(iSample, length);
AddFooter(); // end mark for total memory sample
}
- iPreviousCount = iCount;
+ iPreviousCount = sampleNum;
// add actual sample
err = this->iSampleBuffer->AddSample(&number,1);
- err = this->iSampleBuffer->AddSample((TUint8*)&(iCount),4);
+ err = this->iSampleBuffer->AddSample((TUint8*)&(sampleNum),4);
+ LOGSTRING2("handler timestamp : 0x%04x", sampleNum);
return err;
}
@@ -284,8 +279,6 @@
// handle chunk activity
TBool DMemoryEventHandler::HandleAddChunk(DChunk* aChunk)
{
-// Kern::Printf("New DChunk created: 0x%08x, time: %d", aChunk, iCount);
-
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -293,6 +286,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -320,8 +315,6 @@
TBool DMemoryEventHandler::HandleUpdateChunk(DChunk* aChunk)
{
-// Kern::Printf("DChunk updated: 0x%08x, time: %d", aChunk, iCount);
-
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -329,6 +322,9 @@
if(err != KErrNone)
{
+ Kern::Printf("DChunk update error: %d", err);
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -348,7 +344,6 @@
TBool DMemoryEventHandler::HandleDeleteChunk(DChunk* aChunk)
{
-// Kern::Printf("DChunk deleted: 0x%08x, time: %d", aChunk, iCount);
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -356,6 +351,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -392,7 +389,6 @@
// handle thread activity
TBool DMemoryEventHandler::HandleAddThread(DThread* aThread)
{
-// Kern::Printf("DThread added: 0x%08x, time: %d", aThread->iId, iCount);
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -400,6 +396,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -427,7 +425,6 @@
TBool DMemoryEventHandler::HandleUpdateThread(DThread* aThread)
{
-// Kern::Printf("DThread updated: 0x%08x, time: %d", aThread->iId, iCount);
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -435,6 +432,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -454,7 +453,6 @@
TBool DMemoryEventHandler::HandleDeleteThread(DThread* aThread)
{
-// Kern::Printf("DThread deleted: 0x%08x, time: %d", aThread->iId, iCount);
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -462,6 +460,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -482,7 +482,6 @@
TBool DMemoryEventHandler::HandleAddLibrary(DLibrary* aLibrary, DThread* aThread)
{
LOGTEXT("DMemoryEventHandler::HandleAddLibrary");
- Kern::Printf("DLibrary added: 0x%08x, time: %d", aLibrary, iCount);
// add header first
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
@@ -490,6 +489,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -517,7 +518,7 @@
TBool DMemoryEventHandler::HandleDeleteLibrary(DLibrary* aLibrary)
{
- Kern::Printf("DLibrary deleted: 0x%08x, time: %d", aLibrary, iCount);
+ LOGTEXT("DMemoryEventHandler::HandleDeleteLibrary");
NKern::ThreadEnterCS();
Kern::MutexWait(*iLock);
// add header first
@@ -525,6 +526,8 @@
if(err != KErrNone)
{
+ Kern::MutexSignal(*iLock);
+ NKern::ThreadLeaveCS();
return EFalse;
}
@@ -640,7 +643,7 @@
iSampleDescriptor.Append((TUint8*)&(t.iUserStackSize),sizeof(TInt));
*size += sizeof(TInt);
-// Kern::Printf("TData -> %d",*size);
+ LOGSTRING2("TData -> %d",*size);
return ((TInt)(*size))+1;
}
@@ -656,7 +659,7 @@
TInt zero(0);
TUint32 address((TUint32)&c);
-
+ LOGSTRING2("DMemoryEventHandler::EncodeChunkDataC - address 0x%x", *&address);
iSampleDescriptor.Append((TUint8*)&address,sizeof(TUint32));
*size += sizeof(TUint);
@@ -676,7 +679,7 @@
iSampleDescriptor.Append((TUint8*)&(zero),sizeof(TInt));
*size += sizeof(TInt);
-// Kern::Printf("CData - %d",*size);
+ LOGSTRING2("CData - %d",*size);
return ((TInt)(*size))+1;
}
--- a/perfsrv/piprofiler/plugins/GeneralsPlugin/src/PriSamplerImpl.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/GeneralsPlugin/src/PriSamplerImpl.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -99,16 +99,21 @@
LOGTEXT("Processing threads...");
- DObjectCon& threads = *Kern::Containers()[EThread];
+ DObjectCon* threads = Kern::Containers()[EThread];
+ NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
+ threads->Wait();
// PRI trace variables
this->iThreadCount = 0;
this->iNewThreadCount = 0;
- TInt totalThreadCount = threads.Count();
+ TInt totalThreadCount = threads->Count();
for(TInt i=0;i<totalThreadCount;i++)
{
- DThread* t = (DThread*)(threads)[i];
+ //DThread* t = (DThread*)(threads)[i];
+ DObject* pO=(*threads)[i];
+ DThread* t = (DThread*)pO;
+
LOGSTRING3("Processing thread %d, tag: 0x%x",i,TAG(t));
if( (TAG(t) & PROFILER_THREAD_MARK) == 0)
@@ -132,6 +137,9 @@
LOGSTRING2("Added thread %d to threads to sample",i);
}
+ threads->Signal();
+ NKern::ThreadLeaveCS(); // End of critical section
+
if(this->iThreadCount > 0 || this->iNewThreadCount > 0)
{
this->iProcessing = EStartingToProcess;
@@ -143,7 +151,6 @@
{
this->iProcessing = ENothingToProcess;
}
-
return length;
}
else
@@ -301,12 +308,17 @@
// clear all thread tags
+ NKern::ThreadEnterCS(); // Prevent us from dying or suspending whilst holding a DMutex
DObjectCon* threads = Kern::Containers()[EThread];
+ threads->Wait(); // Obtain the container mutex so the list does get changed under us
+
TInt totalThreadCount = threads->Count();
for(TInt i=0;i<totalThreadCount;i++)
{
DThread* t = (DThread*)(*threads)[i];
TAG(t) = (TAG(t) & 0xfffffffd);
}
- }
+ threads->Signal();
+ NKern::ThreadLeaveCS(); // End of critical section
+ }
--- a/perfsrv/piprofiler/plugins/PWRplugin/group/PWRPlugin.mmp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/PWRplugin/group/PWRPlugin.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -25,6 +25,7 @@
VENDORID VID_DEFAULT
CAPABILITY ALL -TCB
SMPSAFE
+UNPAGED
OS_LAYER_SYSTEMINCLUDE
USERINCLUDE ../inc
--- a/perfsrv/piprofiler/plugins/PWRplugin/inc/PwrPlugin.h Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/PWRplugin/inc/PwrPlugin.h Tue Oct 26 16:20:32 2010 +0300
@@ -20,15 +20,13 @@
//#define PWR_SAMPLER_BACKLIGHT
-//#include "PIProfilerConfigInternal.h"
-
// system definitions
#include <w32std.h>
#include <e32std.h>
#include <e32property.h>
-#include <HWRMPower.h>
-#include <HWRMLight.h>
+#include <hwrmpower.h>
+#include <hwrmlight.h>
// user definitions
#include <piprofiler/SamplerPluginInterface.h>
@@ -107,11 +105,7 @@
TUint32* iSampleTime;
};
-#ifdef PWR_SAMPLER_BACKLIGHT
class CProfilerPowerListener : public CBase, public MHWRMBatteryPowerObserver, public MHWRMLightObserver
-#else
-class CProfilerPowerListener : public CBase, public MHWRMBatteryPowerObserver
-#endif
{
public:
static CProfilerPowerListener* NewL(CPwrPlugin* aSampler);
@@ -128,10 +122,8 @@
// From MHWRMBatteryPowerObserver
virtual void PowerMeasurement(TInt aErr, CHWRMPower::TBatteryPowerMeasurementData& aMeasurement);
-#ifdef PWR_SAMPLER_BACKLIGHT
// From MHWRMLightObserver
virtual void LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus);
-#endif
private:
void Sample();
@@ -144,11 +136,7 @@
private:
-#ifdef PWR_SAMPLER_BACKLIGHT
TUint8 iSample[13];
-#else
- TUint8 iSample[12];
-#endif
TUint16 iNominalCapa;
TUint16 iVoltage;
@@ -157,10 +145,8 @@
CPwrPlugin* iSampler;
CHWRMPower* iPowerAPI;
-#ifdef PWR_SAMPLER_BACKLIGHT
CHWRMLight* iLightAPI;
CHWRMLight::TLightStatus iBackLightStatus;
-#endif
};
#endif
--- a/perfsrv/piprofiler/plugins/PWRplugin/src/PwrPlugin.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/perfsrv/piprofiler/plugins/PWRplugin/src/PwrPlugin.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -19,8 +19,8 @@
#include <piprofiler/ProfilerTraces.h>
#include <centralrepository.h>
-#include <HWRMPower.h>
-#include <HWRMLight.h>
+#include <hwrmpower.h>
+#include <hwrmlight.h>
#include <hwrm/hwrmpowerdomaincrkeys.h>
@@ -324,11 +324,9 @@
iNominalCapa(0),
iVoltage(0),
iCurrent(0),
- iPowerAPI(0)
-#ifdef PWR_SAMPLER_BACKLIGHT
- ,iLightAPI(0),
+ iPowerAPI(0),
+ iLightAPI(0),
iBackLightStatus(CHWRMLight::ELightStatusUnknown)
-#endif
{
LOGTEXT(_L("CProfilerPowerListener::CProfilerPowerListener() - konstuktori"));
@@ -363,13 +361,12 @@
delete iPowerAPI;
iPowerAPI = 0;
}
-#ifdef PWR_SAMPLER_BACKLIGHT
+
if (iLightAPI)
{
delete iLightAPI;
iLightAPI = 0;
}
-#endif
LOGTEXT(_L("CProfilerPowerListener::~CProfilerPowerListener() - exit"));
}
@@ -429,6 +426,8 @@
// Read HWRM reporting settings from central repository
CRepository* centRep = CRepository::NewL(KCRUidPowerSettings);
+ CleanupStack::PushL( centRep );
+
TInt baseInterval(0);
User::LeaveIfError(centRep->Get(KPowerBaseTimeInterval, baseInterval));
User::LeaveIfError(centRep->Get(KPowerMaxReportingPeriod, iOriginalReportingPeriod));
@@ -437,6 +436,7 @@
LOGSTRING2("CProfilerPowerListener::StartL() - Original HWRM max power reporting period: %d", iOriginalReportingPeriod);
User::LeaveIfError(centRep->Set(KPowerMaxReportingPeriod, KReportingPeriodInfinite));
+ CleanupStack::PopAndDestroy();
// Power reporting interval reading may return too low value sometimes. Minimum value expected to be 250ms.
if ( baseInterval < KMinSampleInterval )
@@ -468,10 +468,8 @@
return status.Int();
}
-#ifdef PWR_SAMPLER_BACKLIGHT
// Start monitoring backlight status
iLightAPI = CHWRMLight::NewL(this);
-#endif
LOGTEXT(_L("CProfilerPowerListener::StartL() - exit"));
return KErrNone;
@@ -505,9 +503,7 @@
LOGSTRING2("CProfilerPowerListener::Sample() - Nominal capacitance: %d", iNominalCapa);
LOGSTRING2("CProfilerPowerListener::Sample() - Voltage: %d", iVoltage);
LOGSTRING2("CProfilerPowerListener::Sample() - Current: %d", iCurrent);
-#ifdef PWR_SAMPLER_BACKLIGHT
LOGSTRING2("CProfilerPowerListener::Sample() - Backlight status: %d", (TUint8)iBackLightStatus);
-#endif
iSample[0] = iNominalCapa;
iSample[1] = iNominalCapa >> 8;
@@ -517,7 +513,6 @@
iSample[5] = iCurrent >> 8;
iSample[6] = iCurrent >> 16;
iSample[7] = iCurrent >> 24;
-#ifdef PWR_SAMPLER_BACKLIGHT
iSample[8] = (TUint8)iBackLightStatus;
iSample[9] = sampleTime;
iSample[10] = sampleTime >> 8;
@@ -525,14 +520,6 @@
iSample[12] = sampleTime >> 24;
iSampler->AddSample(iSample, 13, 0);
-#else
- iSample[8] = sampleTime;
- iSample[9] = sampleTime >> 8;
- iSample[10] = sampleTime >> 16;
- iSample[11] = sampleTime >> 24;
-
- iSampler->AddSample(iSample, 12, 0);
-#endif
LOGTEXT(_L("CProfilerPowerListener::Sample() - exit"));
}
@@ -570,14 +557,17 @@
LOGSTRING2("CProfilerPowerListener::Stop() - Failed to restore max sampling period: %d", err);
}
}
+ if (centRep)
+ {
+ delete centRep;
+ }
}
-#ifdef PWR_SAMPLER_BACKLIGHT
+
if (iLightAPI)
{
delete iLightAPI;
iLightAPI = 0;
}
-#endif
LOGTEXT(_L("CProfilerPowerListener::Stop() - exit"));
return KErrNone;
@@ -604,7 +594,6 @@
LOGTEXT(_L("CProfilerPowerListener::PowerMeasurement - exit"));
}
-#ifdef PWR_SAMPLER_BACKLIGHT
void CProfilerPowerListener::LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus)
{
LOGTEXT(_L("CProfilerPowerListener::LightStatusChanged - entry"));
@@ -620,4 +609,3 @@
}
LOGTEXT(_L("CProfilerPowerListener::LightStatusChanged - exit"));
}
-#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,119 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AE), 2,3,1, TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+;if 52.50
+IF exists("Z:\system\install\Series60v5.0.sis") AND NOT exists("Z:\system\install\Series60v3.2.sis")
+
+; engine
+"R:\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+; basic sampler plugins
+"R:\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"R:\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"R:\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"R:\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"R:\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"R:\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+; writer plugins
+"R:\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"R:\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"R:\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"R:\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"R:\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"R:\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"R:\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"R:\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+"R:\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
+
+ENDIF
+
+;if 3.23
+IF exists("Z:\system\install\Series60v3.2.sis") AND NOT exists("Z:\system\install\Series60v5.0.sis")
+; engine
+"K:\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+; basic sampler plugins
+"K:\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"K:\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"K:\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"K:\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"K:\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"K:\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+; writer plugins
+"K:\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"K:\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"K:\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"K:\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+; UI
+"K:\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"K:\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"K:\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"K:\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+"K:\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
+
+ENDIF
+
+IF exists ("Z:\system\install\Series60v5.2.sis")
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+; if 10.1
+"T:\epoc32\data\z\Resource\apps\piprofilerui.mif"-"!:\Resource\Apps\piprofilerui.mif"
+"T:\epoc32\data\z\Resource\apps\piprofilerui.rsc"-"!:\Resource\Apps\piprofilerui.rsc"
+; if 9.2
+"Y:\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"y:\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"Y:\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+"Y:\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
+
+ENDIF
\ No newline at end of file
Binary file perfsrv/piprofiler/sis/piprofiler.sis has changed
Binary file perfsrv/piprofiler/sis/piprofiler.sisx has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_10_1.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,68 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+IF exists ("Z:\system\install\Series60v5.2.sis")
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; profiler exe
+"\epoc32\release\armv5\urel\PIProfiler.exe" -"!:\sys\bin\PIProfiler.exe"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui.rsc"-"!:\Resource\Apps\piprofilerui.rsc"
+"\epoc32\data\z\Resource\apps\piprofilerui.mif"-"!:\Resource\Apps\piprofilerui.mif"
+
+"\epoc32\data\z\PRIVATE\10003A3F\import\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+
+ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_3_2.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,62 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+IF exists ("Z:\system\install\Series60v5.2.sis")
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+"\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
+
+ENDIF
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_5250.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,67 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+;if 52.50
+IF exists("Z:\system\install\Series60v5.0.sis") AND NOT exists("Z:\system\install\Series60v3.2.sis")
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+; piprofiler exe
+"\epoc32\release\armv5\urel\PIProfiler.exe" - "!:\sys\bin\PIProfiler.exe"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"\epoc32\data\z\Resource\apps\piprofilerui.rsc"-"!:\Resource\Apps\piprofilerui.rsc"
+"\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+"\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
+
+ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_9_2.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,74 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+;IF exists ("Z:\system\install\Series60v5.2.sis")
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" - "!:\sys\bin\PIProfilerEngine.exe"
+"\epoc32\release\armv5\urel\PIProfiler.exe" -"!:\sys\bin\PIProfiler.exe"
+
+; basic sampler plugins
+"\epoc32\data\Z\resource\plugins\PIProfilerGenerals.rsc" - "!:\resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\data\Z\resource\plugins\PIProfilerBUP.rsc" - "!:\resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\data\Z\resource\plugins\PIProfilerPWR.rsc" - "!:\resource\Plugins\PIProfilerPWR.RSC"
+
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" - "!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" - "!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" - "!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerPWR.dll" - "!:\sys\bin\PIProfilerPWR.dll"
+"\epoc32\release\armv5\urel\PIProfilerTouchEventAnim.dll" - "!:\sys\bin\PIProfilerTouchEventAnim.dll"
+
+
+; writer plugins
+"\epoc32\data\Z\resource\plugins\piprofilerdebugwriter.rsc" - "!:\resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\data\Z\resource\plugins\piprofilerdiskwriter.rsc" - "!:\resource\Plugins\piprofilerdiskwriter.rsc"
+
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" - "!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" - "!:\sys\bin\piprofilerdiskwriter.dll"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe" - "!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\resource\apps\piprofilerui.rsc" - "!:\resource\Apps\piprofilerui.rsc"
+"\epoc32\data\z\resource\apps\piprofilerui_aif.mif" - "!:\resource\Apps\piprofilerui_aif.mif"
+"\epoc32\data\z\resource\apps\piprofilerui_extraicons.mif" - "!:\resource\Apps\piprofilerui_extraicons.mif"
+
+"\epoc32\data\z\private\2001E5AE\backup_registration.xml" - "!:\private\2001E5AE\backup_registration.xml"
+
+"\epoc32\data\z\private\10003a3f\apps\piprofilerui_reg.rsc" - "!:\resource\Apps\piprofilerui_reg.rsc"
+
+;ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_rnd.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,72 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" -"!:\sys\bin\PIProfilerEngine.exe"
+"\epoc32\release\armv5\urel\PIProfiler.exe" -"!:\sys\bin\PIProfiler.exe"
+
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+"\epoc32\release\armv5\urel\PIProfilerPWR.dll" -"!:\sys\bin\PIProfilerPWR.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerPWR.rsc" - "!:\Resource\Plugins\PIProfilerPWR.RSC"
+
+; internals sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerInternals.dll" -"!:\sys\bin\PIProfilerInternals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerInternals.rsc" - "!:\Resource\Plugins\PIProfilerInternals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerInternalsSampler.ldd" -"!:\sys\bin\PIProfilerInternalsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerISA.dll" -"!:\sys\bin\PIProfilerISA.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerISA.rsc" - "!:\Resource\Plugins\PIProfilerISA.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGPU.dll" -"!:\sys\bin\PIProfilerGPU.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGPU.rsc" - "!:\Resource\Plugins\PIProfilerGPU.RSC"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui.rsc"-"!:\Resource\Apps\piprofilerui.rsc"
+
+"\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_rnd_10_1.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,74 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; engine
+"\epoc32\release\armv5\urel\PIProfilerEngine.exe" -"!:\sys\bin\PIProfilerEngine.exe"
+"\epoc32\release\armv5\urel\PIProfiler.exe" -"!:\sys\bin\PIProfiler.exe"
+
+; basic sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\urel\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+"\epoc32\release\armv5\urel\PIProfilerPWR.dll" -"!:\sys\bin\PIProfilerPWR.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerPWR.rsc" - "!:\Resource\Plugins\PIProfilerPWR.RSC"
+
+; internals sampler plugins
+"\epoc32\release\armv5\urel\PIProfilerInternals.dll" -"!:\sys\bin\PIProfilerInternals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerInternals.rsc" - "!:\Resource\Plugins\PIProfilerInternals.RSC"
+"\epoc32\release\armv5\urel\PIProfilerInternalsSampler.ldd" -"!:\sys\bin\PIProfilerInternalsSampler.ldd"
+"\epoc32\release\armv5\urel\PIProfilerISA.dll" -"!:\sys\bin\PIProfilerISA.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerISA.rsc" - "!:\Resource\Plugins\PIProfilerISA.RSC"
+"\epoc32\release\armv5\urel\PIProfilerGPU.dll" -"!:\sys\bin\PIProfilerGPU.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGPU.rsc" - "!:\Resource\Plugins\PIProfilerGPU.RSC"
+
+; writer plugins
+"\epoc32\release\armv5\urel\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\urel\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\urel\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui_aif.mif"-"!:\Resource\Apps\piprofilerui_aif.mif"
+"\epoc32\data\z\Resource\apps\piprofilerui_ExtraIcons.mif"-"!:\Resource\Apps\piprofilerui_ExtraIcons.mif"
+"\epoc32\data\z\PRIVATE\10003A3F\APPS\piprofilerui_reg.rsc"-"!:\private\10003a3f\import\apps\piprofilerui_reg.rsc"
+
+"\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/sis/piprofiler_rnd_UDEB.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,72 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+
+;Languages
+&EN
+
+;Header
+#{"PIProfiler"}, (0x2001E5AD), 2,3,1,TYPE=SA, RU
+
+;Supports Series 60 v 3.2
+[0x102752AE], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.1
+[0x10283160], 0, 0, 0, {"Series60ProductID"}
+;Supports Series 60 v 5.2
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+;Supports Symbian^3
+[0x20022E6D], 0, 0, 0, {"Series60ProductID"}
+
+; Non-localised vendor name
+:"Nokia Corporation"
+
+; Localised vendor names
+%{"Nokia Corporation"}
+
+; engine
+"\epoc32\release\armv5\udeb\PIProfilerEngine.exe" -"!:\sys\bin\PIProfilerEngine.exe"
+"\epoc32\release\armv5\udeb\PIProfiler.exe" -"!:\sys\bin\PIProfiler.exe"
+
+; basic sampler plugins
+"\epoc32\release\armv5\udeb\PIProfilerGenerals.dll" -"!:\sys\bin\PIProfilerGenerals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGenerals.rsc" - "!:\Resource\Plugins\PIProfilerGenerals.RSC"
+"\epoc32\release\armv5\udeb\PIProfilerGeneralsSampler.ldd" -"!:\sys\bin\PIProfilerGeneralsSampler.ldd"
+"\epoc32\release\armv5\udeb\PIProfilerBUP.dll" -"!:\sys\bin\PIProfilerBUP.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerBUP.rsc" - "!:\Resource\Plugins\PIProfilerBUP.RSC"
+"\epoc32\RELEASE\armv5\udeb\PIProfilerTouchEventAnim.dll"-"!:\sys\bin\PIProfilerTouchEventAnim.dll"
+"\epoc32\release\armv5\udeb\PIProfilerPWR.dll" -"!:\sys\bin\PIProfilerPWR.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerPWR.rsc" - "!:\Resource\Plugins\PIProfilerPWR.RSC"
+
+; internals sampler plugins
+"\epoc32\release\armv5\udeb\PIProfilerInternals.dll" -"!:\sys\bin\PIProfilerInternals.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerInternals.rsc" - "!:\Resource\Plugins\PIProfilerInternals.RSC"
+"\epoc32\release\armv5\udeb\PIProfilerInternalsSampler.ldd" -"!:\sys\bin\PIProfilerInternalsSampler.ldd"
+"\epoc32\release\armv5\udeb\PIProfilerISA.dll" -"!:\sys\bin\PIProfilerISA.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerISA.rsc" - "!:\Resource\Plugins\PIProfilerISA.RSC"
+"\epoc32\release\armv5\udeb\PIProfilerGPU.dll" -"!:\sys\bin\PIProfilerGPU.dll"
+"\epoc32\data\Z\Resource\plugins\PIProfilerGPU.rsc" - "!:\Resource\Plugins\PIProfilerGPU.RSC"
+
+; writer plugins
+"\epoc32\release\armv5\udeb\piprofilerdebugwriter.dll" -"!:\sys\bin\piprofilerdebugwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdebugwriter.rsc" - "!:\Resource\Plugins\piprofilerdebugwriter.rsc"
+"\epoc32\release\armv5\udeb\piprofilerdiskwriter.dll" -"!:\sys\bin\piprofilerdiskwriter.dll"
+"\epoc32\data\Z\Resource\plugins\piprofilerdiskwriter.rsc" - "!:\Resource\Plugins\piprofilerdiskwriter.rsc"
+
+; UI
+"\epoc32\RELEASE\armv5\udeb\PIProfilerUI.exe"-"!:\sys\bin\PIProfilerUI.exe"
+"\epoc32\data\z\Resource\apps\piprofilerui.rsc"-"!:\Resource\Apps\piprofilerui.rsc"
+
+"\epoc32\data\z\PRIVATE\2001E5AE\backup_registration.xml"-"!:\private\2001E5AE\backup_registration.xml"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/Bmarm/PIEngineTestU.DEF Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/Bwins/PIEngineTestu.def Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/conf/PIEngineTest.cfg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,7 @@
+[Test]
+title Sample for 10 seconds
+create PIEngineTest PIEngineTestObject
+PIEngineTestObject StartEngineAndSample10Sec
+delete PIEngineTestObject
+[Endtest]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/conf/PITestFramework.ini Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,233 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+# - Set Test Reporting mode. TestReportMode's possible values are:
+# + 'Summary': Summary of the tested test cases.
+# + 'Environment': Hardware and software info.
+# + 'TestCases': Test case report.
+# + 'FullReport': Set of all above ones.
+# + Example 'TestReportMode= Summary TestCases'
+#
+# - CreateTestReport setting controls report creation mode
+# + YES, Test report will created.
+# + NO, No Test report.
+#
+# - File path indicates the base path of the test report.
+# - File name indicates the name of the test report.
+#
+# - File format indicates the type of the test report.
+# + TXT, Test report file will be txt type, for example 'TestReport.txt'.
+# + HTML, Test report will be html type, for example 'TestReport.html'.
+# + XML, Test report will be xml type, for example 'TestReport.xml'.
+# Note, that xml format is available only when output is set to FILE.
+#
+# - File output indicates output source of the test report.
+# + FILE, Test report logging to file.
+# + RDEBUG, Test report logging to using rdebug.
+#
+# - File Creation Mode indicates test report overwriting if file exist.
+# + OVERWRITE, Overwrites if the Test report file exist.
+# + APPEND, Continue logging after the old Test report information if
+# report exist.
+# - Sets a device reset module's dll name(Reboot).
+# + If Nokia specific reset module is not available or it is not correct one
+# StifHWResetStub module may use as a template for user specific reset
+# module.
+# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
+ # 'TestCases' or 'FullReport'
+
+CreateTestReport= YES # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT # Possible values: TXT, HTML or XML
+TestReportOutput= FILE # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone # Possible values are:
+ # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+ # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+ # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+ # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0 # Default timeout value for each test case. In milliseconds
+#UITestingSupport= YES # Possible values: YES or NO
+#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= TestScripter
+TestCaseFile= z:\testframework\PIEngineTest.cfg
+[End_Module]
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# Hardware and emulator environment logging path and styles can
+# be configured from here to overwrite the Logger's implemented values.
+#
+# Settings description:
+# - Indicates option for creation log directory/directories. If log directory/directories
+# is/are not created by user they will make by software.
+# + YES, Create log directory/directories if not allready exist.
+# + NO, Log directory/directories not created. Only created one is used.
+#
+# - Overwrite emulator path setting.
+# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
+# Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+# will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+# - Overwrite emulator's logging format.
+# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+# + HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+# - Overwrited emulator logging output source.
+# + FILE, Logging to file(s).
+# + RDEBUG, Logging to using rdebug(s).
+#
+# - Overwrite hardware path setting (Same description as above in emulator path).
+# - Overwrite hardware's logging format(Same description as above in emulator format).
+# - Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+# - File Creation Mode indicates file overwriting if file exist.
+# + OVERWRITE, Overwrites if file(s) exist.
+# + APPEND, Continue logging after the old logging information if file(s) exist.
+#
+# - Will thread id include to the log filename.
+# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+# + NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+# - Will time stamps include the to log file.
+# + YES, Time stamp added to each line in log file(s). Time stamp is
+# for example'12.Nov.2003 115958 LOGGING INFO'
+# + NO, No time stamp(s).
+#
+# - Will line breaks include to the log file.
+# + YES, Each logging event includes line break and next log event is in own line.
+# + NO, No line break(s).
+#
+# - Will event ranking include to the log file.
+# + YES, Event ranking number added to each line in log file(s). Ranking number
+# depends on environment's tics, for example(includes time stamp also)
+# '012 12.Nov.2003 115958 LOGGING INFO'
+# + NO, No event ranking.
+#
+# - Will write log file in unicode format.
+# + YES, Log file will be written in unicode format
+# + NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+#CreateLogDirectories= YES # Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML # Possible values: TXT or HTML
+#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML # Possible values: TXT or HTML
+#HardwareOutput= FILE # Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES # Possible values: YES or NO
+#WithTimeStamp= YES # Possible values: YES or NO
+#WithLineBreak= YES # Possible values: YES or NO
+#WithEventRanking= YES # Possible values: YES or NO
+
+#FileUnicode= YES # Possible values: YES or NO
+#AddTestCaseTitle= YES # Possible values: YES or NO
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set filters to be used by ConsoleUI.
+# If you want to use filter with ConsoleUI, simply remove comments
+# from section below and provide valid filter entries.
+# Each filter line has to start with "filter= " keyword.
+# Filter can contain special wildcard characters:
+# * which stands for none or any literal;
+# ? which stands for single character.
+# Filters are not case-sensitive.
+
+#[Filters]
+#filter= *math*
+#filter= *radio*
+#[End_Filters]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/data/PIProfilerSettings.txt Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,95 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+
+; PI Profiler Settings File
+
+; general settings
+[general]
+version=2.00.0
+; "output_type=file_system" writes *.dat file to external memory
+; "output_type=debug_output" writes *.dat file to debug port
+
+output_type=file_system ; output to file system (file_system) or debug output (debug_output)
+file_prefix=PIProfilerTest_#
+save_file_location=C:\data\
+
+; cpu load sampler
+[gpp]
+enabled=true
+sampling_period_ms=1
+
+; function call capture
+[gfc]
+enabled=true
+
+; dynamic binary support
+[itt]
+enabled=true
+
+; memory usage capture
+[mem]
+enabled=true
+sampling_period_ms=3000
+
+; thread priority capture
+[pri]
+enabled=true
+sampling_period_ms=3000
+
+; hardware interrupt capture
+[irq]
+enabled=false
+
+; software interrupt capture
+[swi]
+enabled=false
+
+; ARM11 performance counter capture
+[pec]
+enabled=false
+perfcounter1=0 ; ARM11 perf. counter1
+perfcounter2=7 ; ARM11 perf. counter1
+
+; L2 and interconnect performance counter capture
+[l2i]
+enabled=false
+intercperfcounter1=0 ; interconnect perf. counter1
+intercperfcounter2=1 ; interconnect perf. counter2
+l2perfcounter1=11 ; L2 cache perf. counter1
+l2perfcounter2=13 ; L2 cache perf. counter2
+l2perfcounter3=11 ; L2 cache perf. counter3
+l2perfcounter4=13 ; L2 cache perf. counter4
+
+; button and touch screen event capture
+[bup]
+enabled=true
+
+; power usage capture
+[pwr]
+enabled=true
+
+; gpu
+[gpu]
+enabled=false
+
+; native os task capture support
+[nos]
+enabled=false
+hidden=true
+task_address=0x81FE68
+addr_space_start=0xC6000000
+addr_space_end=0xC6FFFFFFF
+end
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/docs/readme.txt Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+How to execute test:
+
+1. Compile PIEngineTest from /group
+ sbs -c TARGET
+
+2. Add '#include "PIEngineTest.iby" to piprofiler.iby or other suitable place
+
+3. Configure test module to STIF .ini file ( /epoc32/wins/c/TestFramework )
+ [New_Module]
+ ModuleName= TestScripter
+ TestCaseFile= z:\testframework\PIEngineTest.cfg
+ [End_Module]
+
+4. Create image
+
+5. Run test from STIF UI
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/eabi/PIEngineTestu.def Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/group/PIEngineTest.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,79 @@
+/*TYPE TESTCLASS*/
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MMP file for STIF Test Framework's TestScripter
+* testclass test module.
+*
+*/
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+
+TARGET PIEngineTest.dll
+TARGETTYPE dll
+UID 0x1000008D 0x101FB3E3
+
+CAPABILITY ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+// VENDORID 0x00000000
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID 0x00000000
+
+//TARGETPATH ?target_path
+DEFFILE PIEngineTest.def
+
+USERINCLUDE ../inc
+
+OS_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH ../src
+
+SOURCE PIEngineTest.cpp
+SOURCE PIEngineTestBlocks.cpp
+
+//RESOURCE resource_file
+//RESOURCE resource_file2
+
+LIBRARY euser.lib
+LIBRARY bafl.lib
+LIBRARY efsrv.lib
+LIBRARY stiftestinterface.lib
+LIBRARY stiftestengine.lib
+
+LANG SC
+
+/*
+START WINS
+?wins_specific_information
+END
+
+START MARM
+?marm_specific_information
+END
+*/
+// Other possible keywords:
+
+// DOCUMENT ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
+/*
+START BITMAP ?target
+TARGETPATH ?emulated_path_on_target_machine
+HEADER
+SOURCE ?color_depth ?source_bitmap
+END
+*/
+// DEFFILE ?filename
+// AIF ?filename
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/group/PIEngineTest.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,60 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"STIF"},(0x00000000),1,1,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+"\epoc32\release\armv5\udeb\PIEngineTest.dll" - "!:\Sys\Bin\PIEngineTest.dll"
+
+; Embedded SIS
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/group/PIEngineTest_DoxyFile.txt Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,240 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+# Doxyfile 1.4.1
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = PIEngineTest
+PROJECT_NUMBER =
+OUTPUT_DIRECTORY = X:\PIProfiler\piprofiler\trunk\tsrc\\PIEngineTest\
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = YES
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = NO
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = NO
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = NO
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = YES
+CASE_SENSE_NAMES = YES
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_DIRECTORIES = YES
+FILE_VERSION_FILTER =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = X:\PIProfiler\piprofiler\trunk\tsrc\\PIEngineTest\
+FILE_PATTERNS = *.h \
+ *.rh \
+ *.hrh
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = NO
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = YES
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+BINARY_TOC = YES
+TOC_EXPAND = YES
+DISABLE_INDEX = YES
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = NO
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4wide
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = YES
+RTF_OUTPUT = Doc
+COMPACT_RTF = YES
+RTF_HYPERLINKS = YES
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED = NONSHARABLE_CLASS
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH =
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 0
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/group/PIEngineTest_nrm.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,79 @@
+/*TYPE TESTCLASS*/
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MMP file for STIF Test Framework's TestScripter
+* testclass test module.
+*
+*/
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+
+TARGET PIEngineTest.dll
+TARGETTYPE dll
+UID 0x1000008D 0x101FB3E3
+
+CAPABILITY ALL -TCB
+/* Remove comments and replace 0x00000000 with correct vendor id */
+// VENDORID 0x00000000
+/* Remove comments and replace 0x00000000 with correct secure id */
+// SECUREID 0x00000000
+
+//TARGETPATH ?target_path
+DEFFILE PIEngineTest.def
+
+USERINCLUDE ../inc
+
+OS_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH ../src
+
+SOURCE PIEngineTest.cpp
+SOURCE PIEngineTestBlocks.cpp
+
+//RESOURCE resource_file
+//RESOURCE resource_file2
+
+LIBRARY euser.lib
+LIBRARY bafl.lib
+LIBRARY efsrv.lib
+LIBRARY stiftestinterface.lib
+LIBRARY stiftestengine.lib
+
+LANG SC
+
+/*
+START WINS
+?wins_specific_information
+END
+
+START MARM
+?marm_specific_information
+END
+*/
+// Other possible keywords:
+
+// DOCUMENT ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
+/*
+START BITMAP ?target
+TARGETPATH ?emulated_path_on_target_machine
+HEADER
+SOURCE ?color_depth ?source_bitmap
+END
+*/
+// DEFFILE ?filename
+// AIF ?filename
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+// specify the platforms your component needs to be built for here
+// defaults to WINS MARM so you can ignore this if you just build these
+
+ DEFAULT
+
+PRJ_TESTEXPORTS
+// NOTE: If using ARS requirements all export operations should be done under this.
+// 'abld test export'
+
+PRJ_EXPORTS
+// Specify the source file followed by its destination here
+// copy will be used to copy the source file to its destination
+// If there's no destination then the source file will be copied
+// to the same name in /epoc32/include
+// Example:
+/*
+/agnmodel/inc/AGMCOMON.H
+*/
+
+../rom/PIEngineTest.iby CORE_IBY_EXPORT_PATH(tools,PIEngineTest.iby)
+../data/PIProfilerSettings.txt /epoc32/data/PIProfilerSettings.txt
+../conf/PIEngineTest.cfg /epoc32/data/PIEngineTest.cfg
+../conf/PITestFramework.ini /epoc32/data/PITestFramework.ini
+
+PRJ_TESTMMPFILES
+
+ PIEngineTest.mmp
+
+PRJ_MMPFILES
+
+ PIEngineTest_nrm.mmp
+
+// Specify the .mmp files required for building the important component
+// releasables.
+//
+// Specify "tidy" if the component you need to build doesn't need to be
+// released. Specify "ignore" if the MMP file exists but should be
+// ignored.
+// Example:
+/*
+/agnmodel/group/agnmodel.mmp
+#if defined(MARM)
+/agnmodel/group/agsvexe.mmp
+#endif
+*/
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/inc/PIEngineTest.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: STIF testclass declaration
+*
+*/
+
+#ifndef PIENGINETEST_H
+#define PIENGINETEST_H
+
+// INCLUDES
+#include <StifLogger.h>
+#include <TestScripterInternal.h>
+#include <StifTestModule.h>
+#include <TestclassAssert.h>
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+#define TEST_CLASS_VERSION_MAJOR 0
+#define TEST_CLASS_VERSION_MINOR 1
+#define TEST_CLASS_VERSION_BUILD 0
+
+// Logging path
+_LIT( KPIEngineTestLogPath, "\\logs\\testframework\\PIEngineTest\\" );
+// Log file
+_LIT( KPIEngineTestLogFile, "PIEngineTest.txt" );
+_LIT( KPIEngineTestLogFileWithTitle, "PIEngineTest_[%S].txt" );
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class CPIEngineTest;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+
+// CLASS DECLARATION
+
+/**
+* CPIEngineTest test class for STIF Test Framework TestScripter.
+* ?other_description_lines
+*
+* @lib ?library
+* @since ?Series60_version
+*/
+NONSHARABLE_CLASS(CPIEngineTest) : public CScriptBase
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CPIEngineTest* NewL( CTestModuleIf& aTestModuleIf );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CPIEngineTest();
+
+ public: // New functions
+
+ /**
+ * ?member_description.
+ * @since ?Series60_version
+ * @param ?arg1 ?description
+ * @return ?description
+ */
+ //?type ?member_function( ?type ?arg1 );
+
+ public: // Functions from base classes
+
+ /**
+ * From CScriptBase Runs a script line.
+ * @since ?Series60_version
+ * @param aItem Script line containing method name and parameters
+ * @return Symbian OS error code
+ */
+ virtual TInt RunMethodL( CStifItemParser& aItem );
+
+ protected: // New functions
+
+ /**
+ * ?member_description.
+ * @since ?Series60_version
+ * @param ?arg1 ?description
+ * @return ?description
+ */
+ //?type ?member_function( ?type ?arg1 );
+
+ protected: // Functions from base classes
+
+ /**
+ * From ?base_class ?member_description
+ */
+ //?type ?member_function();
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CPIEngineTest( CTestModuleIf& aTestModuleIf );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ // Prohibit copy constructor if not deriving from CBase.
+ // ?classname( const ?classname& );
+ // Prohibit assigment operator if not deriving from CBase.
+ // ?classname& operator=( const ?classname& );
+
+ /**
+ * Frees all resources allocated from test methods.
+ * @since ?Series60_version
+ */
+ void Delete();
+
+ /**
+ * Test methods are listed below.
+ */
+
+ /**
+ * Start PI engine and do sampling for a while. Check that logs are generated.
+ * @since ?Series60_version
+ * @param aItem Script line containing parameters.
+ * @return Symbian OS error code.
+ */
+ virtual TInt StartEngineAndSample10SecL( CStifItemParser& aItem );
+
+ /**
+ * Method used to log version of test class
+ */
+ void SendTestClassVersion();
+
+ //ADD NEW METHOD DEC HERE
+ //[TestMethods] - Do not remove
+
+ public: // Data
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ protected: // Data
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ private: // Data
+
+ // ?one_line_short_description_of_data
+ //?data_declaration;
+
+ // Reserved pointer for future extension
+ //TAny* iReserved;
+
+ public: // Friend classes
+ //?friend_class_declaration;
+ protected: // Friend classes
+ //?friend_class_declaration;
+ private: // Friend classes
+ //?friend_class_declaration;
+
+ };
+
+#endif // PIENGINETEST_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/rom/PIEngineTest.iby Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: STIF testclass declaration
+*
+*/
+
+#ifndef PIENGINETEST_IBY
+#define PIENGINETEST_IBY
+
+// The test module DLL.
+file=ABI_DIR/BUILD_DIR/PIEngineTest.dll sys/bin/PIEngineTest.dll
+
+// STIF Scripter scripts.
+data=EPOCROOT##epoc32/data/PIEngineTest.cfg /testframework/PIEngineTest.cfg
+data=EPOCROOT##epoc32/data/PIProfilerSettings.txt /data/PIProfilerSettings.txt
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/src/PIEngineTest.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains testclass implementation.
+*
+*/
+
+// INCLUDE FILES
+#include <StifTestInterface.h>
+#include "PIEngineTest.h"
+#include <SettingServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+//extern ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+// ?value_n: ?description_line1
+// ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+ ?arg_type arg, // ?description
+ ?arg_type arg) // ?description
+ {
+
+ ?code // ?comment
+
+ // ?comment
+ ?code
+ }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::CPIEngineTest
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CPIEngineTest::CPIEngineTest(
+ CTestModuleIf& aTestModuleIf ):
+ CScriptBase( aTestModuleIf )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CPIEngineTest::ConstructL()
+ {
+ //Read logger settings to check whether test case name is to be
+ //appended to log file name.
+ RSettingServer settingServer;
+ TInt ret = settingServer.Connect();
+ if(ret != KErrNone)
+ {
+ User::Leave(ret);
+ }
+ // Struct to StifLogger settigs.
+ TLoggerSettings loggerSettings;
+ // Parse StifLogger defaults from STIF initialization file.
+ ret = settingServer.GetLoggerSettings(loggerSettings);
+ if(ret != KErrNone)
+ {
+ User::Leave(ret);
+ }
+ // Close Setting server session
+ settingServer.Close();
+
+ TFileName logFileName;
+
+ if(loggerSettings.iAddTestCaseTitle)
+ {
+ TName title;
+ TestModuleIf().GetTestCaseTitleL(title);
+ logFileName.Format(KPIEngineTestLogFileWithTitle, &title);
+ }
+ else
+ {
+ logFileName.Copy(KPIEngineTestLogFile);
+ }
+
+ iLog = CStifLogger::NewL( KPIEngineTestLogPath,
+ logFileName,
+ CStifLogger::ETxt,
+ CStifLogger::EFile,
+ EFalse );
+
+ SendTestClassVersion();
+ }
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CPIEngineTest* CPIEngineTest::NewL(
+ CTestModuleIf& aTestModuleIf )
+ {
+ CPIEngineTest* self = new (ELeave) CPIEngineTest( aTestModuleIf );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+
+ }
+
+// Destructor
+CPIEngineTest::~CPIEngineTest()
+ {
+
+ // Delete resources allocated from test methods
+ Delete();
+
+ // Delete logger
+ delete iLog;
+
+ }
+
+//-----------------------------------------------------------------------------
+// CPIEngineTest::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CPIEngineTest::SendTestClassVersion()
+ {
+ TVersion moduleVersion;
+ moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+ moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+ moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+ TFileName moduleName;
+ moduleName = _L("PIEngineTest.dll");
+
+ TBool newVersionOfMethod = ETrue;
+ TestModuleIf().SendTestModuleVersion(moduleVersion, moduleName, newVersionOfMethod);
+ }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL(
+ CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+ {
+
+ return ( CScriptBase* ) CPIEngineTest::NewL( aTestModuleIf );
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perfsrv/piprofiler/tsrc/PIEngineTest/src/PIEngineTestBlocks.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,218 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains testclass implementation.
+*
+*/
+
+// [INCLUDE FILES] - do not remove
+#include <e32svr.h>
+#include <bautils.h>
+#include <StifParser.h>
+#include <StifTestInterface.h>
+#include "PIEngineTest.h"
+
+// EXTERNAL DATA STRUCTURES
+//extern ?external_data;
+
+// EXTERNAL FUNCTION PROTOTYPES
+//extern ?external_function( ?arg_type,?arg_type );
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// LOCAL CONSTANTS AND MACROS
+//const ?type ?constant_var = ?constant;
+//#define ?macro_name ?macro_def
+
+// MODULE DATA STRUCTURES
+//enum ?declaration
+//typedef ?declaration
+
+// LOCAL FUNCTION PROTOTYPES
+//?type ?function_name( ?arg_type, ?arg_type );
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ?function_name ?description.
+// ?description
+// Returns: ?value_1: ?description
+// ?value_n: ?description_line1
+// ?description_line2
+// -----------------------------------------------------------------------------
+//
+/*
+?type ?function_name(
+ ?arg_type arg, // ?description
+ ?arg_type arg) // ?description
+ {
+
+ ?code // ?comment
+
+ // ?comment
+ ?code
+ }
+*/
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::Delete
+// Delete here all resources allocated and opened from test methods.
+// Called from destructor.
+// -----------------------------------------------------------------------------
+//
+void CPIEngineTest::Delete()
+ {
+
+ }
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CPIEngineTest::RunMethodL(
+ CStifItemParser& aItem )
+ {
+
+ static TStifFunctionInfo const KFunctions[] =
+ {
+ // Copy this line for every implemented function.
+ // First string is the function name used in TestScripter script file.
+ // Second is the actual implementation member function.
+ ENTRY( "StartEngineAndSample10Sec", CPIEngineTest::StartEngineAndSample10SecL ),
+ //ADD NEW ENTRY HERE
+ // [test cases entries] - Do not remove
+
+ };
+
+ const TInt count = sizeof( KFunctions ) /
+ sizeof( TStifFunctionInfo );
+
+ return RunInternalL( KFunctions, count, aItem );
+
+ }
+
+TInt CPIEngineTest::CPIEngineTest::StartEngineAndSample10SecL( CStifItemParser& aItem )
+ {
+ // Print to UI
+ _LIT( KPIEngineTest, "PIEngineTest" );
+ _LIT( KPIEngineExeFile,"Z:\\sys\\bin\\PIProfiler.exe" );
+ _LIT( KPIEngineExeParameters,"timed Z:\\data\\PIProfilerSettings.txt 10" );
+ _LIT( KLogFileName, "C:\\data\\PIProfilerTest_1.dat" );
+
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Check for existing data log files") );
+ iLog->Log( _L("Check for existing data log files") );
+
+ // Remove existing test data log file if it any.
+ RFs fsSession;
+ User::LeaveIfError(fsSession.Connect());
+ if ( BaflUtils::FileExists(fsSession, KLogFileName) )
+ {
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Removing existing file") );
+ iLog->Log( _L("Removing existing file") );
+
+ User::LeaveIfError(fsSession.Delete(KLogFileName));
+ }
+
+ fsSession.Close();
+
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Start profiling for 10 seconds") );
+ iLog->Log(_L("Start profiling for 10 seconds"));
+
+ // Create engine process with timed profiling parameter and setting file.
+ RProcess proc;
+ TInt status = proc.Create(KPIEngineExeFile, KPIEngineExeParameters);
+
+ // Check if creating process failed
+ if(status != KErrNone)
+ {
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Failed to start profiling") );
+ iLog->Log( _L("Failed to start profiling") );
+
+ return status;
+ }
+
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("profiling...") );
+ iLog->Log( _L("profiling...") );
+
+ proc.Resume();
+
+ // Wait for process to finish
+ User::After(15000000);
+
+ if (proc.ExitReason() != KErrNone)
+ {
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Process exited with reason: %d"), proc.ExitReason());
+ iLog->Log( _L("Process exited with reason: %d"), proc.ExitReason() );
+
+ proc.Close();
+
+ return proc.ExitReason();
+ }
+
+ proc.Close();
+
+ TInt err = KErrNone;
+ User::LeaveIfError(fsSession.Connect());
+
+ // Check if data log file was succesfully created and remove it
+ if ( BaflUtils::FileExists(fsSession, KLogFileName) )
+ {
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Data log file was succesfully created") );
+ iLog->Log( _L("Data log file was succesfully created") );
+
+ fsSession.Delete(KLogFileName);
+ }
+ else
+ {
+ TestModuleIf().Printf( 0, KPIEngineTest, _L("Data log file was not created") );
+ iLog->Log( _L("Data log file was not created") );
+
+ err = KErrPathNotFound;
+ }
+
+ fsSession.Close();
+ return err;
+ }
+
+// -----------------------------------------------------------------------------
+// CPIEngineTest::?member_function
+// ?implementation_description
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+/*
+TInt CPIEngineTest::?member_function(
+ CItemParser& aItem )
+ {
+
+ ?code
+
+ }
+*/
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// None
+
+// [End of File] - Do not remove
+
+// End of File
--- a/tracesrv/tracecompiler/group/build.xml Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/group/build.xml Tue Oct 26 16:20:32 2010 +0300
@@ -70,7 +70,10 @@
<target name="build" if="isRel" depends="clean">
- <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5"></javac>
+ <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5">
+ <exclude name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
+ </javac>
<echo> Copying html and properties files from src/com.nokia.tracecompiler/src to ${build.dir} </echo>
<copy todir="${build.dir}">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/group/ccbuild.xml Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,93 @@
+<!--
+#
+# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+-->
+<project name="OstTraceCompiler" default="build" basedir="..">
+
+<target name="init">
+ <property environment="env" />
+ <property name="src.dir" value="src" />
+ <property name="jar.dir" value="jar" />
+ <property name="dest.dir" value="${env.EPOCROOT}epoc32\tools\tracecompiler" />
+ <property name="build.dir" value="${env.EPOCROOT}epoc32\build\ost\tracecompiler" />
+</target>
+
+
+<target name="clean" depends="init">
+ <echo>Cleaning the ${build.dir}</echo>
+ <delete dir="${build.dir}"/>
+ <echo>Creating the build directory</echo>
+ <mkdir dir="${build.dir}"/>
+
+ <echo>Deleting *.xml_ files</echo>
+ <delete>
+ <fileset dir="${env.EPOCROOT}epoc32\build" includes="**/*.xml_"/>
+ </delete>
+</target>
+
+
+<target name="what" depends="init" description="Prints out all releasables">
+ <pathconvert pathsep="${line.separator}" property="output">
+ <fileset dir="${dest.dir}" casesensitive="no">
+ </fileset>
+ </pathconvert>
+ <echo message="${output}" />
+</target>
+
+
+<target name="build" depends="clean">
+ <javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5">
+ <exclude name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
+ </javac>
+
+ <copy todir="${build.dir}">
+ <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
+ <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.html"/>
+ <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.lic"/>
+ </copy>
+
+ <exec executable="attrib">
+ <arg value="-r"/>
+ <arg value="tracecompiler/tracecompiler.zip"/>
+ </exec>
+
+ <echo>Zip TraceCompiler binaries</echo>
+ <zip destfile="tracecompiler/tracecompiler.zip" update="true">
+ <zipfileset dir="${build.dir}"/>
+ </zip>
+
+
+ <echo>Unzip recompiled TraceCompiler binaries intop epoc32\tools\tracecompiler</echo>
+ <unzip src="tracecompiler/tracecompiler.zip" dest="${dest.dir}" overwrite="true"/>
+
+
+ <mkdir dir="${jar.dir}"/>
+
+ <jar destfile="${jar.dir}/tracecompiler.jar" basedir="${build.dir}">
+ <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
+ <manifest>
+ <attribute name="Main-Class" value="com.nokia.tracecompiler.TraceCompilerMain"/>
+ </manifest>
+ </jar>
+
+
+</target>
+
+
+
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld/group/HelloWorld.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+TARGET HelloWorld.exe
+TARGETTYPE exe
+UID 0 0xE9FBE6EE
+
+OS_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE ..\inc
+USERINCLUDE ..\traces
+
+SOURCEPATH ..\src
+SOURCE HelloWorld.cpp
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+ DEBUGGABLE_UDEBONLY
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+HelloWorld.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld/inc/HelloWorld.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __HELLOWORLD_H__
+#define __HELLOWORLD_H__
+
+// Include Files
+
+#include <e32base.h>
+
+// Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif // __HELLOWORLD_H__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld/sis/HelloWorld_EKA2.pkg Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+; Installation file for Symbian OS 9.x for generic console application
+; Installation file for HelloWorld EXE
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+
+;
+; UID is the exe's UID
+;
+#{"HelloWorld EXE"},(0xE9FBE6EE),1,0,0
+
+
+;Localised Vendor name
+%{"Vendor-EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\HelloWorld.exe" -"!:\sys\bin\HelloWorld.exe"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld/src/HelloWorld.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+// Include Files
+#include "HelloWorld.h"
+#include <e32base.h>
+#include <e32debug.h>
+#include <e32std.h>
+#include <e32cons.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "HelloWorldTraces.h"
+#endif
+// Console
+// Constants
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+_LIT(buf60, "123456789_123456789_123456789_123456789_123456789_123456789X");
+_LIT(buf333, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_12X");
+_LIT(buf600, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789X");
+
+_LIT8(ascii_buf600, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789X");
+
+
+// Global Variables
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+// Local Functions
+
+LOCAL_C void MainL()
+ {
+
+ //
+ // add your program code here, example code below
+ //
+
+ OstTrace0(UNICODE_STRING_TEST, TRACE0, "Test different kind of unicode strings.");
+ OstTraceExt2( UNICODE_STRING_TEST , TRACE1,
+ "ascii(5): %s ascii(4): %s", _L8( "STR08" ), _L8("STR8") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE2,
+ "unicode(5): %S unicode(5): %S", _L( "STR16" ), _L("STR16") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE3,
+ "ascii(4): %s unicode(5): %S", _L8( "STR8" ), _L("STR16") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE4,
+ "unicode(5): %S ascii (5): %s", _L( "STR16" ), _L8("STR08") );
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE5,
+ "ascii(5): %s", _L8( "STR08" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE7,
+ "unicode(5): %S", _L( "STR16" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE8,
+ "ascii(1): %s", _L8( "1" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE9,
+ "unicode(1): %S", _L( "1" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE10,
+ "ascii(4): %s", _L8( "STR8" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE11,
+ "unicode(4): %S", _L( "ST16" ));
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE12,
+ "ascii(6): %s unicode (8): %S", _L8( "STR008" ), _L("STR00016") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE13,
+ "unicode(4): %S ascii(8): %s", _L( "ST16" ), _L8("STR00008") );
+
+ OstTraceExt3( UNICODE_STRING_TEST, TRACE14, "unicode(4): %S ascii(8): %s int: %d", _L( "ST16" ), _L8("STR00008"), 7 );
+ OstTraceExt3( UNICODE_STRING_TEST, TRACE15, "unicode(4): %S ascii(0): %s int: %d", _L( "ST16" ), _L8(""), 6 );
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE16, "unicode(60): %S", buf60);
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE17, "unicode(333): %S", buf333);
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE18, "unicode(600): %S", buf600);
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE19,
+ "unicode(5): %S ascii(0): %s", _L( "STR16" ), _L8("") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE20,
+ "unicode(0): %S ascii(5): %s", _L( "" ), _L8("STR08") );
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE21,
+ "ascii(0): %s", _L8( "" ));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE22,
+ "unicode(0): %S", _L( "" ));
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE23,
+ "ascii(4): %s unicode(0): %S", _L8( "STR8" ), _L("") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE24,
+ "ascii(0): %s unicode(5): %S", _L8( "" ), _L("STR16") );
+
+ OstTraceExt2( UNICODE_STRING_TEST , TRACE25,
+ "ascii(5): %s ascii(0): %s", _L8( "STR08" ), _L8("") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE26,
+ "unicode(5): %S unicode(0): %S", _L( "STR16" ), _L("") );
+
+ OstTraceExt2( UNICODE_STRING_TEST , TRACE27,
+ "ascii(0): %s ascii(4): %s", _L8( "" ), _L8("STR8") );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE28,
+ "unicode(0): %S unicode(5): %S", _L( "" ), _L("STR16") );
+
+ OstTraceExt3( UNICODE_STRING_TEST, TRACE29, "unicode(333): %S ascii(0): %s int: %d", buf333, _L8(""), 8 );
+
+ OstTraceExt2( UNICODE_STRING_TEST, TRACE30, "unicode(333): %S unicode(333): %S", buf333, buf333);
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE31,
+ "unicode(65): %S", _L( "Application_FileBrowser_004401103753378_29575020080101_090257.bin" ));
+
+
+ _LIT(KFmtTextFilePrs, "Application_%s_%s_%s.bin");
+ TBuf<120> fileName;
+
+ TTime time;
+ time.HomeTime();
+ TDateTime dateTime = time.DateTime();
+ TBuf<32> dt;
+ _LIT(KDateTimeFormat,"%06d%04d%02d%02d_%02d%02d%02d");
+
+ dt.Format(KDateTimeFormat, dateTime.MicroSecond(), dateTime.Year(), dateTime.Month()+1,
+ dateTime.Day()+1, dateTime.Hour(), dateTime.Minute(), dateTime.Second());
+
+
+ TBuf<60> prsName = _L("FileBrowser");
+ TBuf<60> imeiName = _L("004401103753378");
+
+
+ fileName.Format(KFmtTextFilePrs, prsName.PtrZ(), imeiName.PtrZ(), dt.PtrZ());
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE32, "CDataOutPut::DumpL() %S", fileName);
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE33, "unicode abc = %S", _L("abc"));
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE34, "ascii abc = %s", _L8("abc"));
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE35, "unicode(333): %S", buf333);
+
+ OstTraceExt1( UNICODE_STRING_TEST, TRACE36, "ascii(600): %s", ascii_buf600);
+
+
+ console->Write(_L("Hello, world!\n"));
+
+ }
+
+LOCAL_C void DoStartL()
+ {
+ // Create active scheduler (to run active objects)
+ CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+ CleanupStack::PushL(scheduler);
+ CActiveScheduler::Install(scheduler);
+
+ MainL();
+
+ // Delete active scheduler
+ CleanupStack::PopAndDestroy(scheduler);
+
+ }
+
+// Global Functions
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+ // Create output console
+ TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(
+ KConsFullScreen, KConsFullScreen)));
+ if (createError)
+ return createError;
+ // Run application code inside TRAP harness, wait keypress when terminated
+ TRAPD(mainError, DoStartL());
+ if (mainError)
+ console->Printf(KTextFailed, mainError);
+ console->Printf(KTextPressAnyKey);
+ console->Getch();
+
+ delete console;
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld_reference_files/HelloWorld_0xe9fbe6ee_Dictionary.xml Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tracedictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DictionarySchema.xsd">
+ <typedefs>
+ <object type="ascii" size="1" formatchar="s" classification="string"/>
+ <object type="ascii" size="1" formatchar="ls" classification="string"/>
+ <object type="unicode" size="2" formatchar="S" classification="string"/>
+ <object type="unicode" size="2" formatchar="lS" classification="string"/>
+ <object type="int32" size="4" formatchar="d" classification="integer"/>
+ <object type="int32" size="4" formatchar="ld" classification="integer"/>
+ </typedefs>
+ <data>
+ <def id="1" type="string">Test different kind of unicode strings.</def>
+ <def id="2" type="string">ascii(5): %s ascii(4): %s</def>
+ <def id="3" type="string">unicode(5): %S unicode(5): %S</def>
+ <def id="4" type="string">ascii(4): %s unicode(5): %S</def>
+ <def id="5" type="string">unicode(5): %S ascii (5): %s</def>
+ <def id="6" type="string">ascii(5): %s</def>
+ <def id="7" type="string">unicode(5): %S</def>
+ <def id="8" type="string">ascii(1): %s</def>
+ <def id="9" type="string">unicode(1): %S</def>
+ <def id="10" type="string">ascii(4): %s</def>
+ <def id="11" type="string">unicode(4): %S</def>
+ <def id="12" type="string">ascii(6): %s unicode (8): %S</def>
+ <def id="13" type="string">unicode(4): %S ascii(8): %s</def>
+ <def id="14" type="string">unicode(4): %S ascii(8): %s int: %d</def>
+ <def id="15" type="string">unicode(4): %S ascii(0): %s int: %d</def>
+ <def id="16" type="string">unicode(60): %S</def>
+ <def id="17" type="string">unicode(333): %S</def>
+ <def id="18" type="string">unicode(600): %S</def>
+ <def id="19" type="string">unicode(5): %S ascii(0): %s</def>
+ <def id="20" type="string">unicode(0): %S ascii(5): %s</def>
+ <def id="21" type="string">ascii(0): %s</def>
+ <def id="22" type="string">unicode(0): %S</def>
+ <def id="23" type="string">ascii(4): %s unicode(0): %S</def>
+ <def id="24" type="string">ascii(0): %s unicode(5): %S</def>
+ <def id="25" type="string">ascii(5): %s ascii(0): %s</def>
+ <def id="26" type="string">unicode(5): %S unicode(0): %S</def>
+ <def id="27" type="string">ascii(0): %s ascii(4): %s</def>
+ <def id="28" type="string">unicode(0): %S unicode(5): %S</def>
+ <def id="29" type="string">unicode(333): %S ascii(0): %s int: %d</def>
+ <def id="30" type="string">unicode(333): %S unicode(333): %S</def>
+ <def id="31" type="string">unicode(65): %S</def>
+ <def id="32" type="string">CDataOutPut::DumpL() %S</def>
+ <def id="33" type="string">unicode abc = %S</def>
+ <def id="34" type="string">ascii abc = %s</def>
+ <def id="35" type="string">unicode(333): %S</def>
+ <def id="36" type="string">ascii(600): %s</def>
+ </data>
+ <locations>
+ <path val="../../HelloWorld/src/">
+ <file id="1">HelloWorld.cpp</file>
+ </path>
+ </locations>
+ <component id="-369367314" name="HelloWorld" prefix="HelloWorld: " suffix="">
+ <group id="222" name="UNICODE_STRING_TEST" prefix="UNICODE_STRING_TEST: " suffix="">
+ <trace data-ref="1" name="TRACE0">
+ <instance id="1" loc-ref="1" line="45" methodname="MainL"/>
+ </trace>
+ <trace data-ref="2" name="TRACE1">
+ <instance id="2" loc-ref="1" line="46" methodname="MainL"/>
+ </trace>
+ <trace data-ref="3" name="TRACE2">
+ <instance id="3" loc-ref="1" line="49" methodname="MainL"/>
+ </trace>
+ <trace data-ref="4" name="TRACE3">
+ <instance id="4" loc-ref="1" line="52" methodname="MainL"/>
+ </trace>
+ <trace data-ref="5" name="TRACE4">
+ <instance id="5" loc-ref="1" line="55" methodname="MainL"/>
+ </trace>
+ <trace data-ref="6" name="TRACE5">
+ <instance id="6" loc-ref="1" line="58" methodname="MainL"/>
+ </trace>
+ <trace data-ref="7" name="TRACE7">
+ <instance id="7" loc-ref="1" line="61" methodname="MainL"/>
+ </trace>
+ <trace data-ref="8" name="TRACE8">
+ <instance id="8" loc-ref="1" line="64" methodname="MainL"/>
+ </trace>
+ <trace data-ref="9" name="TRACE9">
+ <instance id="9" loc-ref="1" line="67" methodname="MainL"/>
+ </trace>
+ <trace data-ref="10" name="TRACE10">
+ <instance id="10" loc-ref="1" line="70" methodname="MainL"/>
+ </trace>
+ <trace data-ref="11" name="TRACE11">
+ <instance id="11" loc-ref="1" line="73" methodname="MainL"/>
+ </trace>
+ <trace data-ref="12" name="TRACE12">
+ <instance id="12" loc-ref="1" line="76" methodname="MainL"/>
+ </trace>
+ <trace data-ref="13" name="TRACE13">
+ <instance id="13" loc-ref="1" line="79" methodname="MainL"/>
+ </trace>
+ <trace data-ref="14" name="TRACE14">
+ <instance id="14" loc-ref="1" line="82" methodname="MainL"/>
+ </trace>
+ <trace data-ref="15" name="TRACE15">
+ <instance id="15" loc-ref="1" line="83" methodname="MainL"/>
+ </trace>
+ <trace data-ref="16" name="TRACE16">
+ <instance id="16" loc-ref="1" line="85" methodname="MainL"/>
+ </trace>
+ <trace data-ref="17" name="TRACE17">
+ <instance id="17" loc-ref="1" line="86" methodname="MainL"/>
+ </trace>
+ <trace data-ref="18" name="TRACE18">
+ <instance id="18" loc-ref="1" line="87" methodname="MainL"/>
+ </trace>
+ <trace data-ref="19" name="TRACE19">
+ <instance id="19" loc-ref="1" line="89" methodname="MainL"/>
+ </trace>
+ <trace data-ref="20" name="TRACE20">
+ <instance id="20" loc-ref="1" line="92" methodname="MainL"/>
+ </trace>
+ <trace data-ref="21" name="TRACE21">
+ <instance id="21" loc-ref="1" line="95" methodname="MainL"/>
+ </trace>
+ <trace data-ref="22" name="TRACE22">
+ <instance id="22" loc-ref="1" line="98" methodname="MainL"/>
+ </trace>
+ <trace data-ref="23" name="TRACE23">
+ <instance id="23" loc-ref="1" line="101" methodname="MainL"/>
+ </trace>
+ <trace data-ref="24" name="TRACE24">
+ <instance id="24" loc-ref="1" line="104" methodname="MainL"/>
+ </trace>
+ <trace data-ref="25" name="TRACE25">
+ <instance id="25" loc-ref="1" line="107" methodname="MainL"/>
+ </trace>
+ <trace data-ref="26" name="TRACE26">
+ <instance id="26" loc-ref="1" line="110" methodname="MainL"/>
+ </trace>
+ <trace data-ref="27" name="TRACE27">
+ <instance id="27" loc-ref="1" line="113" methodname="MainL"/>
+ </trace>
+ <trace data-ref="28" name="TRACE28">
+ <instance id="28" loc-ref="1" line="116" methodname="MainL"/>
+ </trace>
+ <trace data-ref="29" name="TRACE29">
+ <instance id="29" loc-ref="1" line="119" methodname="MainL"/>
+ </trace>
+ <trace data-ref="30" name="TRACE30">
+ <instance id="30" loc-ref="1" line="121" methodname="MainL"/>
+ </trace>
+ <trace data-ref="31" name="TRACE31">
+ <instance id="31" loc-ref="1" line="123" methodname="MainL"/>
+ </trace>
+ <trace data-ref="32" name="TRACE32">
+ <instance id="32" loc-ref="1" line="146" methodname="MainL"/>
+ </trace>
+ <trace data-ref="33" name="TRACE33">
+ <instance id="33" loc-ref="1" line="148" methodname="MainL"/>
+ </trace>
+ <trace data-ref="34" name="TRACE34">
+ <instance id="34" loc-ref="1" line="149" methodname="MainL"/>
+ </trace>
+ <trace data-ref="35" name="TRACE35">
+ <instance id="35" loc-ref="1" line="151" methodname="MainL"/>
+ </trace>
+ <trace data-ref="36" name="TRACE36">
+ <instance id="36" loc-ref="1" line="153" methodname="MainL"/>
+ </trace>
+ </group>
+ </component>
+</tracedictionary>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld_reference_files/HelloWorld_0xe9fbe6ee_TraceDefinitions.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,464 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __HELLOWORLD_E9FBE6EE_TRACEDEFINITIONS_H__
+#define __HELLOWORLD_E9FBE6EE_TRACEDEFINITIONS_H__
+
+#define AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#undef HELLOWORLD_COMPONENT
+#define HELLOWORLD_COMPONENT 0xe9fbe6ee
+#undef UNICODE_STRING_TEST
+#define UNICODE_STRING_TEST 0xde
+#undef TRACE0
+#define TRACE0 0x1
+#undef TRACE1
+#define TRACE1 0x2
+#undef TRACE2
+#define TRACE2 0x3
+#undef TRACE3
+#define TRACE3 0x4
+#undef TRACE4
+#define TRACE4 0x5
+#undef TRACE5
+#define TRACE5 0x6
+#undef TRACE7
+#define TRACE7 0x7
+#undef TRACE8
+#define TRACE8 0x8
+#undef TRACE9
+#define TRACE9 0x9
+#undef TRACE10
+#define TRACE10 0xa
+#undef TRACE11
+#define TRACE11 0xb
+#undef TRACE12
+#define TRACE12 0xc
+#undef TRACE13
+#define TRACE13 0xd
+#undef TRACE14
+#define TRACE14 0xe
+#undef TRACE15
+#define TRACE15 0xf
+#undef TRACE16
+#define TRACE16 0x10
+#undef TRACE17
+#define TRACE17 0x11
+#undef TRACE18
+#define TRACE18 0x12
+#undef TRACE19
+#define TRACE19 0x13
+#undef TRACE20
+#define TRACE20 0x14
+#undef TRACE21
+#define TRACE21 0x15
+#undef TRACE22
+#define TRACE22 0x16
+#undef TRACE23
+#define TRACE23 0x17
+#undef TRACE24
+#define TRACE24 0x18
+#undef TRACE25
+#define TRACE25 0x19
+#undef TRACE26
+#define TRACE26 0x1a
+#undef TRACE27
+#define TRACE27 0x1b
+#undef TRACE28
+#define TRACE28 0x1c
+#undef TRACE29
+#define TRACE29 0x1d
+#undef TRACE30
+#define TRACE30 0x1e
+#undef TRACE31
+#define TRACE31 0x1f
+#undef TRACE32
+#define TRACE32 0x20
+#undef TRACE33
+#define TRACE33 0x21
+#undef TRACE34
+#define TRACE34 0x22
+#undef TRACE35
+#define TRACE35 0x23
+#undef TRACE36
+#define TRACE36 0x24
+
+RES_BEGIN( RESOURCE_TRC_SYMBIAN, HELLOWORLD_COMPONENT, HELLOWORLD_TRACE, "HELLOWORLD", "", FALSE )
+
+ #include <SharedTraceDefinitions.h>
+
+ TRACE_GROUP_BEGIN( UNICODE_STRING_TEST, "HelloWorld: UNICODE_STRING_TEST: ", ON )
+
+ TRACE_BEGIN( TRACE0, "Test different kind of unicode strings." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE1, "ascii(5): ascii(4):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR08len, "STR08_len", STR08_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR08, "STR08", STR08_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR8len, "STR8_len", STR8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR8, "STR8", STR8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE2, "unicode(5): unicode(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR162len, "STR162_len", STR162_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR162, "STR162", STR162_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE3, "ascii(4): unicode(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR8len, "STR8_len", STR8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR8, "STR8", STR8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE4, "unicode(5): ascii (5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR08len, "STR08_len", STR08_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR08, "STR08", STR08_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE5, "ascii(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, STR08, "STR08", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE7, "unicode(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, STR16, "STR16", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE8, "ascii(1):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, arg1, "arg1", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE9, "unicode(1):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, arg1, "arg1", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE10, "ascii(4):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, STR8, "STR8", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE11, "unicode(4):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, ST16, "ST16", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE12, "ascii(6): unicode (8):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR008len, "STR008_len", STR008_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR008, "STR008", STR008_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR00016len, "STR00016_len", STR00016_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR00016, "STR00016", STR00016_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE13, "unicode(4): ascii(8):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, ST16len, "ST16_len", ST16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, ST16, "ST16", ST16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR00008len, "STR00008_len", STR00008_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR00008, "STR00008", STR00008_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE14, "unicode(4): ascii(8): int:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, ST16len, "ST16_len", ST16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, ST16, "ST16", ST16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR00008len, "STR00008_len", STR00008_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR00008, "STR00008", STR00008_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg3, "arg3", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE15, "unicode(4): ascii(0): int:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, ST16len, "ST16_len", ST16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, ST16, "ST16", ST16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg3, "arg3", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE16, "unicode(60):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, buf60, "buf60", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE17, "unicode(333):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, buf333, "buf333", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE18, "unicode(600):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, buf600, "buf600", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE19, "unicode(5): ascii(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE20, "unicode(0): ascii(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR08len, "STR08_len", STR08_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR08, "STR08", STR08_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE21, "ascii(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, arg1, "arg1", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE22, "unicode(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, arg1, "arg1", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE23, "ascii(4): unicode(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR8len, "STR8_len", STR8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR8, "STR8", STR8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE24, "ascii(0): unicode(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE25, "ascii(5): ascii(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR08len, "STR08_len", STR08_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR08, "STR08", STR08_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE26, "unicode(5): unicode(0):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE27, "ascii(0): ascii(4):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR8len, "STR8_len", STR8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR8, "STR8", STR8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE28, "unicode(0): unicode(5):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR16len, "STR16_len", STR16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, STR16, "STR16", STR16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE29, "unicode(333): ascii(0): int:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf333len, "buf333_len", buf333_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, buf333, "buf333", buf333_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg3, "arg3", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE30, "unicode(333): unicode(333):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf333len, "buf333_len", buf333_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, buf333, "buf333", buf333_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf3332len, "buf3332_len", buf3332_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE, SYMBIAN_ENDIANESS, buf3332, "buf3332", buf3332_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE31, "unicode(65):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, Application, "Application", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE32, "CDataOutPut::DumpL()" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, fileName, "fileName", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE33, "unicode abc =" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, abc, "abc", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE34, "ascii abc =" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, abc, "abc", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE35, "unicode(333):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, buf333, "buf333", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TRACE36, "ascii(600):" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, ascii, "ascii", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+RES_END
+
+#undef AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld_reference_files/traces/HelloWorldTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,637 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __HELLOWORLDTRACES_H__
+#define __HELLOWORLDTRACES_H__
+
+#define KOstTraceComponentID 0xe9fbe6ee
+
+#define TRACE0 0xde0001
+#define TRACE1 0xde0002
+#define TRACE2 0xde0003
+#define TRACE3 0xde0004
+#define TRACE4 0xde0005
+#define TRACE5 0xde0006
+#define TRACE7 0xde0007
+#define TRACE8 0xde0008
+#define TRACE9 0xde0009
+#define TRACE10 0xde000a
+#define TRACE11 0xde000b
+#define TRACE12 0xde000c
+#define TRACE13 0xde000d
+#define TRACE14 0xde000e
+#define TRACE15 0xde000f
+#define TRACE16 0xde0010
+#define TRACE17 0xde0011
+#define TRACE18 0xde0012
+#define TRACE19 0xde0013
+#define TRACE20 0xde0014
+#define TRACE21 0xde0015
+#define TRACE22 0xde0016
+#define TRACE23 0xde0017
+#define TRACE24 0xde0018
+#define TRACE25 0xde0019
+#define TRACE26 0xde001a
+#define TRACE27 0xde001b
+#define TRACE28 0xde001c
+#define TRACE29 0xde001d
+#define TRACE30 0xde001e
+#define TRACE31 0xde001f
+#define TRACE32 0xde0020
+#define TRACE33 0xde0021
+#define TRACE34 0xde0022
+#define TRACE35 0xde0023
+#define TRACE36 0xde0024
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC16& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+#endif
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC16& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+#endif
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC16& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+#endif
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+#endif
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC16& aParam1, const TDesC8& aParam2, TInt aParam3 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TInt )) <= KOstMaxDataLength)
+ {
+ *( ( TInt* )ptr ) = aParam3;
+ ptr += sizeof ( TInt );
+ length += sizeof ( TInt );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC16& aParam1, const TDesC8& aParam2, TInt32 aParam3 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TInt )) <= KOstMaxDataLength)
+ {
+ *( ( TInt* )ptr ) = aParam3;
+ ptr += sizeof ( TInt );
+ length += sizeof ( TInt );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+#endif
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/HelloWorld_reference_files/traces/fixed_id.definitions Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,38 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]UNICODE_STRING_TEST=0xde
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE0=0x1
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE1=0x2
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE10=0xa
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE11=0xb
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE12=0xc
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE13=0xd
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE14=0xe
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE15=0xf
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE16=0x10
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE17=0x11
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE18=0x12
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE19=0x13
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE2=0x3
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE20=0x14
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE21=0x15
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE22=0x16
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE23=0x17
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE24=0x18
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE25=0x19
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE26=0x1a
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE27=0x1b
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE28=0x1c
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE29=0x1d
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE3=0x4
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE30=0x1e
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE31=0x1f
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE32=0x20
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE33=0x21
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE34=0x22
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE35=0x23
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE36=0x24
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE4=0x5
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE5=0x6
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE7=0x7
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE8=0x8
+[TRACE]UNICODE_STRING_TEST[0xDE]_TRACE9=0x9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/group/TraceCompilerTesterAdvanced.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#define NO_EKERN_LIB
+#include <kernel/kern_ext.mmh>
+
+targettype kext
+
+target tracecompilertesteradvanced.dll
+linkas tracecompilertesteradvanced.dll
+
+vendorid VID_DEFAULT
+capability all
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude ../inc
+userinclude ../inl
+userinclude ../traces_TraceCompilerTesterAdvanced
+
+sourcepath ../src
+source TraceCompilerTesterAdvanced.cpp
+source TraceCompilerTesterCommon1.cpp
+source TraceCompilerTesterCommon2.cpp
+
+uid 0 0x20011111
+
+library ekern.lib
+library tracecore.lib
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/group/TraceCompilerTesterBasic.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#define NO_EKERN_LIB
+#include <kernel/kern_ext.mmh>
+
+targettype kext
+
+target tracecompilertesterbasic.dll
+linkas tracecompilertesterbasic.dll
+
+vendorid VID_DEFAULT
+capability all
+
+OS_LAYER_SYSTEMINCLUDE
+
+userinclude ../inc
+userinclude ../inl
+userinclude ../traces
+
+sourcepath ../src
+source TraceCompilerTesterBasic.cpp
+source TraceCompilerTesterCommon1.cpp
+source TraceCompilerTesterCommon2.cpp
+
+uid 0 0x20011112
+
+library ekern.lib
+library tracecore.lib
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5
+WINSCW
+
+
+PRJ_MMPFILES
+TraceCompilerTesterBasic.mmp
+TraceCompilerTesterAdvanced.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inc/TraceCompilerTesterAdvanced.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __TRACECOMPILERTESTERADVANCED_H__
+#define __TRACECOMPILERTESTERADVANCED_H__
+
+
+// Include files
+#include <TraceCoreNotificationReceiver.h>
+#include "BigNumbers.inl"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterAdvancedTraces.h"
+#endif
+
+// FORWARD DECLARATIONS
+
+/**
+ * TraceCompilerTester application
+ */
+NONSHARABLE_CLASS( DTraceCompilerTesterAdvanced ) : public DTraceCoreNotificationReceiver
+ {
+public:
+ /**
+ * Constructor
+ */
+ DTraceCompilerTesterAdvanced();
+
+ /**
+ * Destructor
+ */
+ ~DTraceCompilerTesterAdvanced();
+
+ /**
+ * Hello moon
+ */
+ inline TInt HelloMoon() {
+ OstTrace0(TRACE_FLOW, HELLO_MOON, "Hello moon!");
+ return 1;
+ };
+
+ /**
+ * Hello world
+ */
+ inline void HelloWorld();
+
+ /**
+ * Second-phase constructor
+ *
+ * @param
+ * @return System-wide error code
+ */
+ TInt Construct();
+
+public: // from DTraceCoreNotificationReceiver
+
+ /**
+ * Callback function for Trace Activation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ * @return None
+ */
+ void TraceActivated( TUint32 aComponentId, TUint16 aGroupId );
+
+ /**
+ * Callback function for Trace Deactivation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ * @return None
+ */
+ void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId );
+
+private:
+
+ };
+
+#endif
+
+#include "TraceCompilerTesterAdvanced.inl"
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inc/TraceCompilerTesterAdvanced.inl Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __TRACECOMPILERADVANCED_INL__
+#define __TRACECOMPILERADVANCED_INL__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterAdvancedTraces.h"
+#endif
+
+inline void DTraceCompilerTesterAdvanced::HelloWorld()
+ {
+ OstTrace0( INCLUDED_NON_SOURCE_FILE_TEST, HELLO_WORLD, "Hello world!" );
+ }
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inc/TraceCompilerTesterBasic.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __TRACECOMPILERTESTERBASIC_H__
+#define __TRACECOMPILERTESTERBASIC_H__
+
+
+// Include files
+#include <TraceCoreNotificationReceiver.h>
+#include "BigNumbers.inl"
+
+// FORWARD DECLARATIONS
+
+/**
+ * TraceCompilerTester application
+ */
+NONSHARABLE_CLASS( DTraceCompilerTesterBasic ) : public DTraceCoreNotificationReceiver
+ {
+public:
+
+ /**
+ * Constructor
+ */
+ DTraceCompilerTesterBasic();
+
+ /**
+ * Destructor
+ */
+ ~DTraceCompilerTesterBasic();
+
+ /**
+ * Second-phase constructor
+ *
+ * @param
+ * @return System-wide error code
+ */
+ TInt Construct();
+
+public: // from DTraceCoreNotificationReceiver
+
+ /**
+ * Callback function for Trace Activation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ * @return None
+ */
+ void TraceActivated( TUint32 aComponentId, TUint16 aGroupId );
+
+ /**
+ * Callback function for Trace Deactivation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ * @return None
+ */
+ void TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId );
+
+private:
+
+ };
+
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inc/TraceCompilerTesterCommon1.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __TRACECOMPILERTESTERCOMMON1_H__
+#define __TRACECOMPILERTESTERCOMMON1_H__
+
+// Include files
+#include <klib.h>
+
+// FORWARD DECLARATIONS
+
+/**
+ * TraceCompilerTester application
+ */
+NONSHARABLE_CLASS( DTraceCompilerTesterCommon1 ) : public DBase
+ {
+public:
+
+ /**
+ * Constructor
+ */
+ DTraceCompilerTesterCommon1();
+
+ /**
+ * Destructor
+ */
+ ~DTraceCompilerTesterCommon1();
+
+ /**
+ * Set values
+ *
+ * @param aValue1
+ * @param aValue2
+ * @param aValue3
+ * @param aValue4
+ * @return sum of the values
+ */
+ TInt32 SumValues( TInt aValue1, TInt aValue2, TUint8 aValue3, TUint8 aValue4 );
+
+ };
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inc/TraceCompilerTesterCommon2.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __TRACECOMPILERTESTERCOMMON2_H__
+#define __TRACECOMPILERTESTERCOMMON2_H__
+
+// Include files
+#include <klib.h>
+
+
+// FORWARD DECLARATIONS
+
+/**
+ * TraceCompilerTester application
+ */
+NONSHARABLE_CLASS( DTraceCompilerTesterCommon2 ) : public DBase
+ {
+public:
+
+ /**
+ * Constructor
+ */
+ DTraceCompilerTesterCommon2();
+
+ /**
+ * Destructor
+ */
+ ~DTraceCompilerTesterCommon2();
+
+ /**
+ * Print Kekkonen
+ */
+ void Kekkonen();
+ };
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/inl/BigNumbers.inl Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __TEST_INL__
+#define __TEST_INL__
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "BigNumbersTraces.h"
+#endif
+
+inline TUint32 GetBigValue1000()
+ {
+ TUint32 value = 1000;
+ OstTrace1(INCLUDED_NON_SOURCE_FILE_TEST, NON_SOURCE_FILE_TRACE1, "Inline function GetBigValue1000 return value: %d", value);
+ return value;
+ }
+
+inline TUint32 GetBigValue2000()
+ {
+ TUint32 value = 2000;
+ OstTrace1(INCLUDED_NON_SOURCE_FILE_TEST, NON_SOURCE_FILE_TRACE2, "Inline function GetBigValue1000 return value: %d", value);
+ return value;
+ }
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/src/TraceCompilerTesterAdvanced.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,413 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <nkern.h>
+
+#include "TraceCompilerTesterAdvanced.h"
+#include "TraceCompilerTesterCommon1.h"
+#include "TraceCompilerTesterCommon2.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterAdvancedTraces.h"
+#include "TraceCompilerTesterCommon2Traces.h"
+#endif
+
+// Define group IDs. If TraceCompiler is missing, define these to get the code to compile.
+// However, component still won't work properly.
+#ifdef OST_TRACE_COMPILER_IN_USE
+#define SHORT_TRACE_TEST ASCII1 >> 16
+#define LONG_TRACE_TEST ASCII300 >> 16
+#define POINTER_PARAMETER_TEST POINTER_PARAMETER_TRACE1 >> 16
+#define INCLUDED_NON_SOURCE_FILE_TEST HELLO_WORLD >> 16
+#define TRACE_FLOW 0x7
+#define KEKKONEN TEXT1 >> 16
+#define TRACE_STATE 0x5
+#define TRACE_DATA TRACE_DATA_TRACE >> 16
+#define POST_CODE_TEST POST1 >> 16
+#else
+#define SHORT_TRACE_TEST
+#define LONG_TRACE_TEST
+#define POINTER_PARAMETER_TEST
+#define INCLUDED_NON_SOURCE_FILE_TEST
+#define TRACE_FLOW
+#define KEKKONEN
+#define TRACE_STATE
+#define TRACE_DATA
+#define POST_CODE_TEST
+#endif
+
+
+//- Local constants ---------------------------------------------------------
+
+const TUint32 KComponentID = 0x20011111;
+
+_LIT8(buf1, "1");
+_LIT8(buf2, "12");
+_LIT8(buf3, "123");
+_LIT8(buf4, "1234");
+_LIT8(buf60, "123456789_123456789_123456789_123456789_123456789_123456789X");
+_LIT8(buf300, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789X");
+_LIT8(buf333, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_12X");
+_LIT8(buf512, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789Y1X");
+_LIT8(buf600, "123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789X");
+
+//- Macros ------------------------------------------------------------------
+
+
+//- Member Functions --------------------------------------------------------
+
+/**
+ * Constructor
+ */
+DTraceCompilerTesterAdvanced::DTraceCompilerTesterAdvanced()
+ {
+ }
+
+/**
+ * EnergyMonitor Destructor
+ */
+DTraceCompilerTesterAdvanced::~DTraceCompilerTesterAdvanced()
+ {
+ }
+
+/**
+ * EnergyMonitor second-phase constructor
+ *
+ * @param
+ * @return System-wide error code
+ */
+TInt DTraceCompilerTesterAdvanced::Construct()
+ {
+ Kern::Printf( "-------------- DTraceCompilerTesterAdvanced::Construct ----------------" );
+ TInt ret( KErrNone );
+
+ // Register notification receiver by using just component ID
+ RegisterNotificationReceiver( KComponentID);
+
+ return ret;
+ }
+
+/**
+ * Callback function for Trace Activation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ */
+void DTraceCompilerTesterAdvanced::TraceActivated( TUint32 aComponentId, TUint16 aGroupId )
+ {
+
+ Kern::Printf( "DTraceCompilerTesterAdvanced::TraceActivated - ComponentId = 0x%x, GroupId = 0x%x", aComponentId, aGroupId );
+
+ if (aGroupId == POINTER_PARAMETER_TEST)
+ {
+ // Print out pointer values of two NTimers by using %p tag
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Pointer Parameter Test START----------------" );
+ NTimer* myNTimer1 = new NTimer();
+ NTimer* myNTimer2 = new NTimer();
+ const NTimer* myNTimer3 = new NTimer();
+ OstTraceExt2( POINTER_PARAMETER_TEST, POINTER_PARAMETER_TRACE1, "Print out pointer values of two NTimers;myNTimer1=%p;myNTimer2=%p", myNTimer1, myNTimer2 );
+ OstTraceExt1( POINTER_PARAMETER_TEST, POINTER_PARAMETER_TRACE2, "Print out pointer values of one const NTimers;myNTimer3=%p", myNTimer3 );
+ delete myNTimer1;
+ delete myNTimer2;
+ delete myNTimer3;
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Pointer Parameter Test END----------------" );
+ }
+ else if (aGroupId == LONG_TRACE_TEST)
+ {
+ // Print out n times traces those lengths are 60, 300, 512 and 600 characters.
+ // Print out also some traces those parameter total length is more than 512
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test START----------------" );
+
+ TInt i=0;
+ TUint numberOfTraces = 1;
+ TInt32 freq = NKern::FastCounterFrequency();
+ TUint32 startTime;
+ TUint32 endTime;
+ TUint32 time;
+
+ TUint timeTestNumber1 = 0;
+ TUint timeTestNumber2 = 0;
+ TUint timeTestNumber3 = 0;
+ TUint timeTestNumber4 = 0;
+ TUint timeTestNumber5 = 0;
+ TUint timeTestNumber6 = 0;
+ TUint timeTestNumber7 = 0;
+ // ---------------------------- Ascii60 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii60----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt1( LONG_TRACE_TEST, ASCII60, "Ascii60: %s", buf60);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber1 = time;
+ // ---------------------------- Ascii60 ----------------------------
+
+ // ---------------------------- Ascii300 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii300----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt1( LONG_TRACE_TEST, ASCII300, "Ascii300: %s", buf300);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber2 = time;
+ // ---------------------------- Ascii300 ----------------------------
+
+ // ---------------------------- Ascii512 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii512----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt1( LONG_TRACE_TEST, ASCII512, "Ascii512: %s", buf512);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber3 = time;
+ // ---------------------------- Ascii512 ----------------------------
+
+ // ---------------------------- Ascii600 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii600----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt1( LONG_TRACE_TEST, ASCII600, "Ascii600: %s", buf600);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber4 = time;
+ // ---------------------------- Ascii600 ----------------------------
+
+ // ---------------------------- Ascii300 + Ascii512 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii300 + Ascii512----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt2( LONG_TRACE_TEST, ASCII300_ASCII512, "Ascii300: %s Ascii512: %s", buf300, buf512);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber5 = time;
+ // ---------------------------- Ascii300 + Ascii512 ----------------------------
+
+ // ---------------------------- Ascii600 + Ascii300 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii600 + Ascii300----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt2( LONG_TRACE_TEST, ASCII600_ASCII300, "Ascii600: %s Ascii300: %s", buf600, buf300);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber6 = time;
+ // ---------------------------- Ascii600 + Ascii300 ----------------------------
+
+ // ---------------------------- Ascii333 + Ascii333 ----------------------------
+ startTime = NKern::FastCounter();
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test : Ascii333 + Ascii333----------------" );
+ for (i=0; i < numberOfTraces; i++)
+ {
+ OstTraceExt2( LONG_TRACE_TEST, ASCII333_ASCII333, "Ascii333: %s Ascii333: %s", buf333, buf333);
+ }
+ endTime = NKern::FastCounter();
+ time = (endTime - startTime) * 1000 / freq;
+
+ timeTestNumber7 = time;
+ // ---------------------------- Ascii333 + Ascii333 ----------------------------
+
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced----------------" );
+ Kern::Printf( "Ascii60: %d", timeTestNumber1 );
+ Kern::Printf( "Ascii300: %d", timeTestNumber2 );
+ Kern::Printf( "Ascii512: %d", timeTestNumber3 );
+ Kern::Printf( "Ascii600: %d", timeTestNumber4 );
+ Kern::Printf( "Ascii300 + Ascii512: %d", timeTestNumber5 );
+ Kern::Printf( "Ascii600 + Ascii300: %d", timeTestNumber6 );
+ Kern::Printf( "Ascii333 + Ascii333: %d", timeTestNumber7 );
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced----------------" );
+
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Long Trace Test END----------------" );
+ }
+ else if (aGroupId == SHORT_TRACE_TEST)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test START----------------" );
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test : Ascii1----------------" );
+ OstTraceExt1( SHORT_TRACE_TEST, ASCII1, "Ascii1: %s", buf1);
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test : Ascii2----------------" );
+ OstTraceExt1( SHORT_TRACE_TEST, ASCII2, "Ascii2: %s", buf2);
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test : Ascii3----------------" );
+ OstTraceExt1( SHORT_TRACE_TEST, ASCII3, "Ascii3: %s", buf3);
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test : Ascii4----------------" );
+ OstTraceExt1( SHORT_TRACE_TEST, ASCII4, "Ascii4: %s", buf4);
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test : Ascii1 + Acii2----------------" );
+ OstTraceExt2( SHORT_TRACE_TEST, ASCII5, "Ascii1: %s Ascii2: %s", buf1, buf2);
+
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Short Trace Test END----------------" );
+ }
+ else if (aGroupId == INCLUDED_NON_SOURCE_FILE_TEST)
+ {
+ // Print out traces from included non-source file that is defined in trace.properties file
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Included Non-Source File Test START----------------" );
+
+ this->HelloWorld();
+ this->HelloMoon();
+
+ TUint32 value3 = GetBigValue1000();
+ TUint32 value4 = GetBigValue2000();
+
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Included Non-Source File Test END----------------" );
+
+ }
+ else if (aGroupId == TRACE_FLOW)
+ {
+ OstTrace0(TRACE_FLOW, TEST_TRACE_2, "Test OLD TraceCompiler");
+ // This test can also use to test function parameters
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Common Source File Test START----------------");
+ DTraceCompilerTesterCommon1* common1 = new DTraceCompilerTesterCommon1();
+ TInt32 sum = common1->SumValues(-1, -2, 100, 200);
+ delete common1;
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Common Source File Test END----------------");
+ }
+ else if (aGroupId == KEKKONEN)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Kekkonen START----------------");
+ DTraceCompilerTesterCommon2* common2 = new DTraceCompilerTesterCommon2();
+ common2->Kekkonen();
+ delete common2;
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Kekkonen END----------------");
+ }
+ else if (aGroupId == TRACE_STATE)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced State Trace Test START----------------");
+ OstTraceState0(STATE_TRACE_0, "Kone1", "Running");
+ OstTraceState1(STATE_TRACE_1, "Kone2", "Stopped", this);
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced State Trace Test END----------------");
+ }
+ else if (aGroupId == TRACE_DATA)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Data Trace Test START----------------");
+
+ TBuf8<601> data(buf600);
+ OstTraceData( TRACE_DATA, TRACE_DATA_TRACE,
+ "DTraceCoreXtiIf::DebugPrintMsg - Msg via XTI IF 0x%{hex8[]}", data.Ptr(), data.Size() );
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced Data Trace Test END----------------");
+ }
+ else if (aGroupId == POST_CODE_TEST)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced POST Code Trace Test START----------------");
+ OstTrace0(POST_CODE_TEST, POST1, "Print some POST code traces");
+ Kern::Printf("[POST][X-Loader][Started][OK]");
+ Kern::Printf("[POST][BootUp][Reset reason][PowerOn]");
+ Kern::NanoWait(50000000);
+ Kern::Printf("[POST][X-Loader][Authenticate][OK]");
+ Kern::NanoWait(100000000);
+ Kern::Printf("[POST][X-Loader][load][OK]");
+ Kern::NanoWait(100000000);
+ Kern::Printf("[POST][X-Loader][Authenticate][OK]");
+ Kern::NanoWait(700000000);
+ Kern::Printf("[POST][X-Loader][load][OK]");
+ Kern::NanoWait(50000000);
+ Kern::Printf("[POST][X-Loader][load][OK]");
+ Kern::NanoWait(50000000);
+ Kern::Printf("[POST][X-Loader][load][OK]");
+ Kern::NanoWait(50000000);
+ Kern::Printf("[POST][X-Loader][Authenticate][OK]");
+ Kern::NanoWait(200000000);
+ Kern::Printf("[POST][Boot strap][Started][OK]");
+ Kern::NanoWait(10000000);
+ Kern::Printf("[POST][Estart][started][OK]");
+ Kern::NanoWait(10000000);
+ Kern::Printf("[POST][Estart][CompositeFileSys.][OK]");
+ Kern::NanoWait(500000000);
+ Kern::Printf("[POST][Mount][Drive][OK]");
+ Kern::NanoWait(200000000);
+ Kern::Printf("[POST][Mount][Drive][OK]");
+ Kern::NanoWait(200000000);
+ Kern::Printf("[POST][Estart][ISC API start][OK]");
+ Kern::NanoWait(300000000);
+ Kern::Printf("[POST][Estart][userdisk format][No]");
+ Kern::NanoWait(10000000);
+ Kern::Printf("[POST][Estart][secenv start][OK]");
+ Kern::NanoWait(20000000);
+ Kern::Printf("[POST][Estart][startup mode][Local]");
+ Kern::NanoWait(10000000);
+ Kern::Printf("[POST][Estart][Language selection][OK]");
+ Kern::NanoWait(200000000);
+ Kern::Printf("[POST][SelfTest][Started][FAIL][KErrOutOfMemory]");
+ Kern::NanoWait(200000000);
+ Kern::Printf("[POST][BT][Started][OK]");
+ Kern::NanoWait(800000000);
+ Kern::Printf("[POST][WLAN][Started][OK]");
+ Kern::NanoWait(800000000);
+ Kern::Printf("[POST][Display][Started][OK]");
+ Kern::NanoWait(800000000);
+ Kern::Printf("[POST][Camera][Started][OK]");
+ Kern::NanoWait(80000000);
+ Kern::Printf("[POST][mc_kernelagent][ExtensionInit0][OK]");
+ Kern::NanoWait(100000000);
+ Kern::Printf("[POST][mc_sender][Pre-init][OK]");
+ Kern::NanoWait(100000000);
+ Kern::Printf("[POST][mc_useragent][MobileCrashWriter init][OK]");
+ Kern::Printf( "--------------TraceCompilerTesterAdvanced POST Code Trace Test END----------------");
+ }
+ }
+
+/**
+ * Callback function for Trace Deactivation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ */
+void DTraceCompilerTesterAdvanced::TraceDeactivated( TUint32 aComponentId, TUint16 aGroupId )
+ {
+ Kern::Printf( "DTraceCompilerTesterAdvanced::TraceDeactivated - ComponentId = 0x%x, GroupId = 0x%x", aComponentId, aGroupId );
+ }
+
+
+/**
+ * The entry point for a standard extension. Creates Long Trace Tester extension.
+ *
+ * @return KErrNone, if successful
+ */
+DECLARE_STANDARD_EXTENSION() //lint !e960 !e1717 ¤/#((& Symbian
+ {
+
+ TInt ret( KErrNone );
+
+ DTraceCompilerTesterAdvanced* longTraceTester = new DTraceCompilerTesterAdvanced();
+
+ if( longTraceTester == NULL )
+ {
+ ret = KErrNoMemory;
+ }
+
+ if ( ret == KErrNone )
+ {
+ // construct instance
+ ret = longTraceTester->Construct();
+ }
+
+ return ret;
+ }
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/src/TraceCompilerTesterBasic.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,462 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <nkern.h>
+
+#include "TraceCompilerTesterBasic.h"
+#include "TraceCompilerTesterCommon1.h"
+#include "TraceCompilerTesterCommon2.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterBasicTraces.h"
+#include "TraceCompilerTesterCommon2Traces.h"
+#endif
+
+// Define group IDs. If TraceCompiler is missing, define these to get the code to compile.
+// However, component still won't work properly.
+#ifdef OST_TRACE_COMPILER_IN_USE
+#define BASIC_OK_TEST TEST_BASIC_INT8 >> 16
+#define ARRAY_OK_TEST TEST_ARRAY_INT8 >> 16
+#define BASIC_TWO_SIMILAR_OK_TEST TEST_BASIC_SIMILAR2_INT8 >> 16
+#define ARRAY_TWO_SIMILAR_OK_TEST TEST_ARRAY_SIMILAR2_INT8 >> 16
+#define ENUM_OK_TEST TEST_ENUM_OK >> 16
+#define TRACE_PERFORMANCE 0x4
+#define TRACE_FLOW 0x7
+#define INCLUDED_NON_SOURCE_FILE_TEST NON_SOURCE_FILE_TRACE1 >> 16
+#define KEKKONEN TEXT1 >> 16
+#else
+#define BASIC_OK_TEST
+#define ARRAY_OK_TEST
+#define BASIC_TWO_SIMILAR_OK_TEST
+#define ARRAY_TWO_SIMILAR_OK_TEST
+#define ENUM_OK_TEST
+#define EVENT_NO_VALUE_OK_TEST
+#define EVENT_WITH_VALUE_OK_TEST
+#define TRACE_PERFORMANCE
+#define TRACE_FLOW
+#define INCLUDED_NON_SOURCE_FILE_TEST
+#define KEKKONEN
+#endif
+
+//- Local constants ---------------------------------------------------------
+
+const TUint32 KComponentID = 0x20011112;
+
+//- Macros ------------------------------------------------------------------
+
+
+//- Member Functions --------------------------------------------------------
+
+/**
+ * Constructor
+ */
+DTraceCompilerTesterBasic::DTraceCompilerTesterBasic()
+ {
+ }
+
+/**
+ * EnergyMonitor Destructor
+ */
+DTraceCompilerTesterBasic::~DTraceCompilerTesterBasic()
+ {
+
+ }
+
+/**
+ * EnergyMonitor second-phase constructor
+ *
+ * @param
+ * @return System-wide error code
+ */
+TInt DTraceCompilerTesterBasic::Construct()
+ {
+
+ TInt ret(KErrNone);
+
+ Kern::Printf( "-------------- DTraceCompilerTesterBasic::Construct ----------------" );
+
+ // Register notification receivers by using component ID and group IDs
+ RegisterNotificationReceiver(KComponentID, BASIC_OK_TEST );
+ RegisterNotificationReceiver(KComponentID, ARRAY_OK_TEST );
+ RegisterNotificationReceiver(KComponentID, BASIC_TWO_SIMILAR_OK_TEST );
+ RegisterNotificationReceiver(KComponentID, ARRAY_TWO_SIMILAR_OK_TEST );
+ RegisterNotificationReceiver(KComponentID, ENUM_OK_TEST );
+ RegisterNotificationReceiver(KComponentID, TRACE_PERFORMANCE );
+ RegisterNotificationReceiver(KComponentID, TRACE_FLOW );
+ RegisterNotificationReceiver(KComponentID, INCLUDED_NON_SOURCE_FILE_TEST );
+ RegisterNotificationReceiver(KComponentID, KEKKONEN );
+
+ return ret;
+ }
+
+/**
+ * Callback function for Trace Activation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ */
+void DTraceCompilerTesterBasic::TraceActivated(TUint32 aComponentId,
+ TUint16 aGroupId)
+ {
+ Kern::Printf(
+ "DTraceCompilerTesterBasic::TraceActivated - ComponentId = 0x%x, GroupId = 0x%x",
+ aComponentId, aGroupId);
+
+ if (aGroupId == BASIC_OK_TEST)
+ {
+ Kern::Printf(
+ "--------------TraceCompilerTesterBasic Array Basic START----------------");
+ TUint8 unicodeStr[10];
+ unicodeStr[0] = 'S';
+ unicodeStr[1] = '\0';
+ unicodeStr[2] = 'T';
+ unicodeStr[3] = '\0';
+ unicodeStr[4] = 'R';
+ unicodeStr[5] = '\0';
+ unicodeStr[6] = '1';
+ unicodeStr[7] = '\0';
+ unicodeStr[8] = '6';
+ unicodeStr[9] = '\0';
+ TPtrC8 unicodePtr(unicodeStr, 10);
+
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_INT8, "int8: %hhd", ( TInt8 )1 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_INT16, "int16: %hd", ( TInt16 )2 );
+ OstTrace1( BASIC_OK_TEST, TEST_BASIC_INT32, "int32: %d", ( TInt )3 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_INT64, "int64: %Ld", ( TInt64 )4 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_UINT8, "uint8: %hhu", ( TUint16 )5 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_UINT16, "uint16: %hu", ( TUint16 )6 );
+ OstTrace1( BASIC_OK_TEST, TEST_BASIC_UINT32, "uint32: %u", ( TUint32 )7 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_UINT64, "uint64: %Lu", ( TUint64 )8 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_HEX8, "hex8: %hhx", ( TUint8 )9 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_HEX16, "hex16: %hx", ( TUint16 )10 );
+ OstTrace1( BASIC_OK_TEST, TEST_BASIC_HEX32, "hex32: %x", ( TUint32 )11 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_HEX64, "hex64: %Lx", ( TUint64 )12 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_STRING8, "ascii: %s", _L8( "STR8" ) );
+ // In kernel unicode strings do not exist -> This uses const TDesC8&
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_STRING16, "unicode: %S", unicodePtr );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_FFIX, "ffix: %f", 0.1 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_FEXP, "fexp: %e", 0.2 );
+ OstTraceExt1( BASIC_OK_TEST, TEST_BASIC_FOPT, "fopt: %g", 0.3 );
+ Kern::Printf( "--------------TraceCompilerTesterBasic Array Basic END----------------" );
+ }
+ else if (aGroupId == ARRAY_OK_TEST)
+ {
+
+
+ Kern::Printf( "--------------TraceCompilerTesterBasic Array Test START----------------" );
+ TInt buf8Len = 29;
+ TInt8 buf8[ 29 ];
+ TInt index = 0;
+ TInt value = -17;
+ while ( index < buf8Len )
+ {
+ buf8[ index++ ] = value;
+ value++;
+ }
+ TInt buf16Len = 11;
+ TInt16 buf16[ 11 ];
+ index = 0;
+ value = -3;
+ while ( index < buf16Len )
+ {
+ buf16[ index++ ] = value;
+ value += 7;
+ }
+ TInt buf32Len = 7;
+ TInt buf32[ 7 ];
+ index = 0;
+ value = -73;
+ while ( index < buf32Len )
+ {
+ buf32[ index++ ] = value;
+ value += 150;
+ }
+ TInt buf64Len = 5;
+ TInt64 buf64[ 5 ];
+ index = 0;
+ value = -100000000L;
+ while ( index < buf64Len )
+ {
+ buf64[ index++ ] = value;
+ value += 100000000L;
+ }
+
+#ifdef __WINS__
+ TInt bufFloatLen = 7;
+ TReal bufFloat[ 7 ];
+ index = 0;
+ TReal val = -0.5;
+ while ( index < bufFloatLen )
+ {
+ bufFloat[ index++ ] = val;
+ val += 1.5;
+ }
+#endif
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_INT8, "int8 array: %{int8[]}",
+ TOstArray< TInt8>( ( TInt8* )buf8, buf8Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_INT16, "int16 array: %{int16[]}",
+ TOstArray< TInt16>( ( TInt16* )buf16, buf16Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_INT32, "int32 array: %{int32[]}",
+ TOstArray< TInt>( ( TInt* )buf32, buf32Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_INT64, "int64 array: %{int64[]}",
+ TOstArray< TInt64>( ( TInt64* )buf64, buf64Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_UINT8, "uint8 array: %{uint8[]}",
+ TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_UINT16, "uint16 array: %{uint16[]}",
+ TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_UINT32, "uint32 array: %{uint32[]}",
+ TOstArray< TUint>( ( TUint* )buf32, buf32Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_UINT64, "uint64 array: %{uint64[]}",
+ TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_HEX8, "hex8 array: %{hex8[]}",
+ TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_HEX16, "hex16 array: %{hex16[]}",
+ TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_HEX32, "hex32 array: %{hex32[]}",
+ TOstArray< TUint>( ( TUint* )buf32, buf32Len ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_HEX64, "hex64 array: %{hex64[]}",
+ TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ) );
+
+#ifdef __WINS__
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_FFIX, "ffix array: %{ffix[]}",
+ TOstArray< TReal>( bufFloat, bufFloatLen ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_FEXP, "fexp array: %{fexp[]}",
+ TOstArray< TReal>( bufFloat, bufFloatLen ) );
+ OstTraceExt1( ARRAY_OK_TEST, TEST_ARRAY_FOPT, "fopt array: %{fopt[]}",
+ TOstArray< TReal>( bufFloat, bufFloatLen ) );
+#endif
+ Kern::Printf( "--------------TraceCompilerTesterBasic Array Test END----------------" );
+ }
+ else if (aGroupId == BASIC_TWO_SIMILAR_OK_TEST)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterBasic Basic Two Similar Test START----------------" );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_INT8,
+ "int8: %hhd %hhd", ( TInt8 )1, ( TInt8 )1 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_INT16,
+ "int16: %hd, %hd", ( TInt16 )2, ( TInt16 )2 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_INT32,
+ "int32: %d, %d", ( TInt )3, ( TInt )3 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_INT64,
+ "int64: %Ld, %Ld", ( TInt64 )4, ( TInt64 )4 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_UINT8,
+ "uint8: %hhu, %hhu", ( TUint8 )5, ( TUint8 )5 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_UINT16,
+ "uint16: %hu, %hu", ( TUint16 )6, ( TUint16 )6 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_UINT32,
+ "uint32: %u, %u", ( TUint )7, ( TUint )7 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_UINT64,
+ "uint64: %Lu, %Lu", ( TUint64 )8, ( TUint64 )8 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_HEX8,
+ "hex8: %hhx, %hhx", ( TUint8 )9, ( TUint8 )9 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_HEX16,
+ "hex16: %hx, %hx", ( TUint16 )10, ( TUint16 )10 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_HEX32,
+ "hex32: %x, %x", ( TUint )11, ( TUint )11 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_HEX64,
+ "hex64: %Lx, %Lx", ( TUint64 )12, ( TUint64 )12 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_STRING8,
+ "ascii: %s, %s", _L8( "STR8" ), _L8( "STR8" ) );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_FFIX,
+ "ffix: %f, %f", 0.1, 0.1 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_FEXP,
+ "fexp: %e, %f", 0.2, 0.2 );
+ OstTraceExt2( BASIC_TWO_SIMILAR_OK_TEST, TEST_BASIC_SIMILAR2_FOPT,
+ "fopt: %g, %g", 0.3, 0.3 );
+ Kern::Printf( "--------------TraceCompilerTesterBasic Basic Two Similar Test END----------------" );
+ }
+ else if (aGroupId == ARRAY_TWO_SIMILAR_OK_TEST)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterBasic Array Two Similar Test START----------------" );
+ TInt buf8Len = 29;
+ TInt8 buf8[ 29 ];
+ TInt index = 0;
+ TInt value = -17;
+ while ( index < buf8Len )
+ {
+ buf8[ index++ ] = value;
+ value++;
+ }
+ TInt buf16Len = 11;
+ TInt16 buf16[ 11 ];
+ index = 0;
+ value = -3;
+ while ( index < buf16Len )
+ {
+ buf16[ index++ ] = value;
+ value += 7;
+ }
+ TInt buf32Len = 7;
+ TInt buf32[ 7 ];
+ index = 0;
+ value = -73;
+ while ( index < buf32Len )
+ {
+ buf32[ index++ ] = value;
+ value += 150;
+ }
+ TInt buf64Len = 5;
+ TInt64 buf64[ 5 ];
+ index = 0;
+ value = -100000000L;
+ while ( index < buf64Len )
+ {
+ buf64[ index++ ] = value;
+ value += 100000000L;
+ }
+
+#ifdef __WINS__
+ TInt bufFloatLen = 7;
+ TReal bufFloat[ 7 ];
+ index = 0;
+ TReal val = -0.5;
+ while ( index < bufFloatLen )
+ {
+ bufFloat[ index++ ] = val;
+ val += 1.5;
+ }
+#endif
+
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_INT8, "int8: %{int8[]} %{int8[]}",
+ TOstArray< TInt8>( ( TInt8* )buf8, buf8Len ), TOstArray< TInt8>( ( TInt8* )buf8, buf8Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_INT16, "int16: %{int16[]} %{int16[]}",
+ TOstArray< TInt16>( ( TInt16* )buf16, buf16Len ), TOstArray< TInt16>( ( TInt16* )buf16, buf16Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_INT32, "int32: %{int32[]} %{int32[]}",
+ TOstArray< TInt>( ( TInt* )buf32, buf32Len ), TOstArray< TInt>( ( TInt* )buf32, buf32Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_INT64, "int64: %{int64[]} %{int64[]}",
+ TOstArray< TInt64>( ( TInt64* )buf64, buf64Len ), TOstArray< TInt64>( ( TInt64* )buf64, buf64Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_UINT8, "uint8: %{uint8[]} %{uint8[]}",
+ TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ), TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_UINT16, "uint16: %{uint16[]} %{uint16[]}",
+ TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ), TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_UINT32, "uint32: %{uint32[]} %{uint32[]}",
+ TOstArray< TUint>( ( TUint* )buf32, buf32Len ), TOstArray< TUint>( ( TUint* )buf32, buf32Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_UINT64, "uint64: %{uint64[]} %{uint64[]}",
+ TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ), TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_HEX8, "hex8: %{hex8[]} %{hex8[]}",
+ TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ), TOstArray< TUint8>( ( TUint8* )buf8, buf8Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_HEX16, "hex16: %{hex16[]} %{hex16[]}",
+ TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ), TOstArray< TUint16>( ( TUint16* )buf16, buf16Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_HEX32, "hex32: %{hex32[]} %{hex32[]}",
+ TOstArray< TUint>( ( TUint* )buf32, buf32Len ), TOstArray< TUint>( ( TUint* )buf32, buf32Len ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_HEX64, "hex64: %{hex64[]} %{hex64[]}",
+ TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ), TOstArray< TUint64>( ( TUint64* )buf64, buf64Len ) );
+
+#ifdef __WINS__
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_FFIX, "ffix: %{ffix[]} %{ffix[]}",
+ TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ), TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_FEXP, "fexp: %{fexp[]} %{fexp[]}",
+ TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ), TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ) );
+ OstTraceExt2( ARRAY_TWO_SIMILAR_OK_TEST, TEST_ARRAY_SIMILAR2_FOPT, "fopt: %{fopt[]} %{fopt[]}",
+ TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ), TOstArray< TReal>( ( TReal* )bufFloat, bufFloatLen ) );
+
+#endif
+ Kern::Printf( "--------------TraceCompilerTesterBasic Array Two Similar Test END----------------" );
+ }
+ else if (aGroupId == ENUM_OK_TEST)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterBasic Enum Test START----------------" );
+ TInt buf[3];
+ buf[0] = KErrNone;
+ buf[1] = KErrNotFound;
+ buf[2] = KErrGeneral;
+ TInt ret = KErrGeneral;
+ OstTrace1( ENUM_OK_TEST, TEST_ENUM_OK, "Enum: %{TErrorCodes}", ret );
+ OstTraceExt1( ENUM_OK_TEST, TEST_ENUM_ARRAY_OK, "Enum Array: %{TErrorCodes[]}",
+ TOstArray< TInt>( ( TInt* )buf, 3 ) );
+ Kern::Printf( "--------------TraceCompilerTesterBasic Enum Test END----------------" );
+ }
+ else if (aGroupId == TRACE_PERFORMANCE)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterBasic Event Test START----------------" );
+
+ OstTraceEventStart0( EVENT_MY_EVENT_TRACE1_START, "Event1" );
+ OstTraceEventStop( EVENT_MY_EVENT_TRACE1_STOP, "Event1", EVENT_MY_EVENT_TRACE1_START );
+
+ OstTraceEventStart1( EVENT_MY_EVENT_TRACE2_START, "Event2", 123 );
+ OstTraceEventStop( EVENT_MY_EVENT_TRACE2_STOP, "Event2", EVENT_MY_EVENT_TRACE2_START );
+
+ Kern::Printf( "--------------TraceCompilerTesterBasic Event Test END----------------" );
+ }
+ else if (aGroupId == TRACE_FLOW)
+ {
+ // This test can also use to test function parameters
+ Kern::Printf( "--------------TraceCompilerTesterBasic Common Source File Test START----------------");
+ DTraceCompilerTesterCommon1* common1 = new DTraceCompilerTesterCommon1();
+ TInt32 sum = common1->SumValues(1, 2, 3, 4);
+ delete common1;
+ Kern::Printf( "--------------TraceCompilerTesterBasic Common Source File Test END----------------");
+ }
+ else if (aGroupId == INCLUDED_NON_SOURCE_FILE_TEST)
+ {
+ // Print out traces from included non-source file that is defined in trace.properties file
+ Kern::Printf( "--------------TraceCompilerTesterBasic Included Non-Source File Test START----------------" );
+
+ TUint32 value1 = GetBigValue1000();
+ TUint32 value2 = GetBigValue2000();
+
+ Kern::Printf( "--------------TraceCompilerTesterBasic Included Non-Source File Test END----------------" );
+ }
+ else if (aGroupId == KEKKONEN)
+ {
+ Kern::Printf( "--------------TraceCompilerTesterBasic Kekkonen START----------------" );
+ DTraceCompilerTesterCommon2* common2 = new DTraceCompilerTesterCommon2();
+ common2->Kekkonen();
+ delete common2;
+ Kern::Printf( "--------------TraceCompilerTesterBasic Kekkonen END----------------" );
+ }
+ }
+
+/**
+ * Callback function for Trace Deactivation
+ *
+ * @param aComponentId
+ * @param aGroupId
+ */
+void DTraceCompilerTesterBasic::TraceDeactivated(TUint32 aComponentId,
+ TUint16 aGroupId)
+ {
+ Kern::Printf(
+ "DTraceCompilerTesterBasic::TraceDeactivated - ComponentId = 0x%x, GroupId = 0x%x",
+ aComponentId, aGroupId);
+ }
+/**
+ * The entry point for a standard extension. Creates Long Trace Tester extension.
+ *
+ * @return KErrNone, if successful
+ */
+DECLARE_STANDARD_EXTENSION()
+ {
+
+ TInt ret(KErrNone);
+
+ DTraceCompilerTesterBasic* longTraceTester =
+ new DTraceCompilerTesterBasic();
+
+ if (longTraceTester == NULL)
+ {
+ ret = KErrNoMemory;
+ }
+
+ if (ret == KErrNone)
+ {
+ // construct instance
+ ret = longTraceTester->Construct();
+ }
+
+ return ret;
+ }
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/src/TraceCompilerTesterCommon1.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <nkern.h>
+
+#include "TraceCompilerTesterCommon1.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterCommon1Traces.h"
+#endif
+
+
+/**
+ * Constructor
+ */
+DTraceCompilerTesterCommon1::DTraceCompilerTesterCommon1()
+ {
+ }
+
+/**
+ * Destructor
+ */
+DTraceCompilerTesterCommon1::~DTraceCompilerTesterCommon1()
+ {
+
+ }
+
+
+/**
+ * Sum values
+ *
+ * @param aValue1
+ * @param aValue2
+ * @param aValue3
+ * @param aValue4
+ * @return sum of the values
+ */
+TInt32 DTraceCompilerTesterCommon1::SumValues( TInt aValue1, TInt aValue2, TUint8 aValue3, TUint8 aValue4 )
+ {
+ OstTraceFunctionEntryExt( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY, this );
+ TInt32 retVal = aValue1 + aValue2 +aValue3 + aValue4;
+ OstTraceFunctionExitExt( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT, this, ( TInt )( retVal ) );
+ return retVal;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/src/TraceCompilerTesterCommon2.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <nkern.h>
+
+#include "TraceCompilerTesterCommon2.h"
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCompilerTesterCommon2Traces.h"
+#endif
+
+
+/**
+ * Constructor
+ */
+DTraceCompilerTesterCommon2::DTraceCompilerTesterCommon2()
+ {
+ }
+
+/**
+ * Destructor
+ */
+DTraceCompilerTesterCommon2::~DTraceCompilerTesterCommon2()
+ {
+
+ }
+
+
+/**
+ * Print Kekkonen
+ */
+void DTraceCompilerTesterCommon2::Kekkonen()
+ {
+ OstTrace0(KEKKONEN,TEXT1," :;ttjffLLGLLLLffjt;,");
+ OstTrace0(KEKKONEN,TEXT2," :;fGWWGWWWWWWWWWWWWGGGGGGLj,.");
+ OstTrace0(KEKKONEN,TEXT3," ;tfGGGGGGGGGWWWWGGGGGGGGGGGLLLLGj;");
+ OstTrace0(KEKKONEN,TEXT4," ifGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLj.");
+ OstTrace0(KEKKONEN,TEXT5," ;fGGGGGGGGGGGGGGGGGGGGGLLLLLLffffffffLffLt,");
+ OstTrace0(KEKKONEN,TEXT6," .iLLLGGGGGGGGGGGGGGGGGGLLLLLfffffffffjfffffjfi:");
+ OstTrace0(KEKKONEN,TEXT7," .fLLLLLGGGGGGGGGGGGGGGGLLLLLLLfffffjjjjjjjjjttjt");
+ OstTrace0(KEKKONEN,TEXT8," .iffLfLGLGGGGGGGGGGGGGGGGGLLLLfffffffjjjjjjjtttii.");
+ OstTrace0(KEKKONEN,TEXT9," .ijfffLLLLLLGGGGGGGGGGGGGGGLLLffLffffffjjjjjttti;;:");
+ OstTrace0(KEKKONEN,TEXT10," ittfffffLLLLGGGGGGGGGGGGGGGLLLLLLLffffjjjjjttttti;:");
+ OstTrace0(KEKKONEN,TEXT11," .iitjffffLLLLLGGGGGGGGGGGGGGGGGLLLffffjjttjjtitttii;:");
+ OstTrace0(KEKKONEN,TEXT12," :ittffLLLLGGGLGGGGGGGGGWGGGGGGGGLLLLffjjttjjtittiiii:");
+ OstTrace0(KEKKONEN,TEXT13," .,tjjffLLLGGGGGGGGGGGGWWWWWGGGGGGGLLLffjjtjfftitttti;:");
+ OstTrace0(KEKKONEN,TEXT14," ,jffjjffLLGGGGGGGGGWWWWGGGWWWWWWWGGLLjjtjffjtttttti;:");
+ OstTrace0(KEKKONEN,TEXT15," .;LLLLLLLLGGGGGGGGGWWWWGGWGGLGGGGWGGLfjjjffjjjjtttii,:.:.");
+ OstTrace0(KEKKONEN,TEXT16," .;fffjjjfLLGGGGGGGGWGGGLfttitLGGGGGGLfjjjjfjjjjjti;,:;fLfi.");
+ OstTrace0(KEKKONEN,TEXT17," .:;;,:...:,;jLLLfi.....:,;;iii:,,::,jjjjfjti;.. .;GGjiiji");
+ OstTrace0(KEKKONEN,TEXT18," . ..:,:::.. ....,;;.:,:. ..... .:;;,..;tt;,. ..:jLtiLfLGi");
+ OstTrace0(KEKKONEN,TEXT19,":: :,,;iii;,::: .::iffjtttjjffffjt;,. ..,;ijffGGLLL;");
+ OstTrace0(KEKKONEN,TEXT20,":: .:;itttjjjjjjj:tGG,:ifGGLLLLLLfffffji: ..::::,tiiLtifGGLi");
+ OstTrace0(KEKKONEN,TEXT21," ....:,;itttjjjjfijDDWGt .iGLLLLfffffffft,.:,,::,jjiiiLGLLGGt.");
+ OstTrace0(KEKKONEN,TEXT22," ,:.:,,,;iittjji;WDDWGG,..fGGGLffffjjjji,,;,:,tjjji;iLjjLGW,");
+ OstTrace0(KEKKONEN,TEXT23," .,,:..:,;iiii:.iDDDWGLft;ifLLLLLffjjji::ii,jjfjjti;iiiLfjj");
+ OstTrace0(KEKKONEN,TEXT24," .:..::::..ifLWDDWGLLLLj;,,;;;iiii;;ttt;;fjfjtiiiijGLjf;");
+ OstTrace0(KEKKONEN,TEXT25," .:;;;;ti;jfLLjt;;ijjLfjjfffffjttti;tjjjjtitiijLfj;");
+ OstTrace0(KEKKONEN,TEXT26," .;tffjjjti::::;tLGGGGWWGLGGGLLLfLLLLfjjjjtti;;jji,");
+ OstTrace0(KEKKONEN,TEXT27," .;i;fjjffLLGGWGWWWWWGGGGWGLLLLLffLLffjttttiii;,...");
+ OstTrace0(KEKKONEN,TEXT28," ,;ijjjjfffLGGLLGGGGGGGGGGLfjLLfffffjjiii;;;,:..:");
+ OstTrace0(KEKKONEN,TEXT29," .iifjttttjfLGGLLLLLLLLffffjtfLffffjjt;;;,;,:..:i");
+ OstTrace0(KEKKONEN,TEXT30," ,iLGi,:,,,;;iiiiiittttiiitjLLffjjjti:::,;,..:ff");
+ OstTrace0(KEKKONEN,TEXT31," .,jLfjtjjfLLGGGGGGGGLLLLfjjfLfjjjti;..;;,:,itG,");
+ OstTrace0(KEKKONEN,TEXT32," ijjjjjjttjjfffLLGGGLLLLfjjfjjjji;:.,;;,;tfW,");
+ OstTrace0(KEKKONEN,TEXT33," :;itjjffffLLGGGGGGGGGGLLLfjfjjj;:.,iiitjGDL");
+ OstTrace0(KEKKONEN,TEXT34," .:;ijjfffLLGGWWWWWWGGGGLLffjjti:..;ttijjEG,");
+ OstTrace0(KEKKONEN,TEXT35," .itjjjfLLLGGGWWWWGGLjji;,,::..:jjitWEj.");
+ OstTrace0(KEKKONEN,TEXT36," :;itjjjjjLLLGGGWGLi;,,::::::;ttiGEKW");
+ OstTrace0(KEKKONEN,TEXT37," ::,,;;iiittjj;,,,,,,;;;ijjjGEKKf:");
+ OstTrace0(KEKKONEN,TEXT38," .: ........::,,;;;ttjjGDKKKEL");
+ OstTrace0(KEKKONEN,TEXT39," ,j. ......:::,,;ttjjWE#KKKE,");
+ OstTrace0(KEKKONEN,TEXT40," ,fj, . ..,,;;iijDK#####f:");
+ OstTrace0(KEKKONEN,TEXT41," tWLf. ..:,,;tfEKKK###Ef");
+ OstTrace0(KEKKONEN,TEXT42," jK##EL; .. :iDKKKKKKK#f:");
+ OstTrace0(KEKKONEN,TEXT43," LK#Effj;;::fDKKKKKKK#D.");
+ OstTrace0(KEKKONEN,TEXT44," EEi. .:EKKKKKKKKL:");
+ OstTrace0(KEKKONEN,TEXT45," :DitD#KKKKKG");
+ OstTrace0(KEKKONEN,TEXT46," ;i: .:,,::::.iK###Ki.");
+ OstTrace0(KEKKONEN,TEXT47," .iWD .:::::,,:fE#Dt");
+ OstTrace0(KEKKONEN,TEXT48," ,L#D:ijttiiii;, :j:");
+ OstTrace0(KEKKONEN,TEXT49," jK# ...::,,. .");
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/traces/trace.properties Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<trace_properties>
+<enum name="TErrorCodes">
+<value id="-2">KErrGeneral</value>
+<value id="1">ValueOne</value>
+</enum>
+<file>../inl/BigNumbers.inl</file>
+</trace_properties>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompilerTester/traces_TraceCompilerTesterAdvanced/trace.properties Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<trace_properties>
+<file>../inc/TraceCompilerTesterAdvanced.inl</file>
+<file>../inc/TraceCompilerTesterAdvanced.h</file>
+<file>../inl/BigNumbers.inl</file>
+<enum name="MyEnum">
+<value id="1">ValueOne</value>
+</enum>
+<enum name="x1">
+<value id="1">EVal</value>
+<value id="2">EVal2</value>
+</enum>
+<enum name="EnergyMonitor"/>
+</trace_properties>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_Test.py Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,236 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#!/user/bin/python
+import os
+import sys
+import shutil
+import glob
+import stat
+
+print "TraceCompiler Test Bench version 1.1\n"
+
+# List of files to be generated. NOTE! Files must be in same order than reference files
+generated_files = []
+# TraceCompilerTester
+generated_files.append(r".\TraceCompilerTester\traces\BigNumbersTraces.h")
+generated_files.append(r".\TraceCompilerTester\traces\fixed_id.definitions")
+generated_files.append(r".\TraceCompilerTester\traces\TraceCompilerTesterBasicTraces.h")
+generated_files.append(r".\TraceCompilerTester\traces\TraceCompilerTesterCommon1Traces.h")
+generated_files.append(r".\TraceCompilerTester\traces\TraceCompilerTesterCommon2Traces.h")
+generated_files.append(r".\TraceCompilerTester\traces_TraceCompilerTesterAdvanced\BigNumbersTraces.h")
+generated_files.append(r".\TraceCompilerTester\traces_TraceCompilerTesterAdvanced\fixed_id.definitions")
+generated_files.append(r".\TraceCompilerTester\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterAdvancedTraces.h")
+generated_files.append(r".\TraceCompilerTester\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterCommon1Traces.h")
+generated_files.append(r".\TraceCompilerTester\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterCommon2Traces.h")
+generated_files.append(r".\epoc32\ost_dictionaries\TraceCompilerTesterAdvanced_0x20011111_Dictionary.xml")
+generated_files.append(r".\epoc32\ost_dictionaries\TraceCompilerTesterBasic_0x20011112_Dictionary.xml")
+generated_files.append(r".\epoc32\include\platform\symbiantraces\autogen\TraceCompilerTesterAdvanced_0x20011111_TraceDefinitions.h")
+generated_files.append(r".\epoc32\include\platform\symbiantraces\autogen\TraceCompilerTesterBasic_0x20011112_TraceDefinitions.h")
+# HelloWorld
+generated_files.append(r".\HelloWorld\traces\fixed_id.definitions")
+generated_files.append(r".\HelloWorld\traces\HelloWorldTraces.h")
+generated_files.append(r".\epoc32\ost_dictionaries\HelloWorld_0xe9fbe6ee_Dictionary.xml")
+generated_files.append(r".\epoc32\include\platform\symbiantraces\autogen\HelloWorld_0xe9fbe6ee_TraceDefinitions.h")
+
+# List of reference files. NOTE! Files must be in same order than generated files
+reference_files = []
+# TraceCompilerTester
+reference_files.append(r".\TraceCompiler_reference_files\traces\BigNumbersTraces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces\fixed_id.definitions")
+reference_files.append(r".\TraceCompiler_reference_files\traces\TraceCompilerTesterBasicTraces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces\TraceCompilerTesterCommon1Traces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces\TraceCompilerTesterCommon2Traces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces_TraceCompilerTesterAdvanced\BigNumbersTraces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces_TraceCompilerTesterAdvanced\fixed_id.definitions")
+reference_files.append(r".\TraceCompiler_reference_files\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterAdvancedTraces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterCommon1Traces.h")
+reference_files.append(r".\TraceCompiler_reference_files\traces_TraceCompilerTesterAdvanced\TraceCompilerTesterCommon2Traces.h")
+reference_files.append(r".\TraceCompiler_reference_files\TraceCompilerTesterAdvanced_0x20011111_Dictionary.xml")
+reference_files.append(r".\TraceCompiler_reference_files\TraceCompilerTesterBasic_0x20011112_Dictionary.xml")
+reference_files.append(r".\TraceCompiler_reference_files\TraceCompilerTesterAdvanced_0x20011111_TraceDefinitions.h")
+reference_files.append(r".\TraceCompiler_reference_files\TraceCompilerTesterBasic_0x20011112_TraceDefinitions.h")
+# HelloWorld
+reference_files.append(r".\HelloWorld_reference_files\traces\fixed_id.definitions")
+reference_files.append(r".\HelloWorld_reference_files\traces\HelloWorldTraces.h")
+reference_files.append(r".\HelloWorld_reference_files\HelloWorld_0xe9fbe6ee_Dictionary.xml")
+reference_files.append(r".\HelloWorld_reference_files\HelloWorld_0xe9fbe6ee_TraceDefinitions.h")
+
+# Name of report file that include differences between generated files and reference files.
+report_file_name = "diff.txt"
+
+def print_instructions():
+ print "Common usage : TraceCompiler_Test.py <drive> <location_of_TraceCompiler>"
+ print " where <drive> is a letter of virtual drive which you want to assign"
+ print " a path of the TraceCompiler Test Bench."
+ print " where <location_of_TraceCompiler> is a location of the TraceCompiler"
+ print " that wanted to be test. Location should be the location of"
+ print " ""tracecompiler"" folder."
+ print "\nExamples:";
+ print " TraceCompiler_Test.py W: .";
+ print " The TraceCompiler Test Bench uses W:\\ as virtual drive and tests"
+ print " the TraceCompiler that has been copied to root of the test bench.";
+ print " TraceCompiler_Test.py Y X:\\epoc32\\tools";
+ print " The TraceCompiler Test Bench uses Y:\\ as virtual drive and tests"
+ print " the TraceCompiler that can be found from X:\\epoc32\\tools folder.";
+
+try:
+ # Get drive name from command line arguments
+ drive = sys.argv[1]
+
+ # Check that drive name is in valid format
+ if drive[0].isalpha() == False or len(drive) > 2 or (len(drive) == 2 and drive[1] != ":") :
+ raise TypeError
+ elif len(drive) < 2 :
+ drive += ":"
+
+ # Get location of the TraceCompiler to be tested from command line arguments
+ location_of_tracecompiler = sys.argv[2]
+
+ # Check if location of the TraceCompiler path valid
+ tracecompiler_script = os.path.join(location_of_tracecompiler, r"tracecompiler.pl")
+ if not os.path.exists(tracecompiler_script) :
+ print "Error: TraceCompiler that should be tested does not exist in defined location"
+ sys.exit()
+
+except (IndexError, TypeError) :
+ print_instructions()
+ sys.exit()
+
+# Subst TraceCompiler Test Bench as specific drive
+print "##### Subst " + drive + " drive #####"
+os.system("subst " + drive + " .")
+
+# Go to substed drive
+os.chdir(drive)
+
+# Verify that substed drive includes TraceCompiler Test Bench. Check is needed in case that
+# drive was already substed.
+filename = os.path.join(drive, r"\TraceCompiler_Test.py")
+if not os.path.exists(filename) :
+ print "\nError: Substed drive does not include TraceCompiler test Bench"
+ sys.exit()
+
+# Path to folder where TraceCompiler under test will be copied
+tracecompiler_under_test_path = os.path.abspath(r"\TraceCompiler_under_test")
+
+# Remove old TraceCompiler under test if that exist
+shutil.rmtree(tracecompiler_under_test_path, True)
+
+# Copy TraceCompiler that should be tested to TraceCompiler Test Bench
+os.mkdir(tracecompiler_under_test_path)
+shutil.copy(tracecompiler_script, os.path.abspath(r"\TraceCompiler_under_test\tracecompiler.pl"))
+shutil.copy(os.path.join(location_of_tracecompiler, r"tracecompiler.pm"),
+ os.path.abspath(r"\TraceCompiler_under_test\tracecompiler.pm"))
+shutil.copy(os.path.join(location_of_tracecompiler, r"tracecompiler_parse_mmp.pl"),
+ os.path.abspath(r"\TraceCompiler_under_test\tracecompiler_parse_mmp.pl"))
+shutil.copytree(os.path.join(location_of_tracecompiler, r"tracecompiler"),
+ os.path.abspath(r"\TraceCompiler_under_test\tracecompiler"))
+
+# Just in case remove all read-only attributes
+for root, dirs, files in os.walk(tracecompiler_under_test_path, topdown=False):
+ for fileName in files:
+ os.chmod (os.path.join(root, fileName), stat.S_IWRITE)
+ for dirName in dirs:
+ os.chmod (os.path.join(root, dirName), stat.S_IWRITE)
+
+# Delete generated files
+print "\n##### Delete all generated files #####"
+for generated_file in generated_files :
+ try :
+ os.remove(generated_file)
+ except :
+ pass
+
+# Delete diff.txt
+try :
+ os.remove(report_file_name)
+except :
+ pass
+
+# Run TraceCompiler to TraceCompilerTesterBasic component
+print "\n##### Run TraceCompiler to TraceCompilerTesterBasic component #####"
+os.chdir("TraceCompilerTester\group")
+os.system(r"java -classpath ../../TraceCompiler_under_test/tracecompiler com.nokia.tracecompiler.TraceCompiler 20011112 TraceCompilerTesterBasic ../../TraceCompilerTester/group/TraceCompilerTesterBasic.mmp ../../TraceCompilerTester/src/TraceCompilerTesterBasic.cpp ../../TraceCompilerTester/src/TraceCompilerTesterCommon1.cpp ../../TraceCompilerTester/src/TraceCompilerTesterCommon2.cpp")
+os.chdir("..\..")
+
+# Run TraceCompiler to TraceCompilerTesterAdvanced component
+print "\n##### Run TraceCompiler to TraceCompilerTesterAdvanced component #####"
+os.chdir("TraceCompilerTester\group")
+os.system(r"java -classpath ../../TraceCompiler_under_test/tracecompiler com.nokia.tracecompiler.TraceCompiler 20011111 TraceCompilerTesterAdvanced ../../TraceCompilerTester/group/TraceCompilerTesterAdvanced.mmp ../../TraceCompilerTester/src/TraceCompilerTesterAdvanced.cpp ../../TraceCompilerTester/src/TraceCompilerTesterCommon1.cpp ../../TraceCompilerTester/src/TraceCompilerTesterCommon2.cpp")
+os.chdir("..\..")
+
+# Run TraceCompiler to HelloWorld component
+print "\n##### Run TraceCompiler to HelloWorld component #####"
+os.chdir("HelloWorld\group")
+os.system(r"java -classpath ../../TraceCompiler_under_test/tracecompiler com.nokia.tracecompiler.TraceCompiler E9FBE6EE HelloWorld ../../HelloWorld/group/HelloWorld.mmp ../../HelloWorld/src/HelloWorld.cpp")
+os.chdir("..\..")
+
+# Compare generated files to reference files
+print "\n##### Compare generated files to reference files #####"
+changed_files = []
+changes = []
+file_index = 0
+for generated_file in generated_files :
+ gfile = open(generated_file, "r")
+ rfile = open(reference_files[file_index], "r")
+ filename_added = False
+
+ for gline in gfile :
+ rline = rfile.readline()
+ if gline != rline :
+ if not "// Created by TraceCompiler" in gline :
+ valid = True
+
+ # In case of dictionary file ignore differences in drive letters
+ if generated_file.endswith(".xml") and "<path val=" in gline :
+ if gline[gline.find(r"/"):] == rline[rline.find(r"/"):] :
+ valid = False
+
+ if valid :
+ if not filename_added :
+ changed_files.append(generated_file)
+ changes.append(50 * "-")
+ changes.append("\n")
+ changes.append(generated_file)
+ changes.append("\n\n")
+ filename_added = True
+ changes.append(gline)
+ changes.append(" <---> ")
+ changes.append("\n")
+ changes.append(rline)
+ changes.append("\n")
+
+ file_index+=1
+
+# Print results
+print "\n##### TEST RESULTS #####"
+if len(changed_files) == 0 :
+ print "\nNO DIFFERENCES\n"
+else :
+ print "\a"
+ print "DIFFERENCES TO REFERENCE FILES NOTICED!\n"
+
+ # Write changes to diff.txt
+ report = open(report_file_name, "w")
+ report.writelines(changes)
+
+ print "There are differences in following files:"
+ for changed_file in changed_files :
+ print changed_file
+ print "\nFor more information, please see the diff.txt."
+ print "\nNOTE: If differences are ok, remember to update reference files."
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/TraceCompilerTesterAdvanced_0x20011111_Dictionary.xml Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tracedictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DictionarySchema.xsd">
+ <typedefs>
+ <object type="int32" size="4" formatchar="d" classification="integer"/>
+ <object type="int32" size="4" formatchar="ld" classification="integer"/>
+ <object type="uint8" size="1" formatchar="hhu" classification="integer"/>
+ <object type="hex8" size="1" formatchar="hhx" classification="hex"/>
+ <object type="HEX8" size="1" formatchar="hhX" classification="hex"/>
+ <object type="hex32" size="4" formatchar="x" classification="hex"/>
+ <object type="hex32" size="4" formatchar="lx" classification="hex"/>
+ <object type="HEX32" size="4" formatchar="lX" classification="hex"/>
+ <object type="HEX32" size="4" formatchar="X" classification="hex"/>
+ <object type="void*" size="4" formatchar="p" classification="hex"/>
+ <object type="void*" size="4" formatchar="lp" classification="hex"/>
+ <object type="ascii" size="1" formatchar="s" classification="string"/>
+ <object type="ascii" size="1" formatchar="ls" classification="string"/>
+ </typedefs>
+ <data>
+ <def id="1" type="string">Hello world!</def>
+ <def id="2" type="string">Inline function GetBigValue1000 return value: %d</def>
+ <def id="3" type="string">Inline function GetBigValue1000 return value: %d</def>
+ <def id="4" type="string">Hello moon!</def>
+ <def id="5" type="string">Test OLD TraceCompiler</def>
+ <def id="6" type="string">> DTraceCompilerTesterCommon1::SumValues;aValue1=%d;aValue2=%d;aValue3=%hhu;aValue4=%hhu;Filler=%hhx;Filler=%hhx;this=%x</def>
+ <def id="7" type="string">< DTraceCompilerTesterCommon1::SumValues;this=%x;retVal=%d</def>
+ <def id="8" type="string">Print out pointer values of two NTimers;myNTimer1=%p;myNTimer2=%p</def>
+ <def id="9" type="string">Print out pointer values of one const NTimers;myNTimer3=%p</def>
+ <def id="10" type="string">Ascii60: %s</def>
+ <def id="11" type="string">Ascii300: %s</def>
+ <def id="12" type="string">Ascii512: %s</def>
+ <def id="13" type="string">Ascii600: %s</def>
+ <def id="14" type="string">Ascii300: %s Ascii512: %s</def>
+ <def id="15" type="string">Ascii600: %s Ascii300: %s</def>
+ <def id="16" type="string">Ascii333: %s Ascii333: %s</def>
+ <def id="17" type="string">Ascii1: %s</def>
+ <def id="18" type="string">Ascii2: %s</def>
+ <def id="19" type="string">Ascii3: %s</def>
+ <def id="20" type="string">Ascii4: %s</def>
+ <def id="21" type="string">Ascii1: %s Ascii2: %s</def>
+ <def id="22" type="string">Machine=%s;State=%s</def>
+ <def id="23" type="string">Machine=%s;State=%s;Instance=0x%x</def>
+ <def id="24" type="string">DTraceCoreXtiIf::DebugPrintMsg - Msg via XTI IF 0x%{hex8[]}</def>
+ <def id="25" type="string">Print some POST code traces</def>
+ <def id="26" type="string"> :;ttjffLLGLLLLffjt;,</def>
+ <def id="27" type="string"> :;fGWWGWWWWWWWWWWWWGGGGGGLj,.</def>
+ <def id="28" type="string"> ;tfGGGGGGGGGWWWWGGGGGGGGGGGLLLLGj;</def>
+ <def id="29" type="string"> ifGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLj.</def>
+ <def id="30" type="string"> ;fGGGGGGGGGGGGGGGGGGGGGLLLLLLffffffffLffLt,</def>
+ <def id="31" type="string"> .iLLLGGGGGGGGGGGGGGGGGGLLLLLfffffffffjfffffjfi:</def>
+ <def id="32" type="string"> .fLLLLLGGGGGGGGGGGGGGGGLLLLLLLfffffjjjjjjjjjttjt</def>
+ <def id="33" type="string"> .iffLfLGLGGGGGGGGGGGGGGGGGLLLLfffffffjjjjjjjtttii.</def>
+ <def id="34" type="string"> .ijfffLLLLLLGGGGGGGGGGGGGGGLLLffLffffffjjjjjttti;;:</def>
+ <def id="35" type="string"> ittfffffLLLLGGGGGGGGGGGGGGGLLLLLLLffffjjjjjttttti;:</def>
+ <def id="36" type="string"> .iitjffffLLLLLGGGGGGGGGGGGGGGGGLLLffffjjttjjtitttii;:</def>
+ <def id="37" type="string"> :ittffLLLLGGGLGGGGGGGGGWGGGGGGGGLLLLffjjttjjtittiiii:</def>
+ <def id="38" type="string"> .,tjjffLLLGGGGGGGGGGGGWWWWWGGGGGGGLLLffjjtjfftitttti;:</def>
+ <def id="39" type="string"> ,jffjjffLLGGGGGGGGGWWWWGGGWWWWWWWGGLLjjtjffjtttttti;:</def>
+ <def id="40" type="string"> .;LLLLLLLLGGGGGGGGGWWWWGGWGGLGGGGWGGLfjjjffjjjjtttii,:.:.</def>
+ <def id="41" type="string"> .;fffjjjfLLGGGGGGGGWGGGLfttitLGGGGGGLfjjjjfjjjjjti;,:;fLfi.</def>
+ <def id="42" type="string"> .:;;,:...:,;jLLLfi.....:,;;iii:,,::,jjjjfjti;.. .;GGjiiji</def>
+ <def id="43" type="string"> . ..:,:::.. ....,;;.:,:. ..... .:;;,..;tt;,. ..:jLtiLfLGi</def>
+ <def id="44" type="string">:: :,,;iii;,::: .::iffjtttjjffffjt;,. ..,;ijffGGLLL;</def>
+ <def id="45" type="string">:: .:;itttjjjjjjj:tGG,:ifGGLLLLLLfffffji: ..::::,tiiLtifGGLi</def>
+ <def id="46" type="string"> ....:,;itttjjjjfijDDWGt .iGLLLLfffffffft,.:,,::,jjiiiLGLLGGt.</def>
+ <def id="47" type="string"> ,:.:,,,;iittjji;WDDWGG,..fGGGLffffjjjji,,;,:,tjjji;iLjjLGW,</def>
+ <def id="48" type="string"> .,,:..:,;iiii:.iDDDWGLft;ifLLLLLffjjji::ii,jjfjjti;iiiLfjj</def>
+ <def id="49" type="string"> .:..::::..ifLWDDWGLLLLj;,,;;;iiii;;ttt;;fjfjtiiiijGLjf;</def>
+ <def id="50" type="string"> .:;;;;ti;jfLLjt;;ijjLfjjfffffjttti;tjjjjtitiijLfj;</def>
+ <def id="51" type="string"> .;tffjjjti::::;tLGGGGWWGLGGGLLLfLLLLfjjjjtti;;jji,</def>
+ <def id="52" type="string"> .;i;fjjffLLGGWGWWWWWGGGGWGLLLLLffLLffjttttiii;,...</def>
+ <def id="53" type="string"> ,;ijjjjfffLGGLLGGGGGGGGGGLfjLLfffffjjiii;;;,:..:</def>
+ <def id="54" type="string"> .iifjttttjfLGGLLLLLLLLffffjtfLffffjjt;;;,;,:..:i</def>
+ <def id="55" type="string"> ,iLGi,:,,,;;iiiiiittttiiitjLLffjjjti:::,;,..:ff</def>
+ <def id="56" type="string"> .,jLfjtjjfLLGGGGGGGGLLLLfjjfLfjjjti;..;;,:,itG,</def>
+ <def id="57" type="string"> ijjjjjjttjjfffLLGGGLLLLfjjfjjjji;:.,;;,;tfW,</def>
+ <def id="58" type="string"> :;itjjffffLLGGGGGGGGGGLLLfjfjjj;:.,iiitjGDL</def>
+ <def id="59" type="string"> .:;ijjfffLLGGWWWWWWGGGGLLffjjti:..;ttijjEG,</def>
+ <def id="60" type="string"> .itjjjfLLLGGGWWWWGGLjji;,,::..:jjitWEj.</def>
+ <def id="61" type="string"> :;itjjjjjLLLGGGWGLi;,,::::::;ttiGEKW</def>
+ <def id="62" type="string"> ::,,;;iiittjj;,,,,,,;;;ijjjGEKKf:</def>
+ <def id="63" type="string"> .: ........::,,;;;ttjjGDKKKEL</def>
+ <def id="64" type="string"> ,j. ......:::,,;ttjjWE#KKKE,</def>
+ <def id="65" type="string"> ,fj, . ..,,;;iijDK#####f:</def>
+ <def id="66" type="string"> tWLf. ..:,,;tfEKKK###Ef</def>
+ <def id="67" type="string"> jK##EL; .. :iDKKKKKKK#f:</def>
+ <def id="68" type="string"> LK#Effj;;::fDKKKKKKK#D.</def>
+ <def id="69" type="string"> EEi. .:EKKKKKKKKL:</def>
+ <def id="70" type="string"> :DitD#KKKKKG</def>
+ <def id="71" type="string"> ;i: .:,,::::.iK###Ki.</def>
+ <def id="72" type="string"> .iWD .:::::,,:fE#Dt</def>
+ <def id="73" type="string"> ,L#D:ijttiiii;, :j:</def>
+ <def id="74" type="string"> jK# ...::,,. .</def>
+ </data>
+ <locations>
+ <path val="../../TraceCompilerTester/src/">
+ <file id="1">TraceCompilerTesterAdvanced.cpp</file>
+ <file id="2">TraceCompilerTesterCommon1.cpp</file>
+ <file id="3">TraceCompilerTesterCommon2.cpp</file>
+ </path>
+ <path val="W:/TraceCompilerTester/inc/">
+ <file id="4">TraceCompilerTesterAdvanced.h</file>
+ <file id="5">TraceCompilerTesterAdvanced.inl</file>
+ </path>
+ <path val="W:/TraceCompilerTester/inl/">
+ <file id="6">BigNumbers.inl</file>
+ </path>
+ </locations>
+ <component id="536940817" name="TraceCompilerTesterAdvanced" prefix="TraceCompilerTesterAdvanced: " suffix="">
+ <group id="222" name="INCLUDED_NON_SOURCE_FILE_TEST" prefix="INCLUDED_NON_SOURCE_FILE_TEST: " suffix="">
+ <trace data-ref="1" name="HELLO_WORLD">
+ <instance id="1" loc-ref="5" line="11" methodname="HelloWorld" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="2" name="NON_SOURCE_FILE_TRACE1">
+ <instance id="2" loc-ref="6" line="12" methodname="GetBigValue1000"/>
+ </trace>
+ <trace data-ref="3" name="NON_SOURCE_FILE_TRACE2">
+ <instance id="3" loc-ref="6" line="19" methodname="GetBigValue2000"/>
+ </trace>
+ </group>
+ <group id="138" name="TRACE_FLOW" prefix="Flow: " suffix="">
+ <trace data-ref="4" name="HELLO_MOON">
+ <instance id="1" loc-ref="4" line="36" methodname="NONSHARABLE_CLASS"/>
+ </trace>
+ <trace data-ref="5" name="TEST_TRACE_2">
+ <instance id="2" loc-ref="1" line="268" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="6" name="DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY">
+ <instance id="3" loc-ref="2" line="38" methodname="SumValues" classname="DTraceCompilerTesterCommon1"/>
+ </trace>
+ <trace data-ref="7" name="DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT">
+ <instance id="4" loc-ref="2" line="40" methodname="SumValues" classname="DTraceCompilerTesterCommon1"/>
+ </trace>
+ </group>
+ <group id="223" name="POINTER_PARAMETER_TEST" prefix="POINTER_PARAMETER_TEST: " suffix="">
+ <trace data-ref="8" name="POINTER_PARAMETER_TRACE1">
+ <instance id="1" loc-ref="1" line="106" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="9" name="POINTER_PARAMETER_TRACE2">
+ <instance id="2" loc-ref="1" line="107" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="224" name="LONG_TRACE_TEST" prefix="LONG_TRACE_TEST: " suffix="">
+ <trace data-ref="10" name="ASCII60">
+ <instance id="1" loc-ref="1" line="138" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="11" name="ASCII300">
+ <instance id="2" loc-ref="1" line="151" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="12" name="ASCII512">
+ <instance id="3" loc-ref="1" line="164" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="13" name="ASCII600">
+ <instance id="4" loc-ref="1" line="177" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="14" name="ASCII300_ASCII512">
+ <instance id="5" loc-ref="1" line="190" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="15" name="ASCII600_ASCII300">
+ <instance id="6" loc-ref="1" line="203" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="16" name="ASCII333_ASCII333">
+ <instance id="7" loc-ref="1" line="216" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="225" name="SHORT_TRACE_TEST" prefix="SHORT_TRACE_TEST: " suffix="">
+ <trace data-ref="17" name="ASCII1">
+ <instance id="1" loc-ref="1" line="240" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="18" name="ASCII2">
+ <instance id="2" loc-ref="1" line="242" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="19" name="ASCII3">
+ <instance id="3" loc-ref="1" line="244" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="20" name="ASCII4">
+ <instance id="4" loc-ref="1" line="246" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="21" name="ASCII5">
+ <instance id="5" loc-ref="1" line="248" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="135" name="TRACE_STATE" prefix="State: " suffix="">
+ <trace data-ref="22" name="STATE_TRACE_0">
+ <instance id="1" loc-ref="1" line="287" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ <trace data-ref="23" name="STATE_TRACE_1">
+ <instance id="2" loc-ref="1" line="288" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="226" name="TRACE_DATA" prefix="Data: " suffix="">
+ <trace data-ref="24" name="TRACE_DATA_TRACE">
+ <instance id="1" loc-ref="1" line="296" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="227" name="POST_CODE_TEST" prefix="POST_CODE_TEST: " suffix="">
+ <trace data-ref="25" name="POST1">
+ <instance id="1" loc-ref="1" line="303" methodname="TraceActivated" classname="DTraceCompilerTesterAdvanced"/>
+ </trace>
+ </group>
+ <group id="228" name="KEKKONEN" prefix="KEKKONEN: " suffix="">
+ <trace data-ref="26" name="TEXT1">
+ <instance id="1" loc-ref="3" line="32" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="27" name="TEXT2">
+ <instance id="2" loc-ref="3" line="33" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="28" name="TEXT3">
+ <instance id="3" loc-ref="3" line="34" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="29" name="TEXT4">
+ <instance id="4" loc-ref="3" line="35" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="30" name="TEXT5">
+ <instance id="5" loc-ref="3" line="36" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="31" name="TEXT6">
+ <instance id="6" loc-ref="3" line="37" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="32" name="TEXT7">
+ <instance id="7" loc-ref="3" line="38" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="33" name="TEXT8">
+ <instance id="8" loc-ref="3" line="39" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="34" name="TEXT9">
+ <instance id="9" loc-ref="3" line="40" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="35" name="TEXT10">
+ <instance id="10" loc-ref="3" line="41" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="36" name="TEXT11">
+ <instance id="11" loc-ref="3" line="42" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="37" name="TEXT12">
+ <instance id="12" loc-ref="3" line="43" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="38" name="TEXT13">
+ <instance id="13" loc-ref="3" line="44" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="39" name="TEXT14">
+ <instance id="14" loc-ref="3" line="45" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="40" name="TEXT15">
+ <instance id="15" loc-ref="3" line="46" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="41" name="TEXT16">
+ <instance id="16" loc-ref="3" line="47" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="42" name="TEXT17">
+ <instance id="17" loc-ref="3" line="48" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="43" name="TEXT18">
+ <instance id="18" loc-ref="3" line="49" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="44" name="TEXT19">
+ <instance id="19" loc-ref="3" line="50" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="45" name="TEXT20">
+ <instance id="20" loc-ref="3" line="51" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="46" name="TEXT21">
+ <instance id="21" loc-ref="3" line="52" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="47" name="TEXT22">
+ <instance id="22" loc-ref="3" line="53" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="48" name="TEXT23">
+ <instance id="23" loc-ref="3" line="54" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="49" name="TEXT24">
+ <instance id="24" loc-ref="3" line="55" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="50" name="TEXT25">
+ <instance id="25" loc-ref="3" line="56" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="51" name="TEXT26">
+ <instance id="26" loc-ref="3" line="57" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="52" name="TEXT27">
+ <instance id="27" loc-ref="3" line="58" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="53" name="TEXT28">
+ <instance id="28" loc-ref="3" line="59" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="54" name="TEXT29">
+ <instance id="29" loc-ref="3" line="60" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="55" name="TEXT30">
+ <instance id="30" loc-ref="3" line="61" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="56" name="TEXT31">
+ <instance id="31" loc-ref="3" line="62" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="57" name="TEXT32">
+ <instance id="32" loc-ref="3" line="63" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="58" name="TEXT33">
+ <instance id="33" loc-ref="3" line="64" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="59" name="TEXT34">
+ <instance id="34" loc-ref="3" line="65" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="60" name="TEXT35">
+ <instance id="35" loc-ref="3" line="66" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="61" name="TEXT36">
+ <instance id="36" loc-ref="3" line="67" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="62" name="TEXT37">
+ <instance id="37" loc-ref="3" line="68" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="63" name="TEXT38">
+ <instance id="38" loc-ref="3" line="69" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="64" name="TEXT39">
+ <instance id="39" loc-ref="3" line="70" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="65" name="TEXT40">
+ <instance id="40" loc-ref="3" line="71" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="66" name="TEXT41">
+ <instance id="41" loc-ref="3" line="72" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="67" name="TEXT42">
+ <instance id="42" loc-ref="3" line="73" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="68" name="TEXT43">
+ <instance id="43" loc-ref="3" line="74" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="69" name="TEXT44">
+ <instance id="44" loc-ref="3" line="75" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="70" name="TEXT45">
+ <instance id="45" loc-ref="3" line="76" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="71" name="TEXT46">
+ <instance id="46" loc-ref="3" line="77" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="72" name="TEXT47">
+ <instance id="47" loc-ref="3" line="78" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="73" name="TEXT48">
+ <instance id="48" loc-ref="3" line="79" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="74" name="TEXT49">
+ <instance id="49" loc-ref="3" line="80" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ </group>
+ </component>
+</tracedictionary>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/TraceCompilerTesterAdvanced_0x20011111_TraceDefinitions.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,647 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERADVANCED_20011111_TRACEDEFINITIONS_H__
+#define __TRACECOMPILERTESTERADVANCED_20011111_TRACEDEFINITIONS_H__
+
+#define AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#undef TRACECOMPILERTESTERADVANCED_COMPONENT
+#define TRACECOMPILERTESTERADVANCED_COMPONENT 0x20011111
+#undef INCLUDED_NON_SOURCE_FILE_TEST
+#define INCLUDED_NON_SOURCE_FILE_TEST 0xde
+#undef HELLO_WORLD
+#define HELLO_WORLD 0x1
+#undef NON_SOURCE_FILE_TRACE1
+#define NON_SOURCE_FILE_TRACE1 0x2
+#undef NON_SOURCE_FILE_TRACE2
+#define NON_SOURCE_FILE_TRACE2 0x3
+#undef TRACE_FLOW
+#define TRACE_FLOW 0x8a
+#undef HELLO_MOON
+#define HELLO_MOON 0x1
+#undef TEST_TRACE_2
+#define TEST_TRACE_2 0x2
+#undef DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY 0x3
+#undef DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT 0x4
+#undef POINTER_PARAMETER_TEST
+#define POINTER_PARAMETER_TEST 0xdf
+#undef POINTER_PARAMETER_TRACE1
+#define POINTER_PARAMETER_TRACE1 0x1
+#undef POINTER_PARAMETER_TRACE2
+#define POINTER_PARAMETER_TRACE2 0x2
+#undef LONG_TRACE_TEST
+#define LONG_TRACE_TEST 0xe0
+#undef ASCII60
+#define ASCII60 0x1
+#undef ASCII300
+#define ASCII300 0x2
+#undef ASCII512
+#define ASCII512 0x3
+#undef ASCII600
+#define ASCII600 0x4
+#undef ASCII300_ASCII512
+#define ASCII300_ASCII512 0x5
+#undef ASCII600_ASCII300
+#define ASCII600_ASCII300 0x6
+#undef ASCII333_ASCII333
+#define ASCII333_ASCII333 0x7
+#undef SHORT_TRACE_TEST
+#define SHORT_TRACE_TEST 0xe1
+#undef ASCII1
+#define ASCII1 0x1
+#undef ASCII2
+#define ASCII2 0x2
+#undef ASCII3
+#define ASCII3 0x3
+#undef ASCII4
+#define ASCII4 0x4
+#undef ASCII5
+#define ASCII5 0x5
+#undef TRACE_STATE
+#define TRACE_STATE 0x87
+#undef STATE_TRACE_0
+#define STATE_TRACE_0 0x1
+#undef STATE_TRACE_1
+#define STATE_TRACE_1 0x2
+#undef TRACE_DATA
+#define TRACE_DATA 0xe2
+#undef TRACE_DATA_TRACE
+#define TRACE_DATA_TRACE 0x1
+#undef POST_CODE_TEST
+#define POST_CODE_TEST 0xe3
+#undef POST1
+#define POST1 0x1
+#undef KEKKONEN
+#define KEKKONEN 0xe4
+#undef TEXT1
+#define TEXT1 0x1
+#undef TEXT2
+#define TEXT2 0x2
+#undef TEXT3
+#define TEXT3 0x3
+#undef TEXT4
+#define TEXT4 0x4
+#undef TEXT5
+#define TEXT5 0x5
+#undef TEXT6
+#define TEXT6 0x6
+#undef TEXT7
+#define TEXT7 0x7
+#undef TEXT8
+#define TEXT8 0x8
+#undef TEXT9
+#define TEXT9 0x9
+#undef TEXT10
+#define TEXT10 0xa
+#undef TEXT11
+#define TEXT11 0xb
+#undef TEXT12
+#define TEXT12 0xc
+#undef TEXT13
+#define TEXT13 0xd
+#undef TEXT14
+#define TEXT14 0xe
+#undef TEXT15
+#define TEXT15 0xf
+#undef TEXT16
+#define TEXT16 0x10
+#undef TEXT17
+#define TEXT17 0x11
+#undef TEXT18
+#define TEXT18 0x12
+#undef TEXT19
+#define TEXT19 0x13
+#undef TEXT20
+#define TEXT20 0x14
+#undef TEXT21
+#define TEXT21 0x15
+#undef TEXT22
+#define TEXT22 0x16
+#undef TEXT23
+#define TEXT23 0x17
+#undef TEXT24
+#define TEXT24 0x18
+#undef TEXT25
+#define TEXT25 0x19
+#undef TEXT26
+#define TEXT26 0x1a
+#undef TEXT27
+#define TEXT27 0x1b
+#undef TEXT28
+#define TEXT28 0x1c
+#undef TEXT29
+#define TEXT29 0x1d
+#undef TEXT30
+#define TEXT30 0x1e
+#undef TEXT31
+#define TEXT31 0x1f
+#undef TEXT32
+#define TEXT32 0x20
+#undef TEXT33
+#define TEXT33 0x21
+#undef TEXT34
+#define TEXT34 0x22
+#undef TEXT35
+#define TEXT35 0x23
+#undef TEXT36
+#define TEXT36 0x24
+#undef TEXT37
+#define TEXT37 0x25
+#undef TEXT38
+#define TEXT38 0x26
+#undef TEXT39
+#define TEXT39 0x27
+#undef TEXT40
+#define TEXT40 0x28
+#undef TEXT41
+#define TEXT41 0x29
+#undef TEXT42
+#define TEXT42 0x2a
+#undef TEXT43
+#define TEXT43 0x2b
+#undef TEXT44
+#define TEXT44 0x2c
+#undef TEXT45
+#define TEXT45 0x2d
+#undef TEXT46
+#define TEXT46 0x2e
+#undef TEXT47
+#define TEXT47 0x2f
+#undef TEXT48
+#define TEXT48 0x30
+#undef TEXT49
+#define TEXT49 0x31
+
+RES_BEGIN( RESOURCE_TRC_SYMBIAN, TRACECOMPILERTESTERADVANCED_COMPONENT, TRACECOMPILERTESTERADVANCED_TRACE, "TRACECOMPILERTESTERADVANCED", "", FALSE )
+
+ #include <SharedTraceDefinitions.h>
+
+ CONST_TBL_BEGIN( MyEnum, 32, SYMBIAN_ENDIANESS, "", "" )
+ CONST_TBL_ENTRY( ValueOne, 1, "" )
+ CONST_TBL_END
+ SEQ_BEGIN( MyEnum_Seq, DONT_CREATE_STRUCT, "", "" )
+ VALUE_CONST( data, "data", MyEnum )
+ SEQ_END
+
+ CONST_TBL_BEGIN( x1, 32, SYMBIAN_ENDIANESS, "", "" )
+ CONST_TBL_ENTRY( EVal, 1, "" )
+ CONST_TBL_ENTRY( EVal2, 2, "" )
+ CONST_TBL_END
+ SEQ_BEGIN( x1_Seq, DONT_CREATE_STRUCT, "", "" )
+ VALUE_CONST( data, "data", x1 )
+ SEQ_END
+
+ CONST_TBL_BEGIN( EnergyMonitor, 32, SYMBIAN_ENDIANESS, "", "" )
+ CONST_TBL_END
+ SEQ_BEGIN( EnergyMonitor_Seq, DONT_CREATE_STRUCT, "", "" )
+ VALUE_CONST( data, "data", EnergyMonitor )
+ SEQ_END
+
+ TRACE_GROUP_BEGIN( INCLUDED_NON_SOURCE_FILE_TEST, "TraceCompilerTesterAdvanced: INCLUDED_NON_SOURCE_FILE_TEST: ", ON )
+
+ TRACE_BEGIN( HELLO_WORLD, "Hello world!" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( NON_SOURCE_FILE_TRACE1, "Inline function GetBigValue1000 return value:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( NON_SOURCE_FILE_TRACE2, "Inline function GetBigValue1000 return value:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( TRACE_FLOW, "TraceCompilerTesterAdvanced: Flow: ", ON )
+
+ TRACE_BEGIN( HELLO_MOON, "Hello moon!" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_TRACE_2, "Test OLD TraceCompiler" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY, "> DTraceCompilerTesterCommon1::SumValues" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, aValue1, "aValue1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, aValue2, "aValue2", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, aValue3, "aValue3", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, aValue4, "aValue4", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, this, "this", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT, "< DTraceCompilerTesterCommon1::SumValues" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, this, "this", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, retVal, "retVal", DEC )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( POINTER_PARAMETER_TEST, "TraceCompilerTesterAdvanced: POINTER_PARAMETER_TEST: ", ON )
+
+ TRACE_BEGIN( POINTER_PARAMETER_TRACE1, "Print out pointer values of two NTimers" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, myNTimer1, "myNTimer1", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, myNTimer2, "myNTimer2", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( POINTER_PARAMETER_TRACE2, "Print out pointer values of one const NTimers" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, myNTimer3, "myNTimer3", HEX )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( LONG_TRACE_TEST, "TraceCompilerTesterAdvanced: LONG_TRACE_TEST: ", ON )
+
+ TRACE_BEGIN( ASCII60, "Ascii60:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf60, "buf60", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII300, "Ascii300:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf300, "buf300", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII512, "Ascii512:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf512, "buf512", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII600, "Ascii600:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf600, "buf600", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII300_ASCII512, "Ascii300: Ascii512:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf300len, "buf300_len", buf300_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf300, "buf300", buf300_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf512len, "buf512_len", buf512_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf512, "buf512", buf512_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII600_ASCII300, "Ascii600: Ascii300:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf600len, "buf600_len", buf600_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf600, "buf600", buf600_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf300len, "buf300_len", buf300_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf300, "buf300", buf300_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII333_ASCII333, "Ascii333: Ascii333:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf333len, "buf333_len", buf333_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf333, "buf333", buf333_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf3332len, "buf3332_len", buf3332_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf3332, "buf3332", buf3332_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( SHORT_TRACE_TEST, "TraceCompilerTesterAdvanced: SHORT_TRACE_TEST: ", ON )
+
+ TRACE_BEGIN( ASCII1, "Ascii1:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf1, "buf1", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII2, "Ascii2:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf2, "buf2", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII3, "Ascii3:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf3, "buf3", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII4, "Ascii4:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, buf4, "buf4", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( ASCII5, "Ascii1: Ascii2:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf1len, "buf1_len", buf1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf1, "buf1", buf1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf2len, "buf2_len", buf2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, buf2, "buf2", buf2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( TRACE_STATE, "TraceCompilerTesterAdvanced: State: ", ON )
+
+ TRACE_BEGIN( STATE_TRACE_0, "Machine;State" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( STATE_TRACE_1, "Machine;State;Instance" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg1len, "arg1_len", arg1_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg1, "arg1", arg1_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, arg2len, "arg2_len", arg2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, arg2, "arg2", arg2_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg3, "arg3", HEX )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( TRACE_DATA, "TraceCompilerTesterAdvanced: Data: ", ON )
+
+ TRACE_BEGIN( TRACE_DATA_TRACE, "DTraceCoreXtiIf::DebugPrintMsg - Msg via XTI IF 0x" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( arg1, "arg1", TRACE_SEQ_BYTE_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( POST_CODE_TEST, "TraceCompilerTesterAdvanced: POST_CODE_TEST: ", ON )
+
+ TRACE_BEGIN( POST1, "Print some POST code traces" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( KEKKONEN, "TraceCompilerTesterAdvanced: KEKKONEN: ", ON )
+
+ TRACE_BEGIN( TEXT1, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT2, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT3, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT4, "ifGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLj." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT5, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT6, ".iLLLGGGGGGGGGGGGGGGGGGLLLLLfffffffffjfffffjfi:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT7, ".fLLLLLGGGGGGGGGGGGGGGGLLLLLLLfffffjjjjjjjjjttjt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT8, ".iffLfLGLGGGGGGGGGGGGGGGGGLLLLfffffffjjjjjjjtttii." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT9, ".ijfffLLLLLLGGGGGGGGGGGGGGGLLLffLffffffjjjjjttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT10, "ittfffffLLLLGGGGGGGGGGGGGGGLLLLLLLffffjjjjjttttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT11, ".iitjffffLLLLLGGGGGGGGGGGGGGGGGLLLffffjjttjjtitttii" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT12, ":ittffLLLLGGGLGGGGGGGGGWGGGGGGGGLLLLffjjttjjtittiiii:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT13, ".,tjjffLLLGGGGGGGGGGGGWWWWWGGGGGGGLLLffjjtjfftitttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT14, ",jffjjffLLGGGGGGGGGWWWWGGGWWWWWWWGGLLjjtjffjtttttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT15, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT16, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT17, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT18, ". ..:,:::.. ....," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT19, ":: :,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT20, ":: .:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT21, "....:," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT22, ",:.:,,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT23, ".,,:..:," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT24, ".:..::::..ifLWDDWGLLLLj" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT25, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT26, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT27, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT28, "," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT29, ".iifjttttjfLGGLLLLLLLLffffjtfLffffjjt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT30, ",iLGi,:,,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT31, ".,jLfjtjjfLLGGGGGGGGLLLLfjjfLfjjjti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT32, "ijjjjjjttjjfffLLGGGLLLLfjjfjjjji" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT33, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT34, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT35, ".itjjjfLLLGGGWWWWGGLjji" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT36, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT37, "::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT38, ".: ........::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT39, ",j. ......:::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT40, ",fj, . ..,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT41, "tWLf. ..:,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT42, "jK##EL" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT43, "LK#Effj" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT44, "EEi. .:EKKKKKKKKL:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT45, ":DitD#KKKKKG" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT46, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT47, ".iWD .:::::,,:fE#Dt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT48, ",L#D:ijttiiii" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT49, "jK# ...::,,. ." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+RES_END
+
+#undef AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/TraceCompilerTesterBasic_0x20011112_Dictionary.xml Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,562 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tracedictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="DictionarySchema.xsd">
+ <typedefs>
+ <object type="int32" size="4" formatchar="d" classification="integer"/>
+ <object type="int32" size="4" formatchar="ld" classification="integer"/>
+ <object type="int8" size="1" formatchar="hhd" classification="integer"/>
+ <object type="hex8" size="1" formatchar="hhx" classification="hex"/>
+ <object type="HEX8" size="1" formatchar="hhX" classification="hex"/>
+ <object type="int16" size="2" formatchar="hd" classification="integer"/>
+ <object type="int64" size="8" formatchar="Ld" classification="integer"/>
+ <object type="int64" size="8" formatchar="lld" classification="integer"/>
+ <object type="uint8" size="1" formatchar="hhu" classification="integer"/>
+ <object type="uint16" size="2" formatchar="hu" classification="integer"/>
+ <object type="uint32" size="4" formatchar="u" classification="integer"/>
+ <object type="uint32" size="4" formatchar="lu" classification="integer"/>
+ <object type="uint64" size="8" formatchar="Lu" classification="integer"/>
+ <object type="uint64" size="8" formatchar="llu" classification="integer"/>
+ <object type="hex16" size="2" formatchar="hx" classification="hex"/>
+ <object type="HEX16" size="2" formatchar="hX" classification="hex"/>
+ <object type="hex32" size="4" formatchar="x" classification="hex"/>
+ <object type="hex32" size="4" formatchar="lx" classification="hex"/>
+ <object type="HEX32" size="4" formatchar="lX" classification="hex"/>
+ <object type="HEX32" size="4" formatchar="X" classification="hex"/>
+ <object type="hex64" size="8" formatchar="Lx" classification="hex"/>
+ <object type="hex64" size="8" formatchar="llx" classification="hex"/>
+ <object type="HEX64" size="8" formatchar="llX" classification="hex"/>
+ <object type="ascii" size="1" formatchar="s" classification="string"/>
+ <object type="ascii" size="1" formatchar="ls" classification="string"/>
+ <object type="unicode" size="2" formatchar="S" classification="string"/>
+ <object type="unicode" size="2" formatchar="lS" classification="string"/>
+ <object type="ffix" size="8" formatchar="f" classification="float"/>
+ <object type="ffix" size="8" formatchar="Lf" classification="float"/>
+ <object type="fexp" size="8" formatchar="e" classification="float"/>
+ <object type="fexp" size="8" formatchar="Le" classification="float"/>
+ <object type="fopt" size="8" formatchar="g" classification="float"/>
+ <object type="fopt" size="8" formatchar="Lg" classification="float"/>
+ <object type="TErrorCodes" size="4" classification="enum">
+ <typemember value="-2" name="KErrGeneral"/>
+ <typemember value="1" name="ValueOne"/>
+ </object>
+ </typedefs>
+ <data>
+ <def id="1" type="string">Inline function GetBigValue1000 return value: %d</def>
+ <def id="2" type="string">Inline function GetBigValue1000 return value: %d</def>
+ <def id="3" type="string">int8: %hhd</def>
+ <def id="4" type="string">int16: %hd</def>
+ <def id="5" type="string">int32: %d</def>
+ <def id="6" type="string">int64: %Ld</def>
+ <def id="7" type="string">uint8: %hhu</def>
+ <def id="8" type="string">uint16: %hu</def>
+ <def id="9" type="string">uint32: %u</def>
+ <def id="10" type="string">uint64: %Lu</def>
+ <def id="11" type="string">hex8: %hhx</def>
+ <def id="12" type="string">hex16: %hx</def>
+ <def id="13" type="string">hex32: %x</def>
+ <def id="14" type="string">hex64: %Lx</def>
+ <def id="15" type="string">ascii: %s</def>
+ <def id="16" type="string">unicode: %S</def>
+ <def id="17" type="string">ffix: %f</def>
+ <def id="18" type="string">fexp: %e</def>
+ <def id="19" type="string">fopt: %g</def>
+ <def id="20" type="string">int8 array: %{int8[]}</def>
+ <def id="21" type="string">int16 array: %{int16[]}</def>
+ <def id="22" type="string">int32 array: %{int32[]}</def>
+ <def id="23" type="string">int64 array: %{int64[]}</def>
+ <def id="24" type="string">uint8 array: %{uint8[]}</def>
+ <def id="25" type="string">uint16 array: %{uint16[]}</def>
+ <def id="26" type="string">uint32 array: %{uint32[]}</def>
+ <def id="27" type="string">uint64 array: %{uint64[]}</def>
+ <def id="28" type="string">hex8 array: %{hex8[]}</def>
+ <def id="29" type="string">hex16 array: %{hex16[]}</def>
+ <def id="30" type="string">hex32 array: %{hex32[]}</def>
+ <def id="31" type="string">hex64 array: %{hex64[]}</def>
+ <def id="32" type="string">ffix array: %{ffix[]}</def>
+ <def id="33" type="string">fexp array: %{fexp[]}</def>
+ <def id="34" type="string">fopt array: %{fopt[]}</def>
+ <def id="35" type="string">int8: %hhd %hhd</def>
+ <def id="36" type="string">int16: %hd, %hd</def>
+ <def id="37" type="string">int32: %d, %d</def>
+ <def id="38" type="string">int64: %Ld, %Ld</def>
+ <def id="39" type="string">uint8: %hhu, %hhu</def>
+ <def id="40" type="string">uint16: %hu, %hu</def>
+ <def id="41" type="string">uint32: %u, %u</def>
+ <def id="42" type="string">uint64: %Lu, %Lu</def>
+ <def id="43" type="string">hex8: %hhx, %hhx</def>
+ <def id="44" type="string">hex16: %hx, %hx</def>
+ <def id="45" type="string">hex32: %x, %x</def>
+ <def id="46" type="string">hex64: %Lx, %Lx</def>
+ <def id="47" type="string">ascii: %s, %s</def>
+ <def id="48" type="string">ffix: %f, %f</def>
+ <def id="49" type="string">fexp: %e, %f</def>
+ <def id="50" type="string">fopt: %g, %g</def>
+ <def id="51" type="string">int8: %{int8[]} %{int8[]}</def>
+ <def id="52" type="string">int16: %{int16[]} %{int16[]}</def>
+ <def id="53" type="string">int32: %{int32[]} %{int32[]}</def>
+ <def id="54" type="string">int64: %{int64[]} %{int64[]}</def>
+ <def id="55" type="string">uint8: %{uint8[]} %{uint8[]}</def>
+ <def id="56" type="string">uint16: %{uint16[]} %{uint16[]}</def>
+ <def id="57" type="string">uint32: %{uint32[]} %{uint32[]}</def>
+ <def id="58" type="string">uint64: %{uint64[]} %{uint64[]}</def>
+ <def id="59" type="string">hex8: %{hex8[]} %{hex8[]}</def>
+ <def id="60" type="string">hex16: %{hex16[]} %{hex16[]}</def>
+ <def id="61" type="string">hex32: %{hex32[]} %{hex32[]}</def>
+ <def id="62" type="string">hex64: %{hex64[]} %{hex64[]}</def>
+ <def id="63" type="string">ffix: %{ffix[]} %{ffix[]}</def>
+ <def id="64" type="string">fexp: %{fexp[]} %{fexp[]}</def>
+ <def id="65" type="string">fopt: %{fopt[]} %{fopt[]}</def>
+ <def id="66" type="string">Enum: %{TErrorCodes}</def>
+ <def id="67" type="string">Enum Array: %{TErrorCodes[]}</def>
+ <def id="68" type="string">Event1>;Value=%d</def>
+ <def id="69" type="string">Event1<;Value=%d;Start Event Trace ID=%u</def>
+ <def id="70" type="string">Event2>;Value=%d</def>
+ <def id="71" type="string">Event2<;Value=%d;Start Event Trace ID=%u</def>
+ <def id="72" type="string">> DTraceCompilerTesterCommon1::SumValues;aValue1=%d;aValue2=%d;aValue3=%hhu;aValue4=%hhu;Filler=%hhx;Filler=%hhx;this=%x</def>
+ <def id="73" type="string">< DTraceCompilerTesterCommon1::SumValues;this=%x;retVal=%d</def>
+ <def id="74" type="string"> :;ttjffLLGLLLLffjt;,</def>
+ <def id="75" type="string"> :;fGWWGWWWWWWWWWWWWGGGGGGLj,.</def>
+ <def id="76" type="string"> ;tfGGGGGGGGGWWWWGGGGGGGGGGGLLLLGj;</def>
+ <def id="77" type="string"> ifGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLj.</def>
+ <def id="78" type="string"> ;fGGGGGGGGGGGGGGGGGGGGGLLLLLLffffffffLffLt,</def>
+ <def id="79" type="string"> .iLLLGGGGGGGGGGGGGGGGGGLLLLLfffffffffjfffffjfi:</def>
+ <def id="80" type="string"> .fLLLLLGGGGGGGGGGGGGGGGLLLLLLLfffffjjjjjjjjjttjt</def>
+ <def id="81" type="string"> .iffLfLGLGGGGGGGGGGGGGGGGGLLLLfffffffjjjjjjjtttii.</def>
+ <def id="82" type="string"> .ijfffLLLLLLGGGGGGGGGGGGGGGLLLffLffffffjjjjjttti;;:</def>
+ <def id="83" type="string"> ittfffffLLLLGGGGGGGGGGGGGGGLLLLLLLffffjjjjjttttti;:</def>
+ <def id="84" type="string"> .iitjffffLLLLLGGGGGGGGGGGGGGGGGLLLffffjjttjjtitttii;:</def>
+ <def id="85" type="string"> :ittffLLLLGGGLGGGGGGGGGWGGGGGGGGLLLLffjjttjjtittiiii:</def>
+ <def id="86" type="string"> .,tjjffLLLGGGGGGGGGGGGWWWWWGGGGGGGLLLffjjtjfftitttti;:</def>
+ <def id="87" type="string"> ,jffjjffLLGGGGGGGGGWWWWGGGWWWWWWWGGLLjjtjffjtttttti;:</def>
+ <def id="88" type="string"> .;LLLLLLLLGGGGGGGGGWWWWGGWGGLGGGGWGGLfjjjffjjjjtttii,:.:.</def>
+ <def id="89" type="string"> .;fffjjjfLLGGGGGGGGWGGGLfttitLGGGGGGLfjjjjfjjjjjti;,:;fLfi.</def>
+ <def id="90" type="string"> .:;;,:...:,;jLLLfi.....:,;;iii:,,::,jjjjfjti;.. .;GGjiiji</def>
+ <def id="91" type="string"> . ..:,:::.. ....,;;.:,:. ..... .:;;,..;tt;,. ..:jLtiLfLGi</def>
+ <def id="92" type="string">:: :,,;iii;,::: .::iffjtttjjffffjt;,. ..,;ijffGGLLL;</def>
+ <def id="93" type="string">:: .:;itttjjjjjjj:tGG,:ifGGLLLLLLfffffji: ..::::,tiiLtifGGLi</def>
+ <def id="94" type="string"> ....:,;itttjjjjfijDDWGt .iGLLLLfffffffft,.:,,::,jjiiiLGLLGGt.</def>
+ <def id="95" type="string"> ,:.:,,,;iittjji;WDDWGG,..fGGGLffffjjjji,,;,:,tjjji;iLjjLGW,</def>
+ <def id="96" type="string"> .,,:..:,;iiii:.iDDDWGLft;ifLLLLLffjjji::ii,jjfjjti;iiiLfjj</def>
+ <def id="97" type="string"> .:..::::..ifLWDDWGLLLLj;,,;;;iiii;;ttt;;fjfjtiiiijGLjf;</def>
+ <def id="98" type="string"> .:;;;;ti;jfLLjt;;ijjLfjjfffffjttti;tjjjjtitiijLfj;</def>
+ <def id="99" type="string"> .;tffjjjti::::;tLGGGGWWGLGGGLLLfLLLLfjjjjtti;;jji,</def>
+ <def id="100" type="string"> .;i;fjjffLLGGWGWWWWWGGGGWGLLLLLffLLffjttttiii;,...</def>
+ <def id="101" type="string"> ,;ijjjjfffLGGLLGGGGGGGGGGLfjLLfffffjjiii;;;,:..:</def>
+ <def id="102" type="string"> .iifjttttjfLGGLLLLLLLLffffjtfLffffjjt;;;,;,:..:i</def>
+ <def id="103" type="string"> ,iLGi,:,,,;;iiiiiittttiiitjLLffjjjti:::,;,..:ff</def>
+ <def id="104" type="string"> .,jLfjtjjfLLGGGGGGGGLLLLfjjfLfjjjti;..;;,:,itG,</def>
+ <def id="105" type="string"> ijjjjjjttjjfffLLGGGLLLLfjjfjjjji;:.,;;,;tfW,</def>
+ <def id="106" type="string"> :;itjjffffLLGGGGGGGGGGLLLfjfjjj;:.,iiitjGDL</def>
+ <def id="107" type="string"> .:;ijjfffLLGGWWWWWWGGGGLLffjjti:..;ttijjEG,</def>
+ <def id="108" type="string"> .itjjjfLLLGGGWWWWGGLjji;,,::..:jjitWEj.</def>
+ <def id="109" type="string"> :;itjjjjjLLLGGGWGLi;,,::::::;ttiGEKW</def>
+ <def id="110" type="string"> ::,,;;iiittjj;,,,,,,;;;ijjjGEKKf:</def>
+ <def id="111" type="string"> .: ........::,,;;;ttjjGDKKKEL</def>
+ <def id="112" type="string"> ,j. ......:::,,;ttjjWE#KKKE,</def>
+ <def id="113" type="string"> ,fj, . ..,,;;iijDK#####f:</def>
+ <def id="114" type="string"> tWLf. ..:,,;tfEKKK###Ef</def>
+ <def id="115" type="string"> jK##EL; .. :iDKKKKKKK#f:</def>
+ <def id="116" type="string"> LK#Effj;;::fDKKKKKKK#D.</def>
+ <def id="117" type="string"> EEi. .:EKKKKKKKKL:</def>
+ <def id="118" type="string"> :DitD#KKKKKG</def>
+ <def id="119" type="string"> ;i: .:,,::::.iK###Ki.</def>
+ <def id="120" type="string"> .iWD .:::::,,:fE#Dt</def>
+ <def id="121" type="string"> ,L#D:ijttiiii;, :j:</def>
+ <def id="122" type="string"> jK# ...::,,. .</def>
+ </data>
+ <locations>
+ <path val="../../TraceCompilerTester/src/">
+ <file id="1">TraceCompilerTesterBasic.cpp</file>
+ <file id="2">TraceCompilerTesterCommon1.cpp</file>
+ <file id="3">TraceCompilerTesterCommon2.cpp</file>
+ </path>
+ <path val="W:/TraceCompilerTester/inl/">
+ <file id="4">BigNumbers.inl</file>
+ </path>
+ </locations>
+ <component id="536940818" name="TraceCompilerTesterBasic" prefix="TraceCompilerTesterBasic: " suffix="">
+ <group id="222" name="INCLUDED_NON_SOURCE_FILE_TEST" prefix="INCLUDED_NON_SOURCE_FILE_TEST: " suffix="">
+ <trace data-ref="1" name="NON_SOURCE_FILE_TRACE1">
+ <instance id="1" loc-ref="4" line="12" methodname="GetBigValue1000"/>
+ </trace>
+ <trace data-ref="2" name="NON_SOURCE_FILE_TRACE2">
+ <instance id="2" loc-ref="4" line="19" methodname="GetBigValue2000"/>
+ </trace>
+ </group>
+ <group id="223" name="BASIC_OK_TEST" prefix="BASIC_OK_TEST: " suffix="">
+ <trace data-ref="3" name="TEST_BASIC_INT8">
+ <instance id="1" loc-ref="1" line="120" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="4" name="TEST_BASIC_INT16">
+ <instance id="2" loc-ref="1" line="121" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="5" name="TEST_BASIC_INT32">
+ <instance id="3" loc-ref="1" line="122" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="6" name="TEST_BASIC_INT64">
+ <instance id="4" loc-ref="1" line="123" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="7" name="TEST_BASIC_UINT8">
+ <instance id="5" loc-ref="1" line="124" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="8" name="TEST_BASIC_UINT16">
+ <instance id="6" loc-ref="1" line="125" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="9" name="TEST_BASIC_UINT32">
+ <instance id="7" loc-ref="1" line="126" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="10" name="TEST_BASIC_UINT64">
+ <instance id="8" loc-ref="1" line="127" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="11" name="TEST_BASIC_HEX8">
+ <instance id="9" loc-ref="1" line="128" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="12" name="TEST_BASIC_HEX16">
+ <instance id="10" loc-ref="1" line="129" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="13" name="TEST_BASIC_HEX32">
+ <instance id="11" loc-ref="1" line="130" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="14" name="TEST_BASIC_HEX64">
+ <instance id="12" loc-ref="1" line="131" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="15" name="TEST_BASIC_STRING8">
+ <instance id="13" loc-ref="1" line="132" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="16" name="TEST_BASIC_STRING16">
+ <instance id="14" loc-ref="1" line="134" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="17" name="TEST_BASIC_FFIX">
+ <instance id="15" loc-ref="1" line="135" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="18" name="TEST_BASIC_FEXP">
+ <instance id="16" loc-ref="1" line="136" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="19" name="TEST_BASIC_FOPT">
+ <instance id="17" loc-ref="1" line="137" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="224" name="ARRAY_OK_TEST" prefix="ARRAY_OK_TEST: " suffix="">
+ <trace data-ref="20" name="TEST_ARRAY_INT8">
+ <instance id="1" loc-ref="1" line="193" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="21" name="TEST_ARRAY_INT16">
+ <instance id="2" loc-ref="1" line="195" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="22" name="TEST_ARRAY_INT32">
+ <instance id="3" loc-ref="1" line="197" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="23" name="TEST_ARRAY_INT64">
+ <instance id="4" loc-ref="1" line="199" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="24" name="TEST_ARRAY_UINT8">
+ <instance id="5" loc-ref="1" line="201" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="25" name="TEST_ARRAY_UINT16">
+ <instance id="6" loc-ref="1" line="203" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="26" name="TEST_ARRAY_UINT32">
+ <instance id="7" loc-ref="1" line="205" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="27" name="TEST_ARRAY_UINT64">
+ <instance id="8" loc-ref="1" line="207" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="28" name="TEST_ARRAY_HEX8">
+ <instance id="9" loc-ref="1" line="209" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="29" name="TEST_ARRAY_HEX16">
+ <instance id="10" loc-ref="1" line="211" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="30" name="TEST_ARRAY_HEX32">
+ <instance id="11" loc-ref="1" line="213" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="31" name="TEST_ARRAY_HEX64">
+ <instance id="12" loc-ref="1" line="215" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="32" name="TEST_ARRAY_FFIX">
+ <instance id="13" loc-ref="1" line="219" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="33" name="TEST_ARRAY_FEXP">
+ <instance id="14" loc-ref="1" line="221" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="34" name="TEST_ARRAY_FOPT">
+ <instance id="15" loc-ref="1" line="223" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="225" name="BASIC_TWO_SIMILAR_OK_TEST" prefix="BASIC_TWO_SIMILAR_OK_TEST: " suffix="">
+ <trace data-ref="35" name="TEST_BASIC_SIMILAR2_INT8">
+ <instance id="1" loc-ref="1" line="231" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="36" name="TEST_BASIC_SIMILAR2_INT16">
+ <instance id="2" loc-ref="1" line="233" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="37" name="TEST_BASIC_SIMILAR2_INT32">
+ <instance id="3" loc-ref="1" line="235" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="38" name="TEST_BASIC_SIMILAR2_INT64">
+ <instance id="4" loc-ref="1" line="237" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="39" name="TEST_BASIC_SIMILAR2_UINT8">
+ <instance id="5" loc-ref="1" line="239" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="40" name="TEST_BASIC_SIMILAR2_UINT16">
+ <instance id="6" loc-ref="1" line="241" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="41" name="TEST_BASIC_SIMILAR2_UINT32">
+ <instance id="7" loc-ref="1" line="243" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="42" name="TEST_BASIC_SIMILAR2_UINT64">
+ <instance id="8" loc-ref="1" line="245" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="43" name="TEST_BASIC_SIMILAR2_HEX8">
+ <instance id="9" loc-ref="1" line="247" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="44" name="TEST_BASIC_SIMILAR2_HEX16">
+ <instance id="10" loc-ref="1" line="249" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="45" name="TEST_BASIC_SIMILAR2_HEX32">
+ <instance id="11" loc-ref="1" line="251" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="46" name="TEST_BASIC_SIMILAR2_HEX64">
+ <instance id="12" loc-ref="1" line="253" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="47" name="TEST_BASIC_SIMILAR2_STRING8">
+ <instance id="13" loc-ref="1" line="255" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="48" name="TEST_BASIC_SIMILAR2_FFIX">
+ <instance id="14" loc-ref="1" line="257" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="49" name="TEST_BASIC_SIMILAR2_FEXP">
+ <instance id="15" loc-ref="1" line="259" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="50" name="TEST_BASIC_SIMILAR2_FOPT">
+ <instance id="16" loc-ref="1" line="261" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="226" name="ARRAY_TWO_SIMILAR_OK_TEST" prefix="ARRAY_TWO_SIMILAR_OK_TEST: " suffix="">
+ <trace data-ref="51" name="TEST_ARRAY_SIMILAR2_INT8">
+ <instance id="1" loc-ref="1" line="317" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="52" name="TEST_ARRAY_SIMILAR2_INT16">
+ <instance id="2" loc-ref="1" line="319" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="53" name="TEST_ARRAY_SIMILAR2_INT32">
+ <instance id="3" loc-ref="1" line="321" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="54" name="TEST_ARRAY_SIMILAR2_INT64">
+ <instance id="4" loc-ref="1" line="323" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="55" name="TEST_ARRAY_SIMILAR2_UINT8">
+ <instance id="5" loc-ref="1" line="325" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="56" name="TEST_ARRAY_SIMILAR2_UINT16">
+ <instance id="6" loc-ref="1" line="327" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="57" name="TEST_ARRAY_SIMILAR2_UINT32">
+ <instance id="7" loc-ref="1" line="329" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="58" name="TEST_ARRAY_SIMILAR2_UINT64">
+ <instance id="8" loc-ref="1" line="331" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="59" name="TEST_ARRAY_SIMILAR2_HEX8">
+ <instance id="9" loc-ref="1" line="333" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="60" name="TEST_ARRAY_SIMILAR2_HEX16">
+ <instance id="10" loc-ref="1" line="335" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="61" name="TEST_ARRAY_SIMILAR2_HEX32">
+ <instance id="11" loc-ref="1" line="337" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="62" name="TEST_ARRAY_SIMILAR2_HEX64">
+ <instance id="12" loc-ref="1" line="339" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="63" name="TEST_ARRAY_SIMILAR2_FFIX">
+ <instance id="13" loc-ref="1" line="343" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="64" name="TEST_ARRAY_SIMILAR2_FEXP">
+ <instance id="14" loc-ref="1" line="345" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="65" name="TEST_ARRAY_SIMILAR2_FOPT">
+ <instance id="15" loc-ref="1" line="347" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="227" name="ENUM_OK_TEST" prefix="ENUM_OK_TEST: " suffix="">
+ <trace data-ref="66" name="TEST_ENUM_OK">
+ <instance id="1" loc-ref="1" line="361" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="67" name="TEST_ENUM_ARRAY_OK">
+ <instance id="2" loc-ref="1" line="362" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="139" name="TRACE_PERFORMANCE" prefix="Performance: " suffix="">
+ <trace data-ref="68" name="EVENT_MY_EVENT_TRACE1_START">
+ <instance id="1" loc-ref="1" line="370" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="69" name="EVENT_MY_EVENT_TRACE1_STOP">
+ <instance id="2" loc-ref="1" line="371" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="70" name="EVENT_MY_EVENT_TRACE2_START">
+ <instance id="3" loc-ref="1" line="373" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ <trace data-ref="71" name="EVENT_MY_EVENT_TRACE2_STOP">
+ <instance id="4" loc-ref="1" line="374" methodname="TraceActivated" classname="DTraceCompilerTesterBasic"/>
+ </trace>
+ </group>
+ <group id="138" name="TRACE_FLOW" prefix="Flow: " suffix="">
+ <trace data-ref="72" name="DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY">
+ <instance id="1" loc-ref="2" line="38" methodname="SumValues" classname="DTraceCompilerTesterCommon1"/>
+ </trace>
+ <trace data-ref="73" name="DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT">
+ <instance id="2" loc-ref="2" line="40" methodname="SumValues" classname="DTraceCompilerTesterCommon1"/>
+ </trace>
+ </group>
+ <group id="228" name="KEKKONEN" prefix="KEKKONEN: " suffix="">
+ <trace data-ref="74" name="TEXT1">
+ <instance id="1" loc-ref="3" line="32" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="75" name="TEXT2">
+ <instance id="2" loc-ref="3" line="33" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="76" name="TEXT3">
+ <instance id="3" loc-ref="3" line="34" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="77" name="TEXT4">
+ <instance id="4" loc-ref="3" line="35" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="78" name="TEXT5">
+ <instance id="5" loc-ref="3" line="36" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="79" name="TEXT6">
+ <instance id="6" loc-ref="3" line="37" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="80" name="TEXT7">
+ <instance id="7" loc-ref="3" line="38" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="81" name="TEXT8">
+ <instance id="8" loc-ref="3" line="39" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="82" name="TEXT9">
+ <instance id="9" loc-ref="3" line="40" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="83" name="TEXT10">
+ <instance id="10" loc-ref="3" line="41" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="84" name="TEXT11">
+ <instance id="11" loc-ref="3" line="42" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="85" name="TEXT12">
+ <instance id="12" loc-ref="3" line="43" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="86" name="TEXT13">
+ <instance id="13" loc-ref="3" line="44" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="87" name="TEXT14">
+ <instance id="14" loc-ref="3" line="45" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="88" name="TEXT15">
+ <instance id="15" loc-ref="3" line="46" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="89" name="TEXT16">
+ <instance id="16" loc-ref="3" line="47" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="90" name="TEXT17">
+ <instance id="17" loc-ref="3" line="48" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="91" name="TEXT18">
+ <instance id="18" loc-ref="3" line="49" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="92" name="TEXT19">
+ <instance id="19" loc-ref="3" line="50" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="93" name="TEXT20">
+ <instance id="20" loc-ref="3" line="51" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="94" name="TEXT21">
+ <instance id="21" loc-ref="3" line="52" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="95" name="TEXT22">
+ <instance id="22" loc-ref="3" line="53" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="96" name="TEXT23">
+ <instance id="23" loc-ref="3" line="54" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="97" name="TEXT24">
+ <instance id="24" loc-ref="3" line="55" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="98" name="TEXT25">
+ <instance id="25" loc-ref="3" line="56" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="99" name="TEXT26">
+ <instance id="26" loc-ref="3" line="57" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="100" name="TEXT27">
+ <instance id="27" loc-ref="3" line="58" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="101" name="TEXT28">
+ <instance id="28" loc-ref="3" line="59" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="102" name="TEXT29">
+ <instance id="29" loc-ref="3" line="60" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="103" name="TEXT30">
+ <instance id="30" loc-ref="3" line="61" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="104" name="TEXT31">
+ <instance id="31" loc-ref="3" line="62" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="105" name="TEXT32">
+ <instance id="32" loc-ref="3" line="63" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="106" name="TEXT33">
+ <instance id="33" loc-ref="3" line="64" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="107" name="TEXT34">
+ <instance id="34" loc-ref="3" line="65" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="108" name="TEXT35">
+ <instance id="35" loc-ref="3" line="66" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="109" name="TEXT36">
+ <instance id="36" loc-ref="3" line="67" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="110" name="TEXT37">
+ <instance id="37" loc-ref="3" line="68" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="111" name="TEXT38">
+ <instance id="38" loc-ref="3" line="69" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="112" name="TEXT39">
+ <instance id="39" loc-ref="3" line="70" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="113" name="TEXT40">
+ <instance id="40" loc-ref="3" line="71" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="114" name="TEXT41">
+ <instance id="41" loc-ref="3" line="72" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="115" name="TEXT42">
+ <instance id="42" loc-ref="3" line="73" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="116" name="TEXT43">
+ <instance id="43" loc-ref="3" line="74" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="117" name="TEXT44">
+ <instance id="44" loc-ref="3" line="75" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="118" name="TEXT45">
+ <instance id="45" loc-ref="3" line="76" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="119" name="TEXT46">
+ <instance id="46" loc-ref="3" line="77" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="120" name="TEXT47">
+ <instance id="47" loc-ref="3" line="78" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="121" name="TEXT48">
+ <instance id="48" loc-ref="3" line="79" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ <trace data-ref="122" name="TEXT49">
+ <instance id="49" loc-ref="3" line="80" methodname="Kekkonen" classname="DTraceCompilerTesterCommon2"/>
+ </trace>
+ </group>
+ </component>
+</tracedictionary>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/TraceCompilerTesterBasic_0x20011112_TraceDefinitions.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1139 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERBASIC_20011112_TRACEDEFINITIONS_H__
+#define __TRACECOMPILERTESTERBASIC_20011112_TRACEDEFINITIONS_H__
+
+#define AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#undef TRACECOMPILERTESTERBASIC_COMPONENT
+#define TRACECOMPILERTESTERBASIC_COMPONENT 0x20011112
+#undef INCLUDED_NON_SOURCE_FILE_TEST
+#define INCLUDED_NON_SOURCE_FILE_TEST 0xde
+#undef NON_SOURCE_FILE_TRACE1
+#define NON_SOURCE_FILE_TRACE1 0x1
+#undef NON_SOURCE_FILE_TRACE2
+#define NON_SOURCE_FILE_TRACE2 0x2
+#undef BASIC_OK_TEST
+#define BASIC_OK_TEST 0xdf
+#undef TEST_BASIC_INT8
+#define TEST_BASIC_INT8 0x1
+#undef TEST_BASIC_INT16
+#define TEST_BASIC_INT16 0x2
+#undef TEST_BASIC_INT32
+#define TEST_BASIC_INT32 0x3
+#undef TEST_BASIC_INT64
+#define TEST_BASIC_INT64 0x4
+#undef TEST_BASIC_UINT8
+#define TEST_BASIC_UINT8 0x5
+#undef TEST_BASIC_UINT16
+#define TEST_BASIC_UINT16 0x6
+#undef TEST_BASIC_UINT32
+#define TEST_BASIC_UINT32 0x7
+#undef TEST_BASIC_UINT64
+#define TEST_BASIC_UINT64 0x8
+#undef TEST_BASIC_HEX8
+#define TEST_BASIC_HEX8 0x9
+#undef TEST_BASIC_HEX16
+#define TEST_BASIC_HEX16 0xa
+#undef TEST_BASIC_HEX32
+#define TEST_BASIC_HEX32 0xb
+#undef TEST_BASIC_HEX64
+#define TEST_BASIC_HEX64 0xc
+#undef TEST_BASIC_STRING8
+#define TEST_BASIC_STRING8 0xd
+#undef TEST_BASIC_STRING16
+#define TEST_BASIC_STRING16 0xe
+#undef TEST_BASIC_FFIX
+#define TEST_BASIC_FFIX 0xf
+#undef TEST_BASIC_FEXP
+#define TEST_BASIC_FEXP 0x10
+#undef TEST_BASIC_FOPT
+#define TEST_BASIC_FOPT 0x11
+#undef ARRAY_OK_TEST
+#define ARRAY_OK_TEST 0xe0
+#undef TEST_ARRAY_INT8
+#define TEST_ARRAY_INT8 0x1
+#undef TEST_ARRAY_INT16
+#define TEST_ARRAY_INT16 0x2
+#undef TEST_ARRAY_INT32
+#define TEST_ARRAY_INT32 0x3
+#undef TEST_ARRAY_INT64
+#define TEST_ARRAY_INT64 0x4
+#undef TEST_ARRAY_UINT8
+#define TEST_ARRAY_UINT8 0x5
+#undef TEST_ARRAY_UINT16
+#define TEST_ARRAY_UINT16 0x6
+#undef TEST_ARRAY_UINT32
+#define TEST_ARRAY_UINT32 0x7
+#undef TEST_ARRAY_UINT64
+#define TEST_ARRAY_UINT64 0x8
+#undef TEST_ARRAY_HEX8
+#define TEST_ARRAY_HEX8 0x9
+#undef TEST_ARRAY_HEX16
+#define TEST_ARRAY_HEX16 0xa
+#undef TEST_ARRAY_HEX32
+#define TEST_ARRAY_HEX32 0xb
+#undef TEST_ARRAY_HEX64
+#define TEST_ARRAY_HEX64 0xc
+#undef TEST_ARRAY_FFIX
+#define TEST_ARRAY_FFIX 0xd
+#undef TEST_ARRAY_FEXP
+#define TEST_ARRAY_FEXP 0xe
+#undef TEST_ARRAY_FOPT
+#define TEST_ARRAY_FOPT 0xf
+#undef BASIC_TWO_SIMILAR_OK_TEST
+#define BASIC_TWO_SIMILAR_OK_TEST 0xe1
+#undef TEST_BASIC_SIMILAR2_INT8
+#define TEST_BASIC_SIMILAR2_INT8 0x1
+#undef TEST_BASIC_SIMILAR2_INT16
+#define TEST_BASIC_SIMILAR2_INT16 0x2
+#undef TEST_BASIC_SIMILAR2_INT32
+#define TEST_BASIC_SIMILAR2_INT32 0x3
+#undef TEST_BASIC_SIMILAR2_INT64
+#define TEST_BASIC_SIMILAR2_INT64 0x4
+#undef TEST_BASIC_SIMILAR2_UINT8
+#define TEST_BASIC_SIMILAR2_UINT8 0x5
+#undef TEST_BASIC_SIMILAR2_UINT16
+#define TEST_BASIC_SIMILAR2_UINT16 0x6
+#undef TEST_BASIC_SIMILAR2_UINT32
+#define TEST_BASIC_SIMILAR2_UINT32 0x7
+#undef TEST_BASIC_SIMILAR2_UINT64
+#define TEST_BASIC_SIMILAR2_UINT64 0x8
+#undef TEST_BASIC_SIMILAR2_HEX8
+#define TEST_BASIC_SIMILAR2_HEX8 0x9
+#undef TEST_BASIC_SIMILAR2_HEX16
+#define TEST_BASIC_SIMILAR2_HEX16 0xa
+#undef TEST_BASIC_SIMILAR2_HEX32
+#define TEST_BASIC_SIMILAR2_HEX32 0xb
+#undef TEST_BASIC_SIMILAR2_HEX64
+#define TEST_BASIC_SIMILAR2_HEX64 0xc
+#undef TEST_BASIC_SIMILAR2_STRING8
+#define TEST_BASIC_SIMILAR2_STRING8 0xd
+#undef TEST_BASIC_SIMILAR2_FFIX
+#define TEST_BASIC_SIMILAR2_FFIX 0xe
+#undef TEST_BASIC_SIMILAR2_FEXP
+#define TEST_BASIC_SIMILAR2_FEXP 0xf
+#undef TEST_BASIC_SIMILAR2_FOPT
+#define TEST_BASIC_SIMILAR2_FOPT 0x10
+#undef ARRAY_TWO_SIMILAR_OK_TEST
+#define ARRAY_TWO_SIMILAR_OK_TEST 0xe2
+#undef TEST_ARRAY_SIMILAR2_INT8
+#define TEST_ARRAY_SIMILAR2_INT8 0x1
+#undef TEST_ARRAY_SIMILAR2_INT16
+#define TEST_ARRAY_SIMILAR2_INT16 0x2
+#undef TEST_ARRAY_SIMILAR2_INT32
+#define TEST_ARRAY_SIMILAR2_INT32 0x3
+#undef TEST_ARRAY_SIMILAR2_INT64
+#define TEST_ARRAY_SIMILAR2_INT64 0x4
+#undef TEST_ARRAY_SIMILAR2_UINT8
+#define TEST_ARRAY_SIMILAR2_UINT8 0x5
+#undef TEST_ARRAY_SIMILAR2_UINT16
+#define TEST_ARRAY_SIMILAR2_UINT16 0x6
+#undef TEST_ARRAY_SIMILAR2_UINT32
+#define TEST_ARRAY_SIMILAR2_UINT32 0x7
+#undef TEST_ARRAY_SIMILAR2_UINT64
+#define TEST_ARRAY_SIMILAR2_UINT64 0x8
+#undef TEST_ARRAY_SIMILAR2_HEX8
+#define TEST_ARRAY_SIMILAR2_HEX8 0x9
+#undef TEST_ARRAY_SIMILAR2_HEX16
+#define TEST_ARRAY_SIMILAR2_HEX16 0xa
+#undef TEST_ARRAY_SIMILAR2_HEX32
+#define TEST_ARRAY_SIMILAR2_HEX32 0xb
+#undef TEST_ARRAY_SIMILAR2_HEX64
+#define TEST_ARRAY_SIMILAR2_HEX64 0xc
+#undef TEST_ARRAY_SIMILAR2_FFIX
+#define TEST_ARRAY_SIMILAR2_FFIX 0xd
+#undef TEST_ARRAY_SIMILAR2_FEXP
+#define TEST_ARRAY_SIMILAR2_FEXP 0xe
+#undef TEST_ARRAY_SIMILAR2_FOPT
+#define TEST_ARRAY_SIMILAR2_FOPT 0xf
+#undef ENUM_OK_TEST
+#define ENUM_OK_TEST 0xe3
+#undef TEST_ENUM_OK
+#define TEST_ENUM_OK 0x1
+#undef TEST_ENUM_ARRAY_OK
+#define TEST_ENUM_ARRAY_OK 0x2
+#undef TRACE_PERFORMANCE
+#define TRACE_PERFORMANCE 0x8b
+#undef EVENT_MY_EVENT_TRACE1_START
+#define EVENT_MY_EVENT_TRACE1_START 0x1
+#undef EVENT_MY_EVENT_TRACE1_STOP
+#define EVENT_MY_EVENT_TRACE1_STOP 0x2
+#undef EVENT_MY_EVENT_TRACE2_START
+#define EVENT_MY_EVENT_TRACE2_START 0x3
+#undef EVENT_MY_EVENT_TRACE2_STOP
+#define EVENT_MY_EVENT_TRACE2_STOP 0x4
+#undef TRACE_FLOW
+#define TRACE_FLOW 0x8a
+#undef DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY 0x1
+#undef DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT 0x2
+#undef KEKKONEN
+#define KEKKONEN 0xe4
+#undef TEXT1
+#define TEXT1 0x1
+#undef TEXT2
+#define TEXT2 0x2
+#undef TEXT3
+#define TEXT3 0x3
+#undef TEXT4
+#define TEXT4 0x4
+#undef TEXT5
+#define TEXT5 0x5
+#undef TEXT6
+#define TEXT6 0x6
+#undef TEXT7
+#define TEXT7 0x7
+#undef TEXT8
+#define TEXT8 0x8
+#undef TEXT9
+#define TEXT9 0x9
+#undef TEXT10
+#define TEXT10 0xa
+#undef TEXT11
+#define TEXT11 0xb
+#undef TEXT12
+#define TEXT12 0xc
+#undef TEXT13
+#define TEXT13 0xd
+#undef TEXT14
+#define TEXT14 0xe
+#undef TEXT15
+#define TEXT15 0xf
+#undef TEXT16
+#define TEXT16 0x10
+#undef TEXT17
+#define TEXT17 0x11
+#undef TEXT18
+#define TEXT18 0x12
+#undef TEXT19
+#define TEXT19 0x13
+#undef TEXT20
+#define TEXT20 0x14
+#undef TEXT21
+#define TEXT21 0x15
+#undef TEXT22
+#define TEXT22 0x16
+#undef TEXT23
+#define TEXT23 0x17
+#undef TEXT24
+#define TEXT24 0x18
+#undef TEXT25
+#define TEXT25 0x19
+#undef TEXT26
+#define TEXT26 0x1a
+#undef TEXT27
+#define TEXT27 0x1b
+#undef TEXT28
+#define TEXT28 0x1c
+#undef TEXT29
+#define TEXT29 0x1d
+#undef TEXT30
+#define TEXT30 0x1e
+#undef TEXT31
+#define TEXT31 0x1f
+#undef TEXT32
+#define TEXT32 0x20
+#undef TEXT33
+#define TEXT33 0x21
+#undef TEXT34
+#define TEXT34 0x22
+#undef TEXT35
+#define TEXT35 0x23
+#undef TEXT36
+#define TEXT36 0x24
+#undef TEXT37
+#define TEXT37 0x25
+#undef TEXT38
+#define TEXT38 0x26
+#undef TEXT39
+#define TEXT39 0x27
+#undef TEXT40
+#define TEXT40 0x28
+#undef TEXT41
+#define TEXT41 0x29
+#undef TEXT42
+#define TEXT42 0x2a
+#undef TEXT43
+#define TEXT43 0x2b
+#undef TEXT44
+#define TEXT44 0x2c
+#undef TEXT45
+#define TEXT45 0x2d
+#undef TEXT46
+#define TEXT46 0x2e
+#undef TEXT47
+#define TEXT47 0x2f
+#undef TEXT48
+#define TEXT48 0x30
+#undef TEXT49
+#define TEXT49 0x31
+
+RES_BEGIN( RESOURCE_TRC_SYMBIAN, TRACECOMPILERTESTERBASIC_COMPONENT, TRACECOMPILERTESTERBASIC_TRACE, "TRACECOMPILERTESTERBASIC", "", FALSE )
+
+ #include <SharedTraceDefinitions.h>
+
+ CONST_TBL_BEGIN( TErrorCodes, 32, SYMBIAN_ENDIANESS, "", "" )
+ CONST_TBL_ENTRY( KErrGeneral, -2, "" )
+ CONST_TBL_ENTRY( ValueOne, 1, "" )
+ CONST_TBL_END
+ SEQ_BEGIN( TErrorCodes_Seq, DONT_CREATE_STRUCT, "", "" )
+ VALUE_CONST( data, "data", TErrorCodes )
+ SEQ_END
+
+ TRACE_GROUP_BEGIN( INCLUDED_NON_SOURCE_FILE_TEST, "TraceCompilerTesterBasic: INCLUDED_NON_SOURCE_FILE_TEST: ", ON )
+
+ TRACE_BEGIN( NON_SOURCE_FILE_TRACE1, "Inline function GetBigValue1000 return value:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( NON_SOURCE_FILE_TRACE2, "Inline function GetBigValue1000 return value:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( BASIC_OK_TEST, "TraceCompilerTesterBasic: BASIC_OK_TEST: ", ON )
+
+ TRACE_BEGIN( TEST_BASIC_INT8, "int8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -8, BE, arg1, "arg1", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_INT16, "int16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -16, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_INT32, "int32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_INT64, "int64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_SDEC, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_UINT8, "uint8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg1, "arg1", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_UINT16, "uint16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_UINT32, "uint32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_UINT64, "uint64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_UDEC, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_HEX8, "hex8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg1, "arg1", HEX )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_HEX16, "hex16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg1, "arg1", HEX )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_HEX32, "hex32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_HEX64, "hex64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_STRING8, "ascii:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII_ZERO_TERMINATED, BE, STR8, "STR8", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_STRING16, "unicode:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_UNICODE_ZERO_TERMINATED, SYMBIAN_ENDIANESS, unicodePtr, "unicodePtr", REF_LENGTH_DETERMINED_BY_ZERO, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_FFIX, "ffix:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_FEXP, "fexp:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_FOPT, "fopt:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( ARRAY_OK_TEST, "TraceCompilerTesterBasic: ARRAY_OK_TEST: ", ON )
+
+ TRACE_BEGIN( TEST_ARRAY_INT8, "int8 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_SDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_INT16, "int16 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_SDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_INT32, "int32 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_SDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_INT64, "int64 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_SDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_UINT8, "uint8 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_UDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_UINT16, "uint16 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_UDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_UINT32, "uint32 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_UDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_UINT64, "uint64 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_UDEC, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_HEX8, "hex8 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_HEX16, "hex16 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_HEX32, "hex32 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_HEX64, "hex64 array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_FFIX, "ffix array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_FEXP, "fexp array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_FOPT, "fopt array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( BASIC_TWO_SIMILAR_OK_TEST, "TraceCompilerTesterBasic: BASIC_TWO_SIMILAR_OK_TEST: ", ON )
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_INT8, "int8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -8, BE, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -8, BE, arg2, "arg2", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_INT16, "int16: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -16, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -16, SYMBIAN_ENDIANESS, arg2, "arg2", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_INT32, "int32: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg2, "arg2", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_INT64, "int64: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_SDEC, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_SDEC, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_UINT8, "uint8: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg2, "arg2", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_UINT16, "uint16: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg2, "arg2", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_UINT32, "uint32: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg2, "arg2", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_UINT64, "uint64: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_UDEC, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_UDEC, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_HEX8, "hex8: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg1, "arg1", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, arg2, "arg2", HEX )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_HEX16, "hex16: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg1, "arg1", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 16, SYMBIAN_ENDIANESS, arg2, "arg2", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_HEX32, "hex32: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg2, "arg2", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_HEX64, "hex64: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_STRING8, "ascii: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR8len, "STR8_len", STR8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR8, "STR8", STR8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, STR82len, "STR82_len", STR82_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ STRING_REF( STRING_ASCII, BE, STR82, "STR82", STR82_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_FFIX, "ffix: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_FEXP, "fexp: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_BASIC_SIMILAR2_FOPT, "fopt: ," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg1, "arg1", TRACE_SEQ_QWORD_HEX, 1 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF( arg2, "arg2", TRACE_SEQ_QWORD_HEX, 1 )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( ARRAY_TWO_SIMILAR_OK_TEST, "TraceCompilerTesterBasic: ARRAY_TWO_SIMILAR_OK_TEST: ", ON )
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_INT8, "int8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf8len, "buf8_len", buf8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_SDEC, buf8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf82len, "buf82_len", buf82_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf82, "buf82", TRACE_SEQ_BYTE_SDEC, buf82_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_INT16, "int16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf16len, "buf16_len", buf16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_SDEC, buf16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf162len, "buf162_len", buf162_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf162, "buf162", TRACE_SEQ_WORD_SDEC, buf162_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_INT32, "int32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf32len, "buf32_len", buf32_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_SDEC, buf32_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf322len, "buf322_len", buf322_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf322, "buf322", TRACE_SEQ_DWORD_SDEC, buf322_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_INT64, "int64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf64len, "buf64_len", buf64_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_SDEC, buf64_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf642len, "buf642_len", buf642_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf642, "buf642", TRACE_SEQ_QWORD_SDEC, buf642_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_UINT8, "uint8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf8len, "buf8_len", buf8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_UDEC, buf8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf82len, "buf82_len", buf82_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf82, "buf82", TRACE_SEQ_BYTE_UDEC, buf82_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_UINT16, "uint16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf16len, "buf16_len", buf16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_UDEC, buf16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf162len, "buf162_len", buf162_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf162, "buf162", TRACE_SEQ_WORD_UDEC, buf162_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_UINT32, "uint32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf32len, "buf32_len", buf32_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_UDEC, buf32_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf322len, "buf322_len", buf322_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf322, "buf322", TRACE_SEQ_DWORD_UDEC, buf322_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_UINT64, "uint64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf64len, "buf64_len", buf64_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_UDEC, buf64_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf642len, "buf642_len", buf642_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf642, "buf642", TRACE_SEQ_QWORD_UDEC, buf642_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_HEX8, "hex8:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf8len, "buf8_len", buf8_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf8, "buf8", TRACE_SEQ_BYTE_HEX, buf8_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf82len, "buf82_len", buf82_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf82, "buf82", TRACE_SEQ_BYTE_HEX, buf82_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_HEX16, "hex16:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf16len, "buf16_len", buf16_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf16, "buf16", TRACE_SEQ_WORD_HEX, buf16_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf162len, "buf162_len", buf162_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf162, "buf162", TRACE_SEQ_WORD_HEX, buf162_lenref, ISIHDR_DONT_GENERATE )
+ FILLER( FILLER_VARIABLE, 32 )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_HEX32, "hex32:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf32len, "buf32_len", buf32_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf32, "buf32", TRACE_SEQ_DWORD_HEX, buf32_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf322len, "buf322_len", buf322_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf322, "buf322", TRACE_SEQ_DWORD_HEX, buf322_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_HEX64, "hex64:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf64len, "buf64_len", buf64_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf64, "buf64", TRACE_SEQ_QWORD_HEX, buf64_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, buf642len, "buf642_len", buf642_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf642, "buf642", TRACE_SEQ_QWORD_HEX, buf642_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_FFIX, "ffix:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloatlen, "bufFloat_len", bufFloat_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, bufFloat_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloat2len, "bufFloat2_len", bufFloat2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat2, "bufFloat2", TRACE_SEQ_QWORD_HEX, bufFloat2_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_FEXP, "fexp:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloatlen, "bufFloat_len", bufFloat_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, bufFloat_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloat2len, "bufFloat2_len", bufFloat2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat2, "bufFloat2", TRACE_SEQ_QWORD_HEX, bufFloat2_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ARRAY_SIMILAR2_FOPT, "fopt:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloatlen, "bufFloat_len", bufFloat_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat, "bufFloat", TRACE_SEQ_QWORD_HEX, bufFloat_lenref, ISIHDR_DONT_GENERATE )
+ PROPERTY( PROPERTY_PMD_IS_NOT_PARAMETER )
+ REFERENCE( 32, SYMBIAN_ENDIANESS, bufFloat2len, "bufFloat2_len", bufFloat2_lenref )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( bufFloat2, "bufFloat2", TRACE_SEQ_QWORD_HEX, bufFloat2_lenref, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( ENUM_OK_TEST, "TraceCompilerTesterBasic: ENUM_OK_TEST: ", ON )
+
+ TRACE_BEGIN( TEST_ENUM_OK, "Enum:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE_CONST( ret, "ret", TErrorCodes )
+ TRACE_END()
+
+ TRACE_BEGIN( TEST_ENUM_ARRAY_OK, "Enum Array:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ SEQ_OF_REF( buf, "buf", TErrorCodes_Seq, REF_AS_MANY_AS_POSSIBLE, ISIHDR_DONT_GENERATE )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( TRACE_PERFORMANCE, "TraceCompilerTesterBasic: Performance: ", ON )
+
+ TRACE_BEGIN( EVENT_MY_EVENT_TRACE1_START, "Event1>" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( EVENT_MY_EVENT_TRACE1_STOP, "Event1<" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( EVENT_MY_EVENT_TRACE2_START, "Event2>" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ TRACE_END()
+
+ TRACE_BEGIN( EVENT_MY_EVENT_TRACE2_STOP, "Event2<" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, value, "value", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, arg1, "arg1", DEC )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( TRACE_FLOW, "TraceCompilerTesterBasic: Flow: ", ON )
+
+ TRACE_BEGIN( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY, "> DTraceCompilerTesterCommon1::SumValues" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, aValue1, "aValue1", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, aValue2, "aValue2", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, aValue3, "aValue3", DEC )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 8, BE, aValue4, "aValue4", DEC )
+ FILLER( FILLER_FIXED, 8 )
+ FILLER( FILLER_FIXED, 8 )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, this, "this", HEX )
+ TRACE_END()
+
+ TRACE_BEGIN( DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT, "< DTraceCompilerTesterCommon1::SumValues" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( 32, SYMBIAN_ENDIANESS, this, "this", HEX )
+ PROPERTY( PROPERTY_PMD_PARAMETER )
+ VALUE( -32, SYMBIAN_ENDIANESS, retVal, "retVal", DEC )
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+ TRACE_GROUP_BEGIN( KEKKONEN, "TraceCompilerTesterBasic: KEKKONEN: ", ON )
+
+ TRACE_BEGIN( TEXT1, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT2, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT3, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT4, "ifGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLj." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT5, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT6, ".iLLLGGGGGGGGGGGGGGGGGGLLLLLfffffffffjfffffjfi:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT7, ".fLLLLLGGGGGGGGGGGGGGGGLLLLLLLfffffjjjjjjjjjttjt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT8, ".iffLfLGLGGGGGGGGGGGGGGGGGLLLLfffffffjjjjjjjtttii." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT9, ".ijfffLLLLLLGGGGGGGGGGGGGGGLLLffLffffffjjjjjttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT10, "ittfffffLLLLGGGGGGGGGGGGGGGLLLLLLLffffjjjjjttttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT11, ".iitjffffLLLLLGGGGGGGGGGGGGGGGGLLLffffjjttjjtitttii" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT12, ":ittffLLLLGGGLGGGGGGGGGWGGGGGGGGLLLLffjjttjjtittiiii:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT13, ".,tjjffLLLGGGGGGGGGGGGWWWWWGGGGGGGLLLffjjtjfftitttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT14, ",jffjjffLLGGGGGGGGGWWWWGGGWWWWWWWGGLLjjtjffjtttttti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT15, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT16, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT17, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT18, ". ..:,:::.. ....," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT19, ":: :,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT20, ":: .:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT21, "....:," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT22, ",:.:,,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT23, ".,,:..:," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT24, ".:..::::..ifLWDDWGLLLLj" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT25, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT26, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT27, "." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT28, "," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT29, ".iifjttttjfLGGLLLLLLLLffffjtfLffffjjt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT30, ",iLGi,:,,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT31, ".,jLfjtjjfLLGGGGGGGGLLLLfjjfLfjjjti" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT32, "ijjjjjjttjjfffLLGGGLLLLfjjfjjjji" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT33, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT34, ".:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT35, ".itjjjfLLLGGGWWWWGGLjji" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT36, ":" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT37, "::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT38, ".: ........::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT39, ",j. ......:::,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT40, ",fj, . ..,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT41, "tWLf. ..:,," )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT42, "jK##EL" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT43, "LK#Effj" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT44, "EEi. .:EKKKKKKKKL:" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT45, ":DitD#KKKKKG" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT46, "-" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT47, ".iWD .:::::,,:fE#Dt" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT48, ",L#D:ijttiiii" )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_BEGIN( TEXT49, "jK# ...::,,. ." )
+ AUTOGEN_BTRACE_HEADER_MAPPED
+ TRACE_END()
+
+ TRACE_GROUP_END()
+
+RES_END
+
+#undef AUTOGEN_TRACES_HAVE_FIXED_IDS
+#include <isi_macros.h>
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces/BigNumbersTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,16 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __BIGNUMBERSTRACES_H__
+#define __BIGNUMBERSTRACES_H__
+
+#define KOstTraceComponentID 0x20011112
+
+#define NON_SOURCE_FILE_TRACE1 0xde0001
+#define NON_SOURCE_FILE_TRACE2 0xde0002
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces/TraceCompilerTesterBasicTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1834 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERBASICTRACES_H__
+#define __TRACECOMPILERTESTERBASICTRACES_H__
+
+#define KOstTraceComponentID 0x20011112
+
+#define TEST_BASIC_INT8 0xdf0001
+#define TEST_BASIC_INT16 0xdf0002
+#define TEST_BASIC_INT32 0xdf0003
+#define TEST_BASIC_INT64 0xdf0004
+#define TEST_BASIC_UINT8 0xdf0005
+#define TEST_BASIC_UINT16 0xdf0006
+#define TEST_BASIC_UINT32 0xdf0007
+#define TEST_BASIC_UINT64 0xdf0008
+#define TEST_BASIC_HEX8 0xdf0009
+#define TEST_BASIC_HEX16 0xdf000a
+#define TEST_BASIC_HEX32 0xdf000b
+#define TEST_BASIC_HEX64 0xdf000c
+#define TEST_BASIC_STRING8 0xdf000d
+#define TEST_BASIC_STRING16 0xdf000e
+#define TEST_BASIC_FFIX 0xdf000f
+#define TEST_BASIC_FEXP 0xdf0010
+#define TEST_BASIC_FOPT 0xdf0011
+#define TEST_ARRAY_INT8 0xe00001
+#define TEST_ARRAY_INT16 0xe00002
+#define TEST_ARRAY_INT32 0xe00003
+#define TEST_ARRAY_INT64 0xe00004
+#define TEST_ARRAY_UINT8 0xe00005
+#define TEST_ARRAY_UINT16 0xe00006
+#define TEST_ARRAY_UINT32 0xe00007
+#define TEST_ARRAY_UINT64 0xe00008
+#define TEST_ARRAY_HEX8 0xe00009
+#define TEST_ARRAY_HEX16 0xe0000a
+#define TEST_ARRAY_HEX32 0xe0000b
+#define TEST_ARRAY_HEX64 0xe0000c
+#define TEST_ARRAY_FFIX 0xe0000d
+#define TEST_ARRAY_FEXP 0xe0000e
+#define TEST_ARRAY_FOPT 0xe0000f
+#define TEST_BASIC_SIMILAR2_INT8 0xe10001
+#define TEST_BASIC_SIMILAR2_INT16 0xe10002
+#define TEST_BASIC_SIMILAR2_INT32 0xe10003
+#define TEST_BASIC_SIMILAR2_INT64 0xe10004
+#define TEST_BASIC_SIMILAR2_UINT8 0xe10005
+#define TEST_BASIC_SIMILAR2_UINT16 0xe10006
+#define TEST_BASIC_SIMILAR2_UINT32 0xe10007
+#define TEST_BASIC_SIMILAR2_UINT64 0xe10008
+#define TEST_BASIC_SIMILAR2_HEX8 0xe10009
+#define TEST_BASIC_SIMILAR2_HEX16 0xe1000a
+#define TEST_BASIC_SIMILAR2_HEX32 0xe1000b
+#define TEST_BASIC_SIMILAR2_HEX64 0xe1000c
+#define TEST_BASIC_SIMILAR2_STRING8 0xe1000d
+#define TEST_BASIC_SIMILAR2_FFIX 0xe1000e
+#define TEST_BASIC_SIMILAR2_FEXP 0xe1000f
+#define TEST_BASIC_SIMILAR2_FOPT 0xe10010
+#define TEST_ARRAY_SIMILAR2_INT8 0xe20001
+#define TEST_ARRAY_SIMILAR2_INT16 0xe20002
+#define TEST_ARRAY_SIMILAR2_INT32 0xe20003
+#define TEST_ARRAY_SIMILAR2_INT64 0xe20004
+#define TEST_ARRAY_SIMILAR2_UINT8 0xe20005
+#define TEST_ARRAY_SIMILAR2_UINT16 0xe20006
+#define TEST_ARRAY_SIMILAR2_UINT32 0xe20007
+#define TEST_ARRAY_SIMILAR2_UINT64 0xe20008
+#define TEST_ARRAY_SIMILAR2_HEX8 0xe20009
+#define TEST_ARRAY_SIMILAR2_HEX16 0xe2000a
+#define TEST_ARRAY_SIMILAR2_HEX32 0xe2000b
+#define TEST_ARRAY_SIMILAR2_HEX64 0xe2000c
+#define TEST_ARRAY_SIMILAR2_FFIX 0xe2000d
+#define TEST_ARRAY_SIMILAR2_FEXP 0xe2000e
+#define TEST_ARRAY_SIMILAR2_FOPT 0xe2000f
+#define TEST_ENUM_OK 0xe30001
+#define TEST_ENUM_ARRAY_OK 0xe30002
+#define EVENT_MY_EVENT_TRACE1_START 0x8b0001
+#define EVENT_MY_EVENT_TRACE1_STOP 0x8b0002
+#define EVENT_MY_EVENT_TRACE2_START 0x8b0003
+#define EVENT_MY_EVENT_TRACE2_STOP 0x8b0004
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt8 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt8* )ptr ) = aParam1;
+ ptr += sizeof ( TInt8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt16 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt16* )ptr ) = aParam1;
+ ptr += sizeof ( TInt16 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt64 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt64* )ptr ) = aParam1;
+ ptr += sizeof ( TInt64 );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint8 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint8* )ptr ) = aParam1;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint16 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint16* )ptr ) = aParam1;
+ ptr += sizeof ( TUint16 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint64 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint64* )ptr ) = aParam1;
+ ptr += sizeof ( TUint64 );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+#endif
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TReal aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TReal* )ptr ) = aParam1;
+ ptr += sizeof ( TReal );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt8 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt16 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt32 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt64 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint8 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint16 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint32 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint64 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TReal >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt8 aParam1, TInt8 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt8* )ptr ) = aParam1;
+ ptr += sizeof ( TInt8 );
+ *( ( TInt8* )ptr ) = aParam2;
+ ptr += sizeof ( TInt8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt16 aParam1, TInt16 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt16* )ptr ) = aParam1;
+ ptr += sizeof ( TInt16 );
+ *( ( TInt16* )ptr ) = aParam2;
+ ptr += sizeof ( TInt16 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TInt aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt32 aParam1, TInt32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt64 aParam1, TInt64 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt64* )ptr ) = aParam1;
+ ptr += sizeof ( TInt64 );
+ *( ( TInt64* )ptr ) = aParam2;
+ ptr += sizeof ( TInt64 );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint8 aParam1, TUint8 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint8* )ptr ) = aParam1;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam2;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint16 aParam1, TUint16 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint16* )ptr ) = aParam1;
+ ptr += sizeof ( TUint16 );
+ *( ( TUint16* )ptr ) = aParam2;
+ ptr += sizeof ( TUint16 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TUint aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint64 aParam1, TUint64 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TUint64* )ptr ) = aParam1;
+ ptr += sizeof ( TUint64 );
+ *( ( TUint64* )ptr ) = aParam2;
+ ptr += sizeof ( TUint64 );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TReal aParam1, TReal aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TReal* )ptr ) = aParam1;
+ ptr += sizeof ( TReal );
+ *( ( TReal* )ptr ) = aParam2;
+ ptr += sizeof ( TReal );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt8 >& aParam1, const TOstArray< TInt8 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt16 >& aParam1, const TOstArray< TInt16 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt >& aParam1, const TOstArray< TInt >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt32 >& aParam1, const TOstArray< TInt32 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt64 >& aParam1, const TOstArray< TInt64 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint8 >& aParam1, const TOstArray< TUint8 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint16 >& aParam1, const TOstArray< TUint16 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint >& aParam1, const TOstArray< TUint >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint32 >& aParam1, const TOstArray< TUint32 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint64 >& aParam1, const TOstArray< TUint64 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TReal >& aParam1, const TOstArray< TReal >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TUint aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt32 aParam1, TUint32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces/TraceCompilerTesterCommon1Traces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,106 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERCOMMON1TRACES_H__
+#define __TRACECOMPILERTESTERCOMMON1TRACES_H__
+
+#define KOstTraceComponentID 0x20011112
+
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY 0x8a0001, aValue1, aValue2, aValue3, aValue4
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT 0x8a0002
+
+
+inline TBool OstTraceGenExt( TUint32 aTraceID, TInt aParam1, TInt aParam2, TUint8 aParam3, TUint8 aParam4, TUint aParam5 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ *( ( TUint8* )ptr ) = aParam3;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam4;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint* )ptr ) = aParam5;
+ ptr += sizeof ( TUint );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGenExt( TUint32 aTraceID, TInt32 aParam1, TInt32 aParam2, TUint8 aParam3, TUint8 aParam4, TUint32 aParam5 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ *( ( TUint8* )ptr ) = aParam3;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam4;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint* )ptr ) = aParam5;
+ ptr += sizeof ( TUint );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces/TraceCompilerTesterCommon2Traces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,63 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERCOMMON2TRACES_H__
+#define __TRACECOMPILERTESTERCOMMON2TRACES_H__
+
+#define KOstTraceComponentID 0x20011112
+
+#define TEXT1 0xe40001
+#define TEXT2 0xe40002
+#define TEXT3 0xe40003
+#define TEXT4 0xe40004
+#define TEXT5 0xe40005
+#define TEXT6 0xe40006
+#define TEXT7 0xe40007
+#define TEXT8 0xe40008
+#define TEXT9 0xe40009
+#define TEXT10 0xe4000a
+#define TEXT11 0xe4000b
+#define TEXT12 0xe4000c
+#define TEXT13 0xe4000d
+#define TEXT14 0xe4000e
+#define TEXT15 0xe4000f
+#define TEXT16 0xe40010
+#define TEXT17 0xe40011
+#define TEXT18 0xe40012
+#define TEXT19 0xe40013
+#define TEXT20 0xe40014
+#define TEXT21 0xe40015
+#define TEXT22 0xe40016
+#define TEXT23 0xe40017
+#define TEXT24 0xe40018
+#define TEXT25 0xe40019
+#define TEXT26 0xe4001a
+#define TEXT27 0xe4001b
+#define TEXT28 0xe4001c
+#define TEXT29 0xe4001d
+#define TEXT30 0xe4001e
+#define TEXT31 0xe4001f
+#define TEXT32 0xe40020
+#define TEXT33 0xe40021
+#define TEXT34 0xe40022
+#define TEXT35 0xe40023
+#define TEXT36 0xe40024
+#define TEXT37 0xe40025
+#define TEXT38 0xe40026
+#define TEXT39 0xe40027
+#define TEXT40 0xe40028
+#define TEXT41 0xe40029
+#define TEXT42 0xe4002a
+#define TEXT43 0xe4002b
+#define TEXT44 0xe4002c
+#define TEXT45 0xe4002d
+#define TEXT46 0xe4002e
+#define TEXT47 0xe4002f
+#define TEXT48 0xe40030
+#define TEXT49 0xe40031
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces/fixed_id.definitions Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,132 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]ARRAY_OK_TEST=0xe0
+[GROUP]ARRAY_TWO_SIMILAR_OK_TEST=0xe2
+[GROUP]BASIC_OK_TEST=0xdf
+[GROUP]BASIC_TWO_SIMILAR_OK_TEST=0xe1
+[GROUP]ENUM_OK_TEST=0xe3
+[GROUP]INCLUDED_NON_SOURCE_FILE_TEST=0xde
+[GROUP]KEKKONEN=0xe4
+[GROUP]TRACE_FLOW=0x8a
+[GROUP]TRACE_PERFORMANCE=0x8b
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_FEXP=0xe
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_FFIX=0xd
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_FOPT=0xf
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_HEX16=0xa
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_HEX32=0xb
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_HEX64=0xc
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_HEX8=0x9
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_INT16=0x2
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_INT32=0x3
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_INT64=0x4
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_INT8=0x1
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_UINT16=0x6
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_UINT32=0x7
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_UINT64=0x8
+[TRACE]ARRAY_OK_TEST[0xE0]_TEST_ARRAY_UINT8=0x5
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_FEXP=0xe
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_FFIX=0xd
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_FOPT=0xf
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_HEX16=0xa
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_HEX32=0xb
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_HEX64=0xc
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_HEX8=0x9
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_INT16=0x2
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_INT32=0x3
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_INT64=0x4
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_INT8=0x1
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_UINT16=0x6
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_UINT32=0x7
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_UINT64=0x8
+[TRACE]ARRAY_TWO_SIMILAR_OK_TEST[0xE2]_TEST_ARRAY_SIMILAR2_UINT8=0x5
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_FEXP=0x10
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_FFIX=0xf
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_FOPT=0x11
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_HEX16=0xa
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_HEX32=0xb
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_HEX64=0xc
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_HEX8=0x9
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_INT16=0x2
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_INT32=0x3
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_INT64=0x4
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_INT8=0x1
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_STRING16=0xe
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_STRING8=0xd
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_UINT16=0x6
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_UINT32=0x7
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_UINT64=0x8
+[TRACE]BASIC_OK_TEST[0xDF]_TEST_BASIC_UINT8=0x5
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_FEXP=0xf
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_FFIX=0xe
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_FOPT=0x10
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_HEX16=0xa
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_HEX32=0xb
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_HEX64=0xc
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_HEX8=0x9
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_INT16=0x2
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_INT32=0x3
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_INT64=0x4
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_INT8=0x1
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_STRING8=0xd
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_UINT16=0x6
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_UINT32=0x7
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_UINT64=0x8
+[TRACE]BASIC_TWO_SIMILAR_OK_TEST[0xE1]_TEST_BASIC_SIMILAR2_UINT8=0x5
+[TRACE]ENUM_OK_TEST[0xE3]_TEST_ENUM_ARRAY_OK=0x2
+[TRACE]ENUM_OK_TEST[0xE3]_TEST_ENUM_OK=0x1
+[TRACE]INCLUDED_NON_SOURCE_FILE_TEST[0xDE]_NON_SOURCE_FILE_TRACE1=0x1
+[TRACE]INCLUDED_NON_SOURCE_FILE_TEST[0xDE]_NON_SOURCE_FILE_TRACE2=0x2
+[TRACE]KEKKONEN[0xE4]_TEXT1=0x1
+[TRACE]KEKKONEN[0xE4]_TEXT10=0xa
+[TRACE]KEKKONEN[0xE4]_TEXT11=0xb
+[TRACE]KEKKONEN[0xE4]_TEXT12=0xc
+[TRACE]KEKKONEN[0xE4]_TEXT13=0xd
+[TRACE]KEKKONEN[0xE4]_TEXT14=0xe
+[TRACE]KEKKONEN[0xE4]_TEXT15=0xf
+[TRACE]KEKKONEN[0xE4]_TEXT16=0x10
+[TRACE]KEKKONEN[0xE4]_TEXT17=0x11
+[TRACE]KEKKONEN[0xE4]_TEXT18=0x12
+[TRACE]KEKKONEN[0xE4]_TEXT19=0x13
+[TRACE]KEKKONEN[0xE4]_TEXT2=0x2
+[TRACE]KEKKONEN[0xE4]_TEXT20=0x14
+[TRACE]KEKKONEN[0xE4]_TEXT21=0x15
+[TRACE]KEKKONEN[0xE4]_TEXT22=0x16
+[TRACE]KEKKONEN[0xE4]_TEXT23=0x17
+[TRACE]KEKKONEN[0xE4]_TEXT24=0x18
+[TRACE]KEKKONEN[0xE4]_TEXT25=0x19
+[TRACE]KEKKONEN[0xE4]_TEXT26=0x1a
+[TRACE]KEKKONEN[0xE4]_TEXT27=0x1b
+[TRACE]KEKKONEN[0xE4]_TEXT28=0x1c
+[TRACE]KEKKONEN[0xE4]_TEXT29=0x1d
+[TRACE]KEKKONEN[0xE4]_TEXT3=0x3
+[TRACE]KEKKONEN[0xE4]_TEXT30=0x1e
+[TRACE]KEKKONEN[0xE4]_TEXT31=0x1f
+[TRACE]KEKKONEN[0xE4]_TEXT32=0x20
+[TRACE]KEKKONEN[0xE4]_TEXT33=0x21
+[TRACE]KEKKONEN[0xE4]_TEXT34=0x22
+[TRACE]KEKKONEN[0xE4]_TEXT35=0x23
+[TRACE]KEKKONEN[0xE4]_TEXT36=0x24
+[TRACE]KEKKONEN[0xE4]_TEXT37=0x25
+[TRACE]KEKKONEN[0xE4]_TEXT38=0x26
+[TRACE]KEKKONEN[0xE4]_TEXT39=0x27
+[TRACE]KEKKONEN[0xE4]_TEXT4=0x4
+[TRACE]KEKKONEN[0xE4]_TEXT40=0x28
+[TRACE]KEKKONEN[0xE4]_TEXT41=0x29
+[TRACE]KEKKONEN[0xE4]_TEXT42=0x2a
+[TRACE]KEKKONEN[0xE4]_TEXT43=0x2b
+[TRACE]KEKKONEN[0xE4]_TEXT44=0x2c
+[TRACE]KEKKONEN[0xE4]_TEXT45=0x2d
+[TRACE]KEKKONEN[0xE4]_TEXT46=0x2e
+[TRACE]KEKKONEN[0xE4]_TEXT47=0x2f
+[TRACE]KEKKONEN[0xE4]_TEXT48=0x30
+[TRACE]KEKKONEN[0xE4]_TEXT49=0x31
+[TRACE]KEKKONEN[0xE4]_TEXT5=0x5
+[TRACE]KEKKONEN[0xE4]_TEXT6=0x6
+[TRACE]KEKKONEN[0xE4]_TEXT7=0x7
+[TRACE]KEKKONEN[0xE4]_TEXT8=0x8
+[TRACE]KEKKONEN[0xE4]_TEXT9=0x9
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY=0x1
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT=0x2
+[TRACE]TRACE_PERFORMANCE[0x8B]_EVENT_MY_EVENT_TRACE1_START=0x1
+[TRACE]TRACE_PERFORMANCE[0x8B]_EVENT_MY_EVENT_TRACE1_STOP=0x2
+[TRACE]TRACE_PERFORMANCE[0x8B]_EVENT_MY_EVENT_TRACE2_START=0x3
+[TRACE]TRACE_PERFORMANCE[0x8B]_EVENT_MY_EVENT_TRACE2_STOP=0x4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/BigNumbersTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,16 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __BIGNUMBERSTRACES_H__
+#define __BIGNUMBERSTRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define NON_SOURCE_FILE_TRACE1 0xde0002
+#define NON_SOURCE_FILE_TRACE2 0xde0003
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/TraceCompilerTesterAdvancedTraces Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,342 @@
+// Created by TraceCompiler 1.2.5
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERADVANCEDTRACES_H__
+#define __TRACECOMPILERTESTERADVANCEDTRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define HELLO_WORLD 0x400001
+#define HELLO_MOON 0x70001
+#define TEST_TRACE_2 0x70002
+#define POINTER_PARAMETER_TRACE1 0x410001
+#define POINTER_PARAMETER_TRACE2 0x410002
+#define ASCII60 0x420001
+#define ASCII300 0x420002
+#define ASCII512 0x420003
+#define ASCII600 0x420004
+#define ASCII300_ASCII512 0x420005
+#define ASCII600_ASCII300 0x420006
+#define ASCII333_ASCII333 0x420007
+#define ASCII1 0x430001
+#define ASCII2 0x430002
+#define ASCII3 0x430003
+#define ASCII4 0x430004
+#define ASCII5 0x430005
+#define STATE_TRACE_0 0x50001
+#define STATE_TRACE_1 0x50002
+#define TRACE_DATA_TRACE 0x440001
+#define POST1 0x450001
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TAny* aParam1, const TAny* aParam2 )
+ {
+ TBool retval = BTrace8( KBTraceCategoryOpenSystemTrace, EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( const TAny** )ptr ) = aParam1;
+ ptr += sizeof ( const TAny* );
+ *( ( const TAny** )ptr ) = aParam2;
+ ptr += sizeof ( const TAny* );
+ ptr -= 8;
+ retval = OstSendNBytes( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TAny* aParam1 )
+ {
+ TBool retval = BTrace8( KBTraceCategoryOpenSystemTrace, EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( const TAny** )ptr ) = aParam1;
+ ptr += sizeof ( const TAny* );
+ ptr -= 4;
+ retval = BTraceContext12( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 )
+ {
+ TBool retval;
+ // Data is written directly and length is determined from trace message length
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ size = sizeAligned;
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ retval = OstSendNBytes( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTrace8( KBTraceCategoryOpenSystemTrace, EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2, TUint aParam3 )
+ {
+ TBool retval = BTrace8( KBTraceCategoryOpenSystemTrace, EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TUint )) <= KOstMaxDataLength)
+ {
+ *( ( TUint* )ptr ) = aParam3;
+ ptr += sizeof ( TUint );
+ length += sizeof ( TUint );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2, TUint32 aParam3 )
+ {
+ TBool retval = BTrace8( KBTraceCategoryOpenSystemTrace, EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TUint )) <= KOstMaxDataLength)
+ {
+ *( ( TUint* )ptr ) = aParam3;
+ ptr += sizeof ( TUint );
+ length += sizeof ( TUint );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( KBTraceCategoryOpenSystemTrace, EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/TraceCompilerTesterAdvancedTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,364 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERADVANCEDTRACES_H__
+#define __TRACECOMPILERTESTERADVANCEDTRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define HELLO_WORLD 0xde0001
+#define HELLO_MOON 0x8a0001
+#define TEST_TRACE_2 0x8a0002
+#define POINTER_PARAMETER_TRACE1 0xdf0001
+#define POINTER_PARAMETER_TRACE2 0xdf0002
+#define ASCII60 0xe00001
+#define ASCII300 0xe00002
+#define ASCII512 0xe00003
+#define ASCII600 0xe00004
+#define ASCII300_ASCII512 0xe00005
+#define ASCII600_ASCII300 0xe00006
+#define ASCII333_ASCII333 0xe00007
+#define ASCII1 0xe10001
+#define ASCII2 0xe10002
+#define ASCII3 0xe10003
+#define ASCII4 0xe10004
+#define ASCII5 0xe10005
+#define STATE_TRACE_0 0x870001
+#define STATE_TRACE_1 0x870002
+#define TRACE_DATA_TRACE 0xe20001
+#define POST1 0xe30001
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TAny* aParam1, const TAny* aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( const TAny** )ptr ) = aParam1;
+ ptr += sizeof ( const TAny* );
+ *( ( const TAny** )ptr ) = aParam2;
+ ptr += sizeof ( const TAny* );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TAny* aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( const TAny** )ptr ) = aParam1;
+ ptr += sizeof ( const TAny* );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2, TUint aParam3 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TUint )) <= KOstMaxDataLength)
+ {
+ *( ( TUint* )ptr ) = aParam3;
+ ptr += sizeof ( TUint );
+ length += sizeof ( TUint );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen3( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2, TUint32 aParam3 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ // Check that there are enough space to next parameter
+ if ((length + sizeof ( TUint )) <= KOstMaxDataLength)
+ {
+ *( ( TUint* )ptr ) = aParam3;
+ ptr += sizeof ( TUint );
+ length += sizeof ( TUint );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/TraceCompilerTesterBasicTraces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1832 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERBASICTRACES_H__
+#define __TRACECOMPILERTESTERBASICTRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define TEST_BASIC_INT8 0xdf0001
+#define TEST_BASIC_INT16 0xdf0002
+#define TEST_BASIC_INT32 0xdf0003
+#define TEST_BASIC_INT64 0xdf0004
+#define TEST_BASIC_UINT8 0xdf0005
+#define TEST_BASIC_UINT16 0xdf0006
+#define TEST_BASIC_UINT32 0xdf0007
+#define TEST_BASIC_UINT64 0xdf0008
+#define TEST_BASIC_HEX8 0xdf0009
+#define TEST_BASIC_HEX16 0xdf000a
+#define TEST_BASIC_HEX32 0xdf000b
+#define TEST_BASIC_HEX64 0xdf000c
+#define TEST_BASIC_STRING8 0xdf000d
+#define TEST_BASIC_STRING16 0xdf000e
+#define TEST_BASIC_FFIX 0xdf000f
+#define TEST_BASIC_FEXP 0xdf0010
+#define TEST_BASIC_FOPT 0xdf0011
+#define TEST_ARRAY_INT8 0xe00001
+#define TEST_ARRAY_INT16 0xe00002
+#define TEST_ARRAY_INT32 0xe00003
+#define TEST_ARRAY_INT64 0xe00004
+#define TEST_ARRAY_UINT8 0xe00005
+#define TEST_ARRAY_UINT16 0xe00006
+#define TEST_ARRAY_UINT32 0xe00007
+#define TEST_ARRAY_UINT64 0xe00008
+#define TEST_ARRAY_HEX8 0xe00009
+#define TEST_ARRAY_HEX16 0xe0000a
+#define TEST_ARRAY_HEX32 0xe0000b
+#define TEST_ARRAY_HEX64 0xe0000c
+#define TEST_ARRAY_FFIX 0xe0000d
+#define TEST_ARRAY_FEXP 0xe0000e
+#define TEST_ARRAY_FOPT 0xe0000f
+#define TEST_BASIC_SIMILAR2_INT8 0xe10001
+#define TEST_BASIC_SIMILAR2_INT16 0xe10002
+#define TEST_BASIC_SIMILAR2_INT32 0xe10003
+#define TEST_BASIC_SIMILAR2_INT64 0xe10004
+#define TEST_BASIC_SIMILAR2_UINT8 0xe10005
+#define TEST_BASIC_SIMILAR2_UINT16 0xe10006
+#define TEST_BASIC_SIMILAR2_UINT32 0xe10007
+#define TEST_BASIC_SIMILAR2_UINT64 0xe10008
+#define TEST_BASIC_SIMILAR2_HEX8 0xe10009
+#define TEST_BASIC_SIMILAR2_HEX16 0xe1000a
+#define TEST_BASIC_SIMILAR2_HEX32 0xe1000b
+#define TEST_BASIC_SIMILAR2_HEX64 0xe1000c
+#define TEST_BASIC_SIMILAR2_STRING8 0xe1000d
+#define TEST_BASIC_SIMILAR2_FFIX 0xe1000e
+#define TEST_BASIC_SIMILAR2_FEXP 0xe1000f
+#define TEST_BASIC_SIMILAR2_FOPT 0xe10010
+#define TEST_ARRAY_SIMILAR2_INT8 0xe20001
+#define TEST_ARRAY_SIMILAR2_INT16 0xe20002
+#define TEST_ARRAY_SIMILAR2_INT32 0xe20003
+#define TEST_ARRAY_SIMILAR2_INT64 0xe20004
+#define TEST_ARRAY_SIMILAR2_UINT8 0xe20005
+#define TEST_ARRAY_SIMILAR2_UINT16 0xe20006
+#define TEST_ARRAY_SIMILAR2_UINT32 0xe20007
+#define TEST_ARRAY_SIMILAR2_UINT64 0xe20008
+#define TEST_ARRAY_SIMILAR2_HEX8 0xe20009
+#define TEST_ARRAY_SIMILAR2_HEX16 0xe2000a
+#define TEST_ARRAY_SIMILAR2_HEX32 0xe2000b
+#define TEST_ARRAY_SIMILAR2_HEX64 0xe2000c
+#define TEST_ARRAY_SIMILAR2_FFIX 0xe2000d
+#define TEST_ARRAY_SIMILAR2_FEXP 0xe2000e
+#define TEST_ARRAY_SIMILAR2_FOPT 0xe2000f
+#define EVENT_MY_EVENT_TRACE1_START 0x8b0001
+#define EVENT_MY_EVENT_TRACE1_STOP 0x8b0002
+#define EVENT_MY_EVENT_TRACE2_START 0x8b0003
+#define EVENT_MY_EVENT_TRACE2_STOP 0x8b0004
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt8 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt8* )ptr ) = aParam1;
+ ptr += sizeof ( TInt8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt16 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt16* )ptr ) = aParam1;
+ ptr += sizeof ( TInt16 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TInt64 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt64* )ptr ) = aParam1;
+ ptr += sizeof ( TInt64 );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint8 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint8* )ptr ) = aParam1;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint16 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint16* )ptr ) = aParam1;
+ ptr += sizeof ( TUint16 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TUint64 aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint64* )ptr ) = aParam1;
+ ptr += sizeof ( TUint64 );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC8& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+#ifndef __KERNEL_MODE__
+inline TBool OstTraceGen1( TUint32 aTraceID, const TDesC16& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+#endif
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, TReal aParam1 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TReal* )ptr ) = aParam1;
+ ptr += sizeof ( TReal );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt8 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt16 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt32 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TInt64 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint8 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint16 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint32 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TUint64 >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen1( TUint32 aTraceID, const TOstArray< TReal >& aParam1 )
+ {
+ TBool retval;
+ TInt size = aParam1.Size();
+ // BTrace assumes that parameter size is atleast 4 bytes
+ if (size % 4 == 0)
+ {
+ TUint8* ptr = ( TUint8* )aParam1.Ptr();
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ else
+ {
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ if (size > KOstMaxDataLength)
+ {
+ size = KOstMaxDataLength;
+ }
+ TInt sizeAligned = ( size + 3 ) & ~3;
+ memcpy( ptr, aParam1.Ptr(), size );
+ ptr += size;
+ // Fillers are written to get 32-bit alignment
+ while ( size++ < sizeAligned )
+ {
+ *ptr++ = 0;
+ }
+ ptr -= sizeAligned;
+ size = sizeAligned;
+ // Data is written directly and length is determined from trace message length
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, size );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt8 aParam1, TInt8 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt8* )ptr ) = aParam1;
+ ptr += sizeof ( TInt8 );
+ *( ( TInt8* )ptr ) = aParam2;
+ ptr += sizeof ( TInt8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt16 aParam1, TInt16 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TInt16* )ptr ) = aParam1;
+ ptr += sizeof ( TInt16 );
+ *( ( TInt16* )ptr ) = aParam2;
+ ptr += sizeof ( TInt16 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TInt aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt32 aParam1, TInt32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt64 aParam1, TInt64 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt64* )ptr ) = aParam1;
+ ptr += sizeof ( TInt64 );
+ *( ( TInt64* )ptr ) = aParam2;
+ ptr += sizeof ( TInt64 );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint8 aParam1, TUint8 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint8* )ptr ) = aParam1;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam2;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint16 aParam1, TUint16 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 4 ];
+ TUint8* ptr = data;
+ *( ( TUint16* )ptr ) = aParam1;
+ ptr += sizeof ( TUint16 );
+ *( ( TUint16* )ptr ) = aParam2;
+ ptr += sizeof ( TUint16 );
+ ptr -= 4;
+ retval = BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, *( ( TUint32* )ptr ) );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TUint aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TUint32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint64 aParam1, TUint64 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TUint64* )ptr ) = aParam1;
+ ptr += sizeof ( TUint64 );
+ *( ( TUint64* )ptr ) = aParam2;
+ ptr += sizeof ( TUint64 );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TDesC8& aParam1, const TDesC8& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TReal aParam1, TReal aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TReal* )ptr ) = aParam1;
+ ptr += sizeof ( TReal );
+ *( ( TReal* )ptr ) = aParam2;
+ ptr += sizeof ( TReal );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt8 >& aParam1, const TOstArray< TInt8 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt16 >& aParam1, const TOstArray< TInt16 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt >& aParam1, const TOstArray< TInt >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt32 >& aParam1, const TOstArray< TInt32 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TInt64 >& aParam1, const TOstArray< TInt64 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint8 >& aParam1, const TOstArray< TUint8 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint16 >& aParam1, const TOstArray< TUint16 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ // Fillers are written to get 32-bit alignment
+ while ( length1++ < lengthAligned1 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ // Fillers are written to get 32-bit alignment
+ while ( length2++ < lengthAligned2 )
+ {
+ *ptr++ = 0;
+ }
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint >& aParam1, const TOstArray< TUint >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint32 >& aParam1, const TOstArray< TUint32 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TUint64 >& aParam1, const TOstArray< TUint64 >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, const TOstArray< TReal >& aParam1, const TOstArray< TReal >& aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TInt length = 0;
+ // Check that parameter lenght is not too long
+ TInt length1 = aParam1.Size();
+ if ((length + length1 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length1 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned1 = ( length1 + 3 ) & ~3;
+ if (lengthAligned1 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned1;
+ }
+ // Check that parameter lenght is not too long
+ TInt length2 = aParam2.Size();
+ if ((length + length2 + sizeof ( TUint32 )) > KOstMaxDataLength)
+ {
+ length2 = KOstMaxDataLength - (length + sizeof ( TUint32 ));
+ }
+ TInt lengthAligned2 = ( length2 + 3 ) & ~3;
+ if (lengthAligned2 > 0)
+ {
+ length = length + sizeof ( TUint32 ) + lengthAligned2;
+ }
+ TUint8 data[ KOstMaxDataLength ];
+ TUint8* ptr = data;
+ // Set length to zero and calculate it againg
+ // when adding parameters
+ length = 0;
+ if (length1 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length1 / (aParam1.Size() / aParam1.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam1.Ptr(), length1 );
+ ptr += length1;
+ length += sizeof ( TUint32 ) + lengthAligned1;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ if (length2 > 0)
+ {
+ // Number of elements is written before data
+ // In case of Unicode string, number of elements is half of length
+ *( ( TUint32* )ptr ) = length2 / (aParam2.Size() / aParam2.Length());
+ ptr += sizeof ( TUint32 );
+ memcpy( ptr, aParam2.Ptr(), length2 );
+ ptr += length2;
+ length += sizeof ( TUint32 ) + lengthAligned2;
+ }
+ else if (length + sizeof ( TUint32 ) <= KOstMaxDataLength)
+ {
+ *( ( TUint32* )ptr ) = 0;
+ ptr += sizeof ( TUint32 );
+ length += sizeof ( TUint32 );
+ }
+ ptr -= length;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, length );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt aParam1, TUint aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TInt32 aParam1, TUint32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TUint* )ptr ) = aParam2;
+ ptr += sizeof ( TUint );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/TraceCompilerTesterCommon1Traces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,106 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERCOMMON1TRACES_H__
+#define __TRACECOMPILERTESTERCOMMON1TRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY 0x8a0003, aValue1, aValue2, aValue3, aValue4
+#define DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT 0x8a0004
+
+
+inline TBool OstTraceGenExt( TUint32 aTraceID, TInt aParam1, TInt aParam2, TUint8 aParam3, TUint8 aParam4, TUint aParam5 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ *( ( TUint8* )ptr ) = aParam3;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam4;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint* )ptr ) = aParam5;
+ ptr += sizeof ( TUint );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGenExt( TUint32 aTraceID, TInt32 aParam1, TInt32 aParam2, TUint8 aParam3, TUint8 aParam4, TUint32 aParam5 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 16 ];
+ TUint8* ptr = data;
+ *( ( TInt* )ptr ) = aParam1;
+ ptr += sizeof ( TInt );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ *( ( TUint8* )ptr ) = aParam3;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = aParam4;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint8* )ptr ) = 0;
+ ptr += sizeof ( TUint8 );
+ *( ( TUint* )ptr ) = aParam5;
+ ptr += sizeof ( TUint );
+ ptr -= 16;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 16 );
+ }
+ return retval;
+ }
+
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint aParam1, TInt aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+inline TBool OstTraceGen2( TUint32 aTraceID, TUint32 aParam1, TInt32 aParam2 )
+ {
+ TBool retval = BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID );
+ if ( retval )
+ {
+ TUint8 data[ 8 ];
+ TUint8* ptr = data;
+ *( ( TUint* )ptr ) = aParam1;
+ ptr += sizeof ( TUint );
+ *( ( TInt* )ptr ) = aParam2;
+ ptr += sizeof ( TInt );
+ ptr -= 8;
+ retval = OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, ptr, 8 );
+ }
+ return retval;
+ }
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/TraceCompilerTesterCommon2Traces.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,63 @@
+// Created by TraceCompiler 2.1.2
+// DO NOT EDIT, CHANGES WILL BE LOST
+
+#ifndef __TRACECOMPILERTESTERCOMMON2TRACES_H__
+#define __TRACECOMPILERTESTERCOMMON2TRACES_H__
+
+#define KOstTraceComponentID 0x20011111
+
+#define TEXT1 0xe40001
+#define TEXT2 0xe40002
+#define TEXT3 0xe40003
+#define TEXT4 0xe40004
+#define TEXT5 0xe40005
+#define TEXT6 0xe40006
+#define TEXT7 0xe40007
+#define TEXT8 0xe40008
+#define TEXT9 0xe40009
+#define TEXT10 0xe4000a
+#define TEXT11 0xe4000b
+#define TEXT12 0xe4000c
+#define TEXT13 0xe4000d
+#define TEXT14 0xe4000e
+#define TEXT15 0xe4000f
+#define TEXT16 0xe40010
+#define TEXT17 0xe40011
+#define TEXT18 0xe40012
+#define TEXT19 0xe40013
+#define TEXT20 0xe40014
+#define TEXT21 0xe40015
+#define TEXT22 0xe40016
+#define TEXT23 0xe40017
+#define TEXT24 0xe40018
+#define TEXT25 0xe40019
+#define TEXT26 0xe4001a
+#define TEXT27 0xe4001b
+#define TEXT28 0xe4001c
+#define TEXT29 0xe4001d
+#define TEXT30 0xe4001e
+#define TEXT31 0xe4001f
+#define TEXT32 0xe40020
+#define TEXT33 0xe40021
+#define TEXT34 0xe40022
+#define TEXT35 0xe40023
+#define TEXT36 0xe40024
+#define TEXT37 0xe40025
+#define TEXT38 0xe40026
+#define TEXT39 0xe40027
+#define TEXT40 0xe40028
+#define TEXT41 0xe40029
+#define TEXT42 0xe4002a
+#define TEXT43 0xe4002b
+#define TEXT44 0xe4002c
+#define TEXT45 0xe4002d
+#define TEXT46 0xe4002e
+#define TEXT47 0xe4002f
+#define TEXT48 0xe40030
+#define TEXT49 0xe40031
+
+
+#endif
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/TraceCompiler_reference_files/traces_TraceCompilerTesterAdvanced/fixed_id.definitions Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,84 @@
+#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt.
+[GROUP]INCLUDED_NON_SOURCE_FILE_TEST=0xde
+[GROUP]KEKKONEN=0xe4
+[GROUP]LONG_TRACE_TEST=0xe0
+[GROUP]POINTER_PARAMETER_TEST=0xdf
+[GROUP]POST_CODE_TEST=0xe3
+[GROUP]SHORT_TRACE_TEST=0xe1
+[GROUP]TRACE_DATA=0xe2
+[GROUP]TRACE_FLOW=0x8a
+[GROUP]TRACE_STATE=0x87
+[TRACE]INCLUDED_NON_SOURCE_FILE_TEST[0xDE]_HELLO_WORLD=0x1
+[TRACE]INCLUDED_NON_SOURCE_FILE_TEST[0xDE]_NON_SOURCE_FILE_TRACE1=0x2
+[TRACE]INCLUDED_NON_SOURCE_FILE_TEST[0xDE]_NON_SOURCE_FILE_TRACE2=0x3
+[TRACE]KEKKONEN[0xE4]_TEXT1=0x1
+[TRACE]KEKKONEN[0xE4]_TEXT10=0xa
+[TRACE]KEKKONEN[0xE4]_TEXT11=0xb
+[TRACE]KEKKONEN[0xE4]_TEXT12=0xc
+[TRACE]KEKKONEN[0xE4]_TEXT13=0xd
+[TRACE]KEKKONEN[0xE4]_TEXT14=0xe
+[TRACE]KEKKONEN[0xE4]_TEXT15=0xf
+[TRACE]KEKKONEN[0xE4]_TEXT16=0x10
+[TRACE]KEKKONEN[0xE4]_TEXT17=0x11
+[TRACE]KEKKONEN[0xE4]_TEXT18=0x12
+[TRACE]KEKKONEN[0xE4]_TEXT19=0x13
+[TRACE]KEKKONEN[0xE4]_TEXT2=0x2
+[TRACE]KEKKONEN[0xE4]_TEXT20=0x14
+[TRACE]KEKKONEN[0xE4]_TEXT21=0x15
+[TRACE]KEKKONEN[0xE4]_TEXT22=0x16
+[TRACE]KEKKONEN[0xE4]_TEXT23=0x17
+[TRACE]KEKKONEN[0xE4]_TEXT24=0x18
+[TRACE]KEKKONEN[0xE4]_TEXT25=0x19
+[TRACE]KEKKONEN[0xE4]_TEXT26=0x1a
+[TRACE]KEKKONEN[0xE4]_TEXT27=0x1b
+[TRACE]KEKKONEN[0xE4]_TEXT28=0x1c
+[TRACE]KEKKONEN[0xE4]_TEXT29=0x1d
+[TRACE]KEKKONEN[0xE4]_TEXT3=0x3
+[TRACE]KEKKONEN[0xE4]_TEXT30=0x1e
+[TRACE]KEKKONEN[0xE4]_TEXT31=0x1f
+[TRACE]KEKKONEN[0xE4]_TEXT32=0x20
+[TRACE]KEKKONEN[0xE4]_TEXT33=0x21
+[TRACE]KEKKONEN[0xE4]_TEXT34=0x22
+[TRACE]KEKKONEN[0xE4]_TEXT35=0x23
+[TRACE]KEKKONEN[0xE4]_TEXT36=0x24
+[TRACE]KEKKONEN[0xE4]_TEXT37=0x25
+[TRACE]KEKKONEN[0xE4]_TEXT38=0x26
+[TRACE]KEKKONEN[0xE4]_TEXT39=0x27
+[TRACE]KEKKONEN[0xE4]_TEXT4=0x4
+[TRACE]KEKKONEN[0xE4]_TEXT40=0x28
+[TRACE]KEKKONEN[0xE4]_TEXT41=0x29
+[TRACE]KEKKONEN[0xE4]_TEXT42=0x2a
+[TRACE]KEKKONEN[0xE4]_TEXT43=0x2b
+[TRACE]KEKKONEN[0xE4]_TEXT44=0x2c
+[TRACE]KEKKONEN[0xE4]_TEXT45=0x2d
+[TRACE]KEKKONEN[0xE4]_TEXT46=0x2e
+[TRACE]KEKKONEN[0xE4]_TEXT47=0x2f
+[TRACE]KEKKONEN[0xE4]_TEXT48=0x30
+[TRACE]KEKKONEN[0xE4]_TEXT49=0x31
+[TRACE]KEKKONEN[0xE4]_TEXT5=0x5
+[TRACE]KEKKONEN[0xE4]_TEXT6=0x6
+[TRACE]KEKKONEN[0xE4]_TEXT7=0x7
+[TRACE]KEKKONEN[0xE4]_TEXT8=0x8
+[TRACE]KEKKONEN[0xE4]_TEXT9=0x9
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII300=0x2
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII300_ASCII512=0x5
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII333_ASCII333=0x7
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII512=0x3
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII60=0x1
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII600=0x4
+[TRACE]LONG_TRACE_TEST[0xE0]_ASCII600_ASCII300=0x6
+[TRACE]POINTER_PARAMETER_TEST[0xDF]_POINTER_PARAMETER_TRACE1=0x1
+[TRACE]POINTER_PARAMETER_TEST[0xDF]_POINTER_PARAMETER_TRACE2=0x2
+[TRACE]POST_CODE_TEST[0xE3]_POST1=0x1
+[TRACE]SHORT_TRACE_TEST[0xE1]_ASCII1=0x1
+[TRACE]SHORT_TRACE_TEST[0xE1]_ASCII2=0x2
+[TRACE]SHORT_TRACE_TEST[0xE1]_ASCII3=0x3
+[TRACE]SHORT_TRACE_TEST[0xE1]_ASCII4=0x4
+[TRACE]SHORT_TRACE_TEST[0xE1]_ASCII5=0x5
+[TRACE]TRACE_DATA[0xE2]_TRACE_DATA_TRACE=0x1
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOMPILERTESTERCOMMON1_SUMVALUES_ENTRY=0x3
+[TRACE]TRACE_FLOW[0x8A]_DTRACECOMPILERTESTERCOMMON1_SUMVALUES_EXIT=0x4
+[TRACE]TRACE_FLOW[0x8A]_HELLO_MOON=0x1
+[TRACE]TRACE_FLOW[0x8A]_TEST_TRACE_2=0x2
+[TRACE]TRACE_STATE[0x87]_STATE_TRACE_0=0x1
+[TRACE]TRACE_STATE[0x87]_STATE_TRACE_1=0x2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/epoc32/build/HelloWorld/group/ARMV5.MAKE Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,110 @@
+export Path:=Z:\epoc32\gcc$(PBUILDPID)\bin;$(Path)
+export PATH:=$(Path)
+
+# prevent MAKEFLAGS variable from upsetting calls to NMAKE
+unexport MAKEFLAGS
+
+ERASE = @erase 2>>nul
+
+
+ifdef EFREEZE_ALLOW_REMOVE
+REMOVEMACRO := EFREEZE_ALLOW_REMOVE=-remove
+endif
+
+
+CLEAN : CLEANHELLOWORLD
+
+CLEANMAKEFILE : CLEANMAKEFILEHELLOWORLD
+
+CLEANALL : CLEANALLHELLOWORLD
+
+FINAL : FINALHELLOWORLD
+
+FREEZE : FREEZEHELLOWORLD
+
+LIBRARY : LIBRARYHELLOWORLD
+
+MAKEFILE : MAKEFILEHELLOWORLD
+
+RESOURCE : RESOURCEHELLOWORLD
+
+SAVESPACE : SAVESPACEHELLOWORLD
+
+TARGET : TARGETHELLOWORLD
+
+LISTING : LISTINGHELLOWORLD
+
+WHATMAKEFILE : WHATMAKEFILEHELLOWORLD
+
+WHAT : WHATHELLOWORLD
+
+CHECKSOURCE : CHECKSOURCE_GENERIC CHECKSOURCEHELLOWORLD
+
+CHECKSOURCE_GENERIC :
+ @perl -S checksource.pl --preprocess -- -DARMCC -DEPOC32 -DMARM -DEABI -DARMCC_2 -DARMCC_2_2 -DGENERIC_MARM -DMARM_ARMV5 -include Z:\EPOC32\include\feature_settings.hrh -I . -I Z:\EPOC32\include Z:\HelloWorld\group\BLD.INF
+ @perl -S checksource.pl --metadata "\HelloWorld\group\BLD.INF" "PRJ_MMPFILES MMP" "HelloWorld.mmp" 15 1
+ @rem
+
+
+TIDY :
+ @echo Nothing to do
+
+
+ROMFILE : STARTROMFILE ROMFILEHELLOWORLD
+
+STARTROMFILE :
+ @perl -S emkdir.pl "\epoc32\rom\HelloWorld\group"
+ @echo // \epoc32\rom\HelloWorld\group\ARMV5.IBY > \epoc32\rom\HelloWorld\group\ARMV5.IBY
+ @echo // >> \epoc32\rom\HelloWorld\group\ARMV5.IBY
+
+
+MAKEFILEHELLOWORLD_FILES= \
+ "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5"
+
+MAKEFILEHELLOWORLD :
+ perl -S makmake.pl $(NO_DEPENDENCIES) -D \HelloWorld\group\HELLOWORLD ARMV5 $(ABLD_FLAGS) $(ABLD_COMPWRAP_FLAG)
+
+CLEANMAKEFILEHELLOWORLD :
+ -$(ERASE) $(MAKEFILEHELLOWORLD_FILES)
+
+WHATMAKEFILEHELLOWORLD :
+ @echo $(MAKEFILEHELLOWORLD_FILES)
+
+TARGETHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" $(CFG)
+
+SAVESPACEHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" $(CFG) CLEANBUILD$(CFG)
+
+LISTINGHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" MAKEWORK$(CFG) LISTING$(CFG)$(SOURCE)
+
+FINALHELLOWORLD :
+ @rem do nothing
+
+CLEANALLHELLOWORLD :
+ perl -S ermdir.pl \EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\
+
+CLEANHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" CLEAN$(CFG)
+
+RESOURCEHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" RESOURCE$(CFG)
+
+LIBRARYHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" LIBRARY
+
+FREEZEHELLOWORLD :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" FREEZE $(REMOVEMACRO)
+
+WHATHELLOWORLD :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" WHAT$(CFG)
+
+CHECKSOURCEHELLOWORLD :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" CHECKSOURCE
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" CHECKSOURCE$(CFG)
+
+ROMFILEHELLOWORLD :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\HelloWorld\group\HELLOWORLD\ARMV5\HELLOWORLD.ARMV5" ROMFILE >> \epoc32\rom\HelloWorld\group\ARMV5.IBY
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/epoc32/build/TraceCompilerTester/group/ARMV5.MAKE Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,161 @@
+export Path:=Z:\epoc32\gcc$(PBUILDPID)\bin;$(Path)
+export PATH:=$(Path)
+
+# prevent MAKEFLAGS variable from upsetting calls to NMAKE
+unexport MAKEFLAGS
+
+ERASE = @erase 2>>nul
+
+
+ifdef EFREEZE_ALLOW_REMOVE
+REMOVEMACRO := EFREEZE_ALLOW_REMOVE=-remove
+endif
+
+
+CLEAN : CLEANTRACECOMPILERTESTERBASIC CLEANTRACECOMPILERTESTERADVANCED
+
+CLEANMAKEFILE : CLEANMAKEFILETRACECOMPILERTESTERBASIC CLEANMAKEFILETRACECOMPILERTESTERADVANCED
+
+CLEANALL : CLEANALLTRACECOMPILERTESTERBASIC CLEANALLTRACECOMPILERTESTERADVANCED
+
+FINAL : FINALTRACECOMPILERTESTERBASIC FINALTRACECOMPILERTESTERADVANCED
+
+FREEZE : FREEZETRACECOMPILERTESTERBASIC FREEZETRACECOMPILERTESTERADVANCED
+
+LIBRARY : LIBRARYTRACECOMPILERTESTERBASIC LIBRARYTRACECOMPILERTESTERADVANCED
+
+MAKEFILE : MAKEFILETRACECOMPILERTESTERBASIC MAKEFILETRACECOMPILERTESTERADVANCED
+
+RESOURCE : RESOURCETRACECOMPILERTESTERBASIC RESOURCETRACECOMPILERTESTERADVANCED
+
+SAVESPACE : SAVESPACETRACECOMPILERTESTERBASIC SAVESPACETRACECOMPILERTESTERADVANCED
+
+TARGET : TARGETTRACECOMPILERTESTERBASIC TARGETTRACECOMPILERTESTERADVANCED
+
+LISTING : LISTINGTRACECOMPILERTESTERBASIC LISTINGTRACECOMPILERTESTERADVANCED
+
+WHATMAKEFILE : WHATMAKEFILETRACECOMPILERTESTERBASIC WHATMAKEFILETRACECOMPILERTESTERADVANCED
+
+WHAT : WHATTRACECOMPILERTESTERBASIC WHATTRACECOMPILERTESTERADVANCED
+
+CHECKSOURCE : CHECKSOURCE_GENERIC CHECKSOURCETRACECOMPILERTESTERBASIC CHECKSOURCETRACECOMPILERTESTERADVANCED
+
+CHECKSOURCE_GENERIC :
+ @perl -S checksource.pl --preprocess -- -DARMCC -DEPOC32 -DMARM -DEABI -DARMCC_2 -DARMCC_2_2 -DGENERIC_MARM -DMARM_ARMV5 -include Z:\EPOC32\include\feature_settings.hrh -I . -I Z:\EPOC32\include Z:\TraceCompilerTester\group\BLD.INF
+ @perl -S checksource.pl --metadata "\TraceCompilerTester\group\BLD.INF" "PRJ_MMPFILES MMP" "TraceCompilerTesterBasic.mmp" 7 1
+ @perl -S checksource.pl --metadata "\TraceCompilerTester\group\BLD.INF" "PRJ_MMPFILES MMP" "TraceCompilerTesterAdvanced.mmp" 8 1
+ @rem
+
+
+TIDY :
+ @echo Nothing to do
+
+
+ROMFILE : STARTROMFILE ROMFILETRACECOMPILERTESTERBASIC ROMFILETRACECOMPILERTESTERADVANCED
+
+STARTROMFILE :
+ @perl -S emkdir.pl "\epoc32\rom\TraceCompilerTester\group"
+ @echo // \epoc32\rom\TraceCompilerTester\group\ARMV5.IBY > \epoc32\rom\TraceCompilerTester\group\ARMV5.IBY
+ @echo // >> \epoc32\rom\TraceCompilerTester\group\ARMV5.IBY
+
+
+MAKEFILETRACECOMPILERTESTERBASIC_FILES= \
+ "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5"
+
+MAKEFILETRACECOMPILERTESTERBASIC :
+ perl -S makmake.pl $(NO_DEPENDENCIES) -D \TraceCompilerTester\group\TRACECOMPILERTESTERBASIC ARMV5 $(ABLD_FLAGS) $(ABLD_COMPWRAP_FLAG)
+
+CLEANMAKEFILETRACECOMPILERTESTERBASIC :
+ -$(ERASE) $(MAKEFILETRACECOMPILERTESTERBASIC_FILES)
+
+WHATMAKEFILETRACECOMPILERTESTERBASIC :
+ @echo $(MAKEFILETRACECOMPILERTESTERBASIC_FILES)
+
+TARGETTRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" $(CFG)
+
+SAVESPACETRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" $(CFG) CLEANBUILD$(CFG)
+
+LISTINGTRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" MAKEWORK$(CFG) LISTING$(CFG)$(SOURCE)
+
+FINALTRACECOMPILERTESTERBASIC :
+ @rem do nothing
+
+CLEANALLTRACECOMPILERTESTERBASIC :
+ perl -S ermdir.pl \EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\
+
+CLEANTRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" CLEAN$(CFG)
+
+RESOURCETRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" RESOURCE$(CFG)
+
+LIBRARYTRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" LIBRARY
+
+FREEZETRACECOMPILERTESTERBASIC :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" FREEZE $(REMOVEMACRO)
+
+WHATTRACECOMPILERTESTERBASIC :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" WHAT$(CFG)
+
+CHECKSOURCETRACECOMPILERTESTERBASIC :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" CHECKSOURCE
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" CHECKSOURCE$(CFG)
+
+ROMFILETRACECOMPILERTESTERBASIC :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERBASIC\ARMV5\TRACECOMPILERTESTERBASIC.ARMV5" ROMFILE >> \epoc32\rom\TraceCompilerTester\group\ARMV5.IBY
+
+
+MAKEFILETRACECOMPILERTESTERADVANCED_FILES= \
+ "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5"
+
+MAKEFILETRACECOMPILERTESTERADVANCED :
+ perl -S makmake.pl $(NO_DEPENDENCIES) -D \TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED ARMV5 $(ABLD_FLAGS) $(ABLD_COMPWRAP_FLAG)
+
+CLEANMAKEFILETRACECOMPILERTESTERADVANCED :
+ -$(ERASE) $(MAKEFILETRACECOMPILERTESTERADVANCED_FILES)
+
+WHATMAKEFILETRACECOMPILERTESTERADVANCED :
+ @echo $(MAKEFILETRACECOMPILERTESTERADVANCED_FILES)
+
+TARGETTRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" $(CFG)
+
+SAVESPACETRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" $(CFG) CLEANBUILD$(CFG)
+
+LISTINGTRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" MAKEWORK$(CFG) LISTING$(CFG)$(SOURCE)
+
+FINALTRACECOMPILERTESTERADVANCED :
+ @rem do nothing
+
+CLEANALLTRACECOMPILERTESTERADVANCED :
+ perl -S ermdir.pl \EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\
+
+CLEANTRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" CLEAN$(CFG)
+
+RESOURCETRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" RESOURCE$(CFG)
+
+LIBRARYTRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" LIBRARY
+
+FREEZETRACECOMPILERTESTERADVANCED :
+ $(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" FREEZE $(REMOVEMACRO)
+
+WHATTRACECOMPILERTESTERADVANCED :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" WHAT$(CFG)
+
+CHECKSOURCETRACECOMPILERTESTERADVANCED :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" CHECKSOURCE
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -s -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" CHECKSOURCE$(CFG)
+
+ROMFILETRACECOMPILERTESTERADVANCED :
+ @$(MAKE) $(VERBOSE) $(KEEPGOING) -r -f "\EPOC32\BUILD\TraceCompilerTester\group\TRACECOMPILERTESTERADVANCED\ARMV5\TRACECOMPILERTESTERADVANCED.ARMV5" ROMFILE >> \epoc32\rom\TraceCompilerTester\group\ARMV5.IBY
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/TraceCompiler_Test/epoc32/include/platform/opensystemtrace_types.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,490 @@
+/**
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Trace-specific structures and values to be used with the Trace API
+*
+*/
+
+
+
+/**
+ @file
+ @publishedPartner
+ @prototype
+*/
+
+
+#ifndef OPENSYSTEMTRACE_TYPES_H
+#define OPENSYSTEMTRACE_TYPES_H
+
+#ifdef __KERNEL_MODE__
+#include <kernel.h>
+#else //__KERNEL_MODE__
+#include <e32std.h>
+#endif //__KERNEL_MODE__
+
+// Includes BTrace API macros and category values
+
+#include <e32btrace.h>
+/**
+@file
+@publishedPartner
+@prototype
+*/
+
+
+/**
+ * Every trace point must be statically assigned a group ID. This is
+ * essentially a “label” that allows identification of the intended use of
+ * the trace packets generated by the trace point. The Group ID will either
+ * reflect a system wide Tracing use cases, such as identifying why a panic
+ * occurred, or is assigned a meaning specific to a component, such as the
+ * heap trace output from the kernel. In essence the Group ID is a way of
+ * indicating that trace points / packets are related in some way.
+ * @see TGroupIdRange for more information.
+ */
+typedef TUint8 TGroupId;
+
+/**
+ * The maximum possible value for TGroupId
+ */
+const TGroupId KMaxGroupId = 255; // 2^8 - 1
+
+/**
+ * @deprecated Use TGroupId instead
+ * @see TGroupId
+ */
+typedef TUint8 TClassification;
+
+/**
+ * @deprecated Use KMaxGroupId instead
+ * @see KMaxGroupId
+ */
+const TClassification KMaxClassification = KMaxGroupId;
+
+/**
+ * Each trace point must be statically assigned a ComponentId to indicate the
+ * module in which the trace point is defined. It should always be the UID3
+ * of the binary containing the trace point associated with the component ID.
+
+ * The ComponentId and Group ID attributes of a trace point are independent.
+ */
+typedef TUint32 TComponentId;
+
+/**
+ * The maximum possible value for TComponentId
+ */
+const TComponentId KMaxComponentId = 0xFFFFFFFF; // 2^32 - 1, or 4294967295 - 1
+
+/**
+ * The EXECUTABLE_DEFAULT_COMPONENTID can be used to define your own default
+ * specific ComponentId. This is done by defining the macro to be your new
+ * default value.
+ *
+ * @deprecated
+ *
+ */
+#ifdef EXECUTABLE_DEFAULT_COMPONENTID
+#define FW_DEFAULT_COMPONENTID EXECUTABLE_DEFAULT_COMPONENTID
+#else
+#define FW_DEFAULT_COMPONENTID TTraceContext::DefaultComponentId()
+#endif
+
+/**
+ * Trace IDs have two functions in a trace packet:
+ *
+ * 1. They identify the individual trace point that created the trace packet.
+ * 2. They specify the format of the trace packet payload.
+ *
+ * This only works if the Trace ID value is unique for a given Group ID and
+ * Component ID, if present, and should be statically assigned during development
+ * when a trace point is created.
+ *
+ * The meaning of a TraceId is specific to the ComponentId and Group ID of the
+ * associated trace point.
+ */
+typedef TUint16 TTraceId;
+
+/**
+ * The maximum possible value for TTraceId
+ */
+const TTraceId KMaxTraceId = 65535; // 2^16 - 1
+
+/**
+ * Used in packets produced by the Print and Printf functions.
+ *
+ * Note that this format should not be used on the
+ * device by clients of OST. This symbol is only marked
+ * as published to partners to give host side tools access to
+ * it.
+ *
+ * @deprecated No replacement is provided as this symbol is no
+ * longer needed as a result of the alignment of trace attributes
+ * in OSTv2.
+ * @see TTraceId
+ */
+const TTraceId KFormatPrintf = 0;
+
+/**
+ * Used in packets produced by the Print and Printf functions
+ * for unicode descriptors.
+ *
+ * Note that this format should not be used on the
+ * device by clients of OST. This symbol is only marked
+ * as published to partners to give host side tools access to
+ * it.
+ *
+ * @deprecated No replacement is provided as this symbol is no
+ * longer needed as a result of the alignment of trace attributes
+ * in OSTv2.
+ * @see TTraceId
+ */
+const TTraceId KFormatPrintfUnicode = 1;
+
+/**
+ * This value was used by UTFv2 clients to specify the start of
+ * the range of enums used to define their format ids. This is
+ * no longer necessary as in OSTv2 clients are allowed to use the
+ * whole range without exception.
+ *
+ * @deprecated No replacement is provided as this symbol is no
+ * longer needed as a result of the alignment of trace attributes
+ * in OSTv2.
+ * @see TTraceId
+ */
+const TTraceId KInitialClientFormat = 512;
+
+/**
+ * Include the thread identification into the trace packet at run-time.
+ * The thread identification is used as an identifier to resolve
+ * thread and process names in conjunction with
+ * Group ID EThreadIdentification = 3.
+ */
+enum THasThreadIdentification
+ {
+ /** Do add the thread identification to the trace packet */
+ EAddThreadIdentification = ETrue,
+ /** Don't add the thread identification */
+ ENoThreadIdentification = EFalse
+ };
+
+
+/**
+ * The EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION can be used to
+ * define the default setting for adding or not adding the thread
+ * identification in a trace packet. This is done by defining
+ * the macro to be your new default value.
+ *
+ * @deprecated
+ *
+ */
+#ifdef EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
+#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EXECUTABLE_DEFAULT_HAS_THREAD_IDENTIFICATION
+#else
+#define FW_DEFAULT_HAS_THREAD_IDENTIFICATION EAddThreadIdentification
+#endif
+
+
+/**
+ * Add the program counter into the trace packet at run-time.
+ * The program counter is used to indicate where the CPU is in the
+ * instruction sequence. This can be used to locate the line of code
+ * or routine the trace was sent from.
+ *
+ * @deprecated
+ *
+ */
+enum THasProgramCounter
+ {
+ /** Do add the program counter to the trace packet. */
+ EAddProgramCounter = ETrue,
+ /** Don't add the program counter */
+ ENoProgramCounter = EFalse
+ };
+
+
+/**
+ * The EXECUTABLE_DEFAULT_HAS_PC can be used to
+ * define the default setting for adding or not adding the
+ * program counter in a trace packet. This is done by defining
+ * the macro to be your new default value.
+ *
+ * @deprecated
+ *
+ */
+#ifdef EXECUTABLE_DEFAULT_HAS_PC
+#define FW_DEFAULT_HAS_PC EXECUTABLE_DEFAULT_HAS_PC
+#else
+#define FW_DEFAULT_HAS_PC ENoProgramCounter
+#endif
+
+/**
+ * The division of the Group IDs into different ranges aims to manage the
+ * contention for the namespace.
+ *
+ * It is recommended that all developers use the Reserved range as far as possible.
+ *
+ * @see TGroupId
+ */
+enum TGroupIdRange
+ {
+ /**
+ * The Group IDs in the Reserved range should be used by the majority of trace
+ * points. This range of Group IDs are intended to identify which of the
+ * most common trace use-cases a trace point is contributing to. They are unique
+ * across the system.
+ *
+ * The Group IDs in this series are defined solely by the Symbian Foundation but are
+ * intended for use by any software on a device.
+ *
+ * These Group IDs should only be enabled at run-time if the filtering on
+ * ComponentIds functionality is also enabled. This is to avoid accidentally causing
+ * trace live-locks from occurring when just the Group IDs is enabled. This could
+ * happen because trace points in components involved in the current trace output
+ * path might also be assigned these Group IDs. Filtering on ComponentIds means
+ * that those trace points can be activated only when it’s known to be safe to do
+ * so and not accidentally enabled with a Group IDs.
+ *
+ * @see TGroupIdReserved
+ */
+ EOstReservedRangeFirst = 0,
+
+ /**
+ * @see EOstReservedRangeFirst
+ */
+ EOstReservedRangeLast = 221,
+
+ /**
+ * The meaning of Group IDs in this range are defined on a per-component basis.
+ * They are to be unique within a component.
+ */
+ EUserDefinedRangeFirst = 222,
+
+ /**
+ * @see EUserDefinedRangeFirst
+ */
+ EUserDefinedRangeLast = 253,
+
+ /**
+ * Only for use on the device by test code.
+ *
+ * Trace points with these Group IDs should not be released as part of a
+ * production device.
+ */
+ ETestingRangeFirst = 254,
+
+ /**
+ * @see ETestingRangeFirst
+ */
+ ETestingRangeLast = KMaxGroupId
+ };
+
+/**
+ * The Group IDs in the Reserved range should be used by the majority of
+ * trace points. This range of Group IDs are intended to identify which
+ * of the most common trace use-cases a trace point is contributing to.
+ *
+ * @see TGroupId
+ * @see TGroupIdRange
+ * @see EOstReservedRangeFirst
+ */
+enum TGroupIdReserved
+ {
+ /**
+ * Used when a fatal error, such as a panic, has occurred or when providing information
+ * on the execution state immediately before the decision to panic.
+ *
+ * A trace point with this Group ID should be used when a fatal condition is detected
+ * which will result in the flow of execution being halted in the thread associated with
+ * the trace point.
+ *
+ * Can also provide information describing where a panic has been dealt with.
+ *
+ * Trace points using this Group ID should be present in a release device.
+ */
+ TRACE_FATAL = 129,
+
+ /**
+ * Used when an error has occurred which means that the current operation cannot continue
+ * but is not sufficiently serious to cause a fatal error. These trace packets should
+ * contain not just the error code but any relevant information about the execution state
+ * when the error occurred.
+ *
+ * To be used for all types of error including include situations where the errors are
+ * returned from a function or via a leave.
+ *
+ * This Group ID also provides information describing where an error has been handled.
+ */
+ TRACE_ERROR = 130,
+
+ /**
+ * Used when something unexpected or unusual has occurred that does not stop the
+ * current operation from happening but may result in unintended side effects or
+ * actual errors later on.
+ */
+ TRACE_WARNING = 131,
+
+ /**
+ * Used to describe activity at the edges of a trace component.
+ *
+ * Includes data about exported or published functions defined by a trace component as
+ * well as calls out of the component to get significant information. Exactly what
+ * is significant depends on the trace component in question. For instance, reading in a
+ * setting from an INI file would be significant but calling RArray::Count() would not be.
+ *
+ * The information in this Group ID should be enough to allow someone unfamiliar with the
+ * trace component to get a high level understanding of what functionality it has executed.
+ */
+ TRACE_BORDER = 132,
+
+ /**
+ * @deprecated Use TRACE_BORDER instead
+ */
+ TRACE_API = TRACE_BORDER,
+
+ /**
+ * @deprecated Use TRACE_NORMAL or one of the other reserved Group IDs instead
+ */
+ TRACE_IMPORTANT = 133,
+
+ /**
+ * Used to described the normal activity within a trace component that might be of interest
+ * to people who use the component.
+ *
+ * The information in this Group ID should be enough to allow someone unfamiliar with the
+ * trace component to start to understand why a component is behaving the way it is perhaps
+ * to help with diagnosing problems with the way the component is being used.
+ */
+ TRACE_NORMAL = 134,
+
+ /**
+ * Intended for tracing the state transitions of an application or service such as those
+ * performed by a machine.
+ *
+ * This group ID can be used only indirectly via OstTraceState0() and OstTraceState1() macros.
+ * Any direct use of the Group ID will result in compilation errors.
+ */
+ TRACE_STATE = 135,
+
+ /**
+ * Used to provide detailed information about the normal activity of a trace component
+ * to help a developer, who is familiar with the component, to understand what it is doing.
+ */
+ TRACE_INTERNALS = 136,
+
+ /**
+ * @deprecated Use TRACE_INTERNALS instead
+ */
+ TRACE_DETAILED = TRACE_INTERNALS,
+
+ /**
+ * Used when there is a need to output large amounts of data through individual trace
+ * points that would likely cause significant intrusion if included under one of the
+ * other Group IDs.
+ *
+ * This Group ID is intended to be used in conjunction with the TRACE_INTERNALS
+ * Group ID to provide more details when debugging a specific trace component.
+ */
+ TRACE_DUMP = 137,
+
+ /**
+ * @deprecated Use TRACE_DUMP instead
+ */
+ TRACE_DEBUG = TRACE_DUMP,
+
+ /**
+ * Used to provide comprehensive information on what paths the execution takes within
+ * functions.
+ *
+ * This Group ID is intended mainly to be used by tools that add temporary instrumentation
+ * points specifically to output this data.
+ */
+ TRACE_FLOW = 138,
+
+ /**
+ * Used to output data about the performance characteristics of the associated trace component
+ * such as execution times.
+ *
+ * This data may need to be processed before it can provide effective metrics. E.g.
+ * the time between two timestamps might need to be computed.
+ *
+ * This group ID can be used only indirectly via OstTraceEventStart0(),
+ * OstTraceEventStart1() and OstTraceEventStop() macros.
+ * Any direct use of the Group ID will result in compilation errors.
+
+ */
+ TRACE_PERFORMANCE = 139,
+
+ /**
+ * May be used when adding temporary trace points during a debugging session to
+ * distinguish them from existing instrumentation.
+ */
+ TRACE_ADHOC = 140,
+
+ /**
+ * This Group ID is reserved for future use to allow the Group ID range to be expanded
+ * to cover more than current 256 different values.
+ *
+ * If trace is output on this Group ID at some point in the future then this indicates
+ * that another mechanism (yet to be decided) will be used to indicate the actual
+ * Group ID for the trace.
+ */
+ TRACE_EXTENSION = 141,
+
+ /**
+ * Not intended to be used by code including this header.
+ *
+ * Provided to allow the following compile time assert (should NOT be used):
+ * EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1
+ *
+ */
+ EGroupIdReservedHighWaterMark
+ };
+
+// Check high water mark for the reserved Group ID range
+__ASSERT_COMPILE(EGroupIdReservedHighWaterMark <= EOstReservedRangeLast + 1);
+
+/**
+ * @see TGroupId
+ * @see ETestingRangeFirst
+ * @test
+ */
+enum TGroupIdTesting
+ {
+ /**
+ * This Group ID may be used for testing purposes and is not intended to be used in
+ * production code.
+ */
+ TRACE_TESTING1 = BTrace::ETest1,
+
+ /**
+ * The same as for TRACE_TESTING1
+ */
+ TRACE_TESTING2 = BTrace::ETest2,
+
+ /**
+ * Not intended to be used by code including this header.
+ *
+ * Provided to allow the following compile time assert (should NOT be used):
+ * EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1
+ *
+ */
+ EGroupIdTestingHighWaterMark
+ };
+
+// Check high water marks for the testing Group ID range
+__ASSERT_COMPILE(EGroupIdTestingHighWaterMark <= ETestingRangeLast + 1);
+
+
+#endif //OPENSYSTEMTRACE_TYPES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/scripts/convert_traces.pl Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1337 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#!perl -w
+#
+#
+
+#*********************************************************************
+# convert_traces.pl
+# *********************************************************************
+#
+# VERSION : 6 Draft 15-Feb-2010 Adrian Issott
+# REASON : Added warnings about the tool being unsupported
+#
+# VERSION : 5 Draft 21-Jan-2010 Adrian Issott
+# REASON : Fixed issue with own macro support + added removal of
+# _L(...) around trace format strings
+#
+# VERSION : 4 Draft 11-Nov-2009 Esa Karvanen
+# REASON : Initial support for converting OST Function entry /
+# exit traces to printfs.
+#
+# VERSION : 3 Draft 20-Aug-2009 Esa Karvanen
+# REASON : Added support to convert OST traces back to printf.
+# Doesn't work for Function entry / exit traces.
+#
+# VERSION : 2 Draft 10-Apr-2008 Esa Karvanen
+# REASON : Printf and own macro support
+#
+# VERSION : 1 Draft 16-Oct-2007 Teemu Piiroinen
+# REASON : Initial version
+
+use strict;
+use env;
+use FindBin '$Bin';
+
+warn "\n";
+warn "Warning: this script is not supported and the Dynamic Analysis Tools team\n";
+warn "does NOT promise to fix any bugs or add any functionality to it.\n";
+warn "\n";
+
+# Should we print debug prints
+my $DEBUG = 0;
+
+if (not defined $ARGV[0] or not -f $ARGV[0])
+{
+ print "Please give path to mmp file as parameter.";
+
+ exit;
+}
+
+# Get group names
+my %map_trace_to_group;
+my %map_trace_to_text;
+my %map_trace_to_parameters;
+
+my $traces_folder;
+
+# Get source files
+my @sources = getSourceFiles();
+my @trace_id_names;
+my $CASWTraceCount = 0;
+
+my $printfMacro;
+
+
+# Ask selection from user
+my $selection = get_operation();
+
+# Check if the selection is numeric
+if ($selection =~ /^-?\d/)
+{
+ # Symbian traces
+ if ($selection == 1)
+ {
+ $traces_folder = get_traces_folder();
+ convertSymbianTraces(@sources);
+ }
+
+ # Kern::Printf
+ elsif ($selection == 2)
+ {
+ $printfMacro = "kern::printf";
+ convertPrintf($printfMacro, @sources);
+ }
+
+ # RDebug::Printf
+ elsif ($selection == 3)
+ {
+ $printfMacro = "rdebug::printf";
+ convertPrintf($printfMacro, @sources);
+ }
+
+ # User defined MACRO
+ elsif ($selection == 4)
+ {
+ $printfMacro = "rdebug::printf";
+ convertPrintf($printfMacro, @sources);
+ }
+
+ # OST traces to Kern::Printf
+ elsif ($selection == 5)
+ {
+ $printfMacro = "Kern::Printf";
+ convertOstToPrintf($printfMacro, @sources);
+ }
+
+ # OST traces to RDebug::Printf
+ elsif ($selection == 6)
+ {
+ $printfMacro = "RDebug::Printf";
+ convertOstToPrintf($printfMacro, @sources);
+ }
+ else
+ {
+ print "Wrong selection!";
+ }
+}
+
+# Otherwise, it's user defined MACRO
+else
+{
+ $printfMacro = $selection;
+ convertPrintf($printfMacro, @sources);
+}
+
+
+#-------------------------------------------------------
+# Convert Symbian traces
+#-------------------------------------------------------
+sub convertSymbianTraces
+{
+ debug("\nConvertSymbianTraces starts");
+ my (@sources) = @_;
+
+ # Go through all found source files
+ foreach my $source_file (@sources)
+ {
+ debug("Source file $source_file");
+ print $source_file . "\n";
+
+ RemoveLineBreaksFromTracesInFile($source_file, 0);
+
+ open FILE, "<$source_file" or die $!;
+
+ my $new_file_content;
+
+ my $traces_converted = 0;
+ my $file_name = "";
+ my $last_include_line = 0;
+ my $line_number = 0;
+
+ if ($source_file =~ /.*\\(.+?)\..+/)
+ {
+ $file_name = $1;
+ }
+
+ foreach my $line (<FILE>)
+ {
+ $line_number += 1;
+
+ my $line_converted = 0;
+
+ chomp $line;
+
+ if ($line =~ /^\s*\#include/)
+ {
+ $last_include_line = $line_number;
+ }
+
+ if ($line =~ /Traces\.h/)
+ {
+ $line = "// " . $line;
+ }
+
+ # FA_CORE_SERVICES traces
+ if ($line =~ /(BUILD_TRACE|ASSERT_TRACE|ASSERT_ALWAYS_TRACE|API_TRACE|INTERNAL_TRACE|DATA_DUMP_TRACE|ISIMSG_API_TRACE).*;/)
+ {
+ my $trace_name = $1;
+
+ if ($line =~ /.*?\/\/.*?$trace_name/)
+ {
+ next;
+ }
+
+ my $spaces = "";
+ if ($line =~ /^(\s+).*?$trace_name/)
+ {
+ $spaces = $1;
+ }
+
+ my $prefix = "";
+ if ($line =~ /^\s*(.*?)$trace_name/)
+ {
+ $prefix = $1;
+ }
+
+ $line =~ s/^.*($trace_name.+;).*/$1/;
+
+ if ($line =~ /$trace_name\s*\((.+)\)\s*;/)
+ {
+ $line_converted = 1;
+ $traces_converted = 1;
+
+ my $parameters = $1;
+
+ $new_file_content .= $spaces . "// " . $prefix . $line . "\n";
+
+ # Get parameters without format string
+ my $parameters_without_format = $parameters;
+ if ($parameters =~ /\".*\"(.*)/)
+ {
+ $parameters_without_format = $1;
+ }
+
+ # Calculate parameter count
+ my $parameter_count = -1;
+ foreach my $part (split(",", $parameters_without_format))
+ {
+ $parameter_count++;
+ }
+
+ my $new_trace = GetNewCASWTraceName($trace_name, $parameter_count);
+
+ if ($trace_name =~ /(BUILD_TRACE|ASSERT_TRACE|ASSERT_ALWAYS_TRACE|API_TRACE|INTERNAL_TRACE)/)
+ {
+ $new_trace .= "(" . $trace_name . ", TRACE_NAME_" . $CASWTraceCount++ . ", " . $parameters . ");";
+ }
+ else
+ {
+ $new_trace .= "(" . $trace_name . ", TRACE_NAME_" . $CASWTraceCount++ . ", ";
+
+ if ($parameter_count == 0)
+ {
+ $new_trace .= "\"\", " . $parameters . ", <data_len>);";
+ }
+ else
+ {
+ $new_trace .= $parameters . ", <data_len>);";
+ }
+ }
+
+ $new_file_content .= $spaces . $new_trace . "\n";
+ }
+ }
+
+ # SymbianTraces
+ if ($line =~ /SymbianTrace([0-2]|Data[0-1]{0,1}|Thread[0-2]|ThreadData[0-1]{0,1}|IsTraceActive|Pc[0-2]|ThreadPc[0-2]|PcData[0-1]{0,1}|ThreadPcData[0-1]{0,1}|StartControlBlock|EndControlBlock|Ext[1-6]|ExtThread[1-6]).*;/)
+ {
+ my $trace_name = "SymbianTrace" . $1;
+
+ if ($line =~ /.*?\/\/.*?SymbianTrace/)
+ {
+ next;
+ }
+
+ # print $trace_name . "\n";
+
+ my $spaces = "";
+ if ($line =~ /^(\s+).*?SymbianTrace/)
+ {
+ $spaces = $1;
+ }
+
+ my $prefix = "";
+ if ($line =~ /^\s*(.*?)SymbianTrace/)
+ {
+ $prefix = $1;
+ }
+
+ $line =~ s/^.*(SymbianTrace.+;).*/$1/;
+
+ #print $line . "\n";
+
+ # Get trace id name
+ if ($line =~ /\(\s*(.+?)[\s\),]{1,2}(.*?)\)\s*;$/)
+ {
+ $line_converted = 1;
+ $traces_converted = 1;
+
+ my $trace_id_name = $1;
+ my $rest_of_parameters = $2;
+
+ my $new_trace_id_name = $trace_id_name;
+
+ $new_file_content .= $spaces . "// " . $prefix . $line . "\n";
+
+ #print $trace_id_name . "\n";
+ #print $rest_of_parameters . "\n";
+
+ if ($trace_name ne "SymbianTraceIsTraceActive")
+ {
+ while (grep(/$new_trace_id_name/, @trace_id_names))
+ {
+ # Duplicate trace
+ $new_trace_id_name .= "_";
+ }
+
+ push(@trace_id_names, $new_trace_id_name);
+ }
+
+ my $trace_text = $map_trace_to_text{$trace_id_name};
+
+ my @params = split(",", $rest_of_parameters);
+
+ $trace_text .= GetFormatText($trace_id_name, @params);
+
+ my $type_string = IsStringType($trace_id_name, @params);
+
+ my $group_name = $map_trace_to_group{$trace_id_name};
+ if (not defined $group_name or $group_name eq "")
+ {
+ $group_name = "DEFAULT_GROUP";
+ $trace_text = "";
+ }
+
+ my $new_trace = GetNewSymbianTraceName($trace_name, $type_string);
+ $new_trace .= "( " . $group_name . ", " .
+ $new_trace_id_name . ", " .
+ "\"" . $trace_text . "\"";
+
+ if ($rest_of_parameters ne "")
+ {
+ $new_trace .= ", " . $rest_of_parameters;
+ }
+
+ $new_trace .= ");";
+
+ $new_file_content .= $spaces . $new_trace . "\n";
+
+ #print $new_trace . "\n\n";
+ }
+ else
+ {
+ print STDERR "Cannot find trace id name. From line: $line\n";
+ }
+ }
+
+ if (not $line_converted)
+ {
+ $new_file_content .= $line . "\n";
+ }
+
+ }
+
+ close FILE;
+
+ if ($traces_converted == 1)
+ {
+ SaveNewSourceFile($source_file, $new_file_content, $last_include_line, $file_name, 1);
+ }
+ }
+
+CreateOSTTraceDefinitionsHeader();
+}
+
+
+#-------------------------------------------------------
+# Convert PRINTF traces to OST traces
+#-------------------------------------------------------
+sub convertPrintf
+{
+ my ($macro, @sources) = @_;
+ debug("\nConvertPrintf starts, macro is: $macro");
+
+ # Go through all found source files
+ foreach my $source_file (@sources)
+ {
+ debug("Source file $source_file");
+ print $source_file . "\n";
+
+ RemoveLineBreaksFromTracesInFile($source_file, 0);
+
+ open FILE, "<$source_file" or die $!;
+
+ my $new_file_content;
+
+ my $traces_converted = 0;
+ my $file_name = "";
+ my $last_include_line = 0;
+ my $line_number = 0;
+ my $traceNumber = 0;
+
+ if ($source_file =~ /.*\\(.+?)\..+/)
+ {
+ $file_name = $1;
+ }
+
+ foreach my $line (<FILE>)
+ {
+ $line_number += 1;
+
+ my $line_converted = 0;
+
+ chomp $line;
+
+ if ($line =~ /^\s*\#include/)
+ {
+ $last_include_line = $line_number;
+ }
+
+ if ($line =~ /Traces\.h/)
+ {
+ $line = "// " . $line;
+ }
+
+ # Printf macro
+ if ($line =~ /^\s*$macro.*;/i)
+ {
+ my $spaces;
+ my $trace = "";
+ if ($line =~ /^(\s*)/)
+ {
+ $spaces = $1;
+ }
+
+ $line =~ s/^\s*($macro.+;).*/$1/;
+
+ $trace = $line;
+
+ # Remove spaces from the beginning
+ $trace =~ s/^\s*//g;
+
+ print("Trace: " . $line . "\n");
+
+ if (GetBracketCount($line) % 2 == 0)
+ {
+ my $param_count = 0;
+ my $params = $line;
+
+ while($params =~ s/(.*?),/$1/)
+ {
+ $param_count++;
+ }
+
+ $line = $spaces . "// " . $trace ."\n";
+ $line .= $spaces;
+
+ # Remove the macro from the trace
+ debug("Trace before removing MACRO $trace");
+ $trace =~ /\((.*)\)/;
+ $trace = $1;
+ debug("Trace after removing MACRO $trace");
+
+ # Remove use of _L(...)
+ if ($trace =~ s/\b_L\(//g)
+ {
+ $trace =~ s/(.*")\)/$1/; # want to remove the last ") rather than the first one we come across
+ }
+
+ # Convert
+ # 0 parameters
+ debug("Convert trace with $param_count parameters");
+ if ($param_count == 0)
+ {
+ $line .= "OstTrace0(DEFAULT_GROUP, DEFAULT_TRACE" . $traceNumber . ", " . $trace . ");";
+ }
+ # 1 parameter
+ elsif ($param_count == 1)
+ {
+ $line .= "OstTrace1(DEFAULT_GROUP, DEFAULT_TRACE" . $traceNumber . ", " . $trace . ");";
+ }
+ # More than 1 parameters
+ else
+ {
+ $line .= "OstTraceExt" . $param_count . "(DEFAULT_GROUP, DEFAULT_TRACE" . $traceNumber . ", " . $trace . ");";
+ }
+
+ $new_file_content .= $line . "\n";
+ $line_converted = 1;
+ $traces_converted = 1;
+ $traceNumber++;
+ }
+ }
+ else
+ {
+ $new_file_content .= $line . "\n";
+ }
+ }
+
+ close FILE;
+
+ if ($traces_converted == 1)
+ {
+ debug("\n\nSave new source file");
+ SaveNewSourceFile($source_file, $new_file_content, $last_include_line, $file_name, 1);
+ }
+ }
+
+CreateOSTTraceDefinitionsHeader();
+
+}
+
+
+#-------------------------------------------------------
+# Get bracket count
+#-------------------------------------------------------
+sub GetBracketCount
+{
+ my ($line) = @_;
+
+ $line =~ s/\\\(//g;
+ $line =~ s/\\\)//g;
+
+ my @brackets = ($line =~ /\(|\)/g);
+
+ return scalar @brackets;
+}
+
+#-------------------------------------------------------
+# Save new source file
+#-------------------------------------------------------
+sub SaveNewSourceFile
+{
+ my ($source_file, $new_file_content, $last_include_line, $file_name, $add_ost_stuff) = @_;
+
+ open FILE, ">$source_file" or die $!;
+
+ my @lines = split("\n", $new_file_content);
+
+ my $line_number = 0;
+ foreach my $line (@lines)
+ {
+ $line_number++;
+
+ print FILE $line . "\n";
+
+ if ($line_number == $last_include_line && $add_ost_stuff == 1)
+ {
+ print FILE "\#include \"OstTraceDefinitions.h\"\n";
+ print FILE "\#ifdef OST_TRACE_COMPILER_IN_USE\n";
+ print FILE "\#include \"" . $file_name . "Traces.h\"\n";
+ print FILE "\#endif\n\n";
+ }
+ }
+
+ close FILE;
+}
+
+
+#-------------------------------------------------------
+# Create OST Trace Definitions header file
+#-------------------------------------------------------
+sub CreateOSTTraceDefinitionsHeader
+{
+ debug("\nCreateOSTTraceDefinitionsHeader starts");
+
+ # Get path to traces folder
+ my $mmp_file = $ARGV[0];
+ my $file_path = $mmp_file;
+ $file_path =~ s/\\[^\\]+$/\\/i;
+ $file_path =~ s/\\\\/\\/g;
+ if ($file_path =~ m/\.mmp/i)
+ {
+ debug("getGroupTraceData. MMP file doesn't have path. Use current dir.");
+ my $dir = "$Bin";
+ $file_path = $dir;
+ $file_path =~ s/\//\\/g;
+ }
+ my $trace_folder_path = concatenatePath($file_path, "..\\traces");
+
+ debug("CreateOSTTraceDefinitionsHeader trace_folder_path: $trace_folder_path");
+
+ mkdir($trace_folder_path);
+
+
+ open FILE, ">$trace_folder_path\\OstTraceDefinitions.h" or die $!;
+
+ print FILE "\#ifndef __OSTTRACEDEFINITIONS_H__\n" .
+ "\#define __OSTTRACEDEFINITIONS_H__\n" .
+ "// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler\n" .
+ "// REMOVE BEFORE CHECK-IN TO VERSION CONTROL\n" .
+ "//\#define OST_TRACE_COMPILER_IN_USE\n" .
+ "\#include <OpenSystemTrace.h>\n" .
+ "\#endif\n";
+
+
+ close FILE;
+}
+
+
+#-------------------------------------------------------
+# Get format text
+#-------------------------------------------------------
+sub GetFormatText
+{
+ my ($trace_id_name, @params) = @_;
+
+ my $format_text = "";
+
+ foreach my $param (@params)
+ {
+ if ($param =~ /(\w+)[\s\)]*$/)
+ {
+ $param = $1;
+ }
+
+ my $type = $map_trace_to_parameters{$trace_id_name}{$param};
+
+ if (not defined $type or $type eq "" or $type eq "-DEC")
+ {
+ $format_text .= " %d";
+ }
+ elsif ($type eq "DEC")
+ {
+ $format_text .= " %u";
+ }
+ elsif ($type eq "HEX")
+ {
+ $format_text .= " 0x%x";
+ }
+ elsif ($type eq "STR")
+ {
+ $format_text .= " %s";
+ }
+ }
+
+ return $format_text;
+}
+
+#-------------------------------------------------------
+# Is string type
+#-------------------------------------------------------
+sub IsStringType
+{
+ my ($trace_id_name, @params) = @_;
+
+ my $type_string = 0;
+
+ foreach my $param (@params)
+ {
+ if ($param =~ /(\w+)[\s\)]*$/)
+ {
+ $param = $1;
+ }
+
+ my $type = $map_trace_to_parameters{$trace_id_name}{$param};
+
+ if (defined $type and $type eq "STR")
+ {
+ $type_string = 1;
+ }
+ }
+
+ return $type_string;
+}
+
+#-------------------------------------------------------
+# Remove linebreaks from traces
+#-------------------------------------------------------
+sub RemoveLineBreaksFromTracesInFile
+{
+ my ($file, $convert_back_to_printf) = @_;
+
+ my $file_changed = 0;
+ my $new_file_content;
+ my $previous_line_changed = 0;
+ my $convert_macro = "Kern::Printf";
+
+ if ($convert_back_to_printf == 1)
+ {
+ $convert_macro = "OstTrace([01]|Ext|Data)";
+ }
+
+ open FILE, "<$file" or die $!;
+
+ foreach my $line (<FILE>)
+ {
+ chomp($line);
+
+ if ($line =~ /SymbianTrace([0-2]|Data[0-1]{0,1}|Thread[0-2]|ThreadData[0-1]{0,1}|IsTraceActive|Pc[0-2]|ThreadPc[0-2]|PcData[0-1]{0,1}|ThreadPcData[0-1]{0,1}|StartControlBlock|EndControlBlock|Ext[1-6]|ExtThread[1-6])[^;]+$/ or
+ $line =~ /$convert_macro[^;]+$/ or
+ $line =~ /(BUILD_TRACE|ASSERT_TRACE|ASSERT_ALWAYS_TRACE|API_TRACE|INTERNAL_TRACE|DATA_DUMP_TRACE|ISIMSG_API_TRACE)[^;]+$/)
+ {
+ # We have a trace in multiple lines
+ $new_file_content .= $line;
+
+ $file_changed = 1;
+ $previous_line_changed = 1;
+ }
+ else
+ {
+ if ($previous_line_changed == 1)
+ {
+ $line =~ s/\s*(.*)/ $1/;
+
+ $new_file_content .= $line;
+ }
+ else
+ {
+ $new_file_content .= $line . "\n";
+ }
+
+ if ($previous_line_changed and $line =~ /;/)
+ {
+ $new_file_content .= "\n";
+ $previous_line_changed = 0;
+ }
+ }
+ }
+
+ close FILE;
+
+ if ($file_changed == 1)
+ {
+ open FILE, ">$file" or die $!;
+
+ print FILE $new_file_content;
+
+ close FILE;
+ }
+}
+
+#-------------------------------------------------------
+# Get new CASW trace name
+#-------------------------------------------------------
+sub GetNewCASWTraceName
+{
+ my ($old_trace_name, $paramater_count) = @_;
+
+ my $new_trace_name;
+
+ if ($old_trace_name eq "BUILD_TRACE" or
+ $old_trace_name eq "ASSERT_TRACE" or
+ $old_trace_name eq "ASSERT_ALWAYS_TRACE" or
+ $old_trace_name eq "API_TRACE" or
+ $old_trace_name eq "INTERNAL_TRACE")
+ {
+ if ($paramater_count <= 0)
+ {
+ $new_trace_name = "OstTrace0";
+ }
+ elsif ($paramater_count <= 5)
+ {
+ $new_trace_name = "OstTraceExt" . $paramater_count;
+ }
+ else
+ {
+ $new_trace_name = "// TODO: Cannot convert trace. Too much parameters.";
+ }
+ }
+ elsif ( $old_trace_name eq "DATA_DUMP_TRACE" or
+ $old_trace_name eq "ISIMSG_API_TRACE")
+ {
+ $new_trace_name = "OstTraceData";
+ }
+
+ return $new_trace_name;
+}
+
+#-------------------------------------------------------
+# Get new Symbian trace name
+#-------------------------------------------------------
+sub GetNewSymbianTraceName
+{
+ my ($old_trace_name, $type_string) = @_;
+
+ my $new_trace_name;
+
+ if ($old_trace_name eq "SymbianTrace0" or
+ $old_trace_name eq "SymbianTraceThread0")
+ {
+ $new_trace_name = "OstTrace0";
+ }
+ elsif ( not $type_string and
+ ( $old_trace_name eq "SymbianTrace1" or
+ $old_trace_name eq "SymbianTraceThread1" or
+ $old_trace_name eq "SymbianTraceExt1" or
+ $old_trace_name eq "SymbianTraceExtThread1"))
+ {
+ $new_trace_name = "OstTrace1";
+ }
+ elsif ( $type_string and
+ ( $old_trace_name eq "SymbianTrace1" or
+ $old_trace_name eq "SymbianTraceThread1" or
+ $old_trace_name eq "SymbianTraceExt1" or
+ $old_trace_name eq "SymbianTraceExtThread1"))
+ {
+ $new_trace_name = "OstTraceExt1";
+ }
+ elsif ( $old_trace_name eq "SymbianTrace2" or
+ $old_trace_name eq "SymbianTraceThread2" or
+ $old_trace_name eq "SymbianTraceExt2" or
+ $old_trace_name eq "SymbianTraceExtThread2")
+ {
+ $new_trace_name = "OstTraceExt2";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceExt3" or
+ $old_trace_name eq "SymbianTraceExtThread3")
+ {
+ $new_trace_name = "OstTraceExt3";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceExt4" or
+ $old_trace_name eq "SymbianTraceExtThread4")
+ {
+ $new_trace_name = "OstTraceExt4";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceExt5" or
+ $old_trace_name eq "SymbianTraceExtThread5")
+ {
+ $new_trace_name = "OstTraceExt5";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceExt6" or
+ $old_trace_name eq "SymbianTraceExtThread6")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceExt6";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceExt7" or
+ $old_trace_name eq "SymbianTraceExtThread7")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceExt7";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceData" or
+ $old_trace_name eq "SymbianTraceData0" or
+ $old_trace_name eq "SymbianTraceThreadData" or
+ $old_trace_name eq "SymbianTraceThreadData0")
+ {
+ $new_trace_name = "OstTraceData";
+ }
+ elsif ($old_trace_name eq "SymbianTraceData1")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceData1";
+ }
+ elsif ($old_trace_name eq "SymbianTraceIsTraceActive")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceIsTraceActive";
+ }
+ elsif ( $old_trace_name eq "SymbianTracePc0" or
+ $old_trace_name eq "SymbianTracePc1" or
+ $old_trace_name eq "SymbianTracePc2")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTracePc";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceThreadPc0" or
+ $old_trace_name eq "SymbianTraceThreadPc1" or
+ $old_trace_name eq "SymbianTraceThreadPc2")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceThreadPc";
+ }
+ elsif ( $old_trace_name eq "SymbianTracePcData" or
+ $old_trace_name eq "SymbianTracePcData0" or
+ $old_trace_name eq "SymbianTracePcData1")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTracePcData";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceThreadPcData" or
+ $old_trace_name eq "SymbianTraceThreadPcData0" or
+ $old_trace_name eq "SymbianTraceThreadPcData1")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceThreadPcData";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceStartControlBlock")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceStartControlBlock";
+ }
+ elsif ( $old_trace_name eq "SymbianTraceEndControlBlock")
+ {
+ $new_trace_name = "// TODO: Cannot convert SymbianTraceEndControlBlock";
+ }
+
+ return $new_trace_name;
+}
+
+#-------------------------------------------------------
+# Get group names
+#-------------------------------------------------------
+sub getGroupTraceData
+{
+ my ($map_trace_to_group, $map_trace_to_text, $map_trace_to_parameters, $traces_folder) = @_;
+
+ debug("\n\ngetGroupTraceData starts with: $traces_folder");
+
+ # Get path to traces folder
+ my $mmp_file = $ARGV[0];
+ my $file_path = $mmp_file;
+ $file_path =~ s/\\[^\\]+$/\\/i;
+ $file_path =~ s/\\\\/\\/g;
+ if ($file_path =~ m/\.mmp/i)
+ {
+ debug("getGroupTraceData file doesn't have path. Use current dir.");
+ my $dir = "$Bin";
+ $file_path = $dir;
+ $file_path =~ s/\//\\/g;
+ }
+
+ my $trace_folder_path = concatenatePath($file_path, $traces_folder);
+
+ debug("getGroupTraceData MMP file: $mmp_file");
+ debug("getGroupTraceData folder path: $trace_folder_path");
+
+ if (not -e $trace_folder_path)
+ {
+ return;
+ }
+
+ # Get all header files in traces folder
+ my $dir_return = qx("dir $trace_folder_path\\*.h /b");
+ my @header_files = split("\n", $dir_return);
+
+ my $found_header = 0;
+
+ foreach my $header_file (@header_files)
+ {
+ debug("getGroupTraceData file: $header_file");
+ open FILE, "<$trace_folder_path\\$header_file" or die $!;
+
+ debug("getGroupTraceData file: Found header!");
+ $found_header = 1;
+
+ my $trace_id_name;
+ my $trace_group_name;
+
+ foreach my $line (<FILE>)
+ {
+ if ($line =~ /\s*TRACE_GROUP_BEGIN\(\s*(.+?)[\s,]/)
+ {
+ $trace_group_name = $1;
+ }
+
+ if ($line =~ /VALUE\s*\(\s*(-*)\d\d\s*,.+?,\s*(.+?),.*?,\s*(.+?)[\s\)]/)
+ {
+ my $sign = $1;
+ my $variable = $2;
+ my $type = $3;
+
+ $map_trace_to_parameters{$trace_id_name}{$variable} = $1 . $type;
+
+ #print $variable . " => " . $type . "\n";
+ }
+
+ if ($line =~ /STRING_REF\s*\(\s*.+?\s*,.+?,\s*(.+?),.*?,\s*.+?[\s\)]/)
+ {
+ my $variable = $1;
+
+ $map_trace_to_parameters{$trace_id_name}{$variable} = "STR";
+ }
+
+ if ($line =~ /\s*TRACE_GROUP_END/)
+ {
+ $trace_group_name = "";
+ }
+
+ if ($line =~ /TRACE_BEGIN\(\s*(.+?)[\s,]+\"(.*)\"/)
+ {
+ $trace_id_name = $1;
+ my $trace_text = $2;
+
+ $trace_text =~ s/\%//g;
+
+ if ($trace_group_name eq "")
+ {
+ print STDERR "Invalid trace definition header file: $header_file\nMost likely bug in this script...";
+ }
+ else
+ {
+ #print "$trace_id_name => $trace_group_name\n";
+ #print "$trace_id_name => $trace_text\n";
+
+ $map_trace_to_group{$trace_id_name} = $trace_group_name;
+ $map_trace_to_text{$trace_id_name} = $trace_text;
+ }
+ }
+ }
+
+ close FILE;
+ }
+
+ return $found_header;
+}
+
+#-------------------------------------------------------
+# Convert OST traces to PRINTF traces
+#-------------------------------------------------------
+sub convertOstToPrintf
+{
+ my ($macro, @sources) = @_;
+ debug("convertOstToPrintf starts, macro is: $macro");
+
+ # Go through all found source files
+ foreach my $source_file (@sources)
+ {
+ debug("Source file $source_file");
+ print $source_file . "\n";
+
+ RemoveLineBreaksFromTracesInFile($source_file, 1);
+
+ open FILE, "<$source_file" or die $!;
+
+ my $new_file_content;
+
+ my $traces_converted = 0;
+ my $file_name = "";
+ my $last_include_line = 0;
+ my $line_number = 0;
+ my $traceNumber = 0;
+
+ if ($source_file =~ /.*\\(.+?)\..+/)
+ {
+ $file_name = $1;
+ }
+
+ foreach my $line (<FILE>)
+ {
+ $line_number += 1;
+
+ my $line_converted = 0;
+
+ chomp $line;
+
+ if ($line =~ /^\s*\#include/)
+ {
+ $last_include_line = $line_number;
+ }
+
+ if ($line =~ /Traces\.h/)
+ {
+ $line = "// " . $line;
+ }
+
+ # Printf macro
+ if ($line =~ /^\s*OstTrace.*;/i)
+ {
+ my $spaces;
+ my $trace = "";
+ if ($line =~ /^(\s*)/)
+ {
+ $spaces = $1;
+ }
+
+ $line =~ s/^\s*(OstTrace.+;).*/$1/;
+
+ # Remove spaces from the beginning
+ $trace = $line;
+ $trace =~ s/^\s*//g;
+
+ print("Trace: " . $line . "\n");
+
+ if (GetBracketCount($line) % 2 == 0)
+ {
+ $line = $spaces . "// " . $trace ."\n";
+ $line .= $spaces;
+
+ # Remove the macro from the trace
+ debug("Trace before removing MACRO $trace");
+
+ # Check if Function Entry or Exit trace
+ if ($trace =~ /^\s*OstTraceFunction.*;/i)
+ {
+ $trace =~ /\(\s*(.*?)([,\s\)])/;
+ $trace = "\"" . $1 . "\"";
+ }
+
+ # Other OST traces
+ else
+ {
+ $trace =~ /\((.*?,)(.*?,)\s?(.*)\)/;
+ $trace = $3;
+ }
+ debug("Trace after removing MACRO $trace");
+
+ # Convert
+ $line .= $macro . "(" . $trace . ");";
+
+ $new_file_content .= $line . "\n";
+ $line_converted = 1;
+ $traces_converted = 1;
+ $traceNumber++;
+ }
+ }
+ else
+ {
+ $new_file_content .= $line . "\n";
+ }
+ }
+
+ close FILE;
+
+ if ($traces_converted == 1)
+ {
+ debug("\n\nSave new source file");
+ SaveNewSourceFile($source_file, $new_file_content, $last_include_line, $file_name, 0);
+ }
+ }
+}
+
+#-------------------------------------------------------
+# Get source files
+#-------------------------------------------------------
+sub getSourceFiles
+{
+ debug("getSourceFiles starts");
+ my @sources;
+
+ # Open mmp file
+ foreach my $mmp_file (@ARGV)
+ {
+ debug("getSourceFiles MMP file: $mmp_file");
+ my $file_path = $mmp_file;
+ $file_path =~ s/\\[^\\]+$/\\/i;
+ $file_path =~ s/\\\\/\\/g;
+ if ($file_path =~ m/\.mmp/i)
+ {
+ debug("getSourceFiles file doesn't have path. Use current dir");
+ my $dir = "$Bin";
+ $file_path = $dir;
+ $file_path =~ s/\//\\/g;
+ }
+
+ # print "File path: $file_path\n";
+
+ my $module_name = $mmp_file;
+ $module_name =~ s/.*\\([^\.]*).*/$1/;
+
+ # print "Module name: $module_name\n";
+
+ my $uid = 0;
+ my $current_src_path;
+
+ if (-e $mmp_file)
+ {
+ debug("getSourceFiles MMP file exists");
+ # Go through lines
+ open FILE, "<$mmp_file" or die $!;
+ foreach my $line (<FILE>)
+ {
+ $line =~ s/\//\\/g;
+
+ # Find uid
+ if ($line =~ /uid.+0x([a-fA-F0-9]+)?/i)
+ {
+ $uid = $1;
+ debug("getSourceFiles Found UID: $uid");
+ # print "Uid: $uid\n";
+ }
+
+ # Find source path
+ if ($line =~ /sourcepath\s+([^\s]+)/i)
+ {
+ my $src_path = $1;
+
+ # Check absolute path
+ if ($src_path =~ /^[^\\]/)
+ {
+ $current_src_path = concatenatePath($file_path, $src_path . "\\");
+ }
+ else
+ {
+ $current_src_path = substr($file_path, 0, 2) . $src_path;
+ }
+
+ debug("getSourceFiles current src path: $current_src_path");
+ # print "Current src path: $current_src_path\n";
+ }
+
+ while ($line =~ /source\s+([^\s]+)/i)
+ {
+ my $src = $1;
+
+ my $src_path = concatenatePath($current_src_path, $src);
+
+ if (-e $src_path)
+ {
+ push (@sources, $src_path);
+ debug("getSourceFiles found source: $src_path");
+ # print "SRC: $src_path\n";
+ }
+
+ $line =~ s/\Q$src//;
+ }
+ }
+ close FILE;
+
+ }
+ }
+
+ return @sources;
+}
+
+#--------------------------------------------------------------
+# Get operation
+#--------------------------------------------------------------
+sub get_operation
+{
+ print "\nSelect operation:\n";
+ print "Convert Symbian traces to OST traces (1)\n";
+ print "Convert Kern::Printf traces to OST traces (2)\n";
+ print "Convert RDebug::Printf traces to OST traces (3)\n";
+ print "Convert own MACRO to OST traces (4)\n";
+ print "Convert OST traces to Kern::Printf traces (5)\n";
+ print "Convert OST traces to RDebug::Printf traces (6)\n";
+
+ my $selection = <STDIN>;
+ chomp $selection;
+
+ if ($selection != 1 and
+ $selection != 2 and
+ $selection != 3 and
+ $selection != 4 and
+ $selection != 5 and
+ $selection != 6)
+ {
+ print STDERR "Invalid input!\n";
+ die;
+ }
+
+ if ($selection == 4)
+ {
+ print "\nGive the macro name (e.g. \"TRACE\" if your maco is like TRACE(\"Text\")\n";
+ $selection = <STDIN>;
+ chomp $selection;
+ }
+
+ return $selection;
+}
+
+#--------------------------------------------------------------
+# Get traces folder
+#--------------------------------------------------------------
+sub get_traces_folder
+{
+ my $traces_folder;
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\traces"))
+ {
+ $traces_folder = "..\\..\\traces";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\traces"))
+ {
+ $traces_folder = "..\\traces";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\symbian_traces\\autogen"))
+ {
+ $traces_folder = "..\\..\\symbian_traces\\autogen";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\..\\symbian_traces\\autogen"))
+ {
+ $traces_folder = "..\\..\\..\\symbian_traces\\autogen";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\..\\..\\symbian_traces\\autogen"))
+ {
+ $traces_folder = "..\\..\\..\\..\\symbian_traces\\autogen";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\autogen"))
+ {
+ $traces_folder = "..\\..\\autogen";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\..\\autogen"))
+ {
+ $traces_folder = "..\\..\\..\\autogen";
+ }
+
+ if (not defined $traces_folder and getGroupTraceData(\%map_trace_to_group, \%map_trace_to_text, \%map_trace_to_parameters, "..\\..\\..\\..\\autogen"))
+ {
+ $traces_folder = "..\\..\\..\\..\\autogen";
+ }
+
+ if (not defined $traces_folder)
+ {
+ print STDERR "Cannot find traces folder...";
+ exit;
+ }
+ return $traces_folder;
+}
+
+
+#-------------------------------------------------------
+# Concatenate path
+#-------------------------------------------------------
+sub concatenatePath
+{
+ my ($concatenatePathBase, $concatenatePathFile) = @_;
+
+ my $backCount = 0;
+
+ # Find how many back references there are and remove them
+ while ($concatenatePathFile =~ /\.\.\\/g)
+ {
+ $backCount++
+ }
+ $concatenatePathFile =~ s/\.\.\\//g;
+
+ # If there is \ in the end of the base remove it
+ my $lastChar = chop($concatenatePathBase);
+ if ($lastChar ne "\\")
+ {
+ $concatenatePathBase = "$concatenatePathBase$lastChar";
+ }
+
+ # Remove directories from the end of the path
+ $concatenatePathBase = reverse($concatenatePathBase);
+ for (my $i=0; $i<$backCount; $i++)
+ {
+ $concatenatePathBase =~ s/.*?\\//;
+ }
+ $concatenatePathBase = reverse($concatenatePathBase);
+
+ my $concatenatePathFullFilePath = "$concatenatePathBase\\$concatenatePathFile";
+
+ return $concatenatePathFullFilePath;
+}
+
+
+#-------------------------------------------------------
+# Debug print
+#-------------------------------------------------------
+sub debug
+{
+ my ($print) = @_;
+
+ if ($DEBUG)
+ {
+ print $print . "\n";
+ }
+}
+
+warn "\n";
+warn "Warning: this script is not supported and the Dynamic Analysis Tools team\n";
+warn "does NOT promise to fix any bugs or add any functionality to it.\n";
+warn "\n";
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/internal/scripts/ost_metrics.pl Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,393 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#!perl -w
+#
+#
+
+#*********************************************************************
+# ost_metrics.pl
+# *********************************************************************
+#
+# VERSION : 8 Draft Feb-15-2010 Adrian Issott
+# REASION : Minor update to output style and added warnings about
+# the tool being unsupported
+#
+# VERSION : 7 Draft Sep-16-2009 Adrian Issott
+# REASION : Added support for restricting output to specific
+# components
+#
+# VERSION : 6 Draft Sep-15-2009 Adrian Issott
+# REASION : Added support for older environments with dictionaries
+# under epoc32\include\internal\symbiantraces\dictionary
+#
+# VERSION : 5 Draft Sep-11-2009 Adrian Issott
+# REASION : Added trace name listing
+# Added counting of trace / group ID with lower case names
+# Made the output of detailed inforamtion optional
+# Added support for epocroots other than \
+# Added warning about assuming epocroot=\ when it's not set
+# Fixed illegal division by zero issue when no components were found
+#
+# VERSION : 4 Draft Sep-11-2008 Esa Karvanen
+# REASION : Skip duplicate UID's when parsing
+#
+# VERSION : 3 Draft May-07-2008 Esa Karvanen
+# REASION : Changed to print amount of traces and stuff
+#
+# VERSION : 2 Draft May-06-2008 Esa Karvanen
+# REASION : Changed to calculate unique groups names
+#
+# VERSION : 1 Draft Mar-28-2008 Teemu Piiroinen
+# REASION : Initial version
+
+use strict;
+use warnings;
+use env;
+
+use Getopt::Long;
+use Pod::Usage;
+
+warn "\n";
+warn "Warning: this script is not supported and the Dynamic Analysis Tools team\n";
+warn "does NOT promise to fix any bugs or add any functionality to it.\n";
+warn "\n";
+
+my %options;
+GetOptions('h|help|?' => \$options{showHelp},
+ 'm|manual' => \$options{showManual},
+ 'r|restrictTo=s' => \$options{restrictTo},
+ 'c|byComponent' => \$options{byComponent},
+ 't|showTraceNames' => \$options{showTraceNames},
+ 'l|lowerCaseNames' => \$options{lowerCaseNames},
+ ) or pod2usage(-Verbose => 0);
+pod2usage(-Verbose => 1) if ($options{showHelp});
+pod2usage(-Verbose => 2) if ($options{showManual});
+
+$options{byComponent} = 1 if $options{showTraceNames};
+
+if (defined $options{restrictTo}) {
+ eval "'' =~ /$options{restrictTo}/";
+ die "Invalid restrictTo pattern ($options{restrictTo}): $@\n" if $@;
+} else {
+ $options{restrictTo} = '.*';
+}
+
+my $component_count = 0;
+
+my $group_count = 0;
+my $total_group_count = 0;
+
+my $trace_count = 0;
+my $component_trace_count = 0;
+my $total_trace_count = 0;
+my @allgroups = ();
+my %hashgroups = ();
+my %uids;
+
+my $lowerCaseGroupNames = 0;
+my $lowerCaseTraceNames = 0;
+
+my $epocroot;
+if (not defined $ENV{EPOCROOT}) {
+ warn "Warning: EPOCROOT not set so assuming it's \\\n";
+ $epocroot = '\\';
+} else {
+ $epocroot = $ENV{EPOCROOT};
+}
+die "Expected the EPOCROOT ($epocroot) to be a directory\n" unless -d $epocroot;
+
+my $ost_dictionaries_dir = $epocroot.'epoc32\ost_dictionaries';
+print "Looking for dictionaries in $ost_dictionaries_dir ...\n";
+
+if (not -d $ost_dictionaries_dir) {
+ $ost_dictionaries_dir = $epocroot.'epoc32\include\internal\symbiantraces\dictionary';
+ print "Looking for dictionaries in $ost_dictionaries_dir ...\n";
+}
+die "Couldn't find the OST dictionaries directory\n" unless -d $ost_dictionaries_dir;
+
+print "Found the OST dictionaries directory\n";
+print "\n";
+
+my $dir_cmd = "dir $ost_dictionaries_dir\\*.xml /S /B 2>NUL";
+my $dir_return = qx($dir_cmd);
+my $current_group;
+
+foreach my $file (split("\n", $dir_return))
+{
+ next unless $file =~ /$options{restrictTo}/i;
+
+ # OST Autogen headers contain "_0x" in their file name
+ if ($file =~ /_0x(.+?)_/i)
+ {
+ # Skip duplicate UID
+ if (exists($uids{$1}))
+ {
+ warn "Warning: skipping duplicate UID in file " . $file . "\n";
+
+ }
+ # This UID for the first time, parse the file
+ else
+ {
+ $uids{$1} = 0;
+ parseFile($file);
+ }
+ }
+ # Also calculate BTraceHooksDictionary
+ elsif ($file =~ m/(BTraceHooksDictionary\.xml)/i)
+ {
+ parseFile($file);
+ }
+}
+
+# Remove duplicates from the groups list
+my %seen = ();
+my @uniq_groups = ();
+foreach my $item (@allgroups) {
+ push(@uniq_groups, $item) unless $seen{$item}++;
+}
+
+
+### OUTPUT TOTALS ###
+
+
+my @groupNames = sort keys %hashgroups;
+my $uniq_groups = scalar @groupNames;
+
+my $avg_groups = ($component_count > 0 ? sprintf "%.2f",($total_group_count / $component_count) : 0);
+
+print "\n\n--------------TOTALS--------------\n\n";
+print "Component count: $component_count\n";
+print "Unique group count: $uniq_groups\n";
+print "Average groups per component: $avg_groups\n";
+print "Trace count: $total_trace_count\n";
+
+if ($options{lowerCaseNames}) {
+ for my $groupName (@groupNames) {
+ if (uc($groupName) ne $groupName) {
+ $lowerCaseGroupNames++;
+ }
+
+ }
+
+ print "\n";
+ print "Lower case Group ID names count: $lowerCaseGroupNames\n";
+ print "Lower case Trace ID names count: $lowerCaseTraceNames\n";
+}
+
+
+### OUTPUT GROUP ID SUMMARY ###
+
+
+# Generate new array where key is the amount of traces and value is the string to be printed
+my @group_lines = ();
+my $groupNo = 0;
+foreach my $key (@groupNames) {
+ my $line = "";
+
+ # Check how many times this group can be found from all groups array
+ my $occurrences = 0;
+ foreach my $item (@allgroups) {
+ if ($item eq $key) {
+ $occurrences = $occurrences + 1;
+ }
+ }
+
+ my $value = $hashgroups{$key};
+
+ my $trace_percents = ($total_trace_count > 0 ? sprintf "%.2f",($value / $total_trace_count) * 100 : 0);
+ my $component_percents = ($component_count > 0 ? sprintf "%.2f",($occurrences / $component_count) * 100 : 0);
+
+ # Add the group name
+ my $i = 0;
+ $line .= "$key";
+ while ((length $key) + $i < 42){
+ $line .= " ";
+ $i = $i + 1;
+ }
+
+ # Add the number of traces
+ $i = 0;
+ $line .= "$value";
+ while ((length $value) + $i < 5){
+ $line .= " ";
+ $i = $i + 1;
+ }
+
+ # Add the number of traces in percents
+ $line .= "($trace_percents %)";
+ $i = 0;
+ while ((length $trace_percents) + $i < 21){
+ $line .= " ";
+ $i = $i + 1;
+ }
+
+ # Add used by no. of components
+ $i = 0;
+ $line .= "$occurrences";
+ while ((length $occurrences) + $i < 3){
+ $line .= " ";
+ $i = $i + 1;
+ }
+
+ # Add used by no. of components in percents
+ $line .= "($component_percents %)\n";
+
+ $group_lines[$groupNo][0] = $value;
+ $group_lines[$groupNo][1] = $line;
+ $groupNo = $groupNo + 1;
+}
+
+my @sorted_group_lines = reverse sort{$a->[0] <=> $b->[0]} @group_lines; #if the $id'th column is numerically
+
+print "\n\n--------------GROUP ID SUMMARY--------------\n\n";
+print "GROUP NAME\t\t\t\tAMOUNT OF TRACES\tUSED BY NO. OF COMPONENTS\n\n";
+
+foreach my $line (@sorted_group_lines) {
+ print $$line[1];
+}
+
+
+#######################################################################
+# Parses file
+#######################################################################
+sub parseFile
+{
+
+ my $file = $_[0];
+ open FILE, "<$file" or die $!;
+
+ foreach my $line (<FILE>)
+ {
+ if ($line =~ /<path val=\"(.+?)\"/i)
+ {
+ print "Path: $1\n" if $options{byComponent};
+ }
+
+ if ($line =~ /<component id=\"-?\d+\" name=\"(.+?)\"/i)
+ {
+ print "Component: $1\n" if $options{byComponent};
+
+ $component_count++;
+ }
+
+ if ($line =~ /<group id=\"\d+\" name=\"(.+?)\"/i)
+ {
+ my $group = $1;
+ print "\tGroup: $group\n" if $options{byComponent};
+ push(@allgroups, $group);
+
+ if (not defined $hashgroups{$group})
+ {
+ $hashgroups{$group} = 0;
+ }
+
+ $group_count++;
+ $total_group_count++;
+ $current_group = $group;
+
+ print "\tGroup trace names:\n" if $options{showTraceNames};
+ }
+
+ if ($line =~ /<\/component>/i)
+ {
+ if ($options{byComponent}) {
+ print "\tGroup count: $group_count\n";
+ print "\tComponent trace count: $component_trace_count\n\n\n";
+ }
+
+ $group_count = 0;
+ $component_trace_count = 0;
+ }
+ if ($line =~ /<trace data-ref=\"\d+\"(?:\s+name=\"(\w+)\")?/i)
+ {
+ if (defined $1) {
+ print "\t\t$1\n" if $options{showTraceNames};
+ if ($options{lowerCaseNames} and uc($1) ne $1) {
+ $lowerCaseTraceNames++;
+ }
+ }
+ $trace_count++;
+ $component_trace_count++;
+ $total_trace_count++;
+ }
+
+ if ($line =~ /<\/group>/i)
+ {
+ print "\tGroup trace count: $trace_count\n" if $options{byComponent};
+ $hashgroups{$current_group} = ($hashgroups{$current_group} + $trace_count);
+ $trace_count = 0;
+ }
+ }
+
+ close FILE;
+}
+
+warn "\n";
+warn "Warning: this script is not supported and the Dynamic Analysis Tools team\n";
+warn "does NOT promise to fix any bugs or add any functionality to it.\n";
+warn "\n";
+
+__END__
+
+=head1 NAME
+
+ost_metrics - Prints metrics about OST usage based on the dictionaries in an EPOCROOT
+
+=head1 SYNOPSIS
+
+ost_metrics [options]
+
+=head1 OPTIONS
+
+ -h (--help) Brief help message.
+ -m (--manual) Full documentation.
+ -r (--restrictTo) <re> Restrict the output to just dictionaries with names
+ matching the regular expression re.
+ -c (--byComponent) Output detailed information about the trace used in each
+ component.
+ -t (--showTraceNames) Output detailed information about the trace ID names used.
+ Implies -byComponent
+ -l (--lowerCaseNames) Count the number of lower case names in the dictionaries.
+
+=head1 DESCRIPTION
+
+This script reads in the dictionaries found under EPOCROOT\epoc32\ost_dictionaries
+and outputs the following information:
+
+=over
+
+=item 1 OST usage breakdown by component if --byComponent is specified
+
+=item 2 OST trace ID usage by component if --showTraceNames is specified
+
+=item 3 Group ID usage in the environment
+
+=item 4 Total usage in the environment
+
+=back
+
+Note that if you don't define EPOCROOT this script assumes you mean "\".
+
+=head1 SUPPORT
+
+Please note that this script is not supported and the Dynamic Analysis Tools team
+does NOT promise to fix any bugs or add any functionality to it.
+
+=head1 COPYRIGHT
+
+Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
+
+=cut
\ No newline at end of file
--- a/tracesrv/tracecompiler/src/com.nokia.tracecompiler/about.html Fri Oct 08 14:56:39 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-
-<h2>About This Content</h2>
-
-<p>February 4, 2009</p>
-
-<h3>Copyright</h3>
-<p>Copyright © 2007-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.<br>
-This component and the accompanying materials are made available under the <br/>
-terms of the License "Symbian Foundation License v1.0" which accompanies this <br/>
-distribution, and is available at the URL: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">http://www.symbianfoundation.org/legal/sfl-v10.html</a>.<p>
-
-</body>
-</html>
\ No newline at end of file
--- a/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/TraceCompilerMain.java Tue Oct 26 16:20:32 2010 +0300
@@ -36,6 +36,7 @@
import com.nokia.tracecompiler.engine.TraceCompilerEngineInterface;
import com.nokia.tracecompiler.engine.TraceLocationList;
import com.nokia.tracecompiler.engine.project.ProjectEngine;
+import com.nokia.tracecompiler.engine.utils.TraceUtils;
import com.nokia.tracecompiler.file.FileUtils;
import com.nokia.tracecompiler.model.TraceCompilerException;
import com.nokia.tracecompiler.model.TraceModel;
@@ -512,6 +513,9 @@
throw new TraceCompilerIllegalArgumentsException(Messages.getString("TraceCompiler.projectNameMissing"), null); //$NON-NLS-1$
}
+ //Sanitise the project name
+ projectName = TraceUtils.convertName(projectName);
+
//if files have not been provided , get them from stdin
if (sources.size() == 0) {
//get them from the stdin
--- a/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/HeaderTemplate.java Tue Oct 26 16:20:32 2010 +0300
@@ -184,7 +184,15 @@
HeaderTemplateElementType.PARAMETER_NAME, ";", //$NON-NLS-1$
HeaderTemplateElementType.NEW_LINE, "ptr += sizeof ( ", //$NON-NLS-1$
HeaderTemplateElementType.PARAMETER_TYPE, " );", //$NON-NLS-1$
+ HeaderTemplateElementType.NEW_LINE};
+
+ /**
+ *
+ */
+ Object[] INCREMENT_LENGTH = { "length += sizeof ( ", //$NON-NLS-1$
+ HeaderTemplateElementType.PARAMETER_TYPE, " );", //$NON-NLS-1$
HeaderTemplateElementType.NEW_LINE };
+
/**
* Template for parameter with fixed size and length check
--- a/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/header/TraceHeaderWriter.java Tue Oct 26 16:20:32 2010 +0300
@@ -821,7 +821,12 @@
currentParameterType = paramType;
if (sourceRule instanceof FillerParameterRule) {
currentParameterName = "0"; //$NON-NLS-1$
- writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
+ if (lenghtVariableDefined == true) {
+ writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
+ writeTemplate(HeaderTemplate.INCREMENT_LENGTH);
+ } else {
+ writeTemplate(HeaderTemplate.FIXED_PARAMETER_TEMPLATE);
+ }
} else {
currentParameterIndex++;
currentParameterName = SymbianConstants.PARAMETER_DECLARATION_PREFIX
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceEngineTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,348 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Modifier properties is returned by one of the TraceObjectUtils.modify methods
+*
+*/
+
+package com.nokia.tracecompiler.engine.source;
+
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Vector;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.*;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.project.TraceIDCache;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.engine.source.SourceEngineTest.MockSourceListener.SourceStatus;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.source.SourcePropertyProvider;
+import com.nokia.tracecompiler.utils.DocumentAdapter;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+
+public class SourceEngineTest {
+
+
+ class MockSourcePropertyProvider extends DocumentAdapter
+ implements SourcePropertyProvider
+ {
+
+ String filename;
+ // ctor takes full filename and path as
+ public MockSourcePropertyProvider(String filename){
+ this.filename = filename;
+ }
+ public String getFileName(){
+ return new File(filename).getName();
+
+ }
+ public String getFilePath(){
+ return new File(filename).getPath();
+ }
+ }
+
+
+
+ class MockSourceListener implements SourceListener{
+
+ // mock listener will receive callbacks on source opened
+ // we can then check that the correct files have been opened
+ // and the others HAVE NOT !
+
+ class SourceStatus
+ {
+ public String filename;
+ public boolean inList = false;
+ public boolean fileExists = false;
+ //public SourceProperties properties; // TODO we may use this later to check parser
+ }
+
+ private Vector<SourceStatus> sourceList = new Vector<SourceStatus>();
+
+ public void sourceOpened(SourceProperties properties) throws TraceCompilerException {
+ String filename = properties.getFileName(); // gets the filename without path
+
+ SourceStatus ss = new SourceStatus();
+
+ if( filename != null){
+ ss.filename = testDataDir + filename;
+ ss.fileExists = new File(ss.filename).exists();
+ for( int i=0;i<files.length;i++){
+ if(ss.filename.compareTo(files[i]) == 0){
+ // found filename in list
+ ss.inList = true;
+ break;
+ }
+ }
+ }
+ sourceList.add(ss);
+ }
+
+ public Vector<SourceStatus> getSourceList(){
+ return sourceList;
+ }
+
+ public boolean verifySourceList(){
+
+ boolean ret = true;
+ // source list should contain the files that do exist
+ for(SourceStatus ss : sourceList){
+ if(ss.filename == null){
+ System.out.println("ERROR: Found a null filename");
+ ret = false;
+ }else{
+ if(! ss.fileExists ){
+ System.out.println("ERROR:"+ss.filename + " file does not exist");
+ ret = false;
+ }
+
+ if(!ss.inList){
+ System.out.println("ERROR: recieved notification for file "+ss.filename +" that was NOT in list");
+ ret = false;
+ }
+ // we could break here if ret == false - but I want error printouts for all list items
+
+ }
+
+ }
+ return ret;
+ }
+ }
+
+
+ static SourceEngine engine = null;
+ static MockSourceListener mockListener;
+ static MockSourcePropertyProvider mockProvider;
+ static String files[] = null;
+ static final String names[] = { "BTraceCategoryHandlerTraces.h", "OstTraceDefinitions.h", "foo.cpp", "bar.cpp", "foo.h"
+ , "not_exist.cpp", "not_exist.h", "fixed_id.definitions", "wrong.ext"};
+
+
+ static String testDataDir = null;
+ static String nonFile = "this file does not exist";
+ static String testFile = "data.txt";
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+
+ GroupNames.initialiseGroupName(); //
+ TraceCompilerEngineGlobals.start();
+ String epocroot = System.getenv("EPOCROOT");
+ // need to check that the path ends in a backslash
+ if(!epocroot.endsWith("\\")){
+ epocroot += "\\";
+ }
+
+ final int LEN = names.length;
+ files = new String[LEN];
+
+ testDataDir = epocroot + "testdata\\SourceEngineTest\\";
+ for(int i=0;i<LEN;i++){
+ files[i] = testDataDir + names[i];
+ }
+
+ testFile = testDataDir + testFile;
+
+ mockListener = new SourceEngineTest().new MockSourceListener();
+ mockProvider = new SourceEngineTest().new MockSourcePropertyProvider(testFile);
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ model.addExtension(new TraceIDCache(testDataDir));
+ model.addExtension(new OstTraceFormatRule());
+
+ FileDocumentMonitor fileDocumentMonitor = new FileDocumentMonitor();
+ DocumentFactory.registerDocumentFramework(fileDocumentMonitor, StringDocumentFactory.class);
+
+ engine = TraceCompilerEngineGlobals.getSourceEngine();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testSourceEngine() {
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ SourceEngine engine = new SourceEngine(model);
+ assertNotNull(engine != null);
+ }
+
+ @Test
+ public void testAddSourceListener() {
+ // TODO - engine allows us to add null listeners -fix as this causes exception when accessed
+ //engine.addSourceListener(null);
+ engine.addSourceListener(mockListener);
+ }
+
+ @Test
+ public void testStart() throws Exception{
+
+ // note the testAddSourceListener must be run or mockListener must be added as a sourceListener first
+ mockListener.getSourceList().clear();
+
+ FileDocumentMonitor.setFiles(files);
+ // TODO - calling engine.start() after FileDocumentMonitor.setFiles(null); - causes crash - fix
+
+ engine.start();
+ // files should have been processed by mockListener - check the list
+ assertTrue(mockListener.verifySourceList());
+ }
+
+
+
+ @Test
+ public void testGetSources() {
+
+ /*
+ TODO we are not getting any sources here DocumentMonitorBase.sources only appears to be cleared
+ data comes from DocumentMonitorBase.sources - which has no member to add any
+ so sources probably could be deleted - or fixed to return the correct data
+ */
+ Iterator<SourceProperties> propsList = engine.getSources();
+ assertFalse(propsList.hasNext());
+ }
+
+ @Test
+ public void testIterator() {
+ // see testGetSources
+ }
+
+ @Test
+ public void testAddNonSourceFile() throws Exception{
+
+ /* TODO - nonSource files and source files actually go to the same place in SourceEngine
+ * as this code adds the files to the same list as SourceEngine.addNonSourceFile
+ * while the sources (DocumentMonitorBase.sources) see above test
+ * is never used
+ FileDocumentMonitor.setFiles(files);
+ FileDocumentMonitor fdm= new FileDocumentMonitor();
+ DocumentFactory.registerDocumentFramework(fdm, StringDocumentFactory.class);
+ */
+ ArrayList<String> arr = engine.getNonSourceFiles();
+ final int originalSize = arr.size();
+
+ // add an existing file - not already added
+ engine.addNonSourceFile(testFile);
+ assertEquals( originalSize +1 , arr.size());
+ assertTrue(testFile.equals(arr.get(arr.size() - 1)));
+
+ // add a duplicate file - engine does not check for duplicates
+ engine.addNonSourceFile(files[0]);
+ assertEquals( originalSize + 2 , arr.size());
+ assertTrue(files[0].equals(arr.get(arr.size() - 1)));
+
+ // TODO - fix engine allows us to add null
+ engine.addNonSourceFile(null);
+ assertEquals( originalSize + 3 , arr.size());
+ assertNull(arr.get(arr.size() - 1));
+
+ // TODO - also allows addition of non existient files
+ engine.addNonSourceFile(nonFile);
+ assertEquals( originalSize + 4 , arr.size());
+ assertTrue(nonFile.equals(arr.get(arr.size() - 1)));
+ }
+
+ @Test
+ public void testRemoveNonSourceFile() {
+
+
+ ArrayList<String> arr = engine.getNonSourceFiles();
+ final int originalSize = arr.size();
+
+ // add an existing file - not already added
+ assertTrue(arr.contains(testFile));
+ engine.removeNonSourceFile(testFile);
+ assertFalse(arr.contains(testFile));
+ assertEquals( originalSize -1 , arr.size());
+
+ // add an existing file - not already added
+ assertTrue(arr.contains(nonFile));
+ engine.removeNonSourceFile(nonFile);
+ assertFalse(arr.contains(nonFile));
+ assertEquals( originalSize - 2 , arr.size());
+
+ // remove a duplicate file - there should be 2 instances of files[0] in list
+ assertTrue(arr.contains(files[0]));
+ engine.removeNonSourceFile(files[0]);
+ assertTrue(arr.contains(files[0])); // TODO - remove only removes 1 occurrence - 1 copy still exists
+ assertEquals( originalSize - 3 , arr.size()); // only 1 item removed
+
+ // TODO operations on null are allowed - fix
+ assertTrue(arr.contains(null));
+ engine.removeNonSourceFile(null);
+ assertFalse(arr.contains(null));
+ assertEquals( originalSize - 4 , arr.size());
+
+ }
+
+ @Test
+ public void testGetNonSourceFiles() {
+ // see testAddNonSourceFile and testRemoveNonSourceFile
+ assertNotNull(engine.getNonSourceFiles());
+ }
+
+ @Test
+ public void testSourceOpened() throws TraceCompilerException{
+
+ mockListener.getSourceList().clear();
+
+ // method SourceEngine is a call back - we can however check that this notifys the listener
+ // IN this case should have recieved a single callback - adding a null file
+ // that does not exist
+ engine.sourceOpened( mockProvider);
+ Vector<SourceStatus> sl = mockListener.getSourceList();
+ assertEquals(sl.size(), 1);
+
+ }
+
+ @Test
+ public void testRemoveSourceListener() throws TraceCompilerException {
+
+ engine.removeSourceListener(mockListener);
+ mockListener.getSourceList().clear();
+
+ engine.sourceOpened( mockProvider);
+ Vector<SourceStatus> sl = mockListener.getSourceList();
+ assertEquals(sl.size(), 0);
+ }
+
+ @Test
+ public void testShutdown() {
+ // because junit executes tests in order they appear in source file - this must be last
+ engine.shutdown();
+ }
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourceFormatterTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ *
+ */
+
+
+package com.nokia.tracecompiler.engine.source;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.model.Trace;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceGroup;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.model.TraceModelExtension;
+import com.nokia.tracecompiler.model.TraceObjectFactory;
+import com.nokia.tracecompiler.plugin.TraceAPIFormatter.TraceFormatType;
+
+public class SourceFormatterTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ TraceCompilerEngineGlobals.start();
+ }
+
+ @Test
+ public void testFormatTraceTraceTraceFormatType() throws TraceCompilerException {
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ OstTraceFormatRule ostFormatRule = new OstTraceFormatRule();
+
+ // note these tests use OstFormatRule
+ model.addExtension(ostFormatRule);
+
+ TraceObjectFactory factory = model.getFactory();
+
+ final int id = 999;
+ String name = "hello_hello";
+ TraceModelExtension[] extensions = null;
+
+ TraceGroup traceGroup = factory.createTraceGroup(id, name, extensions );
+ Trace trace = factory.createTrace(traceGroup, id, name, "traceText", extensions);
+
+ String str= SourceFormatter.formatTrace(trace, TraceFormatType.EMPTY_MACRO);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_ACTIVATION);
+ assertTrue(str.equals("BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID )\r\n"));
+
+ str = SourceFormatter.formatTrace(trace, TraceFormatType.HEADER);
+ assertTrue(str.equals("OstTraceGen0( TUint32 aTraceID )\r\n"));
+
+ str= SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_BUFFER);
+ assertTrue(str.equals("OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA%, %LENGTH% );\r\n"));
+
+ str= SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_PACKED);
+ assertTrue(str.equals("BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA% );\r\n"));
+
+
+ // after we remove the format rule - we should get no data
+ model.removeExtension(ostFormatRule);
+
+ str= SourceFormatter.formatTrace(trace, TraceFormatType.EMPTY_MACRO);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_ACTIVATION);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, TraceFormatType.HEADER);
+ assertTrue(str.equals(""));
+
+ str= SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_BUFFER);
+ assertTrue(str.equals(""));
+
+ str= SourceFormatter.formatTrace(trace, TraceFormatType.TRACE_PACKED);
+ assertTrue(str.equals(""));
+ }
+
+ @Test
+ public void testFormatTraceTraceTraceFormattingRuleTraceFormatTypeIteratorOfStringBoolean() throws TraceCompilerException {
+
+ // note these tests use OstFormatRule specified in setupBeforeClass
+ final int id = 999;
+ String name = "hello_hello";
+ TraceModelExtension[] extensions = null;
+
+ OstTraceFormatRule ostFormatRule = new OstTraceFormatRule();
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ TraceObjectFactory factory = model.getFactory();
+
+ TraceGroup traceGroup = factory.createTraceGroup(id, name, extensions );
+ Trace trace = factory.createTrace(traceGroup, id, name, "traceText", extensions);
+
+ ArrayList<String> tags = new ArrayList<String>();
+ tags.add("tag_1");
+ tags.add("tag_2");
+ tags.add("tag_3");
+ tags.add("tag_4");
+
+ String str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.EMPTY_MACRO, tags.iterator(), false);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.EMPTY_MACRO, tags.iterator(), true);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_ACTIVATION, tags.iterator(), false);
+ assertTrue(str.equals("BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID )\r\n"));
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_ACTIVATION, tags.iterator(), true);
+ assertTrue(str.equals("BTraceFiltered8( EXTRACT_GROUP_ID(aTraceID), EOstTraceActivationQuery, KOstTraceComponentID, aTraceID )\r\n"));
+
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.HEADER, tags.iterator(), true);
+ assertTrue(str.equals("OstTraceGen0( TUint32 aTraceID )\r\n"));
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.HEADER, tags.iterator(), false);
+ assertTrue(str.equals("OstTraceGen0( TUint32 aTraceID )\r\n"));
+
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_BUFFER, tags.iterator(), true);
+ assertTrue(str.equals("OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA%, %LENGTH% );\r\n"));
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_BUFFER, tags.iterator(), false);
+ assertTrue(str.equals("OstSendNBytes( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA%, %LENGTH% );\r\n"));
+
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_PACKED, tags.iterator(), true);
+ assertTrue(str.equals("BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA% );\r\n"));
+ str = SourceFormatter.formatTrace(trace, ostFormatRule, TraceFormatType.TRACE_PACKED, tags.iterator(), false);
+ assertTrue(str.equals("BTraceFilteredContext12( EXTRACT_GROUP_ID(aTraceID), EOstTrace, KOstTraceComponentID, aTraceID, %DATA% );\r\n"));
+
+ // try with no format rule
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.EMPTY_MACRO, tags.iterator(), true);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.EMPTY_MACRO, tags.iterator(), false);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_ACTIVATION, tags.iterator(), true);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_ACTIVATION, tags.iterator(), false);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.HEADER, tags.iterator(), true);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.HEADER, tags.iterator(), false);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_BUFFER, tags.iterator(), true);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_BUFFER, tags.iterator(), false);
+ assertTrue(str.equals(""));
+
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_PACKED, tags.iterator(), true);
+ assertTrue(str.equals(""));
+ str = SourceFormatter.formatTrace(trace, null, TraceFormatType.TRACE_PACKED, tags.iterator(), false);
+ assertTrue(str.equals(""));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/source/SourcePropertiesTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ *
+ */
+
+package com.nokia.tracecompiler.engine.source;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.FileDocumentMonitor;
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.TraceLocation;
+import com.nokia.tracecompiler.engine.project.TraceIDCache;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.engine.source.SourceEngineTest.MockSourcePropertyProvider;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.source.SourceDocumentInterface;
+import com.nokia.tracecompiler.source.SourceDocumentMonitor;
+import com.nokia.tracecompiler.source.SourceParser;
+import com.nokia.tracecompiler.source.SourceParserException;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+
+public class SourcePropertiesTest {
+
+ private final class MockListener implements SourceListener {
+ // listener will keep track of source properties from the SourceEngine
+ public Vector<SourceProperties> propertiesList = new Vector<SourceProperties>();
+
+
+ public void sourceOpened(SourceProperties properties)
+ throws TraceCompilerException {
+ this.propertiesList.add(properties);
+ }
+
+ }
+
+ static MockListener mockListener;
+ static String[] files; // array of filenames
+ static boolean[] fileRwFlags; // array of properties for files
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ TraceCompilerEngineGlobals.start();
+ GroupNames.initialiseGroupName(); //
+ TraceCompilerEngineGlobals.start();
+ String epocroot = System.getenv("EPOCROOT");
+ // need to check that the path ends in a backslash
+ if (!epocroot.endsWith("\\")) {
+ epocroot += "\\";
+ }
+
+ String testDataDir = epocroot + "testdata\\SourceEngineTest\\";
+ testDataDir = testDataDir.replace('\\', '/');
+
+ // just setting up with 2 files here
+ final int LEN = 2;
+ files = new String[LEN];
+ files[0] = testDataDir + "foo.cpp";
+ files[1] = testDataDir + "foo.h";
+ fileRwFlags = new boolean[LEN];
+
+ for(int i=0;i<LEN;i++){
+ fileRwFlags[i] = files[i].endsWith(".h");
+ }
+
+ mockListener = new SourcePropertiesTest().new MockListener();
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+
+ model.addExtension(new TraceIDCache(testDataDir));
+ model.addExtension(new OstTraceFormatRule());
+
+ FileDocumentMonitor fileDocumentMonitor = new FileDocumentMonitor();
+ FileDocumentMonitor.setFiles(files);
+ DocumentFactory.registerDocumentFramework(fileDocumentMonitor,
+ StringDocumentFactory.class);
+
+ // set the mockListener to the engine - the 'real' SourceProperties instances
+ // will then be collected by the listener
+ SourceEngine engine = TraceCompilerEngineGlobals.getSourceEngine();
+ engine.addSourceListener(mockListener);
+ engine.start();
+ }
+
+ @Test
+ public void testSourceProperties() throws Exception {
+ SourceDocumentMonitor documentMonitor = DocumentFactory
+ .getDocumentMonitor();
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ MockSourcePropertyProvider mockProvider
+ = new SourceEngineTest().new MockSourcePropertyProvider(files[0]);
+
+ SourceProperties properties = new SourceProperties(model,
+ documentMonitor.getFactory(), mockProvider);
+ assertNotNull(properties);
+
+ // TODO try with some null parameters - these ALL crash at the moment
+ // properties = new SourceProperties(null,
+ // documentMonitor.getFactory(), mockProvider);
+ // assertNotNull(properties);
+
+ // properties = new SourceProperties(model, null, mockProvider);
+ // assertNotNull(properties);
+
+ // properties = new SourceProperties(model,
+ // documentMonitor.getFactory(), null);
+ // assertNotNull(properties);
+
+ // properties = new SourceProperties(null, null, null);
+ // assertNotNull(properties);
+ }
+
+ @Test
+ public void testGetSourceParser() throws SourceParserException {
+ assertTrue(mockListener.propertiesList.size() > 0);
+ for (SourceProperties p : mockListener.propertiesList) {
+ SourceParser parser = p.getSourceParser();
+ assertNotNull(parser);
+ // quick sanity check on the parser
+ SourceDocumentInterface sdi = parser.getSource();
+ assertNotNull(sdi);
+ }
+ }
+
+ @Test
+ public void testIterator() throws Exception {
+ assertTrue(mockListener.propertiesList.size() > 0);
+ for (SourceProperties p : mockListener.propertiesList) {
+ Iterator<TraceLocation> it = p.iterator();
+ while (it.hasNext()) {
+
+ // TODO do some checks on TraceLocation - move this to TraceLocation tests
+ // just print out the trace location data here
+ TraceLocation tl = it.next();
+ String filename = tl.getFilePath() + tl.getFileName();
+ System.out.println(filename);
+ System.out.println("tl.getClassName()");
+ System.out.println(tl.getClassName());
+ System.out.println("tl.getLineNumber()");
+ System.out.println(tl.getLineNumber());
+ System.out.println("tl.getFunctionName()");
+ System.out.println(tl.getFunctionName());
+ System.out.println("tl.getOriginalName()");
+ System.out.println(tl.getOriginalName());
+ System.out.println("tl.getConvertedName()");
+ System.out.println(tl.getConvertedName());
+ Iterator<String> params = tl.getParameters();
+ int n=0;
+ while(params.hasNext()){
+ System.out.println("param: " + n++ +' '+ params.next());
+ }
+ assertNotNull(filename);
+ assertTrue(filename.equals(files[0]));
+
+ }
+ }
+ }
+
+ @Test
+ public void testGetFileName() {
+ int n = 0;
+ for (SourceProperties p : mockListener.propertiesList) {
+ String filename = p.getFileName();
+ assertNotNull(filename);
+ assertTrue(filename.equals(new File(files[n++]).getName()));
+ }
+ assertEquals(n, files.length);
+ }
+
+ @Test
+ public void testIsReadOnly() {
+ int n=0;
+ for (SourceProperties p : mockListener.propertiesList) {
+ boolean readOnly = p.isReadOnly();
+ assertEquals(readOnly, fileRwFlags[n++]);
+ }
+ assertEquals(n, fileRwFlags.length);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/DuplicateParameterNameModifierTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for DuplicateParameterModifier
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+
+public class DuplicateParameterNameModifierTest {
+
+
+
+ char defaultSeparator = '_';
+ final String theName = "traceName";
+ final String theText= "the text";
+ final int theId = 0;
+ final String paramName = "paramName";
+ static DuplicateParameterNameModifier modifier;
+ static TraceParameter traceParameter;
+
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+
+ TraceCompilerEngineGlobals.start();
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testDuplicateParameterNameModifier() throws TraceCompilerException {
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ TraceGroup group = new TraceGroup(model);
+ model.addGroup(group);
+
+ Trace trace = new Trace(group);
+ trace.setID(theId);
+ trace.setName(theName);
+ trace.setTrace(theText);
+ traceParameter = new TraceParameter(trace, theId);
+
+ traceParameter.setName(paramName);
+ assertNotNull(traceParameter);
+ trace.addParameter(traceParameter);
+ modifier = new DuplicateParameterNameModifier(trace, paramName);
+ }
+
+ @Test
+ public void testFindObject() {
+ TraceObject object = modifier.findObject(paramName);
+ assertNotNull(object);
+ assertEquals(object, traceParameter);
+ }
+
+ @Test
+ public void testGetData() {
+ String data = modifier.getData();
+ assertNotNull(data);
+ assertTrue(paramName.equals(data));
+ }
+
+ @Test
+ public void testHasChanged() {
+ boolean changed = modifier.hasChanged();
+ assertFalse(changed);
+ }
+
+ @Test
+ public void testGetSeparator() {
+ char sep = modifier.getSeparator();
+ assertEquals(sep, defaultSeparator);
+ }
+
+ @Test
+ public void testProcessName() {
+ boolean changed = modifier.hasChanged();
+ assertFalse(changed);
+ modifier.processName();
+ changed = modifier.hasChanged();
+ assertTrue(changed);
+ }
+
+ @Test
+ public void testGetModifier() {
+ String str = DuplicateValueModifier.getModifier("DUP_the first one");
+ assertNotNull(str);
+ assertTrue(str.equals("DUP_"));
+
+ str = DuplicateValueModifier.getModifier("DUP1_the second one");
+ assertNotNull(str);
+ assertTrue(str.equals("DUP1_"));
+
+ str = DuplicateValueModifier.getModifier("DUP999_another one");
+ assertNotNull(str);
+ assertTrue(str.equals("DUP999_"));
+
+ str = DuplicateValueModifier.getModifier("DUP1234_------------------------------------------------- hello --------------");
+ assertNotNull(str);
+ assertTrue(str.equals("DUP1234_"));
+
+ str = DuplicateValueModifier.getModifier("DUP this one is valid");
+ assertNotNull(str);
+ assertTrue(str.equals("DUP ")); // TODO - is this correct expected behavior
+
+ str = DuplicateValueModifier.getModifier("DuP this one is invalid");
+ assertNull(str);
+
+ str = DuplicateValueModifier.getModifier("DuP_this one is invalid");
+ assertNull(str);
+
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/MockExtension.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Mock TraceModel Extension
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+
+//class for testing - comparing extensions
+public class MockExtension implements TraceModelExtension {
+
+ private static int ref = 0;
+ private int testRef;
+
+ public MockExtension() {
+ testRef = ++ref;
+ }
+
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+
+ public int getTestRef() {
+ return testRef;
+ }
+
+ public boolean equals(MockExtension other){
+ return (testRef == other.testRef);
+ }
+
+
+ public static ArrayList<MockExtension> createExtensionsHelper(int numExtensions) {
+ ArrayList<MockExtension> extensions = new ArrayList<MockExtension>();
+ for (int i = 0; i < numExtensions; i++) {
+ extensions.add(new MockExtension());
+ }
+ return extensions;
+ }
+
+ public static boolean compareExtensionsHelper(Iterator<MockExtension> extensions1,
+ Iterator<MockExtension> extensions2) {
+ while (extensions1.hasNext()) {
+ if (!extensions2.hasNext()) {
+ return false;
+ }
+ if(!extensions1.next().equals(extensions2.next())){
+ return false;
+ }
+ }
+ return true;
+ }
+
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/MockTraceModelListener.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Mock TraceModelExtension for testing
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+/**
+ * Class to Mock a TraceModel Listener, all what we are interested in here is
+ * the notification bit
+ *
+ */
+
+public class MockTraceModelListener implements TraceModelListener {
+
+ boolean notified = false;
+
+ public void objectAdded(TraceObject owner, TraceObject object) {
+ notified = true;
+ }
+
+ public void objectCreationComplete(TraceObject object) throws TraceCompilerException {
+ notified = true;
+
+ }
+
+ public void objectRemoved(TraceObject owner, TraceObject object) throws TraceCompilerException {
+ notified = true;
+ }
+
+ public void propertyUpdated(TraceObject object, int property) throws TraceCompilerException {
+ notified = true;
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/MockTraceObject.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Mock TraceObject for testing
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+import java.util.Iterator;
+
+
+/**
+ * Class to mock the instantiation of TraceObject which is abstract but there is no reason to justify it except
+ * probably making sure it's not instantiable, that could be achieved by other means
+ *
+ */
+public class MockTraceObject extends TraceObject {
+
+ @Override
+ public void addExtension(TraceModelExtension extension) {
+ super.addExtension(extension);
+ }
+
+ @Override
+ public <T extends TraceModelExtension> T getExtension(Class<T> extClass) {
+ return super.getExtension(extClass);
+ }
+
+ @Override
+ public <T extends TraceModelExtension> Iterator<T> getExtensions(
+ Class<T> extClass) {
+ return super.getExtensions(extClass);
+ }
+
+ @Override
+ public int getID() {
+ return super.getID();
+ }
+
+ @Override
+ public TraceModel getModel() {
+ return super.getModel();
+ }
+
+ @Override
+ public String getName() {
+ return super.getName();
+ }
+
+ @Override
+ void internalSetID(int id) {
+ super.internalSetID(id);
+ }
+
+ @Override
+ public boolean isComplete() {
+ return super.isComplete();
+ }
+
+ @Override
+ protected void notifyOnDelete(TraceObject object) {
+ super.notifyOnDelete(object);
+ }
+
+ @Override
+ public void removeExtension(TraceModelExtension extension) {
+ super.removeExtension(extension);
+ }
+
+ @Override
+ public <T extends TraceModelExtension> void removeExtensions(
+ Class<T> extClass) {
+ super.removeExtensions(extClass);
+ }
+
+ @Override
+ void reset() {
+ super.reset();
+ }
+
+ @Override
+ void setComplete() throws TraceCompilerException {
+ super.setComplete();
+ }
+
+ @Override
+ public void setID(int id) throws TraceCompilerException {
+ super.setID(id);
+ }
+
+ @Override
+ void setModel(TraceModel model) {
+ super.setModel(model);
+ }
+
+ @Override
+ public void setName(String name) throws TraceCompilerException {
+ super.setName(name);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceConstantTableTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,444 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for TraceConstantTable
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.*;
+
+import java.util.Iterator;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceConstantTableTest {
+
+ private TraceModel aTraceModel;
+ private ModelListenerMock aModelListener;
+ private TraceConstantTable aTraceConstantTable;
+ private Trace aTrace;
+ private TraceGroup aTraceGroup;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ aTraceModel = new TraceModel(new TraceObjectRuleFactoryMock(), null);
+ } catch (TraceCompilerException e) {
+ fail("failed to intantiate TraceModel object.");
+ }
+ aModelListener = new ModelListenerMock();
+ aTraceModel.addModelListener(aModelListener);
+ aTraceConstantTable = new TraceConstantTable(aTraceModel);
+ aTraceGroup = new TraceGroup(aTraceModel);
+ aTrace = new Trace(aTraceGroup);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ aTraceModel = null;
+ aModelListener = null;
+ aTraceConstantTable = null;
+ aTrace = null;
+ aTraceGroup = null;
+ }
+
+ @Test
+ public void testSetName() {
+ String testName = "testName";
+ try {
+ aTraceConstantTable.setName(testName);
+ } catch (TraceCompilerException e) {
+ fail("Cannot execute setName");
+ }
+ testName = null;
+ testName = aTraceConstantTable.getName();
+ assertEquals("testName", testName);
+
+ try {
+ aTraceConstantTable.setName(null);
+ } catch (TraceCompilerException e) {
+ fail("Cannot execute setName");
+ }
+ assertEquals("", aTraceConstantTable.getName());
+ }
+
+ @Test
+ public void testReset() {
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+ aTraceConstantTable.reset();
+ assertTrue(aModelListener.isNotified());
+ Iterator<TraceConstantTableEntry> entries = aTraceConstantTable.getEntries();
+ int i = 0;
+ while (entries.hasNext()){
+ TraceConstantTableEntry entry = entries.next();
+ assertEquals(0, entry.getID());
+ assertEquals("", entry.getName());
+ i++;
+ }
+ // TODO Fix design defect (why times 2?)
+ assertEquals(iMax*2, i);
+ }
+
+// @Test
+// public void testTraceConstantTable() {
+// }
+//
+// @Test
+// public void testGetType() {
+// fail("Not yet implemented");
+// }
+//
+// @Test
+// public void testSetType() {
+// }
+
+ @Test
+ public void testAddEntry() {
+ assertFalse(aTraceConstantTable.hasEntries());
+
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+
+ Iterator<TraceConstantTableEntry> entries = aTraceConstantTable.getEntries();
+ int i = 0;
+ int j = 0; // Added to fix TODO: Design defect addEntry adds twice an entry!?!?!
+ while (entries.hasNext()){
+ TraceConstantTableEntry entry = entries.next();
+ assertEquals(i - j, entry.getID());
+ assertEquals("testName"+(i-j), entry.getName());
+ i++;
+ if (i%2 != 0) {
+ j++;
+ }
+ }
+ }
+
+ @Test
+ public void testRemoveEntry() {
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+ }
+
+ @Test
+ public void testFindEntryByID() {
+ int iMax = 5;
+ TraceConstantTableEntry[] entryArray = new TraceConstantTableEntry[ iMax ];
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ entryArray[i] = entry;
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = aTraceConstantTable.findEntryByID(i);
+ assertEquals(i, entry.getID());
+ assertEquals("testName"+i, entry.getName());
+ assertEquals(entryArray[i], entry);
+ }
+ }
+
+ @Test
+ public void testFindEntryByName() {
+ int iMax = 5;
+ TraceConstantTableEntry[] entryArray = new TraceConstantTableEntry[ iMax ];
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ entryArray[i] = entry;
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = aTraceConstantTable.findEntryByName("testName"+i);
+ assertEquals(i, entry.getID());
+ assertEquals("testName"+i, entry.getName());
+ assertEquals(entryArray[i], entry);
+ }
+ }
+
+ @Test
+ public void testGetEntries() {
+ assertFalse(aTraceConstantTable.hasEntries());
+ Iterator<TraceConstantTableEntry> entries = aTraceConstantTable.getEntries();
+ assertFalse(entries.hasNext());
+
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+
+ entries = aTraceConstantTable.getEntries();
+ int i = 0;
+ int j = 0; // Added to fix TODO: Design defect addEntry adds twice an entry!?!?!
+ while (entries.hasNext()){
+ TraceConstantTableEntry entry = entries.next();
+ assertEquals(i-j, entry.getID());
+ assertEquals("testName"+(i-j), entry.getName());
+ i++;
+ if (i%2 != 0) {
+ j++;
+ }
+ }
+ }
+
+ @Test
+ public void testIterator() {
+ assertFalse(aTraceConstantTable.hasEntries());
+ Iterator<TraceConstantTableEntry> entries = aTraceConstantTable.iterator();
+ assertFalse(entries.hasNext());
+
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+
+ entries = aTraceConstantTable.iterator();
+ int i = 0;
+ int j = 0; // Added to fix TODO: Design defect addEntry adds twice an entry!?!?!
+ while (entries.hasNext()){
+ TraceConstantTableEntry entry = entries.next();
+ assertEquals(i-j, entry.getID());
+ assertEquals("testName"+(i-j), entry.getName());
+ i++;
+ if (i%2 != 0) {
+ j++;
+ }
+ }
+ }
+
+ @Test
+ public void testHasEntries() {
+ assertFalse(aTraceConstantTable.hasEntries());
+
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ entry.setID(i);
+ entry.setName("testName"+i);
+ aTraceConstantTable.addEntry(entry);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ assertTrue(aTraceConstantTable.hasEntries());
+ }
+
+ @Test
+ public void testAddParameterReference() {
+ TraceParameter param = new TraceParameter(aTrace);
+ aTraceConstantTable.addParameterReference(param);
+ assertTrue(aTraceConstantTable.hasParameterReferences());
+ Iterator<TraceParameter> parameters = aTraceConstantTable.getParameterReferences();
+ while (parameters.hasNext()){
+ TraceParameter aux = parameters.next();
+ assertEquals(param, aux);
+ }
+ }
+
+ @Test
+ public void testRemoveParameterReference() {
+ assertFalse(aTraceConstantTable.hasParameterReferences());
+ TraceParameter param = new TraceParameter(aTrace);
+ aTraceConstantTable.addParameterReference(param);
+ assertTrue(aTraceConstantTable.hasParameterReferences());
+ aTraceConstantTable.removeParameterReference(param);
+ assertFalse(aTraceConstantTable.hasParameterReferences());
+ }
+
+ @Test
+ public void testHasParameterReferences() {
+ assertFalse(aTraceConstantTable.hasParameterReferences());
+ TraceParameter param = new TraceParameter(aTrace);
+ aTraceConstantTable.addParameterReference(param);
+ assertTrue(aTraceConstantTable.hasParameterReferences());
+ }
+
+ @Test
+ public void testGetParameterReferences() {
+ int iMax = 3;
+ try {
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = new TraceParameter(aTrace);
+ param.setID(i);
+ param.setName("testName"+i);
+ aTraceConstantTable.addParameterReference(param);
+ assertTrue(aModelListener.isNotified());
+ }
+ } catch (TraceCompilerException e) {
+ fail("Cannot call setID or setName");
+ }
+
+ Iterator<TraceParameter> parameters = aTraceConstantTable.getParameterReferences();
+ int i = 0;
+ while (parameters.hasNext()){
+ TraceParameter param = parameters.next();
+ assertEquals(i, param.getID());
+ assertEquals("testName"+i, param.getName());
+ i++;
+ }
+ }
+
+ @Test
+ public void testGetNextEntryID() {
+ TraceConstantTableEntry entry = new TraceConstantTableEntry(aTraceConstantTable);
+ try{
+ entry.setID(12);
+ } catch (TraceCompilerException tce) {
+ fail("Failed to setID");
+ }
+ aTraceConstantTable.addEntry(entry);
+ assertEquals(13, aTraceConstantTable.getNextEntryID());
+ }
+
+ /**
+ * Class to Mock a TraceModel Listener, all what we are interested in here is the notification bit
+ *
+ */
+ class ModelListenerMock implements TraceModelListener {
+
+ boolean notified = false;
+
+ public void objectAdded(TraceObject owner, TraceObject object) {
+ notified = true;
+ }
+
+ public void objectCreationComplete(TraceObject object)
+ throws TraceCompilerException {
+ notified = true;
+
+ }
+
+
+ public void objectRemoved(TraceObject owner, TraceObject object)
+ throws TraceCompilerException {
+ notified = true;
+ }
+
+
+ public void propertyUpdated(TraceObject object, int property)
+ throws TraceCompilerException {
+ //got the message that something changed
+ notified = true;
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(
+ TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceGroupTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,428 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for TraceGroup Class
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Iterator;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceGroupTest {
+ static TraceModel model;
+ static TraceObjectRuleFactoryMock factory;
+ static TraceObjectPropertyVerifierMock v;
+ static MockTraceModelListener listener;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testReset() {
+ try {
+ factory = new TraceObjectRuleFactoryMock();
+ v = new TraceObjectPropertyVerifierMock();
+ model = new TraceModel(factory, v);
+ listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ //create a TraceGroup
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ //create two Traces owned by the existing group
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(2);
+ t2.setName("trace2");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ //add an extension to trace t1
+ MockTraceObjectRuleOnDelete extension = new MockTraceObjectRuleOnDelete();
+ t1.addExtension(extension);
+
+ //check group has only the traces we added
+ assertTrue(g.hasTraces());
+ Iterator<Trace> traces = g.getTraces();
+ assertTrue(traces.hasNext());
+ g.reset();
+ assertFalse(g.hasTraces());
+ assertEquals(0, g.getTraceCount());
+ traces = g.getTraces();
+ assertFalse(traces.hasNext());
+
+ //the reset also does a reset on all traces
+ assertTrue(extension.getNotifocation());
+ extension.resetNotification();
+
+ //check that all traces have been reset.
+ //TODO why group cleans up traces it did create in the first place.
+ assertEquals(0, t1.getID());
+ assertEquals("", t1.getName());
+ assertEquals(0, t2.getID());
+ assertEquals("", t2.getName());
+
+ //check group ID and name have been reset
+ assertEquals(0, g.getID());
+ assertEquals("", g.getName());
+ }
+
+ @Test
+ public void testTraceGroup() {
+ //see above
+ }
+
+ @Test
+ public void testAddTrace() {
+ //TODO is this needed as Trace constructor always requires a Group
+ //this is similar to the Group -- Model relation
+ }
+
+ @Test
+ public void testRemoveTrace() {
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(2);
+ t2.setName("trace2");
+ g.removeTrace(t1);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+
+ // check there is only t2 left
+ assertTrue(g.hasTraces());
+ assertEquals(1, g.getTraceCount());
+ Iterator<Trace> traces = g.getTraces();
+ assertSame(t2, traces.next());
+
+ //check t1 is reset.
+ //TODO is it necessary to reset t1?
+ assertEquals(0, t1.getID());
+ assertEquals("", t1.getName());
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testHasTraces() {
+ //tested above
+ }
+
+ @Test
+ public void testGetTraceCount() {
+ //tested above
+ }
+
+ @Test
+ public void testGetTraces() {
+ //tested above
+ }
+
+ @Test
+ public void testIterator() {
+ //TODO delete this is exactly like getTraces()
+ }
+
+ @Test
+ public void testGetNextTraceID() {
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(20);
+ t2.setName("trace2");
+
+ assertEquals(21, g.getNextTraceID());
+ g.removeTrace(t2);
+ assertEquals(2, g.getNextTraceID());
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testFindTraceByID() {
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(20);
+ t2.setName("trace2");
+
+ assertSame(t2, g.findTraceByID(20));
+ assertSame(t1, g.findTraceByID(1));
+ assertNull(g.findTraceByID(5555));
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testTracePropertyUpdated() {
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(20);
+ t2.setName("trace2");
+
+ Iterator<Trace> traces = g.getTraces();
+ assertSame(t1, traces.next());
+ assertSame(t2, traces.next());
+
+ t1.setID(40);
+ g.tracePropertyUpdated(new MockTraceObject(), TraceModelListener.ID);
+ traces = g.getTraces();
+ assertSame(t2, traces.next());
+ assertSame(t1, traces.next());
+
+ //TODO tracePropertyUpdated take a TraceObject parameters which is unused
+ //TODO it seems that tracesByName is not used. This must impact performance as
+ // group keeps ordering traces by name.
+ // TraceModelListener.NAME
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testTraceIDsUpdated() {
+ //similar to testTracePropertyUpdated().
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+
+ try {
+ g.setID(22);
+ g.setName("testGroup");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Trace t1 = new Trace(g);
+ Trace t2 = new Trace(g);
+
+ try {
+ t1.setID(1);
+ t1.setName("trace1");
+
+ t2.setID(20);
+ t2.setName("trace2");
+
+ Iterator<Trace> traces = g.getTraces();
+ assertSame(t1, traces.next());
+ assertSame(t2, traces.next());
+
+ t1.setID(40);
+ t2.setID(30);
+ g.traceIDsUpdated();
+ traces = g.getTraces();
+ assertSame(t2, traces.next());
+ assertSame(t1, traces.next());
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ /**
+ * a Mock of the TraceObjectRuleFactory need for for creating a model. empty because we are not testing
+ * the model in this class.
+ *
+ */
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(
+ TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+
+ class TraceObjectPropertyVerifierMock implements TraceObjectPropertyVerifier {
+
+
+ public void checkConstantProperties(TraceConstantTable table,
+ TraceConstantTableEntry entry, int id, String value)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkConstantTableProperties(TraceModel owner,
+ TraceConstantTable table, int id, String tableName)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceGroupProperties(TraceModel owner,
+ TraceGroup group, int id, String name)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceModelProperties(TraceModel model, int id,
+ String name, String path) throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceParameterProperties(Trace owner,
+ TraceParameter parameter, int id, String name, String type)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceProperties(TraceGroup group, Trace trace, int id,
+ String name, String data) throws TraceCompilerException {
+
+
+ }
+
+ }
+
+ class MockTraceObjectRuleOnDelete implements TraceObjectRuleOnDelete {
+
+ private boolean notified = false;
+
+ public void objectDeleted() {
+ notified = true;
+ }
+
+
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+
+ public boolean getNotifocation() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceModelTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1148 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for TraceModel
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.project.SortedProperties;
+import com.nokia.tracecompiler.source.SourceConstants;
+
+public class TraceModelTest {
+
+ static TraceModel model;
+ static MockTraceModelListener listener ;
+ static TraceModelExtensionListenerMock extListener;
+ static TraceModelResetListenerMock resetListener;
+ static TraceProcessingListenerMock procListener;
+ static TraceObjectRuleFactoryMock factory;
+ static TraceObjectPropertyVerifierMock v;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testReset() {
+ try {
+ factory = new TraceObjectRuleFactoryMock();
+ v = new TraceObjectPropertyVerifierMock();
+ model = new TraceModel(factory, v);
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ //TODO move this down after filling the model
+ model.reset();
+ }
+
+ @Test
+ public void testTraceModel() {
+ //see above
+ }
+
+ @Test
+ public void testAddModelListener() {
+ listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ //The model should have getModelListeners() method
+ //one way to test is to call one of the notification methods and check the listener
+ //got the notification
+
+ //notifyPropertyUpdated, notifyObjectAdded, notifyObjectRemoved, notifyObjectCreationComplete
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testRemoveModelListener() {
+ model.removeModelListener(listener);
+ // The model should have getModelListeners() method
+ // one way to test is to call one of the notification methods and check
+ // the removed listener
+ // did the notification
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertFalse(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertFalse(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertFalse(listener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertFalse(listener.isNotified());
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testAddExtensionListener() {
+ extListener = new TraceModelExtensionListenerMock();
+ model.addExtensionListener(extListener);
+ //The model should have getModelExtensionListeners() method
+ //one way to test is to call one of the notification methods and check the listener
+ //got the notification
+ model.notifyExtensionAdded(null, null);
+ assertTrue(extListener.isNotified());
+ extListener.resetNotification();
+ model.notifyExtensionRemoved(null, null);
+ assertTrue(extListener.isNotified());
+ extListener.resetNotification();
+
+ }
+
+ @Test
+ public void testRemoveExtensionListener() {
+ //The model should have getModelExtensionListeners() method
+ //one way to test is to call one of the notification methods and check the listener
+ //got the notification
+ model.removeExtensionListener(extListener);
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertFalse(extListener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertFalse(extListener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertFalse(extListener.isNotified());
+ listener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertFalse(extListener.isNotified());
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testAddResetListener() {
+ resetListener = new TraceModelResetListenerMock();
+ model.addResetListener(resetListener);
+ try {
+ model.reset();
+ assertTrue(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.setValid(true);
+ assertTrue(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.setValid(false);
+ assertTrue(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.setValid(false);
+ assertFalse(resetListener.isNotified());
+ resetListener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testRemoveResetListener() {
+ model.removeResetListener(resetListener);
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertFalse(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertFalse(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertFalse(resetListener.isNotified());
+ resetListener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertFalse(resetListener.isNotified());
+ resetListener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testAddProcessingListener() {
+ procListener = new TraceProcessingListenerMock();
+ model.addProcessingListener(procListener);
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.startProcessing();
+ assertTrue(procListener.isNotified());
+ procListener.resetNotification();
+ model.processingComplete();
+ assertTrue(procListener.isNotified());
+ procListener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testRemoveProcessingListener() {
+ model.removeProcessingListener(procListener);
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectAdded(null, null);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.notifyObjectCreationComplete(null);
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.startProcessing();
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ model.processingComplete();
+ assertFalse(procListener.isNotified());
+ procListener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetNextGroupID() {
+ try {
+ //TODO getNextGroupID() needs to be clarified
+ // this function returns the next available group ID
+ // the algorithm is as follows
+ // if there fixed ids the
+ // find the highest group id from [GROUP] or [[OBSOLETE]][GROUP]
+ // if the value is not numeric then just pick 0
+ // find the max group ID already in the model
+ // get the next id after the highest of both.
+ //TODO obviously fixed_ids should be parsed only once and max calculated once
+ // what happen when there are no fixed ids (deafult is 0 but not documented)
+ //also there is an exception raised if the computed max group id > TraceCompilerEngineGlobals.MAX_GROUP_ID
+ //TODO must be documented and tested.
+
+ //nothing set
+ assertEquals(1, model.getNextGroupID());
+
+ //set some groups
+ //TODO as the model stands, it's possible to add groups with no ids
+ //Refactor to only add valid groups to the model
+ TraceGroup g1 = new TraceGroup(model);
+ g1.setID(30);
+ TraceGroup g2 = new TraceGroup(model);
+ g2.setID(4444);
+ assertEquals(4445, model.getNextGroupID());
+ g2.setID(20);
+ assertEquals(31, model.getNextGroupID());
+ g1.reset();
+ assertEquals(21, model.getNextGroupID());
+ g2.setID(4444);
+
+ //create some fixed is
+ SortedProperties fixedIds = new SortedProperties();
+ fixedIds.setProperty("[GROUP]g1", "333");
+ model.setFixedIds(fixedIds);
+ assertEquals(4445, model.getNextGroupID());
+
+
+ fixedIds.setProperty("[GROUP]g2", "5000");
+ assertEquals(5001, model.getNextGroupID());
+
+
+ fixedIds.setProperty("[[OBSOLETE]][GROUP]g3", "234");
+ assertEquals(5001, model.getNextGroupID());
+
+
+
+ Integer i = Integer.valueOf(TraceCompilerEngineGlobals.MAX_GROUP_ID + 1);
+ fixedIds.setProperty("[GROUP]g6", i.toString());
+ try {
+ model.getNextGroupID();
+ fail("Groups should be higher than " + TraceCompilerEngineGlobals.MAX_GROUP_ID);
+ } catch (TraceCompilerException exc) {
+ //normal behaviour
+ }
+
+ //if we put any rubish in the properties, the model would return the next gid from the
+ //model not the fixedids
+ fixedIds.setProperty("[[OBSOLETE]][GROUP]g4", "rubish");
+ assertEquals(4445, model.getNextGroupID());
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testGetNextConstantTableID() {
+ assertTrue(model.getNextConstantTableID()== 1);
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ try {
+ t1.setID(3);
+ } catch (TraceCompilerException e) {
+ // TODO this behaviour is a bit strange and not documented
+ // this exception is raised when notifying the model listeners
+ fail(e.toString());
+ }
+ assertTrue(model.getNextConstantTableID()== 4);
+ }
+
+ @Test
+ public void testRemoveGroup() {
+ Iterator<TraceGroup> groups = model.getGroups();
+ TraceGroup g = null;
+ if (groups.hasNext()) {
+ g = groups.next();
+ }
+ groups = null;
+ if (g != null) {
+ try {
+ model.removeGroup(g);
+ } catch (TraceCompilerException e) {
+ // TODO exception raised by a listener
+ fail(e.toString());
+ }
+ //check the group has been removed
+ groups = model.getGroups();
+ while (groups.hasNext()) {
+ TraceGroup aGroup = groups.next();
+ assertNotSame(aGroup, g);
+ }
+ }
+
+ //TODO expose a defect. It's perfectly possible to create duplicate groups
+ // and this is due to the fact that groups are ArrayList and the model does not check
+ //if the group has already been created.
+ model.addGroup(g);
+ model.addGroup(g); //duplicate
+ groups = model.getGroups();
+ while (groups.hasNext()) {
+ TraceGroup aGroup = groups.next();
+ assertNotSame(aGroup, g);
+ }
+ }
+
+ @Test
+ public void testHasGroups() {
+ assertTrue(model.hasGroups()); //because we have created groups before
+ //TODO we are now forced to reset the whole model to remove all groups
+ //add a method removeAllGroups() to the TraceModel class.
+ model.reset();
+ assertFalse(model.hasGroups());
+ }
+
+ @Test
+ public void testGetGroupCount() {
+ assertEquals(0, model.getGroupCount());
+ //add some groups
+ TraceGroup g1 = new TraceGroup(model);
+ TraceGroup g2 = new TraceGroup(model);
+ assertEquals(2, model.getGroupCount());
+ }
+
+ @Test
+ public void testGetGroups() {
+ //TODO this method is not necessary as groups are defined as
+ //ArrayList in TraceModel.
+ }
+
+ @Test
+ public void testIterator() {
+ //TODO model.iterator() should be renamed to model.getGroupIterator() or simply remove it
+ // the client can always do model.getGroups().iterator()
+ //also model.iterator() as it stands is exactly model.getGroups()
+ // so remove it and change getGroups() to return the real groups and protect groups by making it private.
+ Iterator<TraceGroup> iterator = model.iterator();
+ }
+
+ @Test
+ public void testFindGroupByID() {
+ model.reset();
+ TraceGroup g1 = new TraceGroup(model);
+ TraceGroup g2 = new TraceGroup(model);
+ TraceGroup g3 = new TraceGroup(model);
+ TraceGroup g4 = new TraceGroup(model);
+ try {
+ g1.setID(1);
+ g2.setID(4444);
+ } catch (TraceCompilerException e) {
+ // TODO Auto-generated catch block
+ fail(e.toString());
+ }
+
+ assertSame(g1, model.findGroupByID(g1.getID()));
+ assertSame(g2,model.findGroupByID(g2.getID()));
+ assertNull(model.findGroupByID(3333));
+ //TODO same defect for duplicates, also it's permissible to add groups with no id
+ //or same name
+ model.findGroupByID(0); //this would return the first group with no ID i.e. 0
+ }
+
+ @Test
+ public void testFindGroupByName() {
+ model.reset();
+ TraceGroup g1 = new TraceGroup(model);
+ TraceGroup g2 = new TraceGroup(model);
+ TraceGroup g3 = new TraceGroup(model);
+ try {
+ g1.setID(1);
+ g1.setName("group1");
+ g2.setID(4444);
+ } catch (TraceCompilerException e) {
+ // TODO same as above
+ fail(e.toString());
+ }
+
+ assertSame(g1, model.findGroupByName("group1"));
+ assertNull(model.findGroupByName("rubish"));
+ //TODO same to as for groups and Ids
+ model.findGroupByName("");
+ }
+
+ @Test
+ public void testFindTraceByName() {
+ model.reset();
+ Trace trace1 = new Trace(new TraceGroup(model));
+ Trace trace2 = new Trace(new TraceGroup(model));
+ try {
+ trace1.setName("Trace1");
+ trace2.setName("Trace2");
+ } catch (TraceCompilerException e) {
+ // TODO same as above
+ fail(e.toString());
+ }
+ assertSame(trace1, model.findTraceByName("Trace1"));
+ assertSame(trace2, model.findTraceByName("Trace2"));
+ assertNull(model.findTraceByName("rubish"));
+ //TODO same issue as above but it's even worse because traces have to belong to groups
+ //so the model should have a list of groups and each group should have a list of traces.
+ //fix fix fix
+ }
+
+ @Test
+ public void testGetGroupAt() {
+ model.reset();
+ TraceGroup g1 = new TraceGroup(model);
+ TraceGroup g2 = new TraceGroup(model);
+ TraceGroup g3 = new TraceGroup(model);
+ //TODO this is not necessary as groups is just an ArrayList
+ assertSame(g1, model.getGroupAt(0));
+ assertSame(g2, model.getGroupAt(1));
+ assertSame(g3, model.getGroupAt(2));
+ try {
+ model.removeGroup(g1);
+ } catch (TraceCompilerException e) {
+ // TODO Auto-generated catch block
+ fail(e.toString());
+ }
+ assertSame(g2, model.getGroupAt(0));
+ assertSame(g3, model.getGroupAt(1));
+
+ //TODO defect: if we pass an index higher we get IndexOutOfBoudException
+ try {
+ model.getGroupAt(2);
+ } catch (IndexOutOfBoundsException e) {
+ fail("Defect: Trying to get a group which is not in the model.");
+ }
+ }
+
+ @Test
+ public void testRemoveConstantTable() {
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+ try {
+ t1.setID(1);
+ t1.setName("table1");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ try {
+ model.removeConstantTable(t1);
+ //TODO why the model resets the table removed??? bu anyway check the table is reset
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ Iterator<TraceConstantTable> constantTables = model.getConstantTables();
+ while (constantTables.hasNext()) {
+ assertNotSame(t1, constantTables.next());
+ }
+ try {
+ model.removeConstantTable(t1);
+ } catch (TraceCompilerException e) {
+ // TODO ignore but this is so confusing, the error is coming from the listeners
+ // but the object may have been removed, therefore fail it
+ //fail(e.toString());
+ }
+
+
+ }
+
+ @Test
+ public void testGetConstantTables() {
+ //TODO not necessary as these tables are ArrayLists
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+ Iterator<TraceConstantTable> constantTables = model.getConstantTables();
+ assertEquals(t1, constantTables.next());
+ assertEquals(t2, constantTables.next());
+ assertEquals(t3, constantTables.next());
+
+ }
+
+ @Test
+ public void testFindConstantTableByID() {
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+ try {
+ t1.setID(1);
+ t1.setName("table1");
+ t2.setID(2);
+ t2.setName("table2");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ assertSame(t1, model.findConstantTableByID(1));
+ assertSame(t2, model.findConstantTableByID(2));
+ assertSame(t3, model.findConstantTableByID(0));
+ //TODO same kind of defect as tables can be duplicates
+
+ }
+
+ @Test
+ public void testFindConstantTableByName() {
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+ try {
+ t1.setID(1);
+ t1.setName("table1");
+ t2.setID(2);
+ t2.setName("table2");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ assertSame(t1, model.findConstantTableByName("table1"));
+ assertSame(t2, model.findConstantTableByName("table2"));
+ assertSame(t3, model.findConstantTableByName(""));
+ //TODO same kind of defect as tables can be duplicates
+ }
+
+ @Test
+ public void testHasConstantTables() {
+
+ assertTrue(model.hasConstantTables());
+ model.reset();
+ //TODO same as for groups, should have removeAllTables()
+ assertFalse(model.hasConstantTables());
+ }
+
+ @Test
+ public void testGetConstantTableAt() {
+ //TODO no need for this as constant tables is an ArrayList
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+ try {
+ t1.setID(1);
+ t1.setName("table1");
+ t2.setID(2);
+ t2.setName("table2");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ assertSame(t1, model.getConstantTableAt(0));
+ assertSame(t2, model.getConstantTableAt(1));
+ assertSame(t3, model.getConstantTableAt(2));
+ try {
+ model.removeConstantTable(t1);
+ } catch (TraceCompilerException e) {
+ // TODO refactore
+ fail(e.toString());
+ }
+ assertSame(t2, model.getConstantTableAt(0));
+ assertSame(t3, model.getConstantTableAt(1));
+
+ try {
+ model.getConstantTableAt(3);
+ } catch (IndexOutOfBoundsException e) {
+ fail("Defect: tried to get a constant table not in the model.");
+ }
+
+
+ }
+
+ @Test
+ public void testAddGroup() {
+ model.reset();
+ TraceGroup g1 = new TraceGroup(model);
+ try {
+ model.removeGroup(g1);
+ } catch (TraceCompilerException e) {
+ // TODO refactor
+ fail(e.toString());
+ }
+ model.addGroup(g1);
+ //TODO this is strange because the apis allow to change the model of the group
+ //check the group is added
+ Iterator<TraceGroup> groups = model.getGroups();
+ assertSame(g1, groups.next());
+ assertFalse(groups.hasNext());
+ }
+
+ @Test
+ public void testAddConstantTable() {
+ //TODO method not need if we keep the tables as an Array list
+ model.reset();
+ TraceConstantTable t1 = new TraceConstantTable(model);
+ TraceConstantTable t2 = new TraceConstantTable(model);
+ TraceConstantTable t3 = new TraceConstantTable(model);
+
+ //check the model has only the tables we added
+ Iterator<TraceConstantTable> constantTables = model.getConstantTables();
+ assertSame(t1, constantTables.next());
+ assertSame(t2, constantTables.next());
+ assertSame(t3, constantTables.next());
+ assertFalse(constantTables.hasNext());
+ }
+
+ @Test
+ public void testNotifyPropertyUpdated() {
+ model.reset();
+ MockTraceModelListener listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ try {
+ model.notifyPropertyUpdated(null, 0);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ //TODO refactore
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testNotifyObjectAdded() {
+ model.reset();
+ MockTraceModelListener listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ model.notifyObjectAdded(null, null);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ }
+
+ @Test
+ public void testNotifyObjectRemoved() {
+ model.reset();
+ MockTraceModelListener listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ try {
+ model.notifyObjectRemoved(new MockTraceObject(), new MockTraceObject());
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ }
+
+ @Test
+ public void testNotifyObjectCreationComplete() {
+ model.reset();
+ MockTraceModelListener listener = new MockTraceModelListener();
+ model.addModelListener(listener);
+ try {
+ model.notifyObjectCreationComplete(null);
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ }
+
+ @Test
+ public void testNotifyExtensionAdded() {
+ model.reset();
+ TraceModelExtensionListenerMock listener = new TraceModelExtensionListenerMock();
+ model.addExtensionListener(listener);
+ model.notifyExtensionAdded(null, null);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ }
+
+ @Test
+ public void testNotifyExtensionRemoved() {
+ model.reset();
+ TraceModelExtensionListenerMock listener = new TraceModelExtensionListenerMock();
+ model.addExtensionListener(listener);
+ model.notifyExtensionRemoved(null, null);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ }
+
+ @Test
+ public void testIsValid() {
+ model.reset();
+ TraceModelResetListenerMock listener = new TraceModelResetListenerMock();
+ model.addResetListener(listener);
+ try {
+ model.setValid(false);
+ assertFalse(model.isValid());
+ model.setValid(true);
+ assertTrue(model.isValid());
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ model.setValid(true);
+ assertTrue(model.isValid());
+ assertFalse(listener.isNotified());
+ model.setValid(false);
+ model.reset();
+ assertTrue(model.isValid()); // Defect should set model to valid at reset
+ } catch (TraceCompilerException e) {
+ // TODO refactor
+ fail(e.toString());
+ }
+
+ }
+
+ @Test
+ public void testSetValid() {
+ //tested above
+ }
+
+ @Test
+ public void testGetFactory() {
+ assertSame(factory, model.getFactory().getRuleFactory());
+ }
+
+ @Test
+ public void testGetVerifier() {
+ assertSame(v, model.getVerifier());
+ }
+
+ @Test
+ public void testStartProcessing() {
+ model.reset();
+ TraceProcessingListenerMock l = new TraceProcessingListenerMock();
+ model.addProcessingListener(l);
+ model.startProcessing();
+ assertTrue(l.isNotified());
+ assertTrue(model.isProcessing());
+ assertFalse(model.isComplete()); //defect can not be processing and completed procession at the same time
+ }
+
+ @Test
+ public void testProcessingComplete() {
+ model.processingComplete();
+ assertTrue(model.isComplete());
+ assertFalse(model.isProcessing());
+ }
+
+ @Test
+ public void testIsProcessing() {
+ //done above
+ }
+
+ @Test
+ public void testHasTraces() {
+ model.reset();
+ assertFalse(model.hasTraces());
+ TraceGroup g1 = new TraceGroup(model);
+ Trace t1 = new Trace(g1);
+ assertTrue(model.hasTraces());
+ }
+
+ @Test
+ public void testGetGroupID() {
+ model.reset();
+ assertFalse(model.hasTraces());
+ TraceGroup g1 = new TraceGroup(model);
+ Trace t1 = new Trace(g1);
+ try {
+ g1.setName("group1");
+ g1.setID(1);
+ } catch (TraceCompilerException e) {
+ // TODO Refactore
+ fail(e.toString());
+ }
+
+ Properties p = new Properties();
+ p.put(model.GROUP_PROPERTY_PREFIX + g1.getName() , g1.getID());
+ try {
+ assertEquals(g1.getID(), model.getGroupID(p, g1)); //TODO something strange about this test failing
+ g1.setName("");
+ assertEquals(2, model.getGroupID(p, g1));
+ p.clear();
+ assertEquals(2, model.getGroupID(p, g1));
+ //TODO make this api simler and safer
+ } catch (TraceCompilerException e) {
+ // TODO refactore
+ fail(e.toString());
+ }
+ fail("Not yet implemented");
+ }
+
+ @Test
+ public void testSaveIDs() {
+ model.reset();
+ TraceGroup g1 = new TraceGroup(model); //no id
+ TraceGroup g2 = new TraceGroup(model); //no name
+ TraceGroup g3 = new TraceGroup(model); //no prop
+ TraceGroup g4 = new TraceGroup(model);
+ Trace t1 = new Trace(g1);
+ Trace t2 = new Trace(g1); //no id
+ Trace t3 = new Trace(g2);
+ Trace t4 = new Trace(g2); //no prop
+ Trace t5 = new Trace(g2); //no name
+
+ try {
+
+ g1.setName("group1");
+ g2.setID(2);
+ g4.setName("group4");
+ g4.setID(4);
+
+ t1.setName("trace1");
+ t1.setID(1);
+
+ t2.setName("trace2");
+
+ t3.setName("trace3");
+ t3.setID(3);
+
+ t5.setID(5);
+
+ } catch (TraceCompilerException e) {
+
+ fail(e.toString());
+ }
+ Properties p = new Properties();
+ model.saveIDs(p);
+ //[GROUP]=0x0 --- g3
+ //[GROUP]group1=0x0 --- g1
+ //[GROUP]group4=0x4 --- g4
+ //[TRACE][0x2]_=0x5 --- g2-t5
+ //[TRACE][0x2]_trace3=0x3 --- g2-t3
+ //[TRACE]group1[0x0]_trace2=0x0 --- g1-t2
+ //[TRACE]group1[0x0]_trace1=0x1 --- g1-t1
+ assertEquals(7, p.size());
+ assertEquals(SourceConstants.HEX_PREFIX + g1.getID(), p.getProperty(model.GROUP_PROPERTY_PREFIX + g1.getName()));
+ //assertEquals(SourceConstants.HEX_PREFIX + g2.getID(), p.getProperty(model.GROUP_PROPERTY_PREFIX + g2.getName()));
+ assertEquals(SourceConstants.HEX_PREFIX + g3.getID(), p.getProperty(model.GROUP_PROPERTY_PREFIX + g3.getName()));
+ assertEquals(SourceConstants.HEX_PREFIX + g4.getID(), p.getProperty(model.GROUP_PROPERTY_PREFIX + g4.getName()));
+ StringBuffer sb = new StringBuffer();
+ String createdTraceName = model.TRACE_PROPERTY_PREFIX + model.createTraceName(sb, g1, t1);
+ assertEquals(SourceConstants.HEX_PREFIX + t1.getID(), p.getProperty(createdTraceName));
+ createdTraceName = model.TRACE_PROPERTY_PREFIX + model.createTraceName(sb, g1, t2);
+ assertEquals(SourceConstants.HEX_PREFIX + t2.getID(), p.getProperty(createdTraceName));
+ createdTraceName = model.TRACE_PROPERTY_PREFIX + model.createTraceName(sb, g2, t3);
+ assertEquals(SourceConstants.HEX_PREFIX + t3.getID(), p.getProperty(createdTraceName));
+ //assertEquals(SourceConstants.HEX_PREFIX + t1.getID(), p.getProperty(model.TRACE_PROPERTY_PREFIX + t4.getName())); this trace seems to have been excluded
+ createdTraceName = model.TRACE_PROPERTY_PREFIX + model.createTraceName(sb, g2, t5);
+ assertEquals(SourceConstants.HEX_PREFIX + t5.getID(), p.getProperty(createdTraceName));
+ //TODO this is probably the most unclear API. please put specs, checks and doc.
+
+ }
+
+ @Test
+ public void testCreateTraceName() {
+ model.reset();
+ StringBuffer sb = new StringBuffer();
+ TraceGroup g = new TraceGroup(model);
+ Trace t = new Trace(g);
+
+ try {
+ g.setName("testgroup");
+ g.setID(1);
+ t.setName("testtrace");
+ t.setID(222);
+ } catch (TraceCompilerException e) {
+ // TODO refactore
+ fail(e.toString());
+ }
+ String createdTraceName = model.createTraceName(sb, g, t);
+ assertEquals("testgroup[0x1]_testtrace", createdTraceName);
+ }
+
+ @Test
+ public void testGetFixedIds() {
+ model.reset();
+ SortedProperties p = new SortedProperties();
+ p.put("key1", "value1");
+ p.put("key3", "value3");
+ p.put("key2", "value2");
+ model.setFixedIds(p);
+ assertEquals(p, model.getFixedIds());
+ }
+
+ @Test
+ public void testSetFixedIds() {
+ //no need see above
+ }
+
+ @Test
+ public void testGetNextTraceId() {
+ model.reset();
+ TraceGroup g = new TraceGroup(model);
+ TraceGroup g2 = new TraceGroup(model);
+ try {
+ g.setName("group1");
+ g.setID(1);
+ g2.setName("group2");
+ g2.setID(2);
+ assertEquals(1, model.getNextTraceId(g));
+ //add a trace
+ Trace t = new Trace(g);
+ t.setID(4);
+ assertEquals(5, (model.getNextTraceId(g)));
+ assertEquals(1, model.getNextTraceId(g2));
+ //TODO add more tests to test the case where the next Id comes from the
+ //fixed ids.
+
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+ }
+
+
+ /**
+ * a Mock of the TraceObjectRuleFactory need for for creating a model. empty because we are not testing
+ * the model in this class.
+ *
+ */
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(
+ TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+
+ /**
+ * Class to Mock a TraceModel extension
+ *
+ */
+ class TraceModelExtensionMock implements TraceModelExtension {
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+ }
+
+ class TraceModelExtensionListenerMock implements TraceModelExtensionListener {
+ boolean notified = false;
+
+ public void extensionAdded(TraceObject object,
+ TraceModelExtension extension) {
+ notified = true;
+
+ }
+
+
+ public void extensionRemoved(TraceObject object,
+ TraceModelExtension extension) {
+ notified = true;
+
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+ class TraceModelResetListenerMock implements TraceModelResetListener {
+ boolean notified = false;
+
+ public void modelReset() {
+ notified = true;
+
+ }
+
+
+ public void modelResetting() {
+ notified = true;
+
+ }
+
+
+ public void modelValid(boolean valid) throws TraceCompilerException {
+ notified = true;
+
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+ class TraceProcessingListenerMock implements TraceProcessingListener {
+ boolean notified = false;
+
+ public void processingComplete(boolean changed) {
+ notified = true;
+
+ }
+
+
+ public void processingStarted() {
+ notified = true;
+
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+ class TraceObjectPropertyVerifierMock implements TraceObjectPropertyVerifier {
+
+
+ public void checkConstantProperties(TraceConstantTable table,
+ TraceConstantTableEntry entry, int id, String value)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkConstantTableProperties(TraceModel owner,
+ TraceConstantTable table, int id, String tableName)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceGroupProperties(TraceModel owner,
+ TraceGroup group, int id, String name)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceModelProperties(TraceModel model, int id,
+ String name, String path) throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceParameterProperties(Trace owner,
+ TraceParameter parameter, int id, String name, String type)
+ throws TraceCompilerException {
+
+
+ }
+
+
+ public void checkTraceProperties(TraceGroup group, Trace trace, int id,
+ String name, String data) throws TraceCompilerException {
+
+
+ }
+
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectFactoryTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,244 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for TraceObjectfactory class
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceObjectFactoryTest {
+
+ static TraceObjectFactory factory;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ TraceCompilerEngineGlobals.start();
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ factory = model.getFactory();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testTraceObjectFactory() throws TraceCompilerException {
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ TraceObjectTest.TraceObjectRuleFactoryMock mockRuleFactory = new TraceObjectTest(). new TraceObjectRuleFactoryMock();
+ TraceObjectFactory factory = new TraceObjectFactory(model, mockRuleFactory);
+
+ assertNotNull(factory);
+ }
+
+ @Test
+ public void testGetRuleFactory() throws TraceCompilerException {
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+ TraceObjectTest.TraceObjectRuleFactoryMock mockRuleFactory = new TraceObjectTest(). new TraceObjectRuleFactoryMock();
+ TraceObjectFactory factory = new TraceObjectFactory(model, mockRuleFactory);
+ assertSame(mockRuleFactory, factory.getRuleFactory());
+ }
+
+ @Test
+ public void testCreateTraceGroup() throws Exception {
+ int id = 1;
+ String name = "hello";
+
+ TraceModelExtension[] extensions = null;
+ TraceGroup group = factory.createTraceGroup(id, name, extensions);
+
+ assertSame(id, group.getID());
+ assertTrue(name.equals(group.getName()));
+ }
+
+
+ @Test
+ public void testCreateTrace() throws TraceCompilerException {
+
+ int id = 1;
+ String name = "hello";
+ String traceText = "traceText";
+
+ int numExtensions = 8;
+ ArrayList<MockExtension> ext1 = MockExtension.createExtensionsHelper(numExtensions);
+ MockExtension extsArr1[] = new MockExtension[numExtensions];
+ ext1.toArray(extsArr1);
+
+ TraceGroup group = factory.createTraceGroup(id, name, extsArr1 );
+ Trace trace = factory.createTrace(group, id, name, traceText, extsArr1);
+ assertSame(trace.getID(), id);
+ assertSame(trace.getName(), name);
+ assertTrue(traceText.equals(trace.getTrace()));
+
+ Iterator<MockExtension> it2 = trace.getExtensions(MockExtension.class);
+ assertTrue(MockExtension.compareExtensionsHelper(ext1.iterator(), it2));
+
+ }
+
+ @Test
+ public void testCreateTraceParameterTraceIntStringStringTraceModelExtensionArray()
+ throws TraceCompilerException {
+
+ int id = 1;
+
+ String name = "theName";
+ String type = "theType";
+
+ int numExtensions = 8;
+ ArrayList<MockExtension> ext1 = MockExtension.createExtensionsHelper(numExtensions);
+ MockExtension extsArr1[] = new MockExtension[numExtensions];
+ ext1.toArray(extsArr1);
+
+ TraceGroup group = factory.createTraceGroup(id, name, extsArr1);
+ Trace trace = factory.createTrace(group, id, name, type, extsArr1);
+ TraceParameter param = factory.createTraceParameter(trace, id, name, type, extsArr1);
+
+ assertSame(id, param.getID());
+ assertTrue(name.equals(param.getName()));
+ assertTrue(type.equals(param.getType()));
+ assertSame(param.getTrace(), trace);
+
+ Iterator<MockExtension> it2 = trace.getExtensions(MockExtension.class);
+ assertTrue(MockExtension.compareExtensionsHelper(ext1.iterator(), it2));
+ }
+
+ @Test
+ public void testCreateTraceParameterIntTraceIntStringStringTraceModelExtensionArray() throws Exception{
+ int objectIndex = 0;
+ int id = 1;
+
+ String name = "theName";
+ String type = "theType";
+
+ int numExtensions = 12;
+ ArrayList<MockExtension> ext1 = MockExtension.createExtensionsHelper(numExtensions);
+ MockExtension extsArr1[] = new MockExtension[numExtensions];
+ ext1.toArray(extsArr1);
+
+ TraceGroup group = factory.createTraceGroup(id, name, extsArr1);
+ Trace trace = factory.createTrace(group, id, name, type, extsArr1);
+ TraceParameter param = factory.createTraceParameter(objectIndex, trace,
+ id, name, type, extsArr1);
+
+ assertEquals(id, param.getID());
+ assertTrue(name.equals(param.getName()));
+ assertTrue(type.equals(param.getType()));
+ assertSame(param.getTrace(), trace);
+
+ Iterator<MockExtension> it2 = trace.getExtensions(MockExtension.class);
+ assertTrue(MockExtension.compareExtensionsHelper(ext1.iterator(), it2));
+
+ }
+
+ @Test
+ public void testCreateConstantTable() throws Exception{
+
+ int numExtensions = 9;
+ ArrayList<MockExtension> ext1s = MockExtension.createExtensionsHelper(numExtensions);
+ MockExtension extensions[] = new MockExtension[numExtensions];
+ ext1s.toArray(extensions);
+
+ int id = 2;
+ String typeName = "the type name";
+
+
+
+ TraceConstantTable table = factory.createConstantTable(id, typeName, extensions);
+
+ // check the extensions are in the table
+ Iterator<MockExtension> exts = table.getExtensions(MockExtension.class);
+
+ int count = 0;
+ while(exts.hasNext()){
+ count++;
+ MockExtension ext = exts.next();
+ assertNotNull(ext);
+
+ // now check that ext is in our original list of extensions
+ boolean found = false;
+ for (MockExtension me : ext1s) {
+ if(ext.equals(me)){
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ assertEquals(count, numExtensions);
+ }
+
+ @Test
+ public void testCreateConstantTableEntry() throws Exception{
+ int numExtensions = 3;
+ ArrayList<MockExtension> ext1 = MockExtension.createExtensionsHelper(numExtensions);
+ MockExtension extensions[] = new MockExtension[numExtensions];
+ ext1.toArray(extensions);
+
+ int id = 399;
+ String typeName = "the type name1234abcd";
+ TraceConstantTable table = factory.createConstantTable(id, typeName, extensions);
+
+ String value = "tha_value";
+ // create an entry on the table
+ factory.createConstantTableEntry(table, id, value, extensions);
+
+ Iterator<TraceConstantTableEntry> it1 = table.iterator();
+ assertTrue(it1.hasNext());
+ TraceConstantTableEntry entry = it1.next();
+
+
+ assertEquals(entry.getID(), id);
+ assertSame(entry.getTable(), table);
+ assertTrue(value.equals(entry.getName()) );
+ assertFalse(it1.hasNext());
+ }
+
+ @Test
+ public void testCreateExtension() {
+ MockTraceObject object = new MockTraceObject();
+
+ // we should only create valid extensions for existing types
+ // one of these is TypeMapping
+ String name1 = "TypeMapping";
+ TraceModelPersistentExtension ext1 = factory.createExtension(object, name1);
+ assertNotNull(ext1);
+
+ String name2 = "NoTypeMapping";
+ assertNull(factory.createExtension(object, name2));
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,322 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for TraceObject class
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.*;
+
+import java.util.Iterator;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+public class TraceObjectTest {
+
+ //TODO there is nothing to justify why TraceObject is abstract
+ static TraceObject trace;
+ static TraceModel model;
+ static MockTraceModelListener listener;
+ static TraceModelExtension traceModelExtension;
+ static TraceModelExtension traceModelExtension2;
+ static TraceModelExtension traceModelExtension3;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ // this is a workaround to instantiate a class from the abstract class we want to test.
+ trace = new MockTraceObject();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testSetModel() {
+ try {
+ //create a trace model
+ model = new TraceModel(new TraceObjectRuleFactoryMock(), null);
+ //create a mock model listener
+ listener = new MockTraceModelListener();
+ //set the listener on the model
+ model.addModelListener(listener);
+ } catch (TraceCompilerException e) {
+ fail("failed to create TraceModel.");
+ }
+ //set the model for the trace object
+ trace.setModel(model);
+ //check the model is set and is the same we passed in
+ assertEquals(model, trace.getModel());
+ }
+
+ @Test
+ public void testGetModel() {
+ //check our model again
+ assertEquals(model, trace.getModel());
+ //set a null model i.e. it should be removed from the trace object
+ trace.setModel(null);
+ //check the trace object does not have a model.
+ assertNull(trace.getModel());
+ }
+
+ @Test
+ public void testSetID() {
+ try {
+ //TODO TraceObject setID is not right. what happen if we call getID without setID?
+ //either the ID is passed to the costructor and make the default constructor private
+ //or set a flag when setID is called, if not getID would raise an excpetion for uninitialzed variable.
+ trace.setModel(model);
+ //set a trace id 1
+ trace.setID(1);
+ //check it set to 1
+ assertTrue(trace.getID() == 1);
+ //check the model listener has been notified
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ //change the trace id and check it again and check the model listener
+ trace.setID(2);
+ assertTrue(trace.getID() == 2);
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+
+ } catch (TraceCompilerException e) {
+ fail("failed to set Trace ID.");
+ }
+ }
+
+ @Test
+ public void testInternalSetID() {
+ //reset id without nofying the model listener
+ trace.internalSetID(1);
+ //check it's set to 1
+ assertTrue(trace.getID() == 1);
+ //check the listener is NOT notified of the change
+ assertFalse(listener.isNotified());
+ //do it again with another value
+ trace.internalSetID(2);
+ assertTrue(trace.getID() == 2);
+ assertFalse(listener.isNotified());
+ }
+
+ @Test
+ public void testSetName() {
+ try {
+ //set trace name and check the listener is notified
+ trace.setName("TestTrace");
+ assertEquals("TestTrace", trace.getName());
+ //check the listener had the event
+ assertTrue(listener.isNotified());
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail("failed to set Trace Name.");
+ }
+ }
+
+ @Test
+ public void testAddExtension() {
+ //add an extension TraceModelExtensionMock and check it's set
+ traceModelExtension = new TraceModelExtensionMock();
+ trace.addExtension(traceModelExtension);
+ Iterator<TraceModelExtensionMock> extensions = trace.getExtensions(TraceModelExtensionMock.class);
+ assertTrue(extensions.hasNext());
+ assertEquals(traceModelExtension, extensions.next());
+ assertFalse(extensions.hasNext());
+
+ //add another extension
+ traceModelExtension2 = new TraceModelExtensionMock2();
+ trace.addExtension(traceModelExtension2);
+ Iterator<TraceModelExtensionMock2> extensions2 = trace.getExtensions(TraceModelExtensionMock2.class);
+ assertTrue(extensions2.hasNext());
+ assertEquals(traceModelExtension2, extensions2.next());
+ assertFalse(extensions2.hasNext());
+
+ //add a duplicate
+ traceModelExtension3 = new TraceModelExtensionMock2();
+ trace.addExtension(traceModelExtension3);
+ extensions2 = trace.getExtensions(TraceModelExtensionMock2.class);
+ assertTrue(extensions2.hasNext());
+ assertEquals(traceModelExtension2, extensions2.next());
+ assertEquals(traceModelExtension3, extensions2.next());
+ assertFalse(extensions2.hasNext());
+
+ //add a null extension
+ try {
+ trace.addExtension(null);
+ } catch(NullPointerException e) {
+ fail("Code should never throw NulPointerException " + e.toString());
+ }
+
+ }
+
+ @Test
+ public void testRemoveExtension() {
+ //remove and extension and check it's removed
+ trace.removeExtension(traceModelExtension3);
+ Iterator<TraceModelExtensionMock> extensions = trace.getExtensions(TraceModelExtensionMock.class);
+ assertTrue(extensions.hasNext());
+ assertEquals(traceModelExtension, extensions.next());
+ assertFalse(extensions.hasNext());
+ Iterator<TraceModelExtensionMock2> extensions2 = trace.getExtensions(TraceModelExtensionMock2.class);
+ assertTrue(extensions2.hasNext());
+ assertEquals(traceModelExtension2, extensions2.next());
+ assertFalse(extensions2.hasNext());
+
+ }
+
+ @Test
+ public void testRemoveExtensions() {
+ //remove all extension of a specific type and check they have been removed
+ trace.addExtension(traceModelExtension3);
+ trace.removeExtensions(TraceModelExtensionMock2.class);
+ Iterator<TraceModelExtensionMock2> extensions2 = trace.getExtensions(TraceModelExtensionMock2.class);
+ assertFalse(extensions2.hasNext());
+ }
+
+ @Test
+ public void testGetExtension() {
+ // test get a extension
+ assertNull(trace.getExtension(TraceModelExtensionMock2.class));
+ assertEquals(traceModelExtension, trace.getExtension(TraceModelExtensionMock.class));
+ }
+
+
+ @Test
+ public void testReset() {
+ //reset the trace object and check the id and name reset to 0 and empty string
+ trace.internalSetID(11);
+ try {
+ trace.setName("TestTraceRenamed");
+ listener.resetNotification();
+ } catch (TraceCompilerException e) {
+ fail("failed to rename trace.");
+ }
+ trace.reset();
+ assertTrue(trace.getID() == 0);
+ assertEquals("", trace.getName());
+ }
+
+ @Test
+ public void testSetComplete() {
+ //set trace object processing complete and check its status
+ listener.resetNotification();
+ try {
+ assertFalse(trace.isComplete());
+ trace.setComplete();
+ assertTrue(listener.isNotified());
+ assertTrue(trace.isComplete());
+ } catch (TraceCompilerException e) {
+ fail("failed to set trace to complete status");
+ }
+
+ }
+
+ @Test
+ public void testNotifyOnDelete() {
+ //test notifucation on delete
+ TraceObjectRuleOnDeleteMock extension = new TraceObjectRuleOnDeleteMock();
+ assertFalse(extension.isNotified());
+ trace.addExtension(extension);
+ trace.notifyOnDelete(trace);
+ assertTrue(extension.isNotified());
+ extension.resetNotification();
+ }
+
+ /**
+ * Class to Mock a TraceModel extension
+ *
+ */
+ class TraceModelExtensionMock implements TraceModelExtension {
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+ }
+
+ /**
+ * another Trace Model extension
+ *
+ */
+ class TraceModelExtensionMock2 implements TraceModelExtension {
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+ }
+
+ /**
+ * Class to Mock TraceObjectRuleOnDelete listener, all what we are interested in here is the notification bit
+ *
+ */
+ class TraceObjectRuleOnDeleteMock implements TraceObjectRuleOnDelete {
+
+ boolean notified = false;
+
+ public void objectDeleted() {
+ notified = true;
+ }
+
+ public TraceObject getOwner() {
+ return null;
+ }
+
+ public void setOwner(TraceObject owner) {
+ }
+
+ public boolean isNotified() {
+ return notified;
+ }
+
+ public void resetNotification() {
+ notified = false;
+ }
+ }
+
+ /**
+ * a Mock of the TraceObjectRuleFactory need for for creating a model. empty because we are not testing
+ * the model in this class.
+ *
+ */
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(
+ TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceObjectUtilsTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for static TracObjectUtils class
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceObjectUtilsTest {
+
+ static private TraceParameter p;
+ static private MockTraceModelListener aModelListener;
+ static private Trace trace;
+ static private TraceModel model;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testModifyDuplicateParameterName() {
+ aModelListener = new MockTraceModelListener();
+ try {
+ model = new TraceModel(new TraceObjectRuleFactoryMock(), null);
+ } catch (TraceCompilerException e) {
+ fail("failed to create trace model : " + e.toString());
+ }
+ model.addModelListener(aModelListener);
+ trace = new Trace(new TraceGroup(model));
+ p = new TraceParameter(trace);
+ assertTrue(aModelListener.isNotified());
+ try {
+ p.setID(1);
+ p.setName("myparam");
+ p.setType("mytype");
+ } catch(TraceCompilerException e) {
+ fail("failed to set parameter : " + e.toString());
+ }
+ TraceObjectModifier modifyDuplicateParameterName = TraceObjectUtils.modifyDuplicateParameterName(trace, "myparam");
+ //Strange stuff, nothing is documented, but this seems to prepend DUP + parameter_index to the name and return a new object
+ assertEquals("DUP" + 1 + "_" + p.getName(), modifyDuplicateParameterName.getData());
+
+ //what if parameter name already has DUP1_...
+ try {
+ p.setName("DUP1_myparam");
+ } catch (TraceCompilerException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ modifyDuplicateParameterName = TraceObjectUtils.modifyDuplicateParameterName(trace, "DUP1_myparam");
+ // this would return DUP2_myparam
+ assertEquals("DUP" + 2 + "_" + "myparam", modifyDuplicateParameterName.getData());
+
+ //what if the name is DUPanything_myparam
+ try {
+ p.setName("DUPxxx_myparam");
+ } catch (TraceCompilerException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ modifyDuplicateParameterName = TraceObjectUtils.modifyDuplicateParameterName(trace, "DUPxxx_myparam");
+ // this would return DUP1_DUPxxx_myparam
+ assertEquals("DUP1_" + p.getName(), modifyDuplicateParameterName.getData());
+
+ //what if it's not a duplicate
+
+ modifyDuplicateParameterName = TraceObjectUtils.modifyDuplicateParameterName(trace, "MMM_myparam");
+ //it just return the name we gave
+ assertEquals("MMM_myparam", modifyDuplicateParameterName.getData());
+ //TODO so what's the fuss about going through all those acrobatic thingies in the code
+ //the method is just looking if a trace has a parameter with name and returns a generated name
+ //to avoid duplications according to some convention, if not it just returns what we gave.
+ }
+
+ @Test
+ public void testRemoveDuplicateModifier() {
+
+ assertEquals("myparam", TraceObjectUtils.removeDuplicateModifier("myparam"));
+ assertEquals("myparam", TraceObjectUtils.removeDuplicateModifier("DUP1_myparam"));
+
+ //this is strange as the rule has now changed, this should not be identified as duplicate name.
+ //see previous test
+ assertEquals("DUPxxx_myparam", TraceObjectUtils.removeDuplicateModifier("xx_myparam"));
+
+ }
+
+ @Test
+ public void testFindProperty() {
+ //TODO this method looks like a non-functional code
+ //the method findProperty() is called from the dictionary but seems to always
+ //return empty string.
+ }
+
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceParameterTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test class for TraceParameter class
+*
+*/
+
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceParameterTest {
+
+ static private TraceParameter p;
+ static private MockTraceModelListener aModelListener;
+ static private Trace trace;
+ static private TraceModel model;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testReset() {
+ try {
+ aModelListener = new MockTraceModelListener();
+ model = new TraceModel(new TraceObjectRuleFactoryMock(), null);
+ model.addModelListener(aModelListener);
+ trace = new Trace(new TraceGroup(model));
+ p = new TraceParameter(trace);
+ assertTrue(aModelListener.isNotified());
+ p.setID(1);
+ p.setName("param1");
+ p.setType("type1");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ assertTrue(trace.hasParameters());
+ assertEquals(1, trace.getParameterCount());
+ p.reset();
+ assertTrue(trace.hasParameters());
+ assertEquals(1, trace.getParameterCount());
+
+ }
+
+ @Test
+ public void testTraceParameterTrace() {
+ //parameter already created
+ try {
+ p.setID(1);
+ p.setName("param1");
+ p.setType("type1");
+ } catch (TraceCompilerException e) {
+ fail(e.toString());
+ }
+
+ assertEquals(1, p.getID());
+ assertEquals("param1", p.getName());
+ assertEquals("type1", p.getType());
+
+ TraceParameter p2 = new TraceParameter(trace);
+ assertSame(trace, p2.getTrace());
+
+ }
+
+ @Test
+ public void testTraceParameterTraceInt() {
+ aModelListener.resetNotification();
+ TraceParameter p2 = new TraceParameter(trace, 1);
+ assertSame(trace, p.getTrace());
+ assertSame(p2, trace.getParameter(1));
+ assertTrue(aModelListener.isNotified());
+
+
+ //what if we add to an index that does not exist
+ try {
+ TraceParameter p3 = new TraceParameter(trace, 20);
+ } catch (IndexOutOfBoundsException e) {
+ //Defect
+ fail("tried to add a paramater with no existant index.");
+ }
+ }
+
+ @Test
+ public void testGetTrace() {
+ trace.reset();
+ p = new TraceParameter(trace);
+ assertEquals(trace, p.getTrace());
+ try {
+ trace.removeParameter(p);
+ } catch (TraceCompilerException e) {
+ fail("could not remove parameter from trace: " + e.toString());
+ }
+ assertEquals(0, p.getID());
+ assertEquals("", p.getName());
+ assertNull(p.getTrace()); //TODO defect, the parameter was removed from trace but not completely cleaned
+ //TODO this would also fail should return empty string or null
+ assertEquals("", p.getType());
+ }
+
+ @Test
+ public void testSetType() {
+ try {
+ p.setType("type");
+ } catch (TraceCompilerException e) {
+ fail("failed to set type to parameter :" + e.toString());
+ }
+ assertEquals("type", p.getType());
+ p.reset();
+ }
+
+ @Test
+ public void testGetType() {
+ //done above
+ }
+
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/model/TraceTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,330 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Trace test class
+*
+*/
+package com.nokia.tracecompiler.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Iterator;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TraceTest {
+
+ //TODO fix this design by either only allowing Trace parameters to be created for a Trace
+ //or create them separately and adding them to a Trace.
+ static private Trace aTrace;
+ static private TraceGroup aTraceGroup;
+ static private TraceModel aTraceModel;
+ static private MockTraceModelListener aModelListener;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ //aTrace = null;
+ //aTraceGroup = null;
+ //aTraceModel = null;
+ //aModelListener = null;
+ }
+
+ @Test
+ public void testReset() {
+ try {
+ aTraceModel = new TraceModel(new TraceObjectRuleFactoryMock(), null);
+ } catch (TraceCompilerException e) {
+ fail("failed to intantiate TraceModel object.");
+ }
+ aModelListener = new MockTraceModelListener();
+ aTraceModel.addModelListener(aModelListener);
+ aTraceGroup = new TraceGroup(aTraceModel);
+ aTrace = new Trace(aTraceGroup);
+
+ TraceParameter aTraceParam = new TraceParameter(aTrace);
+ //TODO API design defect: Why instantiating TraceParameter adds parameter to Trace object?
+ //aTrace.addParameter(aTraceParam);
+ assertTrue(aTrace.hasParameters());
+ assertEquals(1, aTrace.getParameterCount());
+
+ aTrace.reset();
+ assertFalse(aTrace.hasParameters());
+ assertEquals(0, aTrace.getParameterCount());
+ }
+
+// @Test
+// public void testTrace() {
+// }
+
+ @Test
+ public void testSetTrace() {
+ String str = null;
+ aModelListener.resetNotification();
+ try {
+ aTrace.setTrace(str);
+ } catch (TraceCompilerException e) {
+ fail("failed to call setTrace");
+ }
+ str = aTrace.getTrace();
+ assertNotNull(str);
+ assertEquals("", str);
+ assertFalse(aModelListener.isNotified());
+
+ str = "test";
+ try {
+ aTrace.setTrace(str);
+ } catch (TraceCompilerException e) {
+ fail("failed to create TraceModel.");
+ }
+ str = aTrace.getTrace();
+ assertNotNull(str);
+ assertEquals("test", str);
+ assertTrue(aModelListener.isNotified());
+ }
+
+// @Test
+// public void testGetTrace() {
+// }
+
+ @Test
+ public void testGetGroup() {
+ TraceGroup group = aTrace.getGroup();
+ assertEquals(group, aTraceGroup);
+ }
+
+ @Test
+ public void testAddParameter() {
+ TraceParameter param = new TraceParameter(aTrace);
+ aTrace.addParameter(param);
+ assertTrue(aTrace.hasParameters());
+ assertEquals(2, aTrace.getParameterCount());
+ TraceParameter param1 = aTrace.getParameter(1);
+ assertEquals(param, param1);
+ }
+
+ @Test
+ public void testInsertParameter() {
+ TraceParameter param = new TraceParameter(aTrace);
+ aTrace.insertParameter(1, param);
+ assertTrue(aTrace.hasParameters());
+ TraceParameter param1 = aTrace.getParameter(1);
+ assertEquals(param, param1);
+ }
+
+ @Test
+ public void testRemoveParameter() {
+ aTrace.reset();
+ aModelListener.resetNotification();
+ TraceParameter aTraceParam = new TraceParameter(aTrace);
+ //aTrace.addParameter(aTraceParam);
+ try{
+ aTrace.removeParameter(aTraceParam);
+ assertFalse(aTrace.hasParameters());
+ assertEquals(0, aTrace.getParameterCount());
+ assertTrue(aModelListener.isNotified());
+ } catch (TraceCompilerException tce) {
+ fail("Cannot removeParameter");
+ }
+ }
+
+ @Test
+ public void testRemoveParameterAt() {
+ aTrace.reset();
+ aModelListener.resetNotification();
+ TraceParameter aTraceParam = new TraceParameter(aTrace);
+ aTrace.insertParameter(0, aTraceParam);
+ try{
+ aTrace.removeParameterAt(0);
+ //TODO fix this design
+ aTrace.removeParameterAt(0);
+ assertTrue(aModelListener.isNotified());
+ } catch (TraceCompilerException tce) {
+ fail("Cannot removeParameterAt");
+ }
+ assertEquals(0, aTrace.getParameterCount());
+ assertFalse(aTrace.hasParameters());
+ }
+
+ @Test
+ public void testHasParameters() {
+ aTrace.reset();
+ aModelListener.resetNotification();
+ TraceParameter aTraceParam = new TraceParameter(aTrace);
+ aTrace.addParameter(aTraceParam);
+ assertTrue(aTrace.hasParameters());
+ try{
+ aTrace.removeParameter(aTraceParam);
+ assertTrue(aTrace.hasParameters());
+ aTrace.removeParameter(aTraceParam);
+ assertFalse(aTrace.hasParameters());
+ } catch (TraceCompilerException tce) {
+ fail("Cannot testHasParameters");
+ }
+ }
+
+ @Test
+ public void testGetParameterCount() {
+ aTrace.reset();
+ assertEquals(0, aTrace.getParameterCount());
+ int iMax = 5;
+ for (int i=0; i<iMax; i++) {
+ aTrace.addParameter(new TraceParameter(aTrace));
+ }
+ assertEquals(iMax * 2, aTrace.getParameterCount());
+ }
+
+ @Test
+ public void testGetNextParameterID() {
+ TraceParameter param = new TraceParameter(aTrace);
+ try{
+ param.setID(12);
+ } catch (TraceCompilerException tce) {
+ fail("Failed to setID");
+ }
+ aTrace.addParameter(param);
+ assertEquals(13, aTrace.getNextParameterID());
+ }
+
+ @Test
+ public void testGetParameter() {
+ aTrace.reset();
+ int iMax = 3;
+ try{
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = new TraceParameter(aTrace);
+ param.setID(i);
+ //aTrace.addParameter(param);
+ }
+ } catch (TraceCompilerException e){
+ fail("Failed to setID to TraceParameter");
+ }
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = aTrace.getParameter(i);
+ assertEquals(i, param.getID());
+ }
+ }
+
+ @Test
+ public void testGetParameters() {
+ aTrace.reset();
+ int iMax = 3;
+ try{
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = new TraceParameter(aTrace);
+ param.setID(i);
+ //aTrace.addParameter(param);
+ }
+ } catch (TraceCompilerException e){
+ fail("Failed to setID to TraceParameter");
+ }
+
+ Iterator<TraceParameter> params = aTrace.getParameters();
+ int i = 0;
+ while (params.hasNext()){
+ int iValue = ((TraceParameter)params.next()).getID();
+ assertEquals(i, iValue);
+ i++;
+ }
+ }
+
+// @Test
+// public void testIterator() {
+// fail("Not yet implemented");
+// }
+
+ @Test
+ public void testFindParameterByID() {
+ aTrace.reset();
+ int iMax = 5;
+ TraceParameter[] parameters = new TraceParameter[iMax];
+ try {
+ for (int i=0; i<iMax; i++) {
+ parameters[i] = new TraceParameter(aTrace);
+ parameters[i].setID(i);
+ parameters[i].setName("test"+i);
+ //aTrace.addParameter(parameters[i]);
+ }
+ } catch (TraceCompilerException e){
+ fail("Failed to setID to TraceParameter");
+ }
+ // Test
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = aTrace.findParameterByID(i);
+ assertEquals(parameters[i], param);
+ assertEquals(i, param.getID());
+ assertEquals("test"+i, param.getName());
+ }
+ }
+
+ @Test
+ public void testFindParameterByName() {
+ aTrace.reset();
+ int iMax = 5;
+ TraceParameter[] parameters = new TraceParameter[iMax];
+ try {
+ for (int i=0; i<iMax; i++) {
+ parameters[i] = new TraceParameter(aTrace);
+ parameters[i].setID(i);
+ parameters[i].setName("test"+i);
+ //aTrace.addParameter(parameters[i]);
+ }
+ } catch (TraceCompilerException e){
+ fail("Failed to setID to TraceParameter");
+ }
+ // Test
+ for (int i=0; i<iMax; i++) {
+ TraceParameter param = aTrace.findParameterByName("test"+i);
+ assertEquals(parameters[i], param);
+ assertEquals(i, param.getID());
+ assertEquals("test"+i, param.getName());
+ }
+ }
+
+ class TraceObjectRuleFactoryMock implements TraceObjectRuleFactory {
+
+ public TraceModelPersistentExtension createExtension(
+ TraceObject object, String name) {
+ return null;
+ }
+
+ public void postProcessNewRules(TraceObject object) {
+ }
+
+ public void preProcessNewRules(TraceObject object) {
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ContextAreaParserTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,262 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for SourceAreaParser
+*
+* Note : more test cases are needed to cover various c++ syntax test cases.
+*
+*/
+
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import java.util.Iterator;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+
+public class ContextAreaParserTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testContextAreaParser() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ContextAreaParser context = new ContextAreaParser(parser);
+ assertNotNull(context);
+ assertEquals(0, context.getContextList().size());
+ }
+ }
+
+ @Test
+ public void testReset() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ContextAreaParser context = new ContextAreaParser(parser);
+ assertNotNull(context);
+ assertEquals(0, context.getContextList().size());
+ try {
+ context.parseAll();
+ //TODO the test cases have to be made more complex.
+ switch (i) {
+ case 0:
+ assertEquals(0, context.getContextList().size());
+ break;
+ case 1:
+ assertEquals(1, context.getContextList().size());
+ break;
+ case 2:
+ assertEquals(1, context.getContextList().size());
+ break;
+ case 3:
+ assertEquals(1, context.getContextList().size());
+ break;
+ case 4:
+ assertEquals(1, context.getContextList().size());
+ break;
+ case 5:
+ assertEquals(1, context.getContextList().size());
+ break;
+ default:
+ break;
+ }
+
+ context.reset();
+ assertEquals(0, context.getContextList().size());
+
+
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+
+ }
+
+ @Test
+ public void testParseAndGet() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ContextAreaParser context = new ContextAreaParser(parser);
+ assertNotNull(context);
+ assertEquals(0, context.getContextList().size());
+ try {
+ SourceContext currentContext = context.parseAndGet(data.length() / 2); //the middle but this can also be improved on case by case basis
+ //TODO the test cases have to be made more complex.
+ switch (i) {
+ case 0:
+ assertEquals(null, currentContext);
+ break;
+ case 1:
+ assertEquals("CHelloTraceFn", currentContext.getFunctionName());
+ break;
+ case 2:
+ assertEquals("Simple", currentContext.getFunctionName());
+ break;
+ case 3:
+ assertEquals("OutputsTIntReturnValue", currentContext.getFunctionName());
+ break;
+ case 4:
+ assertEquals("OutputsUnknownPtrType", currentContext.getFunctionName());
+ break;
+ case 5:
+ assertEquals("CHelloTraceFn", currentContext.getFunctionName());
+ break;
+ default:
+ break;
+ }
+ context.reset();
+ assertEquals(0, context.getContextList().size());
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+ }
+
+ @Test
+ public void testParseAndGetAll() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ContextAreaParser context = new ContextAreaParser(parser);
+ assertNotNull(context);
+ assertEquals(0, context.getContextList().size());
+ try {
+ Iterator<SourceContext> contexts = context.parseAndGetAll(); //the middle but this can also be improved on case by case basis
+ //TODO the test cases have to be made more complex.
+ //TODO there is no need to return Itertor because SourceContext list is an ArrayList
+ switch (i) {
+ case 0:
+ assertFalse(contexts.hasNext());
+ break;
+ case 1:
+ assertEquals("CHelloTraceFn", contexts.next().getFunctionName());
+ break;
+ case 2:
+ assertEquals("Simple", contexts.next().getFunctionName());
+ break;
+ case 3:
+ assertEquals("OutputsTIntReturnValue", contexts.next().getFunctionName());
+ break;
+ case 4:
+ assertEquals("OutputsUnknownPtrType", contexts.next().getFunctionName());
+ break;
+ case 5:
+ assertEquals("CHelloTraceFn", contexts.next().getFunctionName());
+ break;
+ default:
+ break;
+ }
+ assertFalse(contexts.hasNext());
+
+ context.reset();
+ assertEquals(0, context.getContextList().size());
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+ }
+
+ @Test
+ public void testGetContextList() {
+ //test above
+ }
+
+ @Test
+ public void testFind() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ContextAreaParser context = new ContextAreaParser(parser);
+ assertNotNull(context);
+ assertEquals(0, context.getContextList().size());
+ try {
+ context.parseAll();
+ int currentContextIndex = context.find(data.length() / 2); //the middle but this can also be improved on case by case basis
+ //TODO the test cases have to be made more complex.
+ switch (i) {
+ case 0:
+ assertEquals(-1, currentContextIndex);
+ break;
+ case 1:
+ assertEquals(0, currentContextIndex);
+ break;
+ case 2:
+ assertEquals(0, currentContextIndex);
+ break;
+ case 3:
+ assertEquals(0, currentContextIndex);
+ break;
+ case 4:
+ assertEquals(0, currentContextIndex);
+ break;
+ case 5:
+ assertEquals(0, currentContextIndex);
+ break;
+ default:
+ break;
+ }
+ context.reset();
+ assertEquals(0, context.getContextList().size());
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+ }
+
+ @Test
+ public void testParseAll() {
+ //tested above
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/ExcludedAreaParserTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,199 @@
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+
+public class ExcludedAreaParserTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testExcludedAreaParser() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ExcludedAreaParser ex = new ExcludedAreaParser(parser);
+ assertNotNull(ex);
+ }
+ }
+
+ @Test
+ public void testReset() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ExcludedAreaParser ex = new ExcludedAreaParser(parser);
+ assertNotNull(ex);
+ try {
+ ex.parseAll();
+ } catch (SourceParserException e) {
+ fail("Could parse test case " + e.toString());
+ }
+ switch (i) {
+ case 0:
+ assertEquals(0, ex.getAreas().size());
+ break;
+ case 1:
+ assertEquals(4, ex.getAreas().size());
+ break;
+ case 2:
+ assertEquals(1, ex.getAreas().size());
+ break;
+ case 3:
+ assertEquals(1, ex.getAreas().size());
+ break;
+ case 4:
+ assertEquals(1, ex.getAreas().size());
+ break;
+ case 5:
+ assertEquals(5, ex.getAreas().size());
+ break;
+
+ default:
+ break;
+ }
+ ex.reset();
+ assertEquals(0, ex.getAreas().size());
+ }
+ }
+
+ @Test
+ public void testFind() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ExcludedAreaParser context = new ExcludedAreaParser(parser);
+ assertNotNull(context);
+ List<SourceExcludedArea> areas = context.getAreas();
+ assertEquals(0, areas.size());
+ try {
+ context.parseAll();
+ areas = context.getAreas();
+
+ //TODO the test cases have to be made more complex.
+ switch (i) {
+ case 0:
+ assertEquals(-1, context.find(data.length() / 2));
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ for (int j=0; j< areas.size() -1; j++) {
+ SourceExcludedArea sourceExcludedArea = areas.get(j);
+ int offset = sourceExcludedArea.getOffset();
+ int length = sourceExcludedArea.getLength();
+ //System.out.println("offset = " + offset + " length = " + length + " testcase = " + i + " area = " + j);
+ //TODO defect this test fails while it should pass
+ //assertEquals( - (j+1), context.find(offset - 1));
+ assertEquals(j, context.find(offset));
+ assertEquals(j, context.find(offset + length - 1));
+ //TODO defect this test fails while it should pass
+ //assertEquals( -(j+1), context.find(offset + length));
+ }
+ break;
+ default:
+ break;
+ }
+ context.reset();
+ assertEquals(0, areas.size());
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+ }
+
+ @Test
+ public void testParseAll() {
+ //tested above
+ }
+
+ @Test
+ public void testGetArea() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ ExcludedAreaParser context = new ExcludedAreaParser(parser);
+ assertNotNull(context);
+ List<SourceExcludedArea> areas = context.getAreas();
+ assertEquals(0, areas.size());
+ try {
+ context.parseAll();
+ areas = context.getAreas();
+
+ //TODO the test cases have to be made more complex.
+ switch (i) {
+ case 0:
+ assertNull(context.getArea(data.length() / 2));
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ for (int j=0; j< areas.size() -1; j++) {
+ SourceExcludedArea sourceExcludedArea = areas.get(j);
+ int offset = sourceExcludedArea.getOffset();
+ int length = sourceExcludedArea.getLength();
+ //System.out.println("offset = " + offset + " length = " + length + " testcase = " + i + " area = " + j);
+ //TODO defect this test fails while it should pass
+ //assertNull(context.getArea(offset - 1));
+ assertSame(sourceExcludedArea, context.getArea(offset));
+ assertSame(sourceExcludedArea, context.getArea(offset + length - 1));
+ //TODO defect this test fails while it should pass
+ //assertSame( areas.get(j+1), context.getArea(offset + length));
+ }
+ break;
+ default:
+ break;
+ }
+ context.reset();
+ assertEquals(0, areas.size());
+ } catch (SourceParserException e) {
+ fail("Failed to parse test case " + e.toString());
+ }
+ }
+ }
+
+ @Test
+ public void testGetAreas() {
+ //tested above
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/FunctionReturnValueParserTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for FunctioneturnValueParser
+*
+*/
+
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+
+public class FunctionReturnValueParserTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testFunctionReturnValueParser() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ //constructor
+ FunctionReturnValueParser frvParser = new FunctionReturnValueParser(parser);
+ assertNotNull(frvParser);
+ }
+ }
+
+ @Test
+ public void testParseReturnValues() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+
+ ContextAreaParser ctxParser = new ContextAreaParser(parser);
+ try {
+ ctxParser.parseAll();
+ } catch (SourceParserException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ List<SourceContext> contextList = ctxParser.getContextList();
+
+ for (SourceContext sourceContext : contextList) {
+ List<SourceReturn> retList = new ArrayList<SourceReturn>();
+ FunctionReturnValueParser frvParser = new FunctionReturnValueParser(parser);
+ assertNotNull(frvParser);
+ frvParser.parseReturnValues(sourceContext, retList);
+ //TODO, it seems that parseReturnValue return a SourceReturn Object even when it shoud not such as
+ //in constructors, it return an object with position : length 0, offset : the end of the context.
+ //why it does not simply return null to say there is no return statement.
+
+ //assess creation of these ret values
+
+ switch (i) {
+ case 1:
+ case 2:
+ case 5:
+ assertEquals(1, retList.size());
+ assertEquals(0, retList.get(0).getLocation().getLength());
+ assertEquals(data.length() -1, retList.get(0).getLocation().getOffset());
+ break;
+ case 3:
+ assertEquals(1, retList.size());
+ assertEquals(3, retList.get(0).getLocation().getLength()); //ret
+ assertEquals(239, retList.get(0).getLocation().getOffset());
+ break;
+ case 4:
+ assertEquals(1, retList.size());
+ assertEquals(7, retList.get(0).getLocation().getLength()); //aActive
+ assertEquals(249, retList.get(0).getLocation().getOffset());
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testFindLast() {
+ //TODO FindLast is not called by anyone so remove from production code
+ //if a user needs to find out about the last return context, (s)he can have from the list passed in
+ //parseReturnValues.
+
+ //TODO: there a returnextensions list in FunctionReturnValueParser which is not set by anyone
+ //so remove from production code.
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/MockTracesUseCases.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,62 @@
+package com.nokia.tracecompiler.source;
+
+final public class MockTracesUseCases {
+
+
+ //TODO please check if '\n' shouldn't be replaced by SourceConstants.LINE_FEED
+ public static final String[] testCases =
+ {
+ "", //0
+
+ "CHelloTraceFn::CHelloTraceFn()" + '\n'
+ + "// a comment with OstTrace keyword in it." + '\n'
+ + "/*" + '\n'
+ + " * a multiline comment with OstTrace keyword" + '\n'
+ + " */" + '\n'
+ + "{" + '\n'
+ + "OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, \"[0x%08x] Constructor\", this );" +'\n'
+ + "OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR_TEXTWITHTAB, \"[0x%08x] Constructor - Trace text with tabs\", this );" + '\n'
+ + "}", //1
+
+ "void CHelloTraceFn::Simple()" + '\n'
+ + "{" + '\n'
+ + "OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_ENTRY, this );" + '\n'
+ + "OstTraceFunctionEntryExt( CHELLOTRACEFN_SIMPLE_ENTRY_EXT_NO_PARAM, this );" + '\n'
+ + "// ..." + '\n'
+ + "OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_EXIT, this );" + '\n'
+ + "}", //2
+
+ "TInt CHelloTraceFn::OutputsTIntReturnValue()" + '\n'
+ + "{" + '\n'
+ + "OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_ENTRY, this );" + '\n'
+ + "TInt ret = KErrNone;" + '\n'
+ + "// ..." + '\n'
+ + "OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_EXIT, this, ret );" + '\n'
+ + "return ret;" + '\n'
+ + "}", //3
+
+ "CActive* CHelloTraceFn::OutputsUnknownPtrType(CActive* aActive)" + '\n'
+ + "{" + '\n'
+ + "OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_ENTRY, this );" + '\n'
+ + "// ..." + '\n'
+ + "OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_EXIT, this, (TUint) aActive );" + '\n'
+ + "return aActive;" + '\n'
+ + "}", //4
+
+ "#include \"blah.h\"" + '\n'
+ + "CHelloTraceFn::CHelloTraceFn()" + '\n'
+ + "// a comment with OstTrace keyword in it." + '\n'
+ + "/*" + '\n'
+ + " * a multiline comment with OstTrace keyword" + '\n'
+ + " */" + '\n'
+ + "{" + '\n'
+ + "OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR, \"[0x%08x] Constructor\", this );" +'\n'
+ + "OstTrace1( TRACE_NORMAL, CHELLOTRACEFN_CHELLOTRACEFN_CTOR_TEXTWITHTAB, \"[0x%08x] Constructor - Trace text with tabs\", this );" + '\n'
+ + "}" //5
+
+ //TODO add more test cases here
+ };
+
+
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceContextTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,799 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+
+*/
+
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.FileDocumentMonitor;
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+import com.nokia.tracecompiler.engine.TraceCompilerEngineGlobals;
+import com.nokia.tracecompiler.engine.project.TraceIDCache;
+import com.nokia.tracecompiler.engine.rules.osttrace.OstTraceFormatRule;
+import com.nokia.tracecompiler.engine.source.SourceEngine;
+import com.nokia.tracecompiler.engine.source.SourceListener;
+import com.nokia.tracecompiler.engine.source.SourceProperties;
+import com.nokia.tracecompiler.model.TraceCompilerException;
+import com.nokia.tracecompiler.model.TraceModel;
+import com.nokia.tracecompiler.project.GroupNames;
+import com.nokia.tracecompiler.utils.DocumentFactory;
+
+public class SourceContextTest {
+
+ private final class MockListener implements SourceListener {
+ // listener will keep track of source properties from the SourceEngine
+ public Vector<SourceProperties> propertiesList = new Vector<SourceProperties>();
+
+ public void sourceOpened(SourceProperties properties)
+ throws TraceCompilerException {
+ this.propertiesList.add(properties);
+ }
+ }
+
+ static MockListener mockListener;
+ static String[] files; // array of filenames
+ // expected values for THIS test
+ // the file under test is
+ // $EPOCROOT/testdata/SourceEngineTest/SourceContextTest.cpp
+ final int NUM_FUNCTIONS = 15; // number of functions (contexts) described in test file
+ static ArrayList<SourceContext> contexts = null;
+ static final String CLASS_NAME = "SourceContextTestClassName";
+ static final String FUNCTION_NAME = "FunctionSourceContextTestClassName";
+
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ TraceCompilerEngineGlobals.start();
+ GroupNames.initialiseGroupName(); //
+ TraceCompilerEngineGlobals.start();
+ String epocroot = System.getenv("EPOCROOT");
+ // need to check that the path ends in a backslash
+ if (!epocroot.endsWith("\\")) {
+ epocroot += "\\";
+ }
+
+ String testDataDir = epocroot + "testdata\\SourceEngineTest\\";
+ testDataDir = testDataDir.replace('\\', '/');
+
+ // just setting up with 2 files here
+ final int LEN = 1;
+ files = new String[LEN];
+ files[0] = testDataDir + "SourceContextTest.cpp";
+
+ // gatherOffsets(files[0]);
+ mockListener = new SourceContextTest().new MockListener();
+
+ TraceModel model = TraceCompilerEngineGlobals.getTraceModel();
+
+ model.addExtension(new TraceIDCache(testDataDir));
+ model.addExtension(new OstTraceFormatRule());
+
+ FileDocumentMonitor fileDocumentMonitor = new FileDocumentMonitor();
+ FileDocumentMonitor.setFiles(files);
+ DocumentFactory.registerDocumentFramework(fileDocumentMonitor,
+ StringDocumentFactory.class);
+
+ // set the mockListener to the engine - the 'real' SourceProperties
+ // instances
+ // will then be collected by the listener
+ SourceEngine engine = TraceCompilerEngineGlobals.getSourceEngine();
+ engine.addSourceListener(mockListener);
+ engine.start();
+
+ setupContexts();
+ }
+
+ private static void setupContexts() {
+
+ if (contexts == null) {
+ // here we cheat a bit to gather the offsets to use for gathering
+ // the
+ // source context offsets - this is for ease of test maintenance as
+ // if they were hardcoded they would have to be updated every time
+ // the test file was changed
+ ArrayList<Integer> offsets = null;
+ Iterator<SourceProperties> propsList = mockListener.propertiesList
+ .iterator();
+ while (propsList.hasNext()) {
+
+ // there are a lists of SourceContexts held - they are under
+ // com.nokia.tracecompiler.source.SourceParser.contextAreaParser
+ // com.nokia.tracecompiler.source.ContextAreaParser.contextAreas
+ SourceParser parser = propsList.next().getSourceParser();
+
+ File f = new File(files[0]);
+ final long FILELEN = f.length();
+
+ offsets = new ArrayList<Integer>();
+ SourceContext oldContext = null;
+ for (int i = 0; i < FILELEN; i++) {
+ SourceContext context = parser.getContext(i);
+ if (context != null && context != oldContext) {
+ offsets.add(new Integer(i));
+ oldContext = context;
+ }
+ }
+ }
+ assertTrue(offsets.size() > 0);
+ // reset the list
+ propsList = mockListener.propertiesList
+ .iterator();
+ contexts = new ArrayList<SourceContext>();
+ while (propsList.hasNext()) {
+ SourceParser parser = propsList.next().getSourceParser();
+ for (Integer i : offsets) {
+ int index = i.intValue();
+ SourceContext context = parser.getContext(index);
+ contexts.add(context);
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testGetClassName() {
+
+ int n = 0;
+ for(SourceContext context : contexts){
+ String s = context.getClassName();
+ n++;
+ if( n == 3) { // 3rd function in file is global scope - all others class scope
+ assertNull(s);
+ }else{
+ assertNotNull(s);
+ // test data file has several class names defined
+ // - these in format hasSourceContextTestClassNameN
+ assertTrue(s.equals(CLASS_NAME + n));
+ }
+ }
+ assertEquals(n, NUM_FUNCTIONS);
+ }
+
+ @Test
+ public void testGetFunctionName() {
+ int n = 0;
+ for(SourceContext context : contexts){
+ String s = context.getFunctionName();
+ assertNotNull(s);
+ // test data file has several class names defined
+ // - these in format hasSourceContextTestClassNameFunctionN
+ // but first 1st is a constructor & 2nd is a destructor
+ n++;
+ if (n == 1) {
+ assertTrue(s.equals(CLASS_NAME + n));
+ } else if (n == 2) {
+ assertTrue(s.equals("~" + CLASS_NAME + n));
+ } else {
+ assertTrue(s.equals(FUNCTION_NAME + n));
+ }
+ }
+ assertEquals(n, NUM_FUNCTIONS);
+ }
+
+ @Test
+ public void testHasQualifier() {
+
+ // hasQualifier indicates that the function has an unsigned return type
+ // this is not immediately obvious but has Qualifier calls through to
+ // com.nokia.tracecompiler.source.SourceContext.typeEquals(String)
+ // which checks its
+ // com.nokia.tracecompiler.source.SourceContext.returnTypes
+
+ for(SourceContext context : contexts){
+
+ boolean tIntQualifier = context.hasQualifier("TInt");
+ boolean tUintQualifier = context.hasQualifier("TUint");
+ boolean inlineQualifier = context
+ .hasQualifier(SourceConstants.INLINE);
+ boolean voidQualifier = context
+ .hasQualifier(SourceConstants.VOID);
+ boolean charQualifier = context
+ .hasQualifier(SourceConstants.CHAR);
+ boolean shortQualifier = context
+ .hasQualifier(SourceConstants.SHORT);
+ boolean intQualifier = context
+ .hasQualifier(SourceConstants.INLINE);
+ boolean longQualifier = context
+ .hasQualifier(SourceConstants.LONG);
+ boolean unsignedQualifier = context
+ .hasQualifier(SourceConstants.UNSIGNED);
+
+ String funcName = context.getFunctionName();
+ if (funcName.equals("SourceContextTestClassName1")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName.equals("~SourceContextTestClassName2")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName3")) {
+ // TInt FunctionSourceContextTestClassName3( int param1 )
+ assertFalse(tIntQualifier); // TODO - TEST FAILURE this is NOT set here
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier); // TODO - TEST FAILURE - this is NOT SET here
+ // when it is in next function
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName4")) {
+ assertTrue(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName5")) {
+ assertTrue(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertTrue(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertTrue(intQualifier); // TODO - TEST FAILURE - this is SET here when it
+ // was not in
+ // FunctionSourceContextTestClassName3
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName6")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertTrue(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName7")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertTrue(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName8")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertTrue(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName9")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier); // TODO - TEST FAILURE - another issue with int
+ // qualifier this is NOT SET
+ // here
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName10")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertTrue(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName11")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertFalse(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertFalse(intQualifier);
+ assertFalse(longQualifier);
+ assertTrue(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName12")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertTrue(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertTrue(shortQualifier);
+ assertTrue(intQualifier); // TODO - TEST FAILURE - this is set here when it
+ // should not be ?
+ assertFalse(longQualifier);
+ assertFalse(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName13")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertTrue(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertTrue(shortQualifier);
+ assertTrue(intQualifier); // TODO - TEST FAILURE - this is set here when it
+ // shouldn't be ?
+ assertFalse(longQualifier);
+ assertTrue(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName14")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertTrue(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertTrue(intQualifier); // this is set here - implicit int
+ assertFalse(longQualifier);
+ assertTrue(unsignedQualifier);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName15")) {
+ assertFalse(tIntQualifier);
+ assertFalse(tUintQualifier);
+ assertTrue(inlineQualifier);
+ assertFalse(voidQualifier);
+ assertFalse(charQualifier);
+ assertFalse(shortQualifier);
+ assertTrue(intQualifier); // TODO - TEST FAILURE - this is set here
+ assertFalse(longQualifier);
+ assertTrue(unsignedQualifier);
+ } else {
+ fail("invalid funcname" + funcName);
+ }
+ }
+ }
+
+ @Test
+ public void testTypeEquals() {
+ // SourceContext.hasQualifier is a wrap around SourceContext.typeEquals
+ // definition is return typeEquals(type);
+ // so tested in testHasQualifier
+ }
+
+ @Test
+ public void testIsPointer() {
+ for(SourceContext context : contexts){
+ boolean isPtr = context.isPointer();
+ String funcName = context.getFunctionName();
+ // only functions with pointer return type are
+ // inline unsigned* FunctionSourceContextTestClassName14
+ // inline unsigned TUint* FunctionSourceContextTestClassName15
+ // inline unsigned short* FunctionSourceContextTestClassName13
+ if (funcName.equals("FunctionSourceContextTestClassName13")
+ || funcName
+ .equals("FunctionSourceContextTestClassName14")
+ || funcName
+ .equals("FunctionSourceContextTestClassName15")) {
+ assertTrue(isPtr);
+ } else {
+ assertFalse(isPtr);
+ }
+ }
+ }
+
+ @Test
+ public void testIsVoid() {
+ for(SourceContext context : contexts){
+ boolean isVoid = context.isVoid();
+ String funcName = context.getFunctionName();
+ // System.out.println(funcName + " isVoid = " + isVoid);
+ // only functions with void return type is
+ // the constructor / destructor and
+ // void FunctionSourceContextTestClassName6
+ if (funcName.equals("SourceContextTestClassName1")
+ || funcName.equals("~SourceContextTestClassName2")
+ || funcName
+ .equals("FunctionSourceContextTestClassName6")) {
+ assertTrue(isVoid);
+ } else {
+
+ if(funcName.equals("FunctionSourceContextTestClassName3")){
+ assertTrue(isVoid); // TODO - TEST FAILURE - it returns int
+ }else{
+ assertFalse(isVoid);
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testParseParameters() throws SourceParserException {
+ assertEquals(contexts.size(), NUM_FUNCTIONS);
+ for(SourceContext context : contexts){
+ final String funcName = context.getFunctionName();
+ ArrayList<SourceParameter> paramList = new ArrayList<SourceParameter>();
+ context.parseParameters(paramList);
+ Iterator<SourceParameter> it = paramList.iterator();
+ SourceParameter sp = null;
+
+ // contexts 1 & 2 should have no params - others will
+ if( ! funcName.equals("SourceContextTestClassName1") && ! funcName.equals("~SourceContextTestClassName2") ){
+ assertTrue(it.hasNext()); //yes we have parameters
+ sp = it.next(); // get the first one
+ }
+ if(funcName.equals("SourceContextTestClassName1") || funcName.equals("~SourceContextTestClassName2") ){
+ assertFalse(it.hasNext()); // no parameters
+ } else if (funcName.equals("FunctionSourceContextTestClassName3")) {
+ // TInt FunctionSourceContextTestClassName3( int param1 )
+ assertTrue(sp.getType().equals("int"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName4")) {
+ // inline TInt FunctionSourceContextTestClassName4( TInt
+ // ¶m1, void* param2 );
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName5")) {
+ // TInt FunctionSourceContextTestClassName5( TUint32&
+ // param1, char param2, short param3 );
+ assertTrue(sp.getType().equals("TUint32"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("char"));
+ assertTrue(sp.getName().equals("param2"));
+ assertFalse(sp.isPointer());
+ assertFalse(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("short"));
+ assertTrue(sp.getName().equals("param3"));
+ assertFalse(sp.isPointer());
+ assertFalse(sp.isReference());
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName6")) {
+ // void FunctionSourceContextTestClassName6( TInt& param1,
+ // TUint32 *param2, TUint32* param3 );
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+ assertFalse(sp.hasQualifier("const"));
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("TUint32"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("TUint32"));
+ assertTrue(sp.getName().equals("param3"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName7")) {
+ // char FunctionSourceContextTestClassName7( TInt& param1,
+ // void* param2, TAny* param3, int*& param4 );
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+ assertFalse(sp.hasQualifier("const"));
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("TAny"));
+ assertTrue(sp.getName().equals("param3"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("int"));
+ assertTrue(sp.getName().equals("param4"));
+ assertTrue(sp.isPointer());
+ assertTrue(sp.isReference());
+ assertFalse(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName8")) {
+ // short FunctionSourceContextTestClassName8( const TUint32&
+ // param1 );
+ assertTrue(sp.getType().equals("TUint32"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+ assertTrue(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName9")) {
+ // int FunctionSourceContextTestClassName9( const TInt
+ // param1, const TUint32* param2, const void* param3 );
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertEquals(sp.getPointerCount(), 0);
+ assertTrue(sp.hasQualifier("const"));
+
+ sp = it.next();
+ assertTrue(sp.getType().equals("TUint32"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertTrue(sp.hasQualifier("const"));
+
+ sp = it.next();
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("param3"));
+ assertTrue(sp.isPointer());
+ assertEquals(sp.getPointerCount(), 1);
+ assertFalse(sp.isReference());
+ assertTrue(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName10")) {
+
+ // long FunctionSourceContextTestClassName10( int& param1,
+ // TInt** param2 );
+ assertTrue(sp.getType().equals("int"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertTrue(sp.isReference());
+ assertTrue(sp.getPointerCount() == 0);
+ assertFalse(sp.hasQualifier("const"));
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertEquals(sp.getPointerCount(), 2);
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName11")) {
+ // unsigned int FunctionSourceContextTestClassName11(TInt
+ // param1 );
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param1"));
+ assertFalse(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertEquals(sp.getPointerCount(), 0);
+ assertFalse(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName12")) {
+ // inline short FunctionSourceContextTestClassName12(void*
+ // aPtr )
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("aPtr"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertEquals(sp.getPointerCount(), 1);
+ assertFalse(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName13")) {
+ // inline unsigned short*
+ // FunctionSourceContextTestClassName13(void* param1, TInt*
+ // param2 )
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("param1"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertTrue(sp.getPointerCount() == 1);
+ assertFalse(sp.hasQualifier("const"));
+
+ assertTrue(it.hasNext());
+ sp = it.next();
+ assertTrue(sp.getType().equals("TInt"));
+ assertTrue(sp.getName().equals("param2"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertEquals(sp.getPointerCount(), 1);
+
+ assertFalse(it.hasNext());
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName14")) {
+ // inline unsigned*
+ // FunctionSourceContextTestClassName14(void* aPtr )
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("aPtr"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertTrue(sp.getPointerCount() == 1);
+ assertFalse(sp.hasQualifier("const"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName15")) {
+ // inline unsigned int*
+ // FunctionSourceContextTestClassName15(void* aPtr )
+ assertTrue(sp.getType().equals("void"));
+ assertTrue(sp.getName().equals("aPtr"));
+ assertTrue(sp.isPointer());
+ assertFalse(sp.isReference());
+ assertTrue(sp.getPointerCount() == 1);
+ assertFalse(sp.hasQualifier("const"));
+ } else {
+ fail("invalid funcname" + funcName);
+ }
+
+ assertFalse(it.hasNext());
+
+ }
+ }
+
+ @Test
+ public void testParseReturnValues() throws SourceParserException {
+ assertEquals(contexts.size(), NUM_FUNCTIONS);
+ for(SourceContext context : contexts){
+ final String funcName = context.getFunctionName();
+ ArrayList<SourceReturn> returnList = new ArrayList<SourceReturn>();
+ context.parseReturnValues(returnList);
+ Iterator<SourceReturn> it = returnList.iterator();
+ SourceReturn rp = it.next();
+ String retstr = rp.getReturnStatement();
+
+ // SourceReturn has many properties which are beyond the scope of this test
+ // except for functions with void return r- function should be returning the number of the function
+ if(funcName.equals("SourceContextTestClassName1") || funcName.equals("~SourceContextTestClassName2") ){
+ assertTrue(retstr.equals(""));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName3")) {
+ // TInt FunctionSourceContextTestClassName3( int param1 )
+ assertTrue(retstr.equals("3"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName4")) {
+ // inline TInt FunctionSourceContextTestClassName4( TInt
+ // ¶m1, void* param2 );
+ assertTrue(retstr.equals("4"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName5")) {
+ // TInt FunctionSourceContextTestClassName5( TUint32&
+ // param1, char param2, short param3 );
+ assertTrue(retstr.equals("5"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName6")) {
+ // void FunctionSourceContextTestClassName6( TInt& param1,
+ // TUint32 *param2, TUint32* param3 );
+ assertTrue(retstr.equals(""));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName7")) {
+ // char FunctionSourceContextTestClassName7( TInt& param1,
+ // void* param2, TAny* param3, int*& param4 );
+ assertTrue(retstr.equals("7"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName8")) {
+ // short FunctionSourceContextTestClassName8( const TUint32&
+ // param1 );
+ assertTrue(retstr.equals("8"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName9")) {
+ // int FunctionSourceContextTestClassName9( const TInt
+ // param1, const TUint32* param2, const void* param3 );
+ assertTrue(retstr.equals("9"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName10")) {
+ // long FunctionSourceContextTestClassName10( int& param1,
+ // TInt** param2 );
+ assertTrue(retstr.equals("10"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName11")) {
+ // unsigned int FunctionSourceContextTestClassName11(TInt
+ // param1 );
+ assertTrue(retstr.equals("11"));
+
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName12")) {
+ // inline short FunctionSourceContextTestClassName12(void*
+ // aPtr )
+ assertTrue(retstr.equals("12"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName13")) {
+ // inline unsigned short*
+ // FunctionSourceContextTestClassName13(void* param1, TInt*
+ // param2 )
+ assertTrue(retstr.equals("13"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName14")) {
+ // inline unsigned*
+ // FunctionSourceContextTestClassName14(void* aPtr )
+ assertTrue(retstr.equals("14"));
+ } else if (funcName
+ .equals("FunctionSourceContextTestClassName15")) {
+ // inline unsigned int*
+ // FunctionSourceContextTestClassName15(void* aPtr )
+ assertTrue(retstr.equals("15"));
+ } else {
+ fail("invalid funcname" + funcName);
+ }
+ }
+ }
+
+ @Test
+ public void testToString() {
+ int n = 0;
+ for(SourceContext context : contexts){
+ String s = context.toString();
+ assertNotNull(s);
+ System.out.println(s);
+ if(++n == 1){
+ assertTrue(s.equals("SourceContextTestClassName1::SourceContextTestClassName1"));
+ }else if(n ==2){
+ assertTrue(s.equals("SourceContextTestClassName2::~SourceContextTestClassName2"));
+ }else if(n == 3){
+ assertTrue(s.equals("::FunctionSourceContextTestClassName3"));
+ }else{
+ assertTrue(s.equals("SourceContextTestClassName"+n+"::FunctionSourceContextTestClassName"+n));
+ }
+ }
+ }
+}
+
+// End of File
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceExcludedAreaTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for SourceExcludedArea
+*
+*/
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class SourceExcludedAreaTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testSourceExcludedArea() {
+ SourceExcludedArea sxArea = new SourceExcludedArea(null, 0, SourceExcludedArea.CHARACTER);
+ assertNotNull(sxArea);
+ //TODO there is a problem with this constructor
+ //the type passed in is not checked at all
+ //Also because SourceExcludedArea is subclassing SourceLocationBase, anyone can change the offset and the length
+ //of the area
+ //this class could override these methods to do nothing to protect these fields being changed.
+
+ }
+
+ @Test
+ public void testGetType() {
+ SourceExcludedArea sxArea = new SourceExcludedArea(null, 20, SourceExcludedArea.CHARACTER);
+ assertNotNull(sxArea);
+ assertEquals(SourceExcludedArea.MULTILINE_COMMENT, sxArea.getType());
+ assertEquals(20, sxArea.getOffset());
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceIteratorTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,219 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for SourceIterator
+*
+*/
+
+//TODO more tests are needed here
+
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+
+public class SourceIteratorTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testSourceIterator() {
+ //TODO various test cases need to be added here
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ }
+ }
+
+ @Test
+ public void testHasNext() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ assertTrue(sIter.hasNext());
+ sIter = new SourceIterator(parser, data.length() -1, SourceParser.SKIP_ALL);
+ //TODO defect this should return false
+ assertFalse(sIter.hasNext());
+ }
+
+ @Test
+ public void testNext() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ try {
+ assertEquals('C', sIter.next()); // "CHelloTraceFn::CHelloTraceFn()" + '\n'
+ assertEquals('H', sIter.next());
+ assertEquals('e', sIter.next());
+ assertEquals('l', sIter.next());
+ assertEquals('l', sIter.next());
+ assertEquals('o', sIter.next());
+ assertEquals('T', sIter.next());
+ assertEquals('r', sIter.next());
+ assertEquals('a', sIter.next());
+ assertEquals('c', sIter.next());
+ assertEquals('e', sIter.next());
+ assertEquals('F', sIter.next());
+ assertEquals('n', sIter.next());
+ assertEquals(':', sIter.next());
+ assertEquals(':', sIter.next());
+ assertEquals('C', sIter.next());
+ assertEquals('H', sIter.next());
+ assertEquals('e', sIter.next());
+ assertEquals('l', sIter.next());
+ assertEquals('l', sIter.next());
+ assertEquals('o', sIter.next());
+ assertEquals('T', sIter.next());
+ assertEquals('r', sIter.next());
+ assertEquals('a', sIter.next());
+ assertEquals('c', sIter.next());
+ assertEquals('e', sIter.next());
+ assertEquals('F', sIter.next());
+ assertEquals('n', sIter.next());
+ assertEquals('(', sIter.next());
+ assertEquals(')', sIter.next());
+ assertFalse(sIter.hasSkipped());
+ assertEquals('/', sIter.next()); //TODO this is a genuine defect, it should have returned { here and
+ //all the characters between ) and { should have been skipped.
+ //for the moment it's getting the next index after skipping just one area so if there are contiguous skippable areas
+ // it return the beginning of the next one
+ assertTrue(sIter.hasSkipped());
+ assertEquals('{', sIter.next());
+ assertTrue(sIter.hasSkipped());
+ } catch (SourceParserException e) {
+ fail("failed to get next from source iterator. " + e.toString());
+ }
+ }
+
+ @Test
+ public void testNextIndex() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ assertEquals(0, sIter.nextIndex());
+ sIter = new SourceIterator(parser, 29, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ assertEquals(29, sIter.nextIndex());
+ try {
+ sIter.next();
+ assertEquals(73, sIter.nextIndex()); //check it's { after skipping all areas but see defect above
+ sIter.next();
+ assertEquals('{', sIter.next());
+ } catch (SourceParserException e) {
+ fail("failed to get next from source iterator. " + e.toString());
+ }
+
+ }
+
+ @Test
+ public void testCurrentIndex() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ assertEquals(0, sIter.currentIndex());
+ assertEquals(0, sIter.previousIndex());
+ try {
+ sIter.next();
+ assertEquals(0, sIter.currentIndex()); //check it's { after skipping all areas but see defect above
+ assertEquals(0, sIter.previousIndex());
+ sIter.next();
+ assertEquals(1, sIter.currentIndex());
+ assertEquals(0, sIter.previousIndex());
+ sIter = new SourceIterator(parser, 29, SourceParser.SKIP_ALL);
+ assertEquals(29, sIter.currentIndex());
+ assertEquals(29, sIter.previousIndex());
+ sIter.next();
+ assertEquals(29, sIter.currentIndex());
+ assertEquals(29, sIter.previousIndex()); //TODO this is strange behaviour, it should be 28
+ sIter.next();
+ assertEquals(73, sIter.currentIndex());
+ assertEquals(29, sIter.previousIndex());
+ assertEquals('{', sIter.next());
+ assertEquals(125, sIter.currentIndex());
+ assertEquals(73, sIter.previousIndex());
+ } catch (SourceParserException e) {
+ fail("failed to get next from source iterator. " + e.toString());
+ }
+ }
+
+ @Test
+ public void testPreviousIndex() {
+ //see above
+ }
+
+ @Test
+ public void testPeek() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ SourceIterator sIter = new SourceIterator(parser, 0, SourceParser.SKIP_ALL);
+ assertNotNull(sIter);
+ try {
+ assertEquals('C', sIter.peek());
+ sIter = new SourceIterator(parser, 29, SourceParser.SKIP_ALL);
+ sIter.next();
+ assertEquals('/', sIter.peek());
+ sIter = new SourceIterator(parser, 30, SourceParser.SKIP_ALL);
+ sIter.next();
+ assertEquals('{', sIter.peek());
+ } catch (SourceParserException e) {
+ fail("failed to peek from source iterator. " + e.toString());
+ }
+ }
+
+ @Test
+ public void testHasSkipped() {
+ //see above
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/source/SourceParserTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,471 @@
+/*
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Test Class for SourceParser: Parser for C++ source files
+*
+* Note : more test cases are needed to cover various c++ syntax test cases.
+*
+*/
+
+package com.nokia.tracecompiler.source;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.nokia.tracecompiler.document.StringDocumentFactory;
+
+public class SourceParserTest {
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testSourceParserSourceDocumentFactoryString() {
+ //constructor SourceParser(SourceDocumentFactory, String)
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ //Note: Normally the parser would work the same whether it's created from string or file
+ //so to allow various use cases to be added in the future, we are using SourceParser with
+ //string source data.
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceParser parser = new SourceParser(factory, data);
+ assertNotNull(parser);
+ assertEquals(data.length(), parser.getDataLength());
+ assertEquals(data, parser.getData(0, parser.getDataLength()));
+
+ //TODO defect if we pass non-valid index, the code just throws StringIndexOutofBoundException
+ //while the function claims to return null if nothing can be found
+ //assertNull(parser.getData(10000000, parser.getDataLength()));
+ //assertNull(parser.getData(0, 1000000));
+
+ }
+ }
+
+ @Test
+ public void testSourceParserSourceDocumentFactorySourceDocumentInterface() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertEquals(data.length(), parser.getDataLength());
+ assertEquals(data, parser.getData(0, parser.getDataLength()));
+ }
+ }
+
+ @Test
+ public void testGetSource() {
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertSame(sourceDocument, parser.getSource());
+ //see defect above about invalid index
+ }
+ }
+
+ @Test
+ public void testGetDataIntInt() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertEquals("CHelloTraceFn()", parser.getData(15, 15));
+ //see defect above about invalid index
+ }
+
+ @Test
+ public void testGetDataInt() {
+ String data;
+
+ for (int j = 0; j < MockTracesUseCases.testCases.length; j++) {
+ data = MockTracesUseCases.testCases[j];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ for (int i = 0; i < data.length(); i++) {
+ assertEquals(data.charAt(i), parser.getData(i));
+ }
+ //see defect above about invalid index
+ //assertNull(parser.getData(10000000));
+ }
+
+ }
+
+ @Test
+ public void testGetDataLength() {
+
+ for (int i = 0; i < MockTracesUseCases.testCases.length; i++) {
+ String data = MockTracesUseCases.testCases[i];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertEquals(data.length(), parser.getDataLength());
+ }
+ }
+
+ @Test
+ public void testGetLineNumber() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertEquals(1, parser.getLineNumber(0));
+ assertEquals(1, parser.getLineNumber(20));
+ assertEquals(1, parser.getLineNumber(30));
+ assertEquals(2, parser.getLineNumber(31));
+
+ assertEquals(2, parser.getLineNumber(32));
+ assertEquals(2, parser.getLineNumber(33));
+
+ assertEquals(2, parser.getLineNumber(34));
+ assertEquals(8, parser.getLineNumber(220));
+
+ //TODO defect, the function is claiming to return -1 but it's returning 0
+ //reason: SourParser line 211 retval = source.getLineOfOffset(offset) + 1;
+ //is adding one without checking what it has from source.getLineOfOffset(offset)
+ //assertEquals(-1, parser.getLineNumber(100000));
+ //add more tests
+
+ }
+
+ @Test
+ public void testStartStringSearch() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ SourceStringSearch startStringSearch = parser.startStringSearch("OstTrace", 0, data.length() -1, SourceParser.SKIP_ALL );
+
+ assertEquals(127, startStringSearch.findNext()); //line 7
+ assertEquals(218, startStringSearch.findNext()); //line 8
+
+ assertEquals(-1, startStringSearch.findNext());
+
+ //search for something that does not exist
+ startStringSearch = parser.startStringSearch("Rubish", 0, data.length() -1, SourceParser.SKIP_ALL );
+ assertEquals(-1, startStringSearch.findNext());
+
+ //search case insensitive
+ startStringSearch = parser.startStringSearch("osttrace", 0, data.length() -1, SourceParser.IGNORE_CASE | SourceParser.SKIP_ALL );
+ assertEquals(127, startStringSearch.findNext()); //line 7
+ assertEquals(218, startStringSearch.findNext()); //line 8
+
+ //search
+ startStringSearch = parser.startStringSearch("OstTrace", 0, data.length() -1, SourceParser.SKIP_COMMENTS );
+ assertEquals(127, startStringSearch.findNext()); //line 7
+ assertEquals(218, startStringSearch.findNext()); //line 8
+
+
+ //TODO add more test cases here
+
+
+ }
+
+ @Test
+ public void testTokenizeParameters() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ SourceStringSearch startStringSearch = parser.startStringSearch("OstTrace", 0, data.length() -1, SourceParser.SKIP_ALL );
+
+ int index = startStringSearch.findNext();
+ List<String> listOfParameters = new ArrayList<String>();;
+ try {
+ int offsetOfEndOfParameters = parser.tokenizeParameters(index, listOfParameters, true);
+ assertEquals(4, listOfParameters.size());
+ assertEquals("TRACE_NORMAL", listOfParameters.get(0));
+ assertEquals("CHELLOTRACEFN_CHELLOTRACEFN_CTOR", listOfParameters.get(1));
+ assertEquals("\"[0x%08x] Constructor\"", listOfParameters.get(2));
+ assertEquals("this", listOfParameters.get(3));
+ assertEquals(216, offsetOfEndOfParameters);
+
+ } catch (SourceParserException e) {
+ fail("could not determine parameterlist" +e.toString());
+ }
+
+ //TODO add more test cases here
+ }
+
+ @Test
+ public void testParseFunctionParameters() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ List<SourceParameter> parameterList = new ArrayList<SourceParameter>();
+ try {
+ parser.parseFunctionParameters(100, parameterList);
+ assertEquals(0, parameterList.size());
+ data = MockTracesUseCases.testCases[4];
+ sourceDocument = factory.createDocument(data);
+ parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ parser.parseFunctionParameters(0, parameterList);
+ assertEquals(1, parameterList.size());
+ SourceParameter p = parameterList.get(0);
+ assertEquals("aActive", p.getName());
+ assertEquals(1,p.getPointerCount());
+ assertEquals("CActive", p.getType());
+
+
+ //TODO more test cases are needed here
+
+
+ } catch (SourceParserException e) {
+ fail("Could not build list of parameters. " + e.toString());
+ }
+ }
+
+ @Test
+ public void testParseReturnValues() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ SourceContext context = parser.getContext(130);
+ List<SourceReturn> returnList = new ArrayList<SourceReturn>();
+ parser.parseReturnValues(context, returnList);
+
+ //TODO defect the constructor has no return so simply should return empty list
+ //assertEquals(0, returnList.size());
+
+
+ data = MockTracesUseCases.testCases[3];
+ sourceDocument = factory.createDocument(data);
+ parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ context = parser.getContext(130);
+ returnList = new ArrayList<SourceReturn>();
+ parser.parseReturnValues(context, returnList);
+ assertEquals(1, returnList.size());
+ SourceReturn r = returnList.get(0);
+ assertEquals(239, r.getOffset());
+ assertEquals(3, r.getLength()); //ret
+ assertEquals("ret",parser.getData(239, 3));
+
+ data = MockTracesUseCases.testCases[4];
+ sourceDocument = factory.createDocument(data);
+ parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ context = parser.getContext(100);
+ returnList = new ArrayList<SourceReturn>();
+ parser.parseReturnValues(context, returnList);
+ assertEquals(1, returnList.size());
+ r = returnList.get(0);
+ assertEquals(249, r.getOffset());
+ assertEquals(7, r.getLength()); //CActive
+ assertEquals("aActive",parser.getData(249, 7));
+
+ //TODO more test cases are needed here
+
+ }
+
+ @Test
+ public void testIsInExcludedArea() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertFalse(parser.isInExcludedArea(1));
+ assertTrue(parser.isInExcludedArea(32));
+ assertTrue(parser.isInExcludedArea(74));
+ assertFalse(parser.isInExcludedArea(127));
+
+ //TODO more test cases are needed here
+
+ }
+
+ @Test
+ public void testGetExcludedArea() {
+ String data = MockTracesUseCases.testCases[5];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ List<SourceExcludedArea> excludedAreas = parser.getExcludedAreas();
+ assertEquals(5, excludedAreas.size());
+ assertNull(parser.getExcludedArea(20));
+ assertNull(parser.getExcludedArea(200));
+
+ //TODO a lot more tests are needed here
+ }
+
+ @Test
+ public void testCreateIterator() {
+ String data = MockTracesUseCases.testCases[3];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ SourceIterator iter = parser.createIterator(0, SourceParser.SKIP_ALL);
+ assertNotNull(iter);
+
+ //TODO add more tests by trying the iteration
+
+ }
+
+ @Test
+ public void testGetContext() {
+ //done above
+ }
+
+ @Test
+ public void testFindStartOfLine() {
+ String data = MockTracesUseCases.testCases[1];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ try {
+ int startOfLine = parser.findStartOfLine(300, false, true);
+ assertEquals(218, startOfLine);
+ } catch (SourceParserException e) {
+ fail("Failed to find start of the line " + e.toString());
+ }
+
+ }
+
+ @Test
+ public void testFindExcludedAreaIndex() {
+ String data = MockTracesUseCases.testCases[5];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertEquals( -2, parser.findExcludedAreaIndex(20));
+ assertEquals(0, parser.findExcludedAreaIndex(10));
+ assertEquals(-5, parser.findExcludedAreaIndex(300));
+ }
+
+ @Test
+ public void testFindExcludedAreas() {
+ String data = MockTracesUseCases.testCases[5];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ try {
+ parser.findExcludedAreas();
+ List<SourceExcludedArea> list = parser.getExcludedAreas();
+ assertEquals(5, list.size());
+ //TODO add more assertions here
+
+ } catch (SourceParserException e) {
+ fail("failed to find excluded areas. " + e.toString());
+ }
+
+ }
+
+ @Test
+ public void testGetExcludedAreas() {
+ //done above
+ }
+
+ @Test
+ public void testIsExcluded() {
+ //test
+ //SourceParser.SKIP_STRING SourceExcludedArea.STRING > string
+ //SourceParser.SKIP_COMMENTS SourceExcludedArea.MULTILINE_COMMENT > comment
+ //SourceParser.SKIP_COMMENTS SourceExcludedArea.LINE_COMMENT > linecomment
+ //SourceParser.SKIP_PREPROCESSOR SourceExcludedArea.PREPROCESSOR_DEFINITION > preProcessor
+
+ assertTrue(SourceParser.isExcluded(SourceExcludedArea.LINE_COMMENT, SourceParser.SKIP_COMMENTS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.LINE_COMMENT, SourceParser.SKIP_STRINGS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.LINE_COMMENT, SourceParser.SKIP_PREPROCESSOR));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.LINE_COMMENT, SourceParser.SKIP_WHITE_SPACES));
+
+ assertTrue(SourceParser.isExcluded(SourceExcludedArea.MULTILINE_COMMENT, SourceParser.SKIP_COMMENTS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.MULTILINE_COMMENT, SourceParser.SKIP_PREPROCESSOR));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.MULTILINE_COMMENT, SourceParser.SKIP_STRINGS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.MULTILINE_COMMENT, SourceParser.SKIP_WHITE_SPACES));
+
+ assertTrue(SourceParser.isExcluded(SourceExcludedArea.STRING, SourceParser.SKIP_STRINGS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.STRING, SourceParser.SKIP_PREPROCESSOR));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.STRING, SourceParser.SKIP_COMMENTS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.STRING, SourceParser.SKIP_WHITE_SPACES));
+
+ assertTrue(SourceParser.isExcluded(SourceExcludedArea.PREPROCESSOR_DEFINITION, SourceParser.SKIP_PREPROCESSOR));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.PREPROCESSOR_DEFINITION, SourceParser.SKIP_COMMENTS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.PREPROCESSOR_DEFINITION, SourceParser.SKIP_STRINGS));
+ assertFalse(SourceParser.isExcluded(SourceExcludedArea.PREPROCESSOR_DEFINITION, SourceParser.SKIP_WHITE_SPACES));
+
+ }
+
+ @Test
+ public void testAddLocation() {
+
+ //TODO there is no way to find out if a locaion has been added or not
+ //these locations in the parser are not used anywhere so no test is required
+ //and they need to be deleted.
+ }
+
+ @Test
+ public void testRemoveLocation() {
+ //TODO there is no way to find out if a locaion has been added or not
+ //these locations in the parser are not used anywhere so no test is required
+ //and they need to be deleted.
+ }
+
+ @Test
+ public void testGetDocumentFramework() {
+ String data = MockTracesUseCases.testCases[3];
+ SourceDocumentFactory factory = new StringDocumentFactory();
+ SourceDocumentInterface sourceDocument = factory.createDocument(data);
+ SourceParser parser = new SourceParser(factory, sourceDocument);
+ assertNotNull(parser);
+ assertSame(factory, parser.getDocumentFramework());
+ }
+
+}
--- a/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/TraceCompilerVersion.java Tue Oct 26 16:20:32 2010 +0300
@@ -40,7 +40,7 @@
version = versionImpl.getTraceCompilerVersion();
} else {
// TODO: This is used in console builds -> Maintenance needed
- version = "2.3.0"; //$NON-NLS-1$
+ version = "2.3.2"; //$NON-NLS-1$
}
return version;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/SourceEngineTest/bar.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,179 @@
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Trace Core
+//
+#include <kern_priv.h>
+#include "TraceCoreRouter.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreRouterTraces.h"
+#endif
+
+// Constants
+
+/**
+ * Constructor
+ */
+DTraceCoreRouter::DTraceCoreRouter()
+: iMessageSender( NULL )
+ {
+ }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreRouter::~DTraceCoreRouter()
+ {
+ Kern::MutexWait(*iLock);
+ iRoutingItems.Reset();
+ Kern::MutexSignal(*iLock);
+ iLock->Close(NULL);
+ }
+
+
+/**
+ * Initializes this router
+ *
+ * @param aMessageSender The message sender interface
+ */
+TInt DTraceCoreRouter::Init( MTraceCoreMessageSender& aMessageSender )
+ {
+ iMessageSender = &aMessageSender;
+ _LIT(KTraceCoreRouterLock, "DTraceCoreRouter_Lock");
+ TInt err = Kern::MutexCreate(iLock, KTraceCoreRouterLock, KMutexOrdGeneral0);
+ return err;
+ }
+
+
+/**
+ * Callback for incoming messages
+ *
+ * @param aMsg The message
+ * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+ */
+TInt DTraceCoreRouter::MessageReceived( TTraceMessage &aMsg )
+ {
+ OstTraceExt1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_ENTRY, "> DTraceCoreRouter::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+
+ TInt ret( KErrNotFound );
+ TUint32 messageId = aMsg.iMessageId;
+ TUint32 msgFormat = aMsg.iMsgFormat;
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == messageId && iRoutingItems[ i ].iMsgFormat == msgFormat )
+ {
+ iRoutingItems[ i ].iSubscriber->MessageReceived( aMsg );
+ ret = KErrNone;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_EXIT, "< DTraceCoreRouter::MessageReceived. Ret:%d", ret );
+ return ret;
+ }
+
+
+/**
+ * Subscribes to a message
+ *
+ * @param aRoutingItem The subscription properties.
+ */
+TInt DTraceCoreRouter::Subscribe( TRoutingItem& aRoutingItem )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_ENTRY, "> DTraceCoreRouter::Subscribe 0x%x", ( TUint )&( aRoutingItem ) );
+
+ TInt err = KErrNone;
+ if ( iMessageSender != NULL )
+ {
+ if ( aRoutingItem.iSubscriber != NULL )
+ {
+ Kern::MutexWait(*iLock);
+ // Add to routingItems array
+ err = iRoutingItems.Append( aRoutingItem );
+ Kern::MutexSignal(*iLock);
+ if ( err == KErrNone )
+ {
+ // Set message sender to routing item
+ aRoutingItem.iSubscriber->SetMessageSender( *iMessageSender );
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_SUBSCRIBE_SUBSCRIBED_TO_MESSAGE, "DTraceCoreRouter::Subscribe - Subscribed to message. Subscriber:0x%x MsgId:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ }
+ }
+ // Subscriber was NULL
+ else
+ {
+ err = KErrArgument;
+ }
+ }
+ // Message sender not set
+ else
+ {
+ err = KErrGeneral;
+ }
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_EXIT, "< DTraceCoreRouter::Subscribe. Err:%d", err );
+ return err;
+ }
+
+
+/**
+ * Unsubscribes from a message
+ *
+ * @param aRoutingItem The subscription properties
+ */
+void DTraceCoreRouter::Unsubscribe( TRoutingItem& aRoutingItem )
+ {
+ // Make sure not to delete item while going through items somewhere else
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == aRoutingItem.iMessageID
+ && iRoutingItems[ i ].iSubscriber == aRoutingItem.iSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBE_UNSUBSCRIBED, "DTraceCoreRouter::Unsubscribe - Unsubscribed 0x%x MsgID:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+
+/**
+ * Unsubscribes from all messages of given subscriber
+ *
+ * @param aSubscriber The subscriber to be unregistered
+ */
+void DTraceCoreRouter::Unsubscribe( DTraceCoreSubscriber& aSubscriber )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_UNSUBSCRIBEALL_ENTRY, "> DTraceCoreRouter::UnsubscribeAll 0x%x", ( TUint )&( aSubscriber ) );
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iSubscriber == &aSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBEALL_UNSUBSCRIBED, "DTraceCoreRouter::UnsubscribeAll - Unsubscribed 0x%x MsgID:%d", (TUint)&aSubscriber, (TInt)iRoutingItems[ i ].iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/SourceEngineTest/data.txt Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,1 @@
+this is a dummy file
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/SourceEngineTest/foo.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,179 @@
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Trace Core
+//
+#include <kern_priv.h>
+#include "TraceCoreRouter.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreRouterTraces.h"
+#endif
+
+// Constants
+
+/**
+ * Constructor
+ */
+DTraceCoreRouter::DTraceCoreRouter()
+: iMessageSender( NULL )
+ {
+ }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreRouter::~DTraceCoreRouter()
+ {
+ Kern::MutexWait(*iLock);
+ iRoutingItems.Reset();
+ Kern::MutexSignal(*iLock);
+ iLock->Close(NULL);
+ }
+
+
+/**
+ * Initializes this router
+ *
+ * @param aMessageSender The message sender interface
+ */
+TInt DTraceCoreRouter::Init( MTraceCoreMessageSender& aMessageSender )
+ {
+ iMessageSender = &aMessageSender;
+ _LIT(KTraceCoreRouterLock, "DTraceCoreRouter_Lock");
+ TInt err = Kern::MutexCreate(iLock, KTraceCoreRouterLock, KMutexOrdGeneral0);
+ return err;
+ }
+
+
+/**
+ * Callback for incoming messages
+ *
+ * @param aMsg The message
+ * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+ */
+TInt DTraceCoreRouter::MessageReceived( TTraceMessage &aMsg )
+ {
+ OstTraceExt1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_ENTRY, "> DTraceCoreRouter::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+
+ TInt ret( KErrNotFound );
+ TUint32 messageId = aMsg.iMessageId;
+ TUint32 msgFormat = aMsg.iMsgFormat;
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == messageId && iRoutingItems[ i ].iMsgFormat == msgFormat )
+ {
+ iRoutingItems[ i ].iSubscriber->MessageReceived( aMsg );
+ ret = KErrNone;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_EXIT, "< DTraceCoreRouter::MessageReceived. Ret:%d", ret );
+ return ret;
+ }
+
+
+/**
+ * Subscribes to a message
+ *
+ * @param aRoutingItem The subscription properties.
+ */
+TInt DTraceCoreRouter::Subscribe( TRoutingItem& aRoutingItem )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_ENTRY, "> DTraceCoreRouter::Subscribe 0x%x", ( TUint )&( aRoutingItem ) );
+
+ TInt err = KErrNone;
+ if ( iMessageSender != NULL )
+ {
+ if ( aRoutingItem.iSubscriber != NULL )
+ {
+ Kern::MutexWait(*iLock);
+ // Add to routingItems array
+ err = iRoutingItems.Append( aRoutingItem );
+ Kern::MutexSignal(*iLock);
+ if ( err == KErrNone )
+ {
+ // Set message sender to routing item
+ aRoutingItem.iSubscriber->SetMessageSender( *iMessageSender );
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_SUBSCRIBE_SUBSCRIBED_TO_MESSAGE, "DTraceCoreRouter::Subscribe - Subscribed to message. Subscriber:0x%x MsgId:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ }
+ }
+ // Subscriber was NULL
+ else
+ {
+ err = KErrArgument;
+ }
+ }
+ // Message sender not set
+ else
+ {
+ err = KErrGeneral;
+ }
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_EXIT, "< DTraceCoreRouter::Subscribe. Err:%d", err );
+ return err;
+ }
+
+
+/**
+ * Unsubscribes from a message
+ *
+ * @param aRoutingItem The subscription properties
+ */
+void DTraceCoreRouter::Unsubscribe( TRoutingItem& aRoutingItem )
+ {
+ // Make sure not to delete item while going through items somewhere else
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == aRoutingItem.iMessageID
+ && iRoutingItems[ i ].iSubscriber == aRoutingItem.iSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBE_UNSUBSCRIBED, "DTraceCoreRouter::Unsubscribe - Unsubscribed 0x%x MsgID:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+
+/**
+ * Unsubscribes from all messages of given subscriber
+ *
+ * @param aSubscriber The subscriber to be unregistered
+ */
+void DTraceCoreRouter::Unsubscribe( DTraceCoreSubscriber& aSubscriber )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_UNSUBSCRIBEALL_ENTRY, "> DTraceCoreRouter::UnsubscribeAll 0x%x", ( TUint )&( aSubscriber ) );
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iSubscriber == &aSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBEALL_UNSUBSCRIBED, "DTraceCoreRouter::UnsubscribeAll - Unsubscribed 0x%x MsgID:%d", (TUint)&aSubscriber, (TInt)iRoutingItems[ i ].iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/SourceEngineTest/foo.h Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,216 @@
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Trace Core
+//
+
+#ifndef TRACECOREMEDIASWRITER_H_
+#define TRACECOREMEDIASWRITER_H_
+
+
+// Include files
+#include "TraceCoreWriter.h"
+
+
+// Forward declarations
+class DTraceCoreMediaIf;
+class TMediaSWriterStatistics;
+
+/**
+ * Properties of a single trace
+ */
+class TTraceBuffer
+ {
+public:
+ TTraceBuffer* iNext;
+ TUint8* iBuffer;
+ TUint16 iLength;
+ TUint16 iMissedBefore;
+ TUint8 iType;
+ };
+
+
+/**
+ * Writer implementation, which uses the media interface to write data
+ */
+class DTraceCoreMediaSWriter : public DTraceCoreWriter
+ {
+public:
+
+ /**
+ * Constructor
+ */
+ IMPORT_C DTraceCoreMediaSWriter();
+
+ /**
+ * Destructor
+ */
+ IMPORT_C ~DTraceCoreMediaSWriter();
+
+ /**
+ * Registers this writer to TraceCore
+ */
+ IMPORT_C TInt Register();
+
+ /**
+ * Gets the number of traces allowed per second
+ */
+ virtual TInt GetTraceFrequency() = 0;
+
+ /**
+ * Initializes a trace buffer
+ *
+ * @param aType the entry type
+ * @param aBuffer the buffer
+ */
+ virtual void StartBuffer( TWriterEntryType aType, TTraceBuffer& aBuffer ) = 0;
+
+ /**
+ * Finishes a trace buffer
+ *
+ * @param aBuffer the buffer
+ * @return ETrue if trace can be 'dropped'
+ */
+ virtual TBool EndBuffer( TTraceBuffer& aBuffer ) = 0;
+
+private:
+
+ /**
+ * Starts an entry
+ *
+ * @return the entry ID that is passed to other Write-functions
+ */
+ IMPORT_C TUint32 WriteStart( TWriterEntryType aType );
+
+ /**
+ * Ends an entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ */
+ IMPORT_C void WriteEnd( TUint32 aEntryId );
+
+ /**
+ * Writes 8-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+ IMPORT_C void WriteData( TUint32 aEntryId, TUint8 aData );
+
+ /**
+ * Writes 16-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+ IMPORT_C void WriteData( TUint32 aEntryId, TUint16 aData );
+
+ /**
+ * Writes 32-bit data to given entry
+ *
+ * @param aEntryId the entry ID returned by WriteStart
+ * @param aData the trace data
+ */
+ IMPORT_C void WriteData( TUint32 aEntryId, TUint32 aData );
+
+ /**
+ * DFC for sending data
+ *
+ * @param aMediaWriter the media writer
+ */
+ static void SendDfc( TAny* aMediaWriter );
+
+ /**
+ * Called from the static function to send data
+ */
+ void SendDfc();
+
+ /**
+ * Initializes the statistics
+ */
+ TBool InitStatistics();
+
+
+private:
+
+ /**
+ * Media interface for sending data
+ */
+ DTraceCoreMediaIf* iMediaIf;
+
+ /**
+ * DFC for sending data
+ */
+ TDfc iSendDfc;
+
+ /**
+ * Timer which is used to send traces
+ */
+ TTickLink iSendTimer;
+
+ /**
+ * Flags which tells if the timer is active or not
+ */
+ TBool iSendTimerActive;
+
+ /**
+ * Pointer to the list of free trace buffers
+ */
+ TTraceBuffer* iFirstFreeBuffer;
+
+ /**
+ * Pointer to the next trace to be sent
+ */
+ TTraceBuffer* iFirstReadyBuffer;
+
+ /**
+ * Pointer to the end of list where new traces are added
+ */
+ TTraceBuffer* iLastReadyBuffer;
+
+ /**
+ * All trace buffers
+ */
+ TTraceBuffer* iTraceBuffers;
+
+ /**
+ * Number of free buffers
+ */
+ TUint32 iFreeBuffers;
+
+ /**
+ * Thread which sends data
+ */
+ NThread* iSenderThread;
+
+ /**
+ * Timestamp of the last trace sent
+ */
+ TUint32 iLastTraceSent;
+
+ /**
+ * Media writer statistics
+ */
+ TMediaSWriterStatistics* iStatistics;
+
+ /**
+ * Number of FastCounter ticks between traces
+ */
+ TInt iFastCounterBetweenTraces;
+
+ };
+
+
+#endif /*TRACECOREMEDIASWRITER_H_*/
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/SourceEngineTest/wrong.ext Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,179 @@
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Symbian Foundation License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Trace Core
+//
+#include <kern_priv.h>
+#include "TraceCoreRouter.h"
+#include "TraceCoreSubscriber.h"
+#include "TraceCoreDebug.h"
+#include "OstTraceDefinitions.h"
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TraceCoreRouterTraces.h"
+#endif
+
+// Constants
+
+/**
+ * Constructor
+ */
+DTraceCoreRouter::DTraceCoreRouter()
+: iMessageSender( NULL )
+ {
+ }
+
+
+/**
+ * Destructor
+ */
+DTraceCoreRouter::~DTraceCoreRouter()
+ {
+ Kern::MutexWait(*iLock);
+ iRoutingItems.Reset();
+ Kern::MutexSignal(*iLock);
+ iLock->Close(NULL);
+ }
+
+
+/**
+ * Initializes this router
+ *
+ * @param aMessageSender The message sender interface
+ */
+TInt DTraceCoreRouter::Init( MTraceCoreMessageSender& aMessageSender )
+ {
+ iMessageSender = &aMessageSender;
+ _LIT(KTraceCoreRouterLock, "DTraceCoreRouter_Lock");
+ TInt err = Kern::MutexCreate(iLock, KTraceCoreRouterLock, KMutexOrdGeneral0);
+ return err;
+ }
+
+
+/**
+ * Callback for incoming messages
+ *
+ * @param aMsg The message
+ * @return KErrNotFound if the message id was not found (not subscribed), KErrNone if found
+ */
+TInt DTraceCoreRouter::MessageReceived( TTraceMessage &aMsg )
+ {
+ OstTraceExt1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_ENTRY, "> DTraceCoreRouter::MessageReceived. MsgId:0x%hhx", aMsg.iMessageId );
+
+ TInt ret( KErrNotFound );
+ TUint32 messageId = aMsg.iMessageId;
+ TUint32 msgFormat = aMsg.iMsgFormat;
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == messageId && iRoutingItems[ i ].iMsgFormat == msgFormat )
+ {
+ iRoutingItems[ i ].iSubscriber->MessageReceived( aMsg );
+ ret = KErrNone;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_MESSAGERECEIVED_EXIT, "< DTraceCoreRouter::MessageReceived. Ret:%d", ret );
+ return ret;
+ }
+
+
+/**
+ * Subscribes to a message
+ *
+ * @param aRoutingItem The subscription properties.
+ */
+TInt DTraceCoreRouter::Subscribe( TRoutingItem& aRoutingItem )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_ENTRY, "> DTraceCoreRouter::Subscribe 0x%x", ( TUint )&( aRoutingItem ) );
+
+ TInt err = KErrNone;
+ if ( iMessageSender != NULL )
+ {
+ if ( aRoutingItem.iSubscriber != NULL )
+ {
+ Kern::MutexWait(*iLock);
+ // Add to routingItems array
+ err = iRoutingItems.Append( aRoutingItem );
+ Kern::MutexSignal(*iLock);
+ if ( err == KErrNone )
+ {
+ // Set message sender to routing item
+ aRoutingItem.iSubscriber->SetMessageSender( *iMessageSender );
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_SUBSCRIBE_SUBSCRIBED_TO_MESSAGE, "DTraceCoreRouter::Subscribe - Subscribed to message. Subscriber:0x%x MsgId:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ }
+ }
+ // Subscriber was NULL
+ else
+ {
+ err = KErrArgument;
+ }
+ }
+ // Message sender not set
+ else
+ {
+ err = KErrGeneral;
+ }
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_SUBSCRIBE_EXIT, "< DTraceCoreRouter::Subscribe. Err:%d", err );
+ return err;
+ }
+
+
+/**
+ * Unsubscribes from a message
+ *
+ * @param aRoutingItem The subscription properties
+ */
+void DTraceCoreRouter::Unsubscribe( TRoutingItem& aRoutingItem )
+ {
+ // Make sure not to delete item while going through items somewhere else
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iMessageID == aRoutingItem.iMessageID
+ && iRoutingItems[ i ].iSubscriber == aRoutingItem.iSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBE_UNSUBSCRIBED, "DTraceCoreRouter::Unsubscribe - Unsubscribed 0x%x MsgID:0x%x", (TUint)aRoutingItem.iSubscriber, (TUint)aRoutingItem.iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+
+/**
+ * Unsubscribes from all messages of given subscriber
+ *
+ * @param aSubscriber The subscriber to be unregistered
+ */
+void DTraceCoreRouter::Unsubscribe( DTraceCoreSubscriber& aSubscriber )
+ {
+ OstTrace1( TRACE_FLOW, DTRACECOREROUTER_UNSUBSCRIBEALL_ENTRY, "> DTraceCoreRouter::UnsubscribeAll 0x%x", ( TUint )&( aSubscriber ) );
+
+ Kern::MutexWait(*iLock);
+ for ( TInt i = 0; i < iRoutingItems.Count(); i++ )
+ {
+ if ( iRoutingItems[ i ].iSubscriber == &aSubscriber )
+ {
+ OstTraceExt2( TRACE_NORMAL, DTRACECOREROUTER_UNSUBSCRIBEALL_UNSUBSCRIBED, "DTraceCoreRouter::UnsubscribeAll - Unsubscribed 0x%x MsgID:%d", (TUint)&aSubscriber, (TInt)iRoutingItems[ i ].iMessageID );
+ iRoutingItems.Remove( i );
+ i--;
+ }
+ }
+ Kern::MutexSignal(*iLock);
+ }
+
+// End of File
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_comm_source_tracesplus/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/multmmp_separate_source/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/inc/HelloTraceTypes.h Tue Oct 26 16:20:32 2010 +0300
@@ -22,6 +22,7 @@
class HelloTraceTypes
{
public:
+ static void TestBoolean();
static void SignedIntegers();
static void UnsignedIntegers();
static void Descriptors();
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceExample.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -31,6 +31,7 @@
{
OstTrace0( TRACE_EXAMPLE, HELLOTRACEEXAMPLE_JUSTTYPES, "*********************************************** " );
+ HelloTraceTypes::TestBoolean();
HelloTraceTypes::SignedIntegers();
HelloTraceTypes::UnsignedIntegers();
HelloTraceTypes::Descriptors();
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/dll/src/HelloTraceTypes.cpp Tue Oct 26 16:20:32 2010 +0300
@@ -20,50 +20,72 @@
#include <e32std.h>
#include "HelloTraceTypes.h"
-#include "HelloTraceTypesDup.h"
-#include "HelloTraceTypesDup2.inl"
#include "OstTraceDefinitions.h"
#ifdef OST_TRACE_COMPILER_IN_USE
#include "HelloTraceTypesTraces.h"
#endif
+void HelloTraceTypes::TestBoolean()
+ {
+
+ _LIT(KTextConsoleTitle, "Test bool .... : ");
+ bool joo = true;
+ OstTraceExt1( TRACE_INTERNALS, _TEST_BOOL_HHU_EXT1, "My bool = %hhu", (TUint8)joo);
+ OstTraceExt2( TRACE_INTERNALS, _TEST_BOOL_HHU_EXT2, "Text: %S. My bool = %hhu", KTextConsoleTitle, (TUint8)joo);
+ OstTraceExt2( TRACE_INTERNALS, _TEST_BOOL_U_EXT2, "Text: %S. My bool = %u", KTextConsoleTitle, (TUint32)joo);
+ }
+
void HelloTraceTypes::SignedIntegers()
{
TInt8 eightBit = - (TInt8) 1 << 6;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8,
- "8 bit signed: %hhd", eightBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_8, "8 bit signed: %hhd", eightBit );
+ _LIT(KText1, "Test %hhd .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_HHD_EXT2, "Text: %S. My data = %hhd", KText1, (TInt8)eightBit);
+
TInt16 sixteenBit = - (TInt16) 1 << 14;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16,
- "16 bit signed: %hd", sixteenBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_16, "16 bit signed: %hd", sixteenBit );
+
+ _LIT(KText2, "Test %hd .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_HD_EXT2, "Text: %S. My data = %hd", KText2, (TInt16)sixteenBit);
+
TInt32 thirtyTwoBit = - (TInt32) 1 << 30;
- OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32,
- "32 bit signed: %d", thirtyTwoBit );
+ OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_32, "32 bit signed: %d", thirtyTwoBit );
+
+ _LIT(KText3, "Test %d .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_D_EXT2, "Text: %S. My data = %d", KText3, thirtyTwoBit);
+
TInt64 sixtyFourBit = - (TInt64) 1 << 62;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64,
- "64 bit signed: %Ld", sixtyFourBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_SIGNEDINTEGERS_64, "64 bit signed: %Ld", sixtyFourBit );
}
void HelloTraceTypes::UnsignedIntegers()
{
TUint8 eightBit = (TUint8) 1 << 6;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8,
- "8 bit unsigned: %hhu", eightBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_8, "8 bit unsigned: %hhu", eightBit );
+
+ _LIT(KText1, "Test %hhu .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_HHU_EXT2, "Text: %S. My data = %hhu", KText1, (TUint8)eightBit);
+
TUint16 sixteenBit = (TUint16) 1 << 14;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16,
- "16 bit unsigned: %hu", sixteenBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_16, "16 bit unsigned: %hu", sixteenBit );
+ _LIT(KText2, "Test %hu .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_HU_EXT2, "Text: %S. My data = %hu", KText2, (TUint16)sixteenBit);
+
+
TUint32 thirtyTwoBit = (TUint32) 1 << 30;
- OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32,
- "32 bit unsigned: %u", thirtyTwoBit );
+ OstTrace1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_32, "32 bit unsigned: %u", thirtyTwoBit );
+ _LIT(KText3, "Test %u .... : ");
+ OstTraceExt2( TRACE_INTERNALS, _TEST_U_EXT2, "Text: %S. My data = %u", KText3, thirtyTwoBit);
+
TUint64 sixtyFourBit = (TUint64) 1 << 62;
- OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64,
- "64 bit unsigned: %Lu", sixtyFourBit );
+ OstTraceExt1( TRACE_INTERNALS, HELLOTRACETYPES_UNSIGNEDINTEGERS_64, "64 bit unsigned: %Lu", sixtyFourBit );
}
void HelloTraceTypes::Descriptors()
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_diffnames_tracesplus/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_import/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames_tracesplus/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,5 +15,7 @@
*
*/
+PRJ_TESTEXPORTS
+
#include "../dll/group/bld.inf"
#include "../console/group/bld.inf"
--- a/tracesrv/tracecompiler/test/group/build.xml Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/group/build.xml Tue Oct 26 16:20:32 2010 +0300
@@ -74,6 +74,7 @@
<delete dir="${epoc.root}epoc32/build/testdata/MultipleMmpTestCases"/>
<delete dir="${epoc.root}epoc32/build/testdata/MultipleCppTraceErrorApp"/>
<delete dir="${epoc.root}epoc32/build/testdata/TracesInHeadersApps"/>
+ <delete dir="${testdata.dir}/SourceEngineTest"/>
</target>
<target name="build" depends="clean">
@@ -99,8 +100,20 @@
<copy todir="${epoc.root}testdata/TracesInHeadersApps">
<fileset dir="TracesInHeadersApps"/>
</copy>
+
+ <copy todir="${epoc.root}testdata/SourceEngineTest">
+ <fileset dir="SourceEngineTest"/>
+ </copy>
+
+
<javac classpath="${classpath}" srcdir="${src.dir}" destdir="${build.dir}" debug="false" target="1.5" >
</javac>
+ <!--build pure junit tests from the standard path -->
+ <javac classpath="${classpath}" srcdir="../${src.dir}" destdir="${build.dir}" debug="false" target="1.5" >
+ <include name="**/*Test.java"/>
+ <include name="**/Mock*.java"/>
+ </javac>
+
</target>
<target name="run" depends="build" description="run the junit tests">
@@ -114,7 +127,7 @@
<fileset dir="../jar" includes="*.jar"/>
</path>
- <junit printsummary="yes" haltonfailure="yes">
+ <junit printsummary="yes" haltonfailure="no" haltonerror="no">
<classpath path="${toString:lib.path.ref}"/>
<formatter type="plain"/>
@@ -125,6 +138,10 @@
<include name="*.java"/>
<exclude name="ErrorLogsTestBase.java"/>
</fileset>
+ <fileset dir="../src/com.nokia.tracecompiler/src">
+ <include name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
+ </fileset>
</batchtest>
</junit>
@@ -156,7 +173,7 @@
<echo>${toString:lib.path.ref}</echo>
- <junit printsummary="yes" haltonfailure="yes">
+ <junit printsummary="yes" haltonfailure="no" haltonerror="no">
<classpath path="${toString:lib.path.ref}"/>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -176,6 +193,10 @@
<exclude name="TracesInHeadersTest.java"/>
<exclude name="TraceHeadersLicenceTest.java"/>
</fileset>
+ <fileset dir="../src/com.nokia.tracecompiler/src">
+ <include name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
+ </fileset>
</batchtest>
</junit>
@@ -202,7 +223,7 @@
<fileset dir="../jar" includes="*.jar"/>
</path>
- <junit printsummary="yes" haltonfailure="yes">
+ <junit printsummary="yes" haltonfailure="no" haltonerror="no">
<classpath path="${toString:lib.path.ref}"/>
<formatter type="plain"/>
<formatter type="xml"/>
@@ -218,6 +239,10 @@
<exclude name="TracesInHeadersTest.java"/>
<exclude name="TraceHeadersLicenceTest.java"/>
</fileset>
+ <fileset dir="../src/com.nokia.tracecompiler/src">
+ <include name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
+ </fileset>
</batchtest>
</junit>
--- a/tracesrv/tracecompiler/test/group/ccbuild.xml Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/group/ccbuild.xml Tue Oct 26 16:20:32 2010 +0300
@@ -62,6 +62,8 @@
<!-- Files to analyze -->
<fileset dir="../src/">
<include name="**/*.java"/>
+ <exclude name="**/*Test.java"/>
+ <exclude name="**/Mock*.java"/>
</fileset>
</pmd>
</target>
--- a/tracesrv/tracecompiler/test/multipleMmpTestCases/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-
+PRJ_TESTEXPORTS
#include "../mmp_traces/group/bld.inf"
#include "../mmp_traces_mmpname/group/bld.inf"
--- a/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/bld.inf Tue Oct 26 16:20:32 2010 +0300
@@ -21,5 +21,5 @@
DEFAULT
PRJ_MMPFILES
-mmp_traces1.mmp
+mmp_traces1.dot.mmp
mmp_traces2.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.dot.mmp Tue Oct 26 16:20:32 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+TARGET target1.exe
+TARGETTYPE exe
+UID 0 0xE8576D96
+
+USERINCLUDE ../inc
+USERINCLUDE ../traces
+
+APP_LAYER_SYSTEMINCLUDE
+
+SYSTEMINCLUDE /epoc32/include
+
+SOURCEPATH ../src
+SOURCE MultipleMmpApp1.cpp
+SOURCE ExtraCppFile1.cpp
+
+LIBRARY euser.lib
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
+
--- a/tracesrv/tracecompiler/test/multipleMmpTestCases/mmp_traces/group/mmp_traces1.mmp Fri Oct 08 14:56:39 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-TARGET target1.exe
-TARGETTYPE exe
-UID 0 0xE8576D96
-
-USERINCLUDE ../inc
-USERINCLUDE ../traces
-
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE /epoc32/include
-
-SOURCEPATH ../src
-SOURCE MultipleMmpApp1.cpp
-SOURCE ExtraCppFile1.cpp
-
-LIBRARY euser.lib
-
-#ifdef ENABLE_ABIV2_MODE
-DEBUGGABLE_UDEBONLY
-#endif
-
--- a/tracesrv/tracecompiler/test/src/MultipleMmpTest.java Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/test/src/MultipleMmpTest.java Tue Oct 26 16:20:32 2010 +0300
@@ -50,7 +50,7 @@
private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$
private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$
//old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope)
- private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$
+ private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-4]\\.[0-9].*)"); //$NON-NLS-1$
private static String TCversion = ""; //$NON-NLS-1$
private static String SBSversion = ""; //$NON-NLS-1$
private static File compilerpath;
@@ -78,7 +78,7 @@
compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$
- "com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$
+ "com.nokia.tracecompiler.TraceCompilerMain", "-v"); //$NON-NLS-1$//$NON-NLS-2$
System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$
tc.directory(compilerpath);
tc.redirectErrorStream(true);
@@ -184,9 +184,9 @@
fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$)
headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$
- ostDict1 = new File(epocroot+dictpath+"mmp_traces1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+ ostDict1 = new File(epocroot+dictpath+"mmp_traces1_dot_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
ostDict2 = new File(epocroot+dictpath+"mmp_traces2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
- autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
+ autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_dot_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
autogenDict2 = new File(epocroot+autogenpath+"mmp_traces2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$
dicts.put("_traces", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
@@ -321,10 +321,10 @@
source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$
sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4));
- ostDict1 = new File(epocroot+dictpath+"target11_exe_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
- ostDict2 = new File(epocroot+dictpath+"target12_exe_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
- autogenDict1 = new File(epocroot+autogenpath+"target11_exe_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
- autogenDict2 = new File(epocroot+autogenpath+"target12_exe_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$
+ ostDict1 = new File(epocroot+dictpath+"mmp_traces_target_type1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
+ ostDict2 = new File(epocroot+dictpath+"mmp_traces_target_type2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
+ autogenDict1 = new File(epocroot+autogenpath+"mmp_traces_target_type1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
+ autogenDict2 = new File(epocroot+autogenpath+"mmp_traces_target_type2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$
dicts.put("_traces_target_type", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
//==================================
@@ -362,12 +362,13 @@
ostDict1 = new File(epocroot+dictpath+name + suffix + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$
autogenDict1 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$
- if (!oldBuilder) {
- suffix = "_kext"; //$NON-NLS-1$
- name = "target4";
- } else {
+ suffix= "";
+ //if (!oldBuilder) {
+ // suffix = "_kext"; //$NON-NLS-1$
+ // name = "target4";
+ // } else {
name = "mmp_traces_mixed2";
- }
+ // }
ostDict2 = new File(epocroot+dictpath+name + suffix + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$
autogenDict2 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$
dicts.put("_traces_mixed", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$
--- a/tracesrv/tracecompiler/tracecompiler/release_note.txt Fri Oct 08 14:56:39 2010 +0300
+++ b/tracesrv/tracecompiler/tracecompiler/release_note.txt Tue Oct 26 16:20:32 2010 +0300
@@ -1,6 +1,13 @@
NOTE: JRE1.5 is needed to run TraceCompiler.
-TraceCompiler 2.3.0
+TraceCompiler 2.3.2
+
+
+New stuff in 2.3.2
+ - Defect fix : ou1cimx1#570981 - NCP_RAT: Symbian pmd cannot be created
+
+New stuff in 2.3.1
+ - Defect fix : ou1cimx1yyy483407 Major - Tracing doesn't work when using %hhx parameters in the same trace with a string
New stuff in 2.3.0
- TraceCompiler refactored for Symbian Foundation.
Binary file tracesrv/tracecompiler/tracecompiler/tracecompiler.zip has changed