analyzetool/kerneleventhandler/inc/analyzetooltraceconstants.h
author hgs
Mon, 28 Jun 2010 15:36:07 +0300
changeset 30 86a2e675b80a
parent 20 a71a3e32a2ae
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  Common declarations/definitions for Analyze Tool.
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#ifndef __ANALYZETOOLTRACECONSTANTS_H__
hgs
parents:
diff changeset
    21
#define __ANALYZETOOLTRACECONSTANTS_H__
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
#include <analyzetool/atcommon.h>
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
// Trace version information.
hgs
parents:
diff changeset
    26
const TUint KATTraceVersion = 0x2;
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
// The default logging mode 
hgs
parents:
diff changeset
    29
const TATLogOption KDefaultLoggingMode = EATLogToTrace;
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
// When needed, update the storage data file's version number directly inside
hgs
parents:
diff changeset
    32
// the _LIT8 macro. Note, if you change this string, also remember to update
hgs
parents:
diff changeset
    33
// the constant "KVersionStringLength" below.
hgs
parents:
diff changeset
    34
hgs
parents:
diff changeset
    35
_LIT8( KDataFileVersion, "DATA_FILE_VERSION 11\r\n" );
hgs
parents:
diff changeset
    36
_LIT8( KProcessStart, "PROCESS_START %S %x " );
hgs
parents:
diff changeset
    37
_LIT16( KProcessStart16, "PROCESS_START %S %x " );
hgs
parents:
diff changeset
    38
_LIT8( KDllLoad, "DLL_LOAD %S %Lx %x %x\r\n" );
hgs
parents:
diff changeset
    39
_LIT16( KDllLoad16, "DLL_LOAD %S %Lx %x %x\r\n" );
hgs
parents:
diff changeset
    40
_LIT8( KDllUnload, "DLL_UNLOAD %S %Lx %x %x\r\n" );
hgs
parents:
diff changeset
    41
_LIT16( KDllUnload16, "DLL_UNLOAD %S %Lx %x %x\r\n" );
hgs
parents:
diff changeset
    42
_LIT8( KProcessEnd, "PROCESS_END %x " );
hgs
parents:
diff changeset
    43
_LIT16( KProcessEnd16, "PROCESS_END %x " );
hgs
parents:
diff changeset
    44
_LIT8( KProcessEndAbnormal, "PROCESS_END %x ABNORMAL " );
hgs
parents:
diff changeset
    45
_LIT8( KMemoryLeak, "MEM_LEAK " ); // Remember to update value of KMemoryLeak when changing this.
hgs
parents:
diff changeset
    46
_LIT8( KHandleLeak, "HANDLE_LEAK %S %x\r\n" );
hgs
parents:
diff changeset
    47
_LIT16( KHandleLeak16, "HANDLE_LEAK %S %x\r\n" );
hgs
parents:
diff changeset
    48
_LIT8( KErrorOccured, "ERROR_OCCURED %d " );
hgs
parents:
diff changeset
    49
_LIT8( KLoggingCancelled, "LOGGING_CANCELLED %x\r\n" );
hgs
parents:
diff changeset
    50
_LIT8( KNewLine, "\r\n" );
hgs
parents:
diff changeset
    51
_LIT8( KHexaNumber, " %x" );
hgs
parents:
diff changeset
    52
_LIT8( KSpace, " " );
hgs
parents:
diff changeset
    53
_LIT8( KUdeb, "UDEB" );
hgs
parents:
diff changeset
    54
_LIT8( KUrel, "UREL" );
hgs
parents:
diff changeset
    55
    
hgs
parents:
diff changeset
    56
// Constants for logging through debug channel
hgs
parents:
diff changeset
    57
_LIT( KTraceMessage, "PCSS %x %S" );
hgs
parents:
diff changeset
    58
_LIT( KMemoryAllocHeader, "ALLOCH " );
hgs
parents:
diff changeset
    59
_LIT( KMemoryAllocFragment, "ALLOCF " );
hgs
parents:
diff changeset
    60
_LIT( KMemoryFreedHeader, "FREEH " );
hgs
parents:
diff changeset
    61
_LIT( KMemoryFreedFragment, "FREEF " );
hgs
parents:
diff changeset
    62
_LIT( KSpaceTrace, " " );
hgs
parents:
diff changeset
    63
_LIT( KNewLineTrace, "\r\n" );
hgs
parents:
diff changeset
    64
_LIT( KHexaNumberTrace, " %x" );
hgs
parents:
diff changeset
    65
_LIT( KProcessEndTrace, "PROCESS_END %x " );
hgs
parents:
diff changeset
    66
_LIT( KProcessEndAbnormalTrace, "PROCESS_END %x ABNORMAL " );
hgs
parents:
diff changeset
    67
_LIT( KErrorOccuredTrace, "ERROR_OCCURED %d " );
hgs
parents:
diff changeset
    68
_LIT( KSubtestStart, "TEST_START " );
hgs
parents:
diff changeset
    69
_LIT( KSubtestEnd, "TEST_END " );
hgs
parents:
diff changeset
    70
_LIT8( KEmpty, "" );
hgs
parents:
diff changeset
    71
_LIT( KOpenSquareBracket, "[" );
hgs
parents:
diff changeset
    72
_LIT( KCloseSquareBracket, "]" );
hgs
parents:
diff changeset
    73
_LIT( KUnderLine, "_" );
hgs
parents:
diff changeset
    74
// File name format
hgs
parents:
diff changeset
    75
_LIT( KFormat, "%S%S%02d%S");// pad char="0", field width=2
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
// A string for setting time January 1st, 1970 AD nominal Gregorian
hgs
parents:
diff changeset
    78
_LIT( KJanuaryFirst1970, "19700000:000000.000000" );
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
// Module name when it cannot be defined
hgs
parents:
diff changeset
    81
_LIT8( KUnknownModule, "Unknown" );
hgs
parents:
diff changeset
    82
_LIT16( KUnknownModule16, "Unknown" );
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
// Constant time variable used to calculate timestamps for pc side.
hgs
parents:
diff changeset
    85
const TInt64  KMicroSecondsAt1970 = 62168256000000000;
hgs
parents:
diff changeset
    86
hgs
parents:
diff changeset
    87
// The length of the string KDataFileVersion
hgs
parents:
diff changeset
    88
const TInt KVersionStringLength = 22;
hgs
parents:
diff changeset
    89
hgs
parents:
diff changeset
    90
// The length of the string KMemoryLeak
hgs
parents:
diff changeset
    91
const TInt KMemleakLength = 9;
hgs
parents:
diff changeset
    92
hgs
parents:
diff changeset
    93
// The maximum length of one word (32 bits) represented in the hexadecimal text format
hgs
parents:
diff changeset
    94
// without "0x" prefix
hgs
parents:
diff changeset
    95
const TInt KHexa32Length = 8;
hgs
parents:
diff changeset
    96
hgs
parents:
diff changeset
    97
// The maximum length of one word (32 bits) represented in the decimal text format
hgs
parents:
diff changeset
    98
const TInt KDec32Length = 10;
hgs
parents:
diff changeset
    99
hgs
parents:
diff changeset
   100
// The maximum length of a TInt64 represented in the hexadecimal text format without
hgs
parents:
diff changeset
   101
// "0x" prefix
hgs
parents:
diff changeset
   102
const TInt KHexa64Length = 16;
hgs
parents:
diff changeset
   103
hgs
parents:
diff changeset
   104
// The length of one space character in text
hgs
parents:
diff changeset
   105
const TInt KSpaceLength = 1;
hgs
parents:
diff changeset
   106
hgs
parents:
diff changeset
   107
// The length of the combination of carriage return and new line characters.
hgs
parents:
diff changeset
   108
const TInt KNewlineLength = 2;
hgs
parents:
diff changeset
   109
hgs
parents:
diff changeset
   110
// The maximum length of the "PROCESS_START..." buffer. The first number is length of
hgs
parents:
diff changeset
   111
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   112
const TInt KProcessStartBufLength = 16 + KMaxProcessName + KSpaceLength + KHexa32Length +
hgs
parents:
diff changeset
   113
                                        KSpaceLength + KHexa64Length + KHexa32Length + KNewlineLength;
hgs
parents:
diff changeset
   114
hgs
parents:
diff changeset
   115
// The maximum length of the "DLL_LOAD..." buffer. The first number is length of
hgs
parents:
diff changeset
   116
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   117
const TInt KDllLoadBufLength = 9 + KMaxLibraryName + KSpaceLength + KHexa64Length + KSpaceLength +
hgs
parents:
diff changeset
   118
                    KHexa32Length + KSpaceLength + KHexa32Length + KNewlineLength;
hgs
parents:
diff changeset
   119
hgs
parents:
diff changeset
   120
// The maximum length of the "DLL_UNLOAD..." buffer. The first number is length of
hgs
parents:
diff changeset
   121
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   122
const TInt KDllUnloadBufLength = 11 + KMaxLibraryName + KHexa64Length + KSpaceLength + KSpaceLength + 
hgs
parents:
diff changeset
   123
                    KHexa32Length + KSpaceLength + KHexa32Length + KNewlineLength;
hgs
parents:
diff changeset
   124
hgs
parents:
diff changeset
   125
// The maximum length of the "PROCESS_END..." buffer. The first number is length of
hgs
parents:
diff changeset
   126
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   127
const TInt KProcessEndBufLength = 12 + KHexa32Length + KSpaceLength +
hgs
parents:
diff changeset
   128
                                        KHexa64Length + KNewlineLength;
hgs
parents:
diff changeset
   129
                                        
hgs
parents:
diff changeset
   130
// The maximum length of the "ERROR_OCCURED..." buffer. The first number is length of
hgs
parents:
diff changeset
   131
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   132
const TInt KErrOccuredBufLength = 14 + KDec32Length + KSpaceLength +
hgs
parents:
diff changeset
   133
                                        KHexa64Length + KNewlineLength;
hgs
parents:
diff changeset
   134
                                        
hgs
parents:
diff changeset
   135
// The maximum length of the "ALLOCH / ALLOCF..." buffer. 
hgs
parents:
diff changeset
   136
const TInt KMemAllocBufLength = 255;
hgs
parents:
diff changeset
   137
hgs
parents:
diff changeset
   138
// The maximum length of the "FREE..." buffer.
hgs
parents:
diff changeset
   139
const TInt KMemFreedBufLength = 255;
hgs
parents:
diff changeset
   140
hgs
parents:
diff changeset
   141
// The maximum length of the "HANDLE_LEAK..." buffer. The first number is length of
hgs
parents:
diff changeset
   142
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   143
const TInt KHandleLeakBufLength = 12 + KMaxLibraryName + KSpaceLength +
hgs
parents:
diff changeset
   144
                                        KHexa32Length + KNewlineLength;
hgs
parents:
diff changeset
   145
                                        
hgs
parents:
diff changeset
   146
// The maximum length of the "TEST_START..." buffer. The first number is length of
hgs
parents:
diff changeset
   147
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   148
const TInt KTestStartBufLength = 11 + KHexa64Length + KSpaceLength +
hgs
parents:
diff changeset
   149
                                        KATMaxSubtestIdLength + KSpaceLength + KHexa64Length + KNewlineLength;
hgs
parents:
diff changeset
   150
hgs
parents:
diff changeset
   151
// The maximum length of the "TEST_END..." buffer. The first number is length of
hgs
parents:
diff changeset
   152
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   153
const TInt KTestEndBufLength = 9 + KHexa64Length + KSpaceLength +
hgs
parents:
diff changeset
   154
                                        KATMaxSubtestIdLength + KSpaceLength + KHexa64Length + KNewlineLength;
hgs
parents:
diff changeset
   155
hgs
parents:
diff changeset
   156
// The maximun length of the "LOGGING_CANCELLED..." buffer. The first number is the
hgs
parents:
diff changeset
   157
// length of the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   158
const TInt KCancelBufLength = 18 + KHexa64Length + KNewlineLength;
hgs
parents:
diff changeset
   159
hgs
parents:
diff changeset
   160
// The maximun length of the "PROCESS_END %x ABNORMAL..." buffer. The first number is length of
hgs
parents:
diff changeset
   161
// the line tag and one space character (see the descriptor constants above).
hgs
parents:
diff changeset
   162
const TInt KEndAbnormalBufLength = 22 + KHexa32Length + KHexa64Length + 
hgs
parents:
diff changeset
   163
                                        KSpaceLength + KNewlineLength;
hgs
parents:
diff changeset
   164
hgs
parents:
diff changeset
   165
// The maximun length of the file name extension buffer.
hgs
parents:
diff changeset
   166
const TInt KExtensionLength = 50;
hgs
parents:
diff changeset
   167
hgs
parents:
diff changeset
   168
// The maximun length of the process UID3 buffer.
hgs
parents:
diff changeset
   169
const TInt KProcessUidLength = 20;
hgs
parents:
diff changeset
   170
hgs
parents:
diff changeset
   171
#endif // __ANALYZETOOLTRACECONSTANTS_H__