sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Trace API
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef UTRACE_H
|
sl@0
|
19 |
#define UTRACE_H
|
sl@0
|
20 |
|
sl@0
|
21 |
#ifdef __KERNEL_MODE__
|
sl@0
|
22 |
#include <kernel/kernel.h>
|
sl@0
|
23 |
#else //__KERNEL_MODE__
|
sl@0
|
24 |
#include <e32std.h>
|
sl@0
|
25 |
#endif //__KERNEL_MODE__
|
sl@0
|
26 |
#include <e32btrace.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
@file
|
sl@0
|
31 |
@publishedPartner
|
sl@0
|
32 |
@prototype
|
sl@0
|
33 |
*/
|
sl@0
|
34 |
|
sl@0
|
35 |
/**
|
sl@0
|
36 |
Primary filter type.
|
sl@0
|
37 |
The primary filter type used as classification information.
|
sl@0
|
38 |
*/
|
sl@0
|
39 |
typedef TUint8 TPrimaryFilter;
|
sl@0
|
40 |
/**
|
sl@0
|
41 |
Secondary filter type.
|
sl@0
|
42 |
The secondary filter type used as classification information.
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
typedef TUint32 TSecondaryFilter;
|
sl@0
|
45 |
|
sl@0
|
46 |
|
sl@0
|
47 |
/**
|
sl@0
|
48 |
The trace contains information used to debug an application
|
sl@0
|
49 |
This can be used in both UREL and UDEB builds.
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
const TPrimaryFilter KDebug = 253;
|
sl@0
|
52 |
|
sl@0
|
53 |
|
sl@0
|
54 |
/**
|
sl@0
|
55 |
Schema type.
|
sl@0
|
56 |
Use the schema in conjunction with primary and secondary filters to determine
|
sl@0
|
57 |
how a trace shall be interpreted.
|
sl@0
|
58 |
The schema must represent a specific, well-documented, and consistent plan;
|
sl@0
|
59 |
a way to define the structure and/or its content.
|
sl@0
|
60 |
*/
|
sl@0
|
61 |
typedef TUint8 TTraceSchema;
|
sl@0
|
62 |
|
sl@0
|
63 |
/**
|
sl@0
|
64 |
The schema is binary, or raw data.
|
sl@0
|
65 |
*/
|
sl@0
|
66 |
const TTraceSchema KBinary = 0;//Binary format
|
sl@0
|
67 |
/**
|
sl@0
|
68 |
The schema is ASCII text.
|
sl@0
|
69 |
*/
|
sl@0
|
70 |
const TTraceSchema KText = 1;//Text only
|
sl@0
|
71 |
|
sl@0
|
72 |
/**
|
sl@0
|
73 |
Maximum length of a formatted string
|
sl@0
|
74 |
*/
|
sl@0
|
75 |
const TInt KMaxPrintfSize = 256;
|
sl@0
|
76 |
|
sl@0
|
77 |
|
sl@0
|
78 |
/**@internalComponent*/
|
sl@0
|
79 |
#define UTRACE_HEADER(aSize,aF1,aSchema,aContext,aPc) \
|
sl@0
|
80 |
((((aSize)+(4&(TBool)aContext<<2)+(4&(TBool)aPc<<2))<<BTrace::ESizeIndex*8) \
|
sl@0
|
81 |
+(((BTrace::EContextIdPresent & (aContext<<3))|(BTrace::EPcPresent & (aPc<<4)))<<BTrace::EFlagsIndex*8) \
|
sl@0
|
82 |
+((aF1)<<BTrace::ECategoryIndex*8) \
|
sl@0
|
83 |
+((aSchema)<<BTrace::ESubCategoryIndex*8))
|
sl@0
|
84 |
/**@internalComponent*/
|
sl@0
|
85 |
#define UTracePf0(aF1,aSchema,aContext,aPc) \
|
sl@0
|
86 |
BTrace::OutX \
|
sl@0
|
87 |
(UTRACE_HEADER(4,(aF1),(aSchema),(aContext),(aPc)),0,0,0)
|
sl@0
|
88 |
/**@internalComponent*/
|
sl@0
|
89 |
#define UTracePf1(aF1,aSchema,aContext,aPc,a1) \
|
sl@0
|
90 |
BTrace::OutX(UTRACE_HEADER(8,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(a1),0,0)
|
sl@0
|
91 |
/**@internalComponent*/
|
sl@0
|
92 |
#define UTracePf2(aF1,aSchema,aContext,aPc,a1,a2) \
|
sl@0
|
93 |
BTrace::OutX(UTRACE_HEADER(12,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(a1),(TUint32)(a2),0)
|
sl@0
|
94 |
/**@internalComponent*/
|
sl@0
|
95 |
#define UTracePf3(aF1,aSchema,aContext,aPc,a1,a2,a3) \
|
sl@0
|
96 |
BTrace::OutX(UTRACE_HEADER(16,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(a1),(TUint32)(a2),(TUint32)(a3))
|
sl@0
|
97 |
/**@internalComponent*/
|
sl@0
|
98 |
#define UTracePfAny(aF1,aSchema,aContext,aPc,a1,aData,aDataSize) \
|
sl@0
|
99 |
BTrace::OutBig(UTRACE_HEADER(8,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(a1),aData,(TInt)(aDataSize))
|
sl@0
|
100 |
/**@internalComponent*/
|
sl@0
|
101 |
#define UTraceSf0(aF1,aF2,aSchema,aContext,aPc) \
|
sl@0
|
102 |
BTrace::OutFilteredX(UTRACE_HEADER(8,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(aF2),0,0)
|
sl@0
|
103 |
/** @internalComponent */
|
sl@0
|
104 |
#define UTraceSf1(aF1,aF2,aSchema,aContext,aPc,a1) \
|
sl@0
|
105 |
BTrace::OutFilteredX(UTRACE_HEADER(12,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(aF2),(TUint32)(a1),0)
|
sl@0
|
106 |
/** @internalComponent */
|
sl@0
|
107 |
#define UTraceSf2(aF1,aF2,aSchema,aContext,aPc,a1,a2) \
|
sl@0
|
108 |
BTrace::OutFilteredX(UTRACE_HEADER(16,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(aF2),(TUint32)(a1),(TUint32)(a2))
|
sl@0
|
109 |
/** @internalComponent */
|
sl@0
|
110 |
#define UTraceSfAny(aF1,aF2,aSchema,aContext,aPc,aData,aDataSize) \
|
sl@0
|
111 |
BTrace::OutFilteredBig(UTRACE_HEADER(8,(aF1),(aSchema),(aContext),(aPc)),(TUint32)(aF2),aData,(TInt)(aDataSize))
|
sl@0
|
112 |
|
sl@0
|
113 |
|
sl@0
|
114 |
/**
|
sl@0
|
115 |
Class for tracing from user and kernel side.
|
sl@0
|
116 |
|
sl@0
|
117 |
This appends entries to a trace log.
|
sl@0
|
118 |
Each trace point require classification information to be passed.
|
sl@0
|
119 |
Classification information, i.e. primary and secondary filter,
|
sl@0
|
120 |
is meta-data about the trace entry that can be used for
|
sl@0
|
121 |
filtering, e.g. the trace was inserted by a particular component.
|
sl@0
|
122 |
|
sl@0
|
123 |
In order to append trace points to the trace log they
|
sl@0
|
124 |
need to be turned on and off at run-time, based on the classification.
|
sl@0
|
125 |
It is also possible to turn trace points on and off
|
sl@0
|
126 |
at compile-time using the SYMBIAN_TRACE_ENABLE macro.
|
sl@0
|
127 |
|
sl@0
|
128 |
The class can be used in two ways, either using the
|
sl@0
|
129 |
static methods without any preparatory work, or by setting up
|
sl@0
|
130 |
an object which has all necessary information pre-defined which
|
sl@0
|
131 |
allows each consecutive call to contain a minimum of information.
|
sl@0
|
132 |
The latter set of methods are more intrusive both at run-time and
|
sl@0
|
133 |
for foot print.
|
sl@0
|
134 |
|
sl@0
|
135 |
@code
|
sl@0
|
136 |
TBool includeContextID = ETrue;
|
sl@0
|
137 |
TBool includePc = EFalse;
|
sl@0
|
138 |
TUint32 traceData = aData;
|
sl@0
|
139 |
TPrimaryFilter filter1 = 253;
|
sl@0
|
140 |
|
sl@0
|
141 |
TUTrace tracer(filter1, KBinary, includeContextID, includePc);
|
sl@0
|
142 |
tracer.Printf(_L("My trace point."));
|
sl@0
|
143 |
tracer.Trace(traceData);
|
sl@0
|
144 |
|
sl@0
|
145 |
//or
|
sl@0
|
146 |
|
sl@0
|
147 |
TUTrace::PrintfPrimary(filter1, KBinary, includeContextID, includePc, _L("My trace point with data %i."), traceData);
|
sl@0
|
148 |
TUTrace::TracePrimary(filter1, KBinary, includeContextID, includePc, traceData);
|
sl@0
|
149 |
|
sl@0
|
150 |
@endcode
|
sl@0
|
151 |
|
sl@0
|
152 |
|
sl@0
|
153 |
Note:
|
sl@0
|
154 |
Trace does not enforce any security. It is the developer's responsibility
|
sl@0
|
155 |
to ensure that trace points do not contain any sensitive information that may
|
sl@0
|
156 |
be used to compromise platform security.
|
sl@0
|
157 |
|
sl@0
|
158 |
@publishedPartner
|
sl@0
|
159 |
@prototype
|
sl@0
|
160 |
*/
|
sl@0
|
161 |
#if defined (SYMBIAN_TRACE_ENABLE) || defined (__DOXYGEN__)
|
sl@0
|
162 |
class TUTrace
|
sl@0
|
163 |
{
|
sl@0
|
164 |
public:
|
sl@0
|
165 |
|
sl@0
|
166 |
/**
|
sl@0
|
167 |
Construct a trace object with classification for
|
sl@0
|
168 |
primary filter only.
|
sl@0
|
169 |
|
sl@0
|
170 |
@param aF1 Primary filter as classification information
|
sl@0
|
171 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
172 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
173 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
174 |
*/
|
sl@0
|
175 |
TUTrace(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc)
|
sl@0
|
176 |
{
|
sl@0
|
177 |
Set(aF1, aSchema, aIncludeContextID, aIncludePc);
|
sl@0
|
178 |
}
|
sl@0
|
179 |
|
sl@0
|
180 |
/**
|
sl@0
|
181 |
Construct a trace object with classification for both
|
sl@0
|
182 |
primary and secondary filters.
|
sl@0
|
183 |
|
sl@0
|
184 |
@param aF1 Primary filter as classification information
|
sl@0
|
185 |
@param aF2 Secondary filter as classification information
|
sl@0
|
186 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
187 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
188 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
189 |
*/
|
sl@0
|
190 |
TUTrace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc)
|
sl@0
|
191 |
{
|
sl@0
|
192 |
Set(aF1, aF2, aSchema, aIncludeContextID, aIncludePc);
|
sl@0
|
193 |
}
|
sl@0
|
194 |
|
sl@0
|
195 |
|
sl@0
|
196 |
/**
|
sl@0
|
197 |
Set the classification and additional information.
|
sl@0
|
198 |
|
sl@0
|
199 |
@param aF1 Primary filter as classification information
|
sl@0
|
200 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
201 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
202 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
203 |
*/
|
sl@0
|
204 |
void Set(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc)
|
sl@0
|
205 |
{
|
sl@0
|
206 |
iF2 = 0;
|
sl@0
|
207 |
iF1 = aF1;
|
sl@0
|
208 |
iSchema = aSchema;
|
sl@0
|
209 |
iPresent = aIncludeContextID;
|
sl@0
|
210 |
iPresent |= aIncludePc << EPc;
|
sl@0
|
211 |
iReserved1 = 0;
|
sl@0
|
212 |
iReserved2 = 0;
|
sl@0
|
213 |
}
|
sl@0
|
214 |
|
sl@0
|
215 |
|
sl@0
|
216 |
/**
|
sl@0
|
217 |
Set the classification and additional information.
|
sl@0
|
218 |
|
sl@0
|
219 |
@param aF1 Primary filter as classification information
|
sl@0
|
220 |
@param aF2 Secondary filter as classification information
|
sl@0
|
221 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
222 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
223 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
224 |
*/
|
sl@0
|
225 |
void Set(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID , TBool aIncludePc)
|
sl@0
|
226 |
{
|
sl@0
|
227 |
Set(aF1, aSchema, aIncludeContextID, aIncludePc);
|
sl@0
|
228 |
iF2 = aF2;
|
sl@0
|
229 |
}
|
sl@0
|
230 |
|
sl@0
|
231 |
#ifdef __KERNEL_MODE__
|
sl@0
|
232 |
|
sl@0
|
233 |
/**
|
sl@0
|
234 |
Prints a formatted string in kernel mode only.
|
sl@0
|
235 |
|
sl@0
|
236 |
The function uses Kern::AppendFormat() to do the formatting.
|
sl@0
|
237 |
|
sl@0
|
238 |
Although it is safe to call this function from an ISR, it polls the output
|
sl@0
|
239 |
serial port and may take a long time to complete, invalidating any
|
sl@0
|
240 |
real-time guarantee.
|
sl@0
|
241 |
|
sl@0
|
242 |
If called from an ISR, it is possible for output text to be intermingled
|
sl@0
|
243 |
with other output text if one set of output interrupts or preempts another.
|
sl@0
|
244 |
|
sl@0
|
245 |
Some of the formatting options may not work inside an ISR.
|
sl@0
|
246 |
|
sl@0
|
247 |
Be careful not to use a string that is too long to fit onto the stack.
|
sl@0
|
248 |
If the specified string is too big to fit into a single trace
|
sl@0
|
249 |
a multipart trace is generated.
|
sl@0
|
250 |
|
sl@0
|
251 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
252 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
253 |
by the format string.
|
sl@0
|
254 |
|
sl@0
|
255 |
@return The trace was/was not logged.
|
sl@0
|
256 |
|
sl@0
|
257 |
@pre Calling thread can either be in a critical section or not.
|
sl@0
|
258 |
@pre Interrupts must be enabled.
|
sl@0
|
259 |
@pre Kernel must be unlocked
|
sl@0
|
260 |
@pre Call in any context.
|
sl@0
|
261 |
@pre Suitable for use in a device driver
|
sl@0
|
262 |
@pre Classification information must be set up
|
sl@0
|
263 |
|
sl@0
|
264 |
@see Kern::AppendFormat()
|
sl@0
|
265 |
@see BTrace::TMultipart
|
sl@0
|
266 |
*/
|
sl@0
|
267 |
TBool Printf(const char* aFmt, ...)
|
sl@0
|
268 |
{
|
sl@0
|
269 |
TBuf8<KMaxPrintfSize> buf;
|
sl@0
|
270 |
VA_LIST list;
|
sl@0
|
271 |
VA_START(list,aFmt);
|
sl@0
|
272 |
Kern::AppendFormat(buf,aFmt,list);
|
sl@0
|
273 |
TUint8 oldFormat = iSchema;
|
sl@0
|
274 |
iSchema = KText;
|
sl@0
|
275 |
TBool logged = EFalse;
|
sl@0
|
276 |
logged = Trace(buf.Ptr(),buf.Size());
|
sl@0
|
277 |
iSchema = oldFormat;
|
sl@0
|
278 |
return logged;
|
sl@0
|
279 |
}
|
sl@0
|
280 |
|
sl@0
|
281 |
#else //__KERNEL_MODE__
|
sl@0
|
282 |
|
sl@0
|
283 |
/**
|
sl@0
|
284 |
Prints a formatted string.
|
sl@0
|
285 |
|
sl@0
|
286 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
287 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
288 |
by the format string.
|
sl@0
|
289 |
|
sl@0
|
290 |
@return The trace was/was not logged.
|
sl@0
|
291 |
|
sl@0
|
292 |
@pre Classification information must be set up
|
sl@0
|
293 |
*/
|
sl@0
|
294 |
TBool Printf(const char* aFmt, ...)
|
sl@0
|
295 |
{
|
sl@0
|
296 |
TTruncateOverflow8 overflow;
|
sl@0
|
297 |
VA_LIST list;
|
sl@0
|
298 |
VA_START(list,aFmt);
|
sl@0
|
299 |
TPtrC8 fmt((const TText8*)aFmt);
|
sl@0
|
300 |
TBuf8<KMaxPrintfSize> buf;
|
sl@0
|
301 |
buf.AppendFormatList(fmt,list,&overflow);
|
sl@0
|
302 |
TUint8 oldFormat = iSchema;
|
sl@0
|
303 |
iSchema = KText;
|
sl@0
|
304 |
TBool logged = EFalse;
|
sl@0
|
305 |
logged = Trace(buf.PtrZ(),buf.Size());
|
sl@0
|
306 |
iSchema = oldFormat;
|
sl@0
|
307 |
return logged;
|
sl@0
|
308 |
};
|
sl@0
|
309 |
|
sl@0
|
310 |
/**
|
sl@0
|
311 |
Prints a formatted string.
|
sl@0
|
312 |
|
sl@0
|
313 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
314 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
315 |
by the format string.
|
sl@0
|
316 |
|
sl@0
|
317 |
@return The trace was/was not logged.
|
sl@0
|
318 |
|
sl@0
|
319 |
@pre Classification information must be set up
|
sl@0
|
320 |
*/
|
sl@0
|
321 |
TBool Printf(TRefByValue<const TDesC16> aFmt,...)
|
sl@0
|
322 |
{
|
sl@0
|
323 |
TTruncateOverflow16 overflow;
|
sl@0
|
324 |
VA_LIST list;
|
sl@0
|
325 |
VA_START(list,aFmt);
|
sl@0
|
326 |
TBuf<KMaxPrintfSize> buf;
|
sl@0
|
327 |
buf.AppendFormatList(aFmt,list,&overflow);
|
sl@0
|
328 |
TUint8 oldFormat = iSchema;
|
sl@0
|
329 |
iSchema = KText;
|
sl@0
|
330 |
TBool logged = EFalse;
|
sl@0
|
331 |
#ifdef _UNICODE
|
sl@0
|
332 |
TPtr8 p(buf.Collapse());
|
sl@0
|
333 |
logged = Trace(buf.PtrZ(), p.Size());
|
sl@0
|
334 |
#else
|
sl@0
|
335 |
logged = Trace(buf.PtrZ(), buf.Size());
|
sl@0
|
336 |
#endif //_UNICODE
|
sl@0
|
337 |
iSchema = oldFormat;
|
sl@0
|
338 |
return logged;
|
sl@0
|
339 |
};
|
sl@0
|
340 |
|
sl@0
|
341 |
/**
|
sl@0
|
342 |
Prints a string.
|
sl@0
|
343 |
|
sl@0
|
344 |
@param aDes The string. This can be of variable length.
|
sl@0
|
345 |
|
sl@0
|
346 |
@return The trace was/was not logged.
|
sl@0
|
347 |
|
sl@0
|
348 |
@pre Classification information must be set up
|
sl@0
|
349 |
*/
|
sl@0
|
350 |
TBool Printf(const TDesC8& aDes)
|
sl@0
|
351 |
{
|
sl@0
|
352 |
TUint8 oldFormat = iSchema;
|
sl@0
|
353 |
iSchema = KText;
|
sl@0
|
354 |
TBool logged = EFalse;
|
sl@0
|
355 |
logged = Trace(aDes.Ptr(), aDes.Size());
|
sl@0
|
356 |
iSchema = oldFormat;
|
sl@0
|
357 |
return logged;
|
sl@0
|
358 |
};
|
sl@0
|
359 |
|
sl@0
|
360 |
/**
|
sl@0
|
361 |
Prints a string.
|
sl@0
|
362 |
|
sl@0
|
363 |
@param aDes The string. This can be of variable length.
|
sl@0
|
364 |
|
sl@0
|
365 |
@return The trace was/was not logged.
|
sl@0
|
366 |
|
sl@0
|
367 |
@pre Classification information must be set up
|
sl@0
|
368 |
*/
|
sl@0
|
369 |
TBool Printf(const TDesC16& aDes)
|
sl@0
|
370 |
{
|
sl@0
|
371 |
TUint8 oldFormat = iSchema;
|
sl@0
|
372 |
iSchema = KText;
|
sl@0
|
373 |
TBool logged = EFalse;
|
sl@0
|
374 |
logged = Trace(aDes.Ptr(), aDes.Size());
|
sl@0
|
375 |
iSchema = oldFormat;
|
sl@0
|
376 |
return logged;
|
sl@0
|
377 |
};
|
sl@0
|
378 |
|
sl@0
|
379 |
#endif //__KERNEL_MODE__
|
sl@0
|
380 |
|
sl@0
|
381 |
/**
|
sl@0
|
382 |
Sends a trace with no payload data.
|
sl@0
|
383 |
|
sl@0
|
384 |
@return The trace was/was not logged.
|
sl@0
|
385 |
|
sl@0
|
386 |
@pre Classification information must be set up
|
sl@0
|
387 |
*/
|
sl@0
|
388 |
TBool Trace()
|
sl@0
|
389 |
{
|
sl@0
|
390 |
if(iF2 > 0)
|
sl@0
|
391 |
{
|
sl@0
|
392 |
return UTraceSf0(iF1,iF2,iSchema,ContextID(),Pc());
|
sl@0
|
393 |
}
|
sl@0
|
394 |
return UTracePf0(iF1,iSchema,ContextID(),Pc());
|
sl@0
|
395 |
};
|
sl@0
|
396 |
|
sl@0
|
397 |
/**
|
sl@0
|
398 |
Sends a trace containing 4 bytes of data.
|
sl@0
|
399 |
|
sl@0
|
400 |
@param aData1 4 bytes of data.
|
sl@0
|
401 |
|
sl@0
|
402 |
@return The trace was/was not logged.
|
sl@0
|
403 |
|
sl@0
|
404 |
@pre Classification information must be set up
|
sl@0
|
405 |
*/
|
sl@0
|
406 |
TBool Trace(TUint32 aData1)
|
sl@0
|
407 |
{
|
sl@0
|
408 |
if(iF2 > 0)
|
sl@0
|
409 |
{
|
sl@0
|
410 |
return UTraceSf1(iF1,iF2,iSchema,ContextID(),Pc(), aData1);
|
sl@0
|
411 |
}
|
sl@0
|
412 |
return UTracePf1(iF1,iSchema,ContextID(),Pc(), aData1);
|
sl@0
|
413 |
};
|
sl@0
|
414 |
|
sl@0
|
415 |
/**
|
sl@0
|
416 |
Sends a trace with 8 bytes of data.
|
sl@0
|
417 |
|
sl@0
|
418 |
@param aData1 4 bytes of data
|
sl@0
|
419 |
@param aData2 4 bytes of data
|
sl@0
|
420 |
|
sl@0
|
421 |
@return The trace was/was not logged.
|
sl@0
|
422 |
|
sl@0
|
423 |
@pre Classification information must be set up
|
sl@0
|
424 |
*/
|
sl@0
|
425 |
TBool Trace(TUint32 aData1, TUint32 aData2)
|
sl@0
|
426 |
{
|
sl@0
|
427 |
if(iF2 > 0)
|
sl@0
|
428 |
{
|
sl@0
|
429 |
return UTraceSf2(iF1,iF2,iSchema,ContextID(),Pc(), aData1, aData2);
|
sl@0
|
430 |
}
|
sl@0
|
431 |
return UTracePf2(iF1,iSchema,ContextID(),Pc(),aData1,aData2);
|
sl@0
|
432 |
};
|
sl@0
|
433 |
|
sl@0
|
434 |
/**
|
sl@0
|
435 |
Sends a trace with 12 bytes of data.
|
sl@0
|
436 |
Note: This method does not support secondary filtering.
|
sl@0
|
437 |
|
sl@0
|
438 |
@param aData1 4 bytes of data
|
sl@0
|
439 |
@param aData2 4 bytes of data
|
sl@0
|
440 |
@param aData3 4 bytes of data
|
sl@0
|
441 |
|
sl@0
|
442 |
@return The trace was/was not logged.
|
sl@0
|
443 |
|
sl@0
|
444 |
@pre Classification information must be set up
|
sl@0
|
445 |
*/
|
sl@0
|
446 |
TBool Trace(TUint32 aData1, TUint32 aData2, TUint32 aData3)
|
sl@0
|
447 |
{
|
sl@0
|
448 |
if(iF2 > 0)
|
sl@0
|
449 |
{
|
sl@0
|
450 |
return EFalse;
|
sl@0
|
451 |
}
|
sl@0
|
452 |
return UTracePf3(iF1,iSchema,ContextID(),Pc(),aData1,aData2,aData3);
|
sl@0
|
453 |
};
|
sl@0
|
454 |
|
sl@0
|
455 |
/**
|
sl@0
|
456 |
Sends a trace with variable length data.
|
sl@0
|
457 |
|
sl@0
|
458 |
If the specified data is too big to fit into a single
|
sl@0
|
459 |
trace record a multipart trace is generated.
|
sl@0
|
460 |
|
sl@0
|
461 |
@param aData Address of addition data to add to trace.
|
sl@0
|
462 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
463 |
@param aSize Number of bytes of additional data.
|
sl@0
|
464 |
|
sl@0
|
465 |
@return The trace was/was not logged.
|
sl@0
|
466 |
|
sl@0
|
467 |
@pre Classification information must be set up
|
sl@0
|
468 |
|
sl@0
|
469 |
@see BTrace::TMultipart
|
sl@0
|
470 |
*/
|
sl@0
|
471 |
TBool Trace(const TAny* aData, TInt aSize)
|
sl@0
|
472 |
{
|
sl@0
|
473 |
if(iF2 > 0)
|
sl@0
|
474 |
{
|
sl@0
|
475 |
return UTraceSfAny(iF1,iF2,iSchema,ContextID(),Pc(),aData,aSize);
|
sl@0
|
476 |
}
|
sl@0
|
477 |
return UTracePfAny(iF1,iSchema,ContextID(),Pc(),0,aData,aSize);
|
sl@0
|
478 |
};
|
sl@0
|
479 |
|
sl@0
|
480 |
|
sl@0
|
481 |
//Static methods
|
sl@0
|
482 |
#ifdef __KERNEL_MODE__
|
sl@0
|
483 |
|
sl@0
|
484 |
/**
|
sl@0
|
485 |
Prints a formatted string in kernel mode only.
|
sl@0
|
486 |
The trace is classified by primary filter only.
|
sl@0
|
487 |
|
sl@0
|
488 |
The function uses Kern::AppendFormat() to do the formatting.
|
sl@0
|
489 |
|
sl@0
|
490 |
Although it is safe to call this function from an ISR, it polls the output
|
sl@0
|
491 |
serial port and may take a long time to complete, invalidating any
|
sl@0
|
492 |
real-time guarantee.
|
sl@0
|
493 |
|
sl@0
|
494 |
If called from an ISR, it is possible for output text to be intermingled
|
sl@0
|
495 |
with other output text if one set of output interrupts or preempts another.
|
sl@0
|
496 |
|
sl@0
|
497 |
Some of the formatting options may not work inside an ISR.
|
sl@0
|
498 |
|
sl@0
|
499 |
Be careful not to use a string that is too long to fit onto the stack.
|
sl@0
|
500 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
501 |
a multipart trace is generated.
|
sl@0
|
502 |
|
sl@0
|
503 |
|
sl@0
|
504 |
@param aF1 Primary filter as classification information
|
sl@0
|
505 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
506 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
507 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
508 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
509 |
by the format string.
|
sl@0
|
510 |
|
sl@0
|
511 |
@return The trace was/was not logged.
|
sl@0
|
512 |
|
sl@0
|
513 |
@pre Calling thread can either be in a critical section or not.
|
sl@0
|
514 |
@pre Interrupts must be enabled.
|
sl@0
|
515 |
@pre Kernel must be unlocked
|
sl@0
|
516 |
@pre Call in any context.
|
sl@0
|
517 |
@pre Suitable for use in a device driver
|
sl@0
|
518 |
|
sl@0
|
519 |
@see Kern::AppendFormat()
|
sl@0
|
520 |
@see BTrace::TMultipart
|
sl@0
|
521 |
*/
|
sl@0
|
522 |
static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...)
|
sl@0
|
523 |
{
|
sl@0
|
524 |
TBuf8<KMaxPrintfSize> buf;
|
sl@0
|
525 |
VA_LIST list;
|
sl@0
|
526 |
VA_START(list,aFmt);
|
sl@0
|
527 |
Kern::AppendFormat(buf,aFmt,list);
|
sl@0
|
528 |
return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.Ptr(),buf.Size());
|
sl@0
|
529 |
}
|
sl@0
|
530 |
|
sl@0
|
531 |
#else //__KERNEL_MODE__
|
sl@0
|
532 |
|
sl@0
|
533 |
/**
|
sl@0
|
534 |
Prints a formatted string. The trace is classified by primary filter only.
|
sl@0
|
535 |
|
sl@0
|
536 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
537 |
a multipart trace is generated.
|
sl@0
|
538 |
|
sl@0
|
539 |
@param aF1 Primary filter as classification information
|
sl@0
|
540 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
541 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
542 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
543 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
544 |
by the format string.
|
sl@0
|
545 |
|
sl@0
|
546 |
@return The trace was/was not logged.
|
sl@0
|
547 |
|
sl@0
|
548 |
@see BTrace::TMultipart
|
sl@0
|
549 |
*/
|
sl@0
|
550 |
static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...)
|
sl@0
|
551 |
{
|
sl@0
|
552 |
TTruncateOverflow8 overflow;
|
sl@0
|
553 |
VA_LIST list;
|
sl@0
|
554 |
VA_START(list,aFmt);
|
sl@0
|
555 |
TPtrC8 fmt((const TText8*)aFmt);
|
sl@0
|
556 |
TBuf8<KMaxPrintfSize> buf;
|
sl@0
|
557 |
buf.AppendFormatList(fmt,list,&overflow);
|
sl@0
|
558 |
return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(),buf.Size());
|
sl@0
|
559 |
};
|
sl@0
|
560 |
|
sl@0
|
561 |
/**
|
sl@0
|
562 |
Prints a formatted string. The trace is classified by primary filter only.
|
sl@0
|
563 |
|
sl@0
|
564 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
565 |
a multipart trace is generated.
|
sl@0
|
566 |
|
sl@0
|
567 |
@param aF1 Primary filter as classification information
|
sl@0
|
568 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
569 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
570 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
571 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
572 |
by the format string.
|
sl@0
|
573 |
|
sl@0
|
574 |
@return The trace was/was not logged.
|
sl@0
|
575 |
|
sl@0
|
576 |
@see BTrace::TMultipart
|
sl@0
|
577 |
*/
|
sl@0
|
578 |
static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, TRefByValue<const TDesC16> aFmt,...)
|
sl@0
|
579 |
{
|
sl@0
|
580 |
TTruncateOverflow16 overflow;
|
sl@0
|
581 |
VA_LIST list;
|
sl@0
|
582 |
VA_START(list,aFmt);
|
sl@0
|
583 |
TBuf<KMaxPrintfSize> buf;
|
sl@0
|
584 |
buf.AppendFormatList(aFmt,list,&overflow);
|
sl@0
|
585 |
#ifdef _UNICODE
|
sl@0
|
586 |
TPtr8 p(buf.Collapse());
|
sl@0
|
587 |
return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(), p.Size());
|
sl@0
|
588 |
#else
|
sl@0
|
589 |
return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(), buf.Size());
|
sl@0
|
590 |
#endif //_UNICODE
|
sl@0
|
591 |
};
|
sl@0
|
592 |
|
sl@0
|
593 |
/**
|
sl@0
|
594 |
Prints a string. The trace is classified by primary filter only.
|
sl@0
|
595 |
|
sl@0
|
596 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
597 |
a multipart trace is generated.
|
sl@0
|
598 |
|
sl@0
|
599 |
@param aF1 Primary filter as classification information
|
sl@0
|
600 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
601 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
602 |
@param aDes The string. This can be of variable length.
|
sl@0
|
603 |
|
sl@0
|
604 |
@return The trace was/was not logged.
|
sl@0
|
605 |
|
sl@0
|
606 |
@see BTrace::TMultipart
|
sl@0
|
607 |
*/
|
sl@0
|
608 |
static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const TDesC8& aDes)
|
sl@0
|
609 |
{
|
sl@0
|
610 |
return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc,0, aDes.Ptr(), aDes.Size());
|
sl@0
|
611 |
};
|
sl@0
|
612 |
|
sl@0
|
613 |
/**
|
sl@0
|
614 |
Prints a string. The trace is classified by primary filter only.
|
sl@0
|
615 |
|
sl@0
|
616 |
|
sl@0
|
617 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
618 |
a multipart trace is generated.
|
sl@0
|
619 |
|
sl@0
|
620 |
@param aF1 Primary filter as classification information
|
sl@0
|
621 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
622 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
623 |
@param aDes The string. This can be of variable length.
|
sl@0
|
624 |
|
sl@0
|
625 |
@return The trace was/was not logged.
|
sl@0
|
626 |
|
sl@0
|
627 |
@see BTrace::TMultipart
|
sl@0
|
628 |
*/
|
sl@0
|
629 |
static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const TDesC16& aDes)
|
sl@0
|
630 |
{
|
sl@0
|
631 |
TUTrace trace(aF1,KText,aIncludeContextID,aIncludePc);
|
sl@0
|
632 |
return trace.Printf(aDes);
|
sl@0
|
633 |
};
|
sl@0
|
634 |
|
sl@0
|
635 |
/**
|
sl@0
|
636 |
Prints a formatted string. The trace is classified by primary and secondary filter.
|
sl@0
|
637 |
|
sl@0
|
638 |
|
sl@0
|
639 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
640 |
a multipart trace is generated.
|
sl@0
|
641 |
|
sl@0
|
642 |
@param aF1 Primary filter as classification information
|
sl@0
|
643 |
@param aF2 Secondary filter as classification information
|
sl@0
|
644 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
645 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
646 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
647 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
648 |
by the format string.
|
sl@0
|
649 |
|
sl@0
|
650 |
@return The trace was/was not logged.
|
sl@0
|
651 |
|
sl@0
|
652 |
@see BTrace::TMultipart
|
sl@0
|
653 |
*/
|
sl@0
|
654 |
static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...)
|
sl@0
|
655 |
{
|
sl@0
|
656 |
TTruncateOverflow8 overflow;
|
sl@0
|
657 |
VA_LIST list;
|
sl@0
|
658 |
VA_START(list,aFmt);
|
sl@0
|
659 |
TPtrC8 fmt((const TText8*)aFmt);
|
sl@0
|
660 |
TBuf8<KMaxPrintfSize> buf;
|
sl@0
|
661 |
buf.AppendFormatList(fmt,list,&overflow);
|
sl@0
|
662 |
return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(),buf.Size());
|
sl@0
|
663 |
};
|
sl@0
|
664 |
|
sl@0
|
665 |
/**
|
sl@0
|
666 |
Prints a formatted string. The trace is classified by primary and secondary filter.
|
sl@0
|
667 |
|
sl@0
|
668 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
669 |
a multipart trace is generated.
|
sl@0
|
670 |
|
sl@0
|
671 |
@param aF1 Primary filter as classification information
|
sl@0
|
672 |
@param aF2 Secondary filter as classification information
|
sl@0
|
673 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
674 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
675 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
676 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
677 |
by the format string.
|
sl@0
|
678 |
|
sl@0
|
679 |
@return The trace was/was not logged.
|
sl@0
|
680 |
|
sl@0
|
681 |
@see BTrace::TMultipart
|
sl@0
|
682 |
*/
|
sl@0
|
683 |
static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, TRefByValue<const TDesC16> aFmt,...)
|
sl@0
|
684 |
{
|
sl@0
|
685 |
TTruncateOverflow16 overflow;
|
sl@0
|
686 |
VA_LIST list;
|
sl@0
|
687 |
VA_START(list,aFmt);
|
sl@0
|
688 |
TBuf<KMaxPrintfSize> buf;
|
sl@0
|
689 |
buf.AppendFormatList(aFmt,list,&overflow);
|
sl@0
|
690 |
#ifdef _UNICODE
|
sl@0
|
691 |
TPtr8 p(buf.Collapse());
|
sl@0
|
692 |
return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(), p.Size());
|
sl@0
|
693 |
#else
|
sl@0
|
694 |
return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(), buf.Size());
|
sl@0
|
695 |
#endif //_UNICODE
|
sl@0
|
696 |
};
|
sl@0
|
697 |
|
sl@0
|
698 |
/**
|
sl@0
|
699 |
Prints a string. The trace is classified by primary and secondary filter.
|
sl@0
|
700 |
|
sl@0
|
701 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
702 |
a multipart trace is generated.
|
sl@0
|
703 |
|
sl@0
|
704 |
@param aF1 Primary filter as classification information
|
sl@0
|
705 |
@param aF2 Secondary filter as classification information
|
sl@0
|
706 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
707 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
708 |
@param aDes The string. This can be of variable length.
|
sl@0
|
709 |
|
sl@0
|
710 |
@return The trace was/was not logged.
|
sl@0
|
711 |
|
sl@0
|
712 |
@see BTrace::TMultipart
|
sl@0
|
713 |
*/
|
sl@0
|
714 |
static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const TDesC8& aDes)
|
sl@0
|
715 |
{
|
sl@0
|
716 |
return UTraceSfAny(aF1, aF2, KText,aIncludeContextID, aIncludePc, aDes.Ptr(), aDes.Size());
|
sl@0
|
717 |
};
|
sl@0
|
718 |
|
sl@0
|
719 |
/**
|
sl@0
|
720 |
Prints a string. The trace is classified by primary and secondary filter.
|
sl@0
|
721 |
|
sl@0
|
722 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
723 |
a multipart trace is generated.
|
sl@0
|
724 |
|
sl@0
|
725 |
@param aF1 Primary filter as classification information
|
sl@0
|
726 |
@param aF2 Secondary filter as classification information
|
sl@0
|
727 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
728 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
729 |
@param aDes The string. This can be of variable length.
|
sl@0
|
730 |
|
sl@0
|
731 |
@return The trace was/was not logged.
|
sl@0
|
732 |
|
sl@0
|
733 |
@see BTrace::TMultipart
|
sl@0
|
734 |
*/
|
sl@0
|
735 |
static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const TDesC16& aDes)
|
sl@0
|
736 |
{
|
sl@0
|
737 |
TUTrace trace(aF1,aF2,KText,aIncludeContextID,aIncludePc);
|
sl@0
|
738 |
return trace.Printf(aDes);
|
sl@0
|
739 |
};
|
sl@0
|
740 |
|
sl@0
|
741 |
#endif //__KERNEL_MODE_
|
sl@0
|
742 |
|
sl@0
|
743 |
/**
|
sl@0
|
744 |
Sends a trace with no payload. The trace is classified
|
sl@0
|
745 |
by primary filter only.
|
sl@0
|
746 |
|
sl@0
|
747 |
@param aF1 Primary filter as classification information
|
sl@0
|
748 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
749 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
750 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
751 |
|
sl@0
|
752 |
@return The trace was/was not logged.
|
sl@0
|
753 |
*/
|
sl@0
|
754 |
static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc)
|
sl@0
|
755 |
{
|
sl@0
|
756 |
return UTracePf0(aF1, aSchema, aIncludeContextID, aIncludePc);
|
sl@0
|
757 |
}
|
sl@0
|
758 |
|
sl@0
|
759 |
/**
|
sl@0
|
760 |
Sends a trace with 4 bytes of data. The trace is classified
|
sl@0
|
761 |
by primary filter only.
|
sl@0
|
762 |
|
sl@0
|
763 |
@param aF1 Primary filter as classification information
|
sl@0
|
764 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
765 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
766 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
767 |
@param aData1 4 bytes of data
|
sl@0
|
768 |
|
sl@0
|
769 |
@return The trace was/was not logged.
|
sl@0
|
770 |
*/
|
sl@0
|
771 |
static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1)
|
sl@0
|
772 |
{
|
sl@0
|
773 |
return UTracePf1(aF1, aSchema, aIncludeContextID, aIncludePc, aData1);
|
sl@0
|
774 |
}
|
sl@0
|
775 |
|
sl@0
|
776 |
/**
|
sl@0
|
777 |
Sends a trace with 8 bytes of data. The trace is classified
|
sl@0
|
778 |
by primary filter only.
|
sl@0
|
779 |
|
sl@0
|
780 |
@param aF1 Primary filter as classification information
|
sl@0
|
781 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
782 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
783 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
784 |
@param aData1 4 bytes of data
|
sl@0
|
785 |
@param aData2 4 bytes of data
|
sl@0
|
786 |
|
sl@0
|
787 |
@return The trace was/was not logged.
|
sl@0
|
788 |
*/
|
sl@0
|
789 |
static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2)
|
sl@0
|
790 |
{
|
sl@0
|
791 |
return UTracePf2(aF1, aSchema, aIncludeContextID, aIncludePc,aData1,aData2);
|
sl@0
|
792 |
}
|
sl@0
|
793 |
|
sl@0
|
794 |
/**
|
sl@0
|
795 |
Sends a trace with 12 bytes of data. The trace is classified
|
sl@0
|
796 |
by primary filter only.
|
sl@0
|
797 |
|
sl@0
|
798 |
@param aF1 Primary filter as classification information
|
sl@0
|
799 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
800 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
801 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
802 |
@param aData1 4 bytes of data
|
sl@0
|
803 |
@param aData2 4 bytes of data
|
sl@0
|
804 |
@param aData3 4 bytes of data
|
sl@0
|
805 |
|
sl@0
|
806 |
@return The trace was/was not logged.
|
sl@0
|
807 |
*/
|
sl@0
|
808 |
static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2, TUint aData3)
|
sl@0
|
809 |
{
|
sl@0
|
810 |
return UTracePf3(aF1, aSchema, aIncludeContextID, aIncludePc,aData1,aData2,aData3);
|
sl@0
|
811 |
}
|
sl@0
|
812 |
|
sl@0
|
813 |
/**
|
sl@0
|
814 |
Sends a trace with variable length data. The trace is classified
|
sl@0
|
815 |
by primary filter only.
|
sl@0
|
816 |
|
sl@0
|
817 |
If the specified data is too big to fit into a single
|
sl@0
|
818 |
trace record a multipart trace is generated.
|
sl@0
|
819 |
|
sl@0
|
820 |
@param aF1 Primary filter as classification information
|
sl@0
|
821 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
822 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
823 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
824 |
@param aData Address of addition data to add to trace.
|
sl@0
|
825 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
826 |
@param aSize Number of bytes of additional data.
|
sl@0
|
827 |
|
sl@0
|
828 |
@return The trace was/was not logged.
|
sl@0
|
829 |
|
sl@0
|
830 |
@see BTrace::TMultipart
|
sl@0
|
831 |
*/
|
sl@0
|
832 |
static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, const TAny* aData, TInt aSize)
|
sl@0
|
833 |
{
|
sl@0
|
834 |
return UTracePfAny(aF1, aSchema, aIncludeContextID, aIncludePc, 0, aData, aSize);
|
sl@0
|
835 |
}
|
sl@0
|
836 |
|
sl@0
|
837 |
/**
|
sl@0
|
838 |
Sends a trace with no payload. The trace is classified
|
sl@0
|
839 |
by primary and secondary filter.
|
sl@0
|
840 |
|
sl@0
|
841 |
@param aF1 Primary filter as classification information
|
sl@0
|
842 |
@param aF2 Secondary filter as classification information
|
sl@0
|
843 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
844 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
845 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
846 |
|
sl@0
|
847 |
@return The trace was/was not logged.
|
sl@0
|
848 |
*/
|
sl@0
|
849 |
static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc)
|
sl@0
|
850 |
{
|
sl@0
|
851 |
return UTraceSf0(aF1, aF2, aSchema, aIncludeContextID, aIncludePc);
|
sl@0
|
852 |
}
|
sl@0
|
853 |
|
sl@0
|
854 |
/**
|
sl@0
|
855 |
Sends a trace with 4 bytes of data. The trace is classified
|
sl@0
|
856 |
by primary and secondary filter.
|
sl@0
|
857 |
|
sl@0
|
858 |
@param aF1 Primary filter as classification information
|
sl@0
|
859 |
@param aF2 Secondary filter as classification information
|
sl@0
|
860 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
861 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
862 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
863 |
@param aData1 4 bytes of data
|
sl@0
|
864 |
|
sl@0
|
865 |
@return The trace was/was not logged.
|
sl@0
|
866 |
*/
|
sl@0
|
867 |
static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1)
|
sl@0
|
868 |
{
|
sl@0
|
869 |
return UTraceSf1(aF1, aF2, aSchema , aIncludeContextID, aIncludePc, aData1);
|
sl@0
|
870 |
}
|
sl@0
|
871 |
|
sl@0
|
872 |
/**
|
sl@0
|
873 |
Sends a trace with 8 bytes of data. The trace is classified
|
sl@0
|
874 |
by primary and secondary filter.
|
sl@0
|
875 |
|
sl@0
|
876 |
@param aF1 Primary filter as classification information
|
sl@0
|
877 |
@param aF2 Secondary filter as classification information
|
sl@0
|
878 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
879 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
880 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
881 |
@param aData1 4 bytes of data
|
sl@0
|
882 |
@param aData2 4 bytes of data
|
sl@0
|
883 |
|
sl@0
|
884 |
@return The trace was/was not logged.
|
sl@0
|
885 |
*/
|
sl@0
|
886 |
static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2)
|
sl@0
|
887 |
{
|
sl@0
|
888 |
return UTraceSf2(aF1, aF2, aSchema , aIncludeContextID, aIncludePc,aData1,aData2);
|
sl@0
|
889 |
}
|
sl@0
|
890 |
|
sl@0
|
891 |
/**
|
sl@0
|
892 |
Sends a trace with variable length data. The trace is classified
|
sl@0
|
893 |
by primary and secondary filter.
|
sl@0
|
894 |
|
sl@0
|
895 |
If the specified data is too big to fit into a single
|
sl@0
|
896 |
trace record a multipart trace is generated.
|
sl@0
|
897 |
|
sl@0
|
898 |
@param aF1 Primary filter as classification information
|
sl@0
|
899 |
@param aF2 Secondary filter as classification information
|
sl@0
|
900 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
901 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
902 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
903 |
@param aData Address of addition data to add to trace.
|
sl@0
|
904 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
905 |
@param aSize Number of bytes of additional data.
|
sl@0
|
906 |
|
sl@0
|
907 |
@return The trace was/was not logged.
|
sl@0
|
908 |
|
sl@0
|
909 |
@see BTrace::TMultipart
|
sl@0
|
910 |
*/
|
sl@0
|
911 |
static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, const TAny* aData, TInt aSize)
|
sl@0
|
912 |
{
|
sl@0
|
913 |
return UTraceSfAny(aF1, aF2, aSchema, aIncludeContextID, aIncludePc, aData, aSize);
|
sl@0
|
914 |
}
|
sl@0
|
915 |
|
sl@0
|
916 |
private:
|
sl@0
|
917 |
|
sl@0
|
918 |
// See/Update comments below
|
sl@0
|
919 |
TUTrace(){};
|
sl@0
|
920 |
|
sl@0
|
921 |
/**
|
sl@0
|
922 |
@internalComponent
|
sl@0
|
923 |
*/
|
sl@0
|
924 |
enum TTraceInfoPresent
|
sl@0
|
925 |
{
|
sl@0
|
926 |
EContext = 0,
|
sl@0
|
927 |
EPc = 1
|
sl@0
|
928 |
};
|
sl@0
|
929 |
|
sl@0
|
930 |
/**
|
sl@0
|
931 |
Dummy class to toss away overflow
|
sl@0
|
932 |
@internalComponent
|
sl@0
|
933 |
*/
|
sl@0
|
934 |
#ifndef __KERNEL_MODE__
|
sl@0
|
935 |
class TTruncateOverflow16 : public TDes16Overflow
|
sl@0
|
936 |
{
|
sl@0
|
937 |
public:
|
sl@0
|
938 |
virtual void Overflow(TDes&) {};
|
sl@0
|
939 |
};
|
sl@0
|
940 |
/**
|
sl@0
|
941 |
Dummy class to toss away overflow
|
sl@0
|
942 |
@internalComponent
|
sl@0
|
943 |
*/
|
sl@0
|
944 |
class TTruncateOverflow8 : public TDes8Overflow
|
sl@0
|
945 |
{
|
sl@0
|
946 |
public:
|
sl@0
|
947 |
virtual void Overflow(TDes8&) {};
|
sl@0
|
948 |
};
|
sl@0
|
949 |
#endif //__KERNEL_MODE__
|
sl@0
|
950 |
|
sl@0
|
951 |
/**
|
sl@0
|
952 |
@internalComponent
|
sl@0
|
953 |
*/
|
sl@0
|
954 |
TBool ContextID()
|
sl@0
|
955 |
{
|
sl@0
|
956 |
return iPresent&1;
|
sl@0
|
957 |
};
|
sl@0
|
958 |
|
sl@0
|
959 |
/**
|
sl@0
|
960 |
@internalComponent
|
sl@0
|
961 |
*/
|
sl@0
|
962 |
TBool Pc()
|
sl@0
|
963 |
{
|
sl@0
|
964 |
return (iPresent&2)>>EPc;
|
sl@0
|
965 |
};
|
sl@0
|
966 |
|
sl@0
|
967 |
private:
|
sl@0
|
968 |
TPrimaryFilter iF1;
|
sl@0
|
969 |
TTraceSchema iSchema;
|
sl@0
|
970 |
TSecondaryFilter iF2;
|
sl@0
|
971 |
TInt8 iPresent;
|
sl@0
|
972 |
|
sl@0
|
973 |
TUint32 iReserved1;
|
sl@0
|
974 |
TUint32 iReserved2;
|
sl@0
|
975 |
};
|
sl@0
|
976 |
|
sl@0
|
977 |
#else //SYMBIAN_TRACE_ENABLE
|
sl@0
|
978 |
|
sl@0
|
979 |
|
sl@0
|
980 |
class TUTrace
|
sl@0
|
981 |
{
|
sl@0
|
982 |
public:
|
sl@0
|
983 |
/**
|
sl@0
|
984 |
Construct a trace object with classification for
|
sl@0
|
985 |
primary filter only.
|
sl@0
|
986 |
|
sl@0
|
987 |
@param aF1 Primary filter as classification information
|
sl@0
|
988 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
989 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
990 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
991 |
*/
|
sl@0
|
992 |
TUTrace(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){};
|
sl@0
|
993 |
|
sl@0
|
994 |
/**
|
sl@0
|
995 |
Construct a trace object with classification for both
|
sl@0
|
996 |
primary and secondary filters.
|
sl@0
|
997 |
|
sl@0
|
998 |
@param aF1 Primary filter as classification information
|
sl@0
|
999 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1000 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1001 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1002 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1003 |
*/
|
sl@0
|
1004 |
TUTrace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){};
|
sl@0
|
1005 |
|
sl@0
|
1006 |
/**
|
sl@0
|
1007 |
Set the classification and additional information.
|
sl@0
|
1008 |
|
sl@0
|
1009 |
@param aF1 Primary filter as classification information
|
sl@0
|
1010 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1011 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1012 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1013 |
*/
|
sl@0
|
1014 |
void Set(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){};
|
sl@0
|
1015 |
|
sl@0
|
1016 |
/**
|
sl@0
|
1017 |
Set the classification and additional information.
|
sl@0
|
1018 |
|
sl@0
|
1019 |
@param aF1 Primary filter as classification information
|
sl@0
|
1020 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1021 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1022 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1023 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1024 |
*/
|
sl@0
|
1025 |
void Set(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){};
|
sl@0
|
1026 |
#ifdef __KERNEL_MODE__
|
sl@0
|
1027 |
|
sl@0
|
1028 |
/**
|
sl@0
|
1029 |
Prints a formatted string in kernel mode only.
|
sl@0
|
1030 |
|
sl@0
|
1031 |
The function uses Kern::AppendFormat() to do the formatting.
|
sl@0
|
1032 |
|
sl@0
|
1033 |
Although it is safe to call this function from an ISR, it polls the output
|
sl@0
|
1034 |
serial port and may take a long time to complete, invalidating any
|
sl@0
|
1035 |
real-time guarantee.
|
sl@0
|
1036 |
|
sl@0
|
1037 |
If called from an ISR, it is possible for output text to be intermingled
|
sl@0
|
1038 |
with other output text if one set of output interrupts or preempts another.
|
sl@0
|
1039 |
|
sl@0
|
1040 |
Some of the formatting options may not work inside an ISR.
|
sl@0
|
1041 |
|
sl@0
|
1042 |
Be careful not to use a string that is too long to fit onto the stack.
|
sl@0
|
1043 |
If the specified string is too big to fit into a single trace
|
sl@0
|
1044 |
a multipart trace is generated.
|
sl@0
|
1045 |
|
sl@0
|
1046 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1047 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1048 |
by the format string.
|
sl@0
|
1049 |
|
sl@0
|
1050 |
@return The trace was/was not logged.
|
sl@0
|
1051 |
|
sl@0
|
1052 |
@pre Calling thread can either be in a critical section or not.
|
sl@0
|
1053 |
@pre Interrupts must be enabled.
|
sl@0
|
1054 |
@pre Kernel must be unlocked
|
sl@0
|
1055 |
@pre Call in any context.
|
sl@0
|
1056 |
@pre Suitable for use in a device driver
|
sl@0
|
1057 |
@pre Classification information must be set up
|
sl@0
|
1058 |
|
sl@0
|
1059 |
@see Kern::AppendFormat()
|
sl@0
|
1060 |
@See BTrace::TMultipart
|
sl@0
|
1061 |
*/
|
sl@0
|
1062 |
TBool Printf(const char* /*aFmt*/, ...)
|
sl@0
|
1063 |
{
|
sl@0
|
1064 |
return EFalse;
|
sl@0
|
1065 |
}
|
sl@0
|
1066 |
|
sl@0
|
1067 |
#else //__KERNEL_MODE__
|
sl@0
|
1068 |
|
sl@0
|
1069 |
/**
|
sl@0
|
1070 |
Prints a formatted string.
|
sl@0
|
1071 |
|
sl@0
|
1072 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1073 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1074 |
by the format string.
|
sl@0
|
1075 |
|
sl@0
|
1076 |
@return The trace was/was not logged.
|
sl@0
|
1077 |
|
sl@0
|
1078 |
@pre Classification information must be set up
|
sl@0
|
1079 |
*/
|
sl@0
|
1080 |
TBool Printf(const char* /*aFmt*/, ...)
|
sl@0
|
1081 |
{
|
sl@0
|
1082 |
return EFalse;
|
sl@0
|
1083 |
};
|
sl@0
|
1084 |
|
sl@0
|
1085 |
/**
|
sl@0
|
1086 |
Prints a formatted string.
|
sl@0
|
1087 |
|
sl@0
|
1088 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1089 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1090 |
by the format string.
|
sl@0
|
1091 |
|
sl@0
|
1092 |
@return The trace was/was not logged.
|
sl@0
|
1093 |
|
sl@0
|
1094 |
@pre Classification information must be set up
|
sl@0
|
1095 |
*/
|
sl@0
|
1096 |
TBool Printf(TRefByValue<const TDesC16> /*aFmt*/,...)
|
sl@0
|
1097 |
{
|
sl@0
|
1098 |
return EFalse;
|
sl@0
|
1099 |
};
|
sl@0
|
1100 |
|
sl@0
|
1101 |
/**
|
sl@0
|
1102 |
Prints a string.
|
sl@0
|
1103 |
|
sl@0
|
1104 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1105 |
|
sl@0
|
1106 |
@return The trace was/was not logged.
|
sl@0
|
1107 |
|
sl@0
|
1108 |
@pre Classification information must be set up
|
sl@0
|
1109 |
*/
|
sl@0
|
1110 |
TBool Printf(const TDesC8& /*aDes*/)
|
sl@0
|
1111 |
{
|
sl@0
|
1112 |
return EFalse;
|
sl@0
|
1113 |
};
|
sl@0
|
1114 |
|
sl@0
|
1115 |
/**
|
sl@0
|
1116 |
Prints a string.
|
sl@0
|
1117 |
|
sl@0
|
1118 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1119 |
|
sl@0
|
1120 |
@return The trace was/was not logged.
|
sl@0
|
1121 |
|
sl@0
|
1122 |
@pre Classification information must be set up
|
sl@0
|
1123 |
*/
|
sl@0
|
1124 |
TBool Printf(const TDesC16& /*aDes*/)
|
sl@0
|
1125 |
{
|
sl@0
|
1126 |
return EFalse;
|
sl@0
|
1127 |
};
|
sl@0
|
1128 |
|
sl@0
|
1129 |
#endif // __KERNEL_MODE__
|
sl@0
|
1130 |
|
sl@0
|
1131 |
/**
|
sl@0
|
1132 |
Sends a trace with no payload data.
|
sl@0
|
1133 |
|
sl@0
|
1134 |
@return The trace was/was not logged.
|
sl@0
|
1135 |
|
sl@0
|
1136 |
@pre Classification information must be set up
|
sl@0
|
1137 |
*/
|
sl@0
|
1138 |
TBool Trace()
|
sl@0
|
1139 |
{
|
sl@0
|
1140 |
return EFalse;
|
sl@0
|
1141 |
};
|
sl@0
|
1142 |
|
sl@0
|
1143 |
/**
|
sl@0
|
1144 |
Sends a trace containing 4 bytes of data.
|
sl@0
|
1145 |
|
sl@0
|
1146 |
@param aData1 4 bytes of data.
|
sl@0
|
1147 |
|
sl@0
|
1148 |
@return The trace was/was not logged.
|
sl@0
|
1149 |
|
sl@0
|
1150 |
@pre Classification information must be set up
|
sl@0
|
1151 |
*/
|
sl@0
|
1152 |
TBool Trace(TUint32 /*aData1*/)
|
sl@0
|
1153 |
{
|
sl@0
|
1154 |
return EFalse;
|
sl@0
|
1155 |
};
|
sl@0
|
1156 |
|
sl@0
|
1157 |
/**
|
sl@0
|
1158 |
Sends a trace with 8 bytes of data.
|
sl@0
|
1159 |
|
sl@0
|
1160 |
@param aData1 4 bytes of data
|
sl@0
|
1161 |
@param aData2 4 bytes of data
|
sl@0
|
1162 |
|
sl@0
|
1163 |
@return The trace was/was not logged.
|
sl@0
|
1164 |
|
sl@0
|
1165 |
@pre Classification information must be set up
|
sl@0
|
1166 |
*/
|
sl@0
|
1167 |
TBool Trace(TUint32 /*aData1*/, TUint32 /*aData2*/)
|
sl@0
|
1168 |
{
|
sl@0
|
1169 |
return EFalse;
|
sl@0
|
1170 |
};
|
sl@0
|
1171 |
|
sl@0
|
1172 |
/**
|
sl@0
|
1173 |
Sends a trace with 12 bytes of data.
|
sl@0
|
1174 |
Note: This method does not support secondary filtering.
|
sl@0
|
1175 |
|
sl@0
|
1176 |
@param aData1 4 bytes of data
|
sl@0
|
1177 |
@param aData2 4 bytes of data
|
sl@0
|
1178 |
@param aData3 4 bytes of data
|
sl@0
|
1179 |
|
sl@0
|
1180 |
@return The trace was/was not logged.
|
sl@0
|
1181 |
|
sl@0
|
1182 |
@pre Classification information must be set up
|
sl@0
|
1183 |
*/
|
sl@0
|
1184 |
TBool Trace(TUint32 /*aData1*/, TUint32 /*aData2*/, TUint32 /*aData3*/)
|
sl@0
|
1185 |
{
|
sl@0
|
1186 |
return EFalse;
|
sl@0
|
1187 |
};
|
sl@0
|
1188 |
|
sl@0
|
1189 |
/**
|
sl@0
|
1190 |
Sends a trace with variable length data.
|
sl@0
|
1191 |
|
sl@0
|
1192 |
If the specified data is too big to fit into a single
|
sl@0
|
1193 |
trace record a multipart trace is generated.
|
sl@0
|
1194 |
|
sl@0
|
1195 |
@param aData Address of addition data to add to trace.
|
sl@0
|
1196 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
1197 |
@param aSize Number of bytes of additional data.
|
sl@0
|
1198 |
|
sl@0
|
1199 |
@return The trace was/was not logged.
|
sl@0
|
1200 |
|
sl@0
|
1201 |
@pre Classification information must be set up
|
sl@0
|
1202 |
|
sl@0
|
1203 |
@See BTrace::TMultipart
|
sl@0
|
1204 |
*/
|
sl@0
|
1205 |
TBool Trace(const TAny* /*aData*/, TInt /*aSize*/)
|
sl@0
|
1206 |
{
|
sl@0
|
1207 |
return EFalse;
|
sl@0
|
1208 |
};
|
sl@0
|
1209 |
|
sl@0
|
1210 |
#ifdef __KERNEL_MODE__
|
sl@0
|
1211 |
|
sl@0
|
1212 |
/**
|
sl@0
|
1213 |
Prints a formatted string in kernel mode only.
|
sl@0
|
1214 |
The trace is classified by primary filter only.
|
sl@0
|
1215 |
|
sl@0
|
1216 |
The function uses Kern::AppendFormat() to do the formatting.
|
sl@0
|
1217 |
|
sl@0
|
1218 |
Although it is safe to call this function from an ISR, it polls the output
|
sl@0
|
1219 |
serial port and may take a long time to complete, invalidating any
|
sl@0
|
1220 |
real-time guarantee.
|
sl@0
|
1221 |
|
sl@0
|
1222 |
If called from an ISR, it is possible for output text to be intermingled
|
sl@0
|
1223 |
with other output text if one set of output interrupts or preempts another.
|
sl@0
|
1224 |
|
sl@0
|
1225 |
Some of the formatting options may not work inside an ISR.
|
sl@0
|
1226 |
|
sl@0
|
1227 |
Be careful not to use a string that is too long to fit onto the stack.
|
sl@0
|
1228 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1229 |
a multipart trace is generated.
|
sl@0
|
1230 |
|
sl@0
|
1231 |
|
sl@0
|
1232 |
@param aF1 Primary filter as classification information
|
sl@0
|
1233 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1234 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1235 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1236 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1237 |
by the format string.
|
sl@0
|
1238 |
|
sl@0
|
1239 |
@return The trace was/was not logged.
|
sl@0
|
1240 |
|
sl@0
|
1241 |
@pre Calling thread can either be in a critical section or not.
|
sl@0
|
1242 |
@pre Interrupts must be enabled.
|
sl@0
|
1243 |
@pre Kernel must be unlocked
|
sl@0
|
1244 |
@pre Call in any context.
|
sl@0
|
1245 |
@pre Suitable for use in a device driver
|
sl@0
|
1246 |
|
sl@0
|
1247 |
@see Kern::AppendFormat()
|
sl@0
|
1248 |
@See BTrace::TMultipart
|
sl@0
|
1249 |
*/
|
sl@0
|
1250 |
static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...)
|
sl@0
|
1251 |
{
|
sl@0
|
1252 |
return EFalse;
|
sl@0
|
1253 |
}
|
sl@0
|
1254 |
|
sl@0
|
1255 |
#else //__KERNEL_MODE__
|
sl@0
|
1256 |
|
sl@0
|
1257 |
/**
|
sl@0
|
1258 |
Prints a formatted string. The trace is classified by primary filter only.
|
sl@0
|
1259 |
|
sl@0
|
1260 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1261 |
a multipart trace is generated.
|
sl@0
|
1262 |
|
sl@0
|
1263 |
@param aF1 Primary filter as classification information
|
sl@0
|
1264 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1265 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1266 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1267 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1268 |
by the format string.
|
sl@0
|
1269 |
|
sl@0
|
1270 |
@return The trace was/was not logged.
|
sl@0
|
1271 |
|
sl@0
|
1272 |
@See BTrace::TMultipart
|
sl@0
|
1273 |
*/
|
sl@0
|
1274 |
static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...)
|
sl@0
|
1275 |
{
|
sl@0
|
1276 |
return EFalse;
|
sl@0
|
1277 |
};
|
sl@0
|
1278 |
|
sl@0
|
1279 |
/**
|
sl@0
|
1280 |
Prints a formatted string. The trace is classified by primary filter only.
|
sl@0
|
1281 |
|
sl@0
|
1282 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1283 |
a multipart trace is generated.
|
sl@0
|
1284 |
|
sl@0
|
1285 |
@param aF1 Primary filter as classification information
|
sl@0
|
1286 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1287 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1288 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1289 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1290 |
by the format string.
|
sl@0
|
1291 |
|
sl@0
|
1292 |
@return The trace was/was not logged.
|
sl@0
|
1293 |
|
sl@0
|
1294 |
@See BTrace::TMultipart
|
sl@0
|
1295 |
*/
|
sl@0
|
1296 |
static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TRefByValue<const TDesC16> /*aFmt*/,...)
|
sl@0
|
1297 |
{
|
sl@0
|
1298 |
return EFalse;
|
sl@0
|
1299 |
};
|
sl@0
|
1300 |
|
sl@0
|
1301 |
|
sl@0
|
1302 |
/**
|
sl@0
|
1303 |
Prints a string. The trace is classified by primary filter only.
|
sl@0
|
1304 |
|
sl@0
|
1305 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1306 |
a multipart trace is generated.
|
sl@0
|
1307 |
|
sl@0
|
1308 |
@param aF1 Primary filter as classification information
|
sl@0
|
1309 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1310 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1311 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1312 |
|
sl@0
|
1313 |
@return The trace was/was not logged.
|
sl@0
|
1314 |
|
sl@0
|
1315 |
@See BTrace::TMultipart
|
sl@0
|
1316 |
*/
|
sl@0
|
1317 |
static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC8& /*aDes*/)
|
sl@0
|
1318 |
{
|
sl@0
|
1319 |
return EFalse;
|
sl@0
|
1320 |
};
|
sl@0
|
1321 |
|
sl@0
|
1322 |
/**
|
sl@0
|
1323 |
Prints a string. The trace is classified by primary filter only.
|
sl@0
|
1324 |
|
sl@0
|
1325 |
|
sl@0
|
1326 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1327 |
a multipart trace is generated.
|
sl@0
|
1328 |
|
sl@0
|
1329 |
@param aF1 Primary filter as classification information
|
sl@0
|
1330 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1331 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1332 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1333 |
|
sl@0
|
1334 |
@return The trace was/was not logged.
|
sl@0
|
1335 |
|
sl@0
|
1336 |
@See BTrace::TMultipart
|
sl@0
|
1337 |
*/
|
sl@0
|
1338 |
static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC16& /*aDes*/)
|
sl@0
|
1339 |
{
|
sl@0
|
1340 |
return EFalse;
|
sl@0
|
1341 |
};
|
sl@0
|
1342 |
|
sl@0
|
1343 |
|
sl@0
|
1344 |
/**
|
sl@0
|
1345 |
Prints a formatted string. The trace is classified by primary and secondary filter.
|
sl@0
|
1346 |
|
sl@0
|
1347 |
|
sl@0
|
1348 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1349 |
a multipart trace is generated.
|
sl@0
|
1350 |
|
sl@0
|
1351 |
@param aF1 Primary filter as classification information
|
sl@0
|
1352 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1353 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1354 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1355 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1356 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1357 |
by the format string.
|
sl@0
|
1358 |
|
sl@0
|
1359 |
@return The trace was/was not logged.
|
sl@0
|
1360 |
|
sl@0
|
1361 |
@See BTrace::TMultipart
|
sl@0
|
1362 |
*/
|
sl@0
|
1363 |
static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...)
|
sl@0
|
1364 |
{
|
sl@0
|
1365 |
return EFalse;
|
sl@0
|
1366 |
};
|
sl@0
|
1367 |
|
sl@0
|
1368 |
/**
|
sl@0
|
1369 |
Prints a formatted string. The trace is classified by primary and secondary filter.
|
sl@0
|
1370 |
|
sl@0
|
1371 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1372 |
a multipart trace is generated.
|
sl@0
|
1373 |
|
sl@0
|
1374 |
@param aF1 Primary filter as classification information
|
sl@0
|
1375 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1376 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1377 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1378 |
@param aFmt The format string. This must not be longer than 256 characters.
|
sl@0
|
1379 |
@param ... A variable number of arguments to be converted to text as dictated
|
sl@0
|
1380 |
by the format string.
|
sl@0
|
1381 |
|
sl@0
|
1382 |
@return The trace was/was not logged.
|
sl@0
|
1383 |
|
sl@0
|
1384 |
@See BTrace::TMultipart
|
sl@0
|
1385 |
*/
|
sl@0
|
1386 |
static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TRefByValue<const TDesC16> /*aFmt*/,...)
|
sl@0
|
1387 |
{
|
sl@0
|
1388 |
return EFalse;
|
sl@0
|
1389 |
};
|
sl@0
|
1390 |
|
sl@0
|
1391 |
|
sl@0
|
1392 |
/**
|
sl@0
|
1393 |
Prints a string. The trace is classified by primary and secondary filter.
|
sl@0
|
1394 |
|
sl@0
|
1395 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1396 |
a multipart trace is generated.
|
sl@0
|
1397 |
|
sl@0
|
1398 |
@param aF1 Primary filter as classification information
|
sl@0
|
1399 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1400 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1401 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1402 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1403 |
|
sl@0
|
1404 |
@return The trace was/was not logged.
|
sl@0
|
1405 |
|
sl@0
|
1406 |
@See BTrace::TMultipart
|
sl@0
|
1407 |
*/
|
sl@0
|
1408 |
static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC8& /*aDes*/)
|
sl@0
|
1409 |
{
|
sl@0
|
1410 |
return EFalse;
|
sl@0
|
1411 |
};
|
sl@0
|
1412 |
|
sl@0
|
1413 |
|
sl@0
|
1414 |
/**
|
sl@0
|
1415 |
Prints a string. The trace is classified by primary and secondary filter.
|
sl@0
|
1416 |
|
sl@0
|
1417 |
If the specified string is too long to fit into a single trace record
|
sl@0
|
1418 |
a multipart trace is generated.
|
sl@0
|
1419 |
|
sl@0
|
1420 |
@param aF1 Primary filter as classification information
|
sl@0
|
1421 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1422 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1423 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1424 |
@param aDes The string. This can be of variable length.
|
sl@0
|
1425 |
|
sl@0
|
1426 |
@return The trace was/was not logged.
|
sl@0
|
1427 |
|
sl@0
|
1428 |
@See BTrace::TMultipart
|
sl@0
|
1429 |
*/
|
sl@0
|
1430 |
static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC16& /*aDes*/)
|
sl@0
|
1431 |
{
|
sl@0
|
1432 |
return EFalse;
|
sl@0
|
1433 |
};
|
sl@0
|
1434 |
|
sl@0
|
1435 |
#endif //__KERNEL_MODE_
|
sl@0
|
1436 |
|
sl@0
|
1437 |
/**
|
sl@0
|
1438 |
Sends a trace with no payload. The trace is classified
|
sl@0
|
1439 |
by primary filter only.
|
sl@0
|
1440 |
|
sl@0
|
1441 |
@param aF1 Primary filter as classification information
|
sl@0
|
1442 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1443 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1444 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1445 |
|
sl@0
|
1446 |
@return The trace was/was not logged.
|
sl@0
|
1447 |
*/
|
sl@0
|
1448 |
static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/)
|
sl@0
|
1449 |
{
|
sl@0
|
1450 |
return EFalse;
|
sl@0
|
1451 |
}
|
sl@0
|
1452 |
|
sl@0
|
1453 |
|
sl@0
|
1454 |
/**
|
sl@0
|
1455 |
Sends a trace with 4 bytes of data. The trace is classified
|
sl@0
|
1456 |
by primary filter only.
|
sl@0
|
1457 |
|
sl@0
|
1458 |
@param aF1 Primary filter as classification information
|
sl@0
|
1459 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1460 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1461 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1462 |
@param aData1 4 bytes of data
|
sl@0
|
1463 |
|
sl@0
|
1464 |
@return The trace was/was not logged.
|
sl@0
|
1465 |
*/
|
sl@0
|
1466 |
static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/)
|
sl@0
|
1467 |
|
sl@0
|
1468 |
{
|
sl@0
|
1469 |
return EFalse;
|
sl@0
|
1470 |
}
|
sl@0
|
1471 |
|
sl@0
|
1472 |
/**
|
sl@0
|
1473 |
Sends a trace with 8 bytes of data. The trace is classified
|
sl@0
|
1474 |
by primary filter only.
|
sl@0
|
1475 |
|
sl@0
|
1476 |
@param aF1 Primary filter as classification information
|
sl@0
|
1477 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1478 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1479 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1480 |
@param aData1 4 bytes of data
|
sl@0
|
1481 |
@param aData2 4 bytes of data
|
sl@0
|
1482 |
|
sl@0
|
1483 |
@return The trace was/was not logged.
|
sl@0
|
1484 |
*/
|
sl@0
|
1485 |
static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/)
|
sl@0
|
1486 |
{
|
sl@0
|
1487 |
return EFalse;
|
sl@0
|
1488 |
}
|
sl@0
|
1489 |
|
sl@0
|
1490 |
|
sl@0
|
1491 |
/**
|
sl@0
|
1492 |
Sends a trace with 12 bytes of data. The trace is classified
|
sl@0
|
1493 |
by primary filter only.
|
sl@0
|
1494 |
|
sl@0
|
1495 |
@param aF1 Primary filter as classification information
|
sl@0
|
1496 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1497 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1498 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1499 |
@param aData1 4 bytes of data
|
sl@0
|
1500 |
@param aData2 4 bytes of data
|
sl@0
|
1501 |
@param aData3 4 bytes of data
|
sl@0
|
1502 |
|
sl@0
|
1503 |
@return The trace was/was not logged.
|
sl@0
|
1504 |
*/
|
sl@0
|
1505 |
static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/, TUint /*aData3*/)
|
sl@0
|
1506 |
{
|
sl@0
|
1507 |
return EFalse;
|
sl@0
|
1508 |
}
|
sl@0
|
1509 |
|
sl@0
|
1510 |
|
sl@0
|
1511 |
/**
|
sl@0
|
1512 |
Sends a trace with variable length data. The trace is classified
|
sl@0
|
1513 |
by primary filter only.
|
sl@0
|
1514 |
|
sl@0
|
1515 |
If the specified data is too big to fit into a single
|
sl@0
|
1516 |
trace record a multipart trace is generated.
|
sl@0
|
1517 |
|
sl@0
|
1518 |
@param aF1 Primary filter as classification information
|
sl@0
|
1519 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1520 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1521 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1522 |
@param aData Address of addition data to add to trace.
|
sl@0
|
1523 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
1524 |
@param aSize Number of bytes of additional data.
|
sl@0
|
1525 |
|
sl@0
|
1526 |
@return The trace was/was not logged.
|
sl@0
|
1527 |
|
sl@0
|
1528 |
@See BTrace::TMultipart
|
sl@0
|
1529 |
*/
|
sl@0
|
1530 |
static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TAny* /*aData*/, TInt /*aSize*/)
|
sl@0
|
1531 |
{
|
sl@0
|
1532 |
return EFalse;
|
sl@0
|
1533 |
}
|
sl@0
|
1534 |
|
sl@0
|
1535 |
|
sl@0
|
1536 |
/**
|
sl@0
|
1537 |
Sends a trace with no payload. The trace is classified
|
sl@0
|
1538 |
by primary and secondary filter.
|
sl@0
|
1539 |
|
sl@0
|
1540 |
@param aF1 Primary filter as classification information
|
sl@0
|
1541 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1542 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1543 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1544 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1545 |
|
sl@0
|
1546 |
@return The trace was/was not logged.
|
sl@0
|
1547 |
*/
|
sl@0
|
1548 |
static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/)
|
sl@0
|
1549 |
{
|
sl@0
|
1550 |
return EFalse;
|
sl@0
|
1551 |
}
|
sl@0
|
1552 |
|
sl@0
|
1553 |
|
sl@0
|
1554 |
/**
|
sl@0
|
1555 |
Sends a trace with 4 bytes of data. The trace is classified
|
sl@0
|
1556 |
by primary and secondary filter.
|
sl@0
|
1557 |
|
sl@0
|
1558 |
@param aF1 Primary filter as classification information
|
sl@0
|
1559 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1560 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1561 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1562 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1563 |
@param aData1 4 bytes of data
|
sl@0
|
1564 |
|
sl@0
|
1565 |
@return The trace was/was not logged.
|
sl@0
|
1566 |
*/
|
sl@0
|
1567 |
static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/)
|
sl@0
|
1568 |
{
|
sl@0
|
1569 |
return EFalse;
|
sl@0
|
1570 |
}
|
sl@0
|
1571 |
|
sl@0
|
1572 |
|
sl@0
|
1573 |
/**
|
sl@0
|
1574 |
Sends a trace with 8 bytes of data. The trace is classified
|
sl@0
|
1575 |
by primary and secondary filter.
|
sl@0
|
1576 |
|
sl@0
|
1577 |
@param aF1 Primary filter as classification information
|
sl@0
|
1578 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1579 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1580 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1581 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1582 |
@param aData1 4 bytes of data
|
sl@0
|
1583 |
@param aData2 4 bytes of data
|
sl@0
|
1584 |
|
sl@0
|
1585 |
@return The trace was/was not logged.
|
sl@0
|
1586 |
*/
|
sl@0
|
1587 |
static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/)
|
sl@0
|
1588 |
{
|
sl@0
|
1589 |
return EFalse;
|
sl@0
|
1590 |
}
|
sl@0
|
1591 |
|
sl@0
|
1592 |
|
sl@0
|
1593 |
/**
|
sl@0
|
1594 |
Sends a trace with variable length data. The trace is classified
|
sl@0
|
1595 |
by primary and secondary filter.
|
sl@0
|
1596 |
|
sl@0
|
1597 |
If the specified data is too big to fit into a single
|
sl@0
|
1598 |
trace record a multipart trace is generated.
|
sl@0
|
1599 |
|
sl@0
|
1600 |
@param aF1 Primary filter as classification information
|
sl@0
|
1601 |
@param aF2 Secondary filter as classification information
|
sl@0
|
1602 |
@param aSchema The schema used to determine the format of the content
|
sl@0
|
1603 |
@param aIncludeContextID Include context ID in the trace
|
sl@0
|
1604 |
@param aIncludePc Include program counter in the trace
|
sl@0
|
1605 |
@param aData Address of addition data to add to trace.
|
sl@0
|
1606 |
Must be word aligned, i.e. a multiple of 4.
|
sl@0
|
1607 |
@param aSize Number of bytes of additional data.
|
sl@0
|
1608 |
|
sl@0
|
1609 |
@return The trace was/was not logged.
|
sl@0
|
1610 |
|
sl@0
|
1611 |
@See BTrace::TMultipart
|
sl@0
|
1612 |
*/
|
sl@0
|
1613 |
static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TAny* /*aData*/, TInt /*aSize*/)
|
sl@0
|
1614 |
{
|
sl@0
|
1615 |
return EFalse;
|
sl@0
|
1616 |
}
|
sl@0
|
1617 |
|
sl@0
|
1618 |
private:
|
sl@0
|
1619 |
/**
|
sl@0
|
1620 |
Default constructor. This prevents accidental empty initialisation of traces.
|
sl@0
|
1621 |
*/
|
sl@0
|
1622 |
TUTrace(){};
|
sl@0
|
1623 |
|
sl@0
|
1624 |
/**
|
sl@0
|
1625 |
@internalComponent
|
sl@0
|
1626 |
*/
|
sl@0
|
1627 |
enum TTraceInfoPresent
|
sl@0
|
1628 |
{
|
sl@0
|
1629 |
EContext = 0,
|
sl@0
|
1630 |
EPc = 1
|
sl@0
|
1631 |
};
|
sl@0
|
1632 |
|
sl@0
|
1633 |
/**
|
sl@0
|
1634 |
Dummy class to toss away overflow
|
sl@0
|
1635 |
@internalComponent
|
sl@0
|
1636 |
*/
|
sl@0
|
1637 |
#ifndef __KERNEL_MODE__
|
sl@0
|
1638 |
class TTruncateOverflow16 : public TDes16Overflow
|
sl@0
|
1639 |
{
|
sl@0
|
1640 |
public:
|
sl@0
|
1641 |
virtual void Overflow(TDes&) {};
|
sl@0
|
1642 |
};
|
sl@0
|
1643 |
/**
|
sl@0
|
1644 |
Dummy class to toss away overflow
|
sl@0
|
1645 |
@internalComponent
|
sl@0
|
1646 |
*/
|
sl@0
|
1647 |
class TTruncateOverflow8 : public TDes8Overflow
|
sl@0
|
1648 |
{
|
sl@0
|
1649 |
public:
|
sl@0
|
1650 |
virtual void Overflow(TDes8&) {};
|
sl@0
|
1651 |
};
|
sl@0
|
1652 |
#endif //__KERNEL_MODE__
|
sl@0
|
1653 |
|
sl@0
|
1654 |
/**
|
sl@0
|
1655 |
@internalComponent
|
sl@0
|
1656 |
*/
|
sl@0
|
1657 |
TBool ContextID()
|
sl@0
|
1658 |
{
|
sl@0
|
1659 |
return EFalse;
|
sl@0
|
1660 |
};
|
sl@0
|
1661 |
|
sl@0
|
1662 |
/**
|
sl@0
|
1663 |
@internalComponent
|
sl@0
|
1664 |
*/
|
sl@0
|
1665 |
TBool Pc()
|
sl@0
|
1666 |
{
|
sl@0
|
1667 |
return EFalse;
|
sl@0
|
1668 |
};
|
sl@0
|
1669 |
|
sl@0
|
1670 |
private:
|
sl@0
|
1671 |
TPrimaryFilter iF1;
|
sl@0
|
1672 |
TTraceSchema iSchema;
|
sl@0
|
1673 |
TSecondaryFilter iF2;
|
sl@0
|
1674 |
TInt8 iPresent;
|
sl@0
|
1675 |
|
sl@0
|
1676 |
TUint32 iReserved1;
|
sl@0
|
1677 |
TUint32 iReserved2;
|
sl@0
|
1678 |
};
|
sl@0
|
1679 |
|
sl@0
|
1680 |
#endif //SYMBIAN_TRACE_ENABLE
|
sl@0
|
1681 |
|
sl@0
|
1682 |
|
sl@0
|
1683 |
#endif //UTRACE_H
|