os/kernelhwsrv/kerneltest/e32test/debug/t_perflogger.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/debug/t_perflogger.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Header file for Kernel Performance Logger test
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 +*/
    1.24 +
    1.25 +#ifndef T_PERFLOGGER_H__
    1.26 +#define T_PERFLOGGER_H__
    1.27 +
    1.28 +#include <d32btrace.h>
    1.29 +
    1.30 +//-------------------------------------------------------------------------------------
    1.31 +
    1.32 +/** Unrolled trace record layout for simplier access to the record fields */
    1.33 +struct TTraceLayout
    1.34 +	{
    1.35 +    TInt        iSize;
    1.36 +    TUint       iFlags;
    1.37 +    TUint       iCategory;
    1.38 +    TUint       iSubCategory;
    1.39 +	
    1.40 +    TUint32     iHeader2;
    1.41 +    TUint32     iTimestamp;
    1.42 +    TUint32     iTimestamp2;
    1.43 +    TUint32     iContext;
    1.44 +    TUint32     iPC;
    1.45 +    TUint32     iExtra;
    1.46 +	
    1.47 +    TInt        iDataWords;    ///< number of 32 bit words in the trace record "data" section. 0 means that tere is no data.
    1.48 +    const TUint32*    ipData;  ///< pointer to the data.
    1.49 +	
    1.50 +    TTraceLayout()
    1.51 +		{
    1.52 +        iSize=0; iFlags=0; iCategory=0; iSubCategory=0; iHeader2 =0;        
    1.53 +        iTimestamp=0; iTimestamp2=0; iContext=0; iPC=0; iExtra=0; iDataWords=0;            
    1.54 +        ipData=NULL;
    1.55 +		}
    1.56 +	
    1.57 +	};
    1.58 +
    1.59 +
    1.60 +//-------------------------------------------------------------------------------------
    1.61 +
    1.62 +void  Initialise();
    1.63 +void  Finalise();
    1.64 +TUint ParseTraceRecord(const TUint8* apRecord, TTraceLayout& aTraceLayout);
    1.65 +void  PrintTraceRecord(const TTraceLayout& aTraceLayout);
    1.66 +TUint URnd(TUint aMin, TUint aMax);
    1.67 +TUint URnd(TUint aMax);
    1.68 +
    1.69 +
    1.70 +#endif //T_PERFLOGGER_H__