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