sl@0: // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __TRACE__ sl@0: #define __TRACE__ sl@0: sl@0: #include sl@0: sl@0: typedef unsigned char TraceData; sl@0: typedef unsigned long PC; sl@0: sl@0: struct Process sl@0: { sl@0: int iId; sl@0: char* iName; sl@0: }; sl@0: sl@0: struct Thread sl@0: { sl@0: int iId; sl@0: char* iName; sl@0: const Process* iProcess; sl@0: int iIndex; sl@0: }; sl@0: sl@0: class Sampler sl@0: { sl@0: public: sl@0: virtual void Sample(unsigned aNumber, const Thread& aThread, PC aPc) =0; sl@0: virtual void Complete(unsigned aTotal, unsigned aActive) =0; sl@0: }; sl@0: sl@0: class Decoder; sl@0: class NonXIP; sl@0: sl@0: class Trace sl@0: { sl@0: public: sl@0: Trace(); sl@0: ~Trace(); sl@0: void Load(const char* aTraceFile, unsigned aBegin, unsigned aEnd); sl@0: void Decode(Sampler& aSampler, NonXIP* aNonXIP); sl@0: private: sl@0: TraceData* iTrace; sl@0: int iLength; sl@0: Decoder* iDecoder; sl@0: }; sl@0: sl@0: #endif // __TRACE__