kerneltest/e32test/debug/t_perflogger.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Header file for Kernel Performance Logger test
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20 */
       
    21 
       
    22 #ifndef T_PERFLOGGER_H__
       
    23 #define T_PERFLOGGER_H__
       
    24 
       
    25 #include <d32btrace.h>
       
    26 
       
    27 //-------------------------------------------------------------------------------------
       
    28 
       
    29 /** Unrolled trace record layout for simplier access to the record fields */
       
    30 struct TTraceLayout
       
    31 	{
       
    32     TInt        iSize;
       
    33     TUint       iFlags;
       
    34     TUint       iCategory;
       
    35     TUint       iSubCategory;
       
    36 	
       
    37     TUint32     iHeader2;
       
    38     TUint32     iTimestamp;
       
    39     TUint32     iTimestamp2;
       
    40     TUint32     iContext;
       
    41     TUint32     iPC;
       
    42     TUint32     iExtra;
       
    43 	
       
    44     TInt        iDataWords;    ///< number of 32 bit words in the trace record "data" section. 0 means that tere is no data.
       
    45     const TUint32*    ipData;  ///< pointer to the data.
       
    46 	
       
    47     TTraceLayout()
       
    48 		{
       
    49         iSize=0; iFlags=0; iCategory=0; iSubCategory=0; iHeader2 =0;        
       
    50         iTimestamp=0; iTimestamp2=0; iContext=0; iPC=0; iExtra=0; iDataWords=0;            
       
    51         ipData=NULL;
       
    52 		}
       
    53 	
       
    54 	};
       
    55 
       
    56 
       
    57 //-------------------------------------------------------------------------------------
       
    58 
       
    59 void  Initialise();
       
    60 void  Finalise();
       
    61 TUint ParseTraceRecord(const TUint8* apRecord, TTraceLayout& aTraceLayout);
       
    62 void  PrintTraceRecord(const TTraceLayout& aTraceLayout);
       
    63 TUint URnd(TUint aMin, TUint aMax);
       
    64 TUint URnd(TUint aMax);
       
    65 
       
    66 
       
    67 #endif //T_PERFLOGGER_H__