|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HELLOTRACEFNDUP2_H_ |
|
19 #define HELLOTRACEFNDUP2_H_ |
|
20 #include "OstTraceDefinitions.h" |
|
21 #ifdef OST_TRACE_COMPILER_IN_USE |
|
22 #include "HelloTraceFn2DupTraces.h" |
|
23 #endif |
|
24 |
|
25 inline void CHelloTraceFn::SimpleDup() |
|
26 { |
|
27 OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE2_DUP_ENTRY, this ); |
|
28 // ... |
|
29 OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE2_DUP_EXIT, this ); |
|
30 } |
|
31 |
|
32 inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam) |
|
33 { |
|
34 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_ENTRY, this ); |
|
35 Simple(); |
|
36 OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS2_DUP_EXIT, this ); |
|
37 } |
|
38 |
|
39 inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam) |
|
40 { |
|
41 OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_ENTRY, NULL ); |
|
42 CHelloTraceFn* example = CHelloTraceFn::NewLC(); |
|
43 example->SimpleDup(); |
|
44 CleanupStack::PopAndDestroy(example); |
|
45 OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS2_DUP_EXIT ); |
|
46 } |
|
47 |
|
48 inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8, TInt16 aParam16, |
|
49 TInt32 aParam32, TInt64 aParam64) |
|
50 { |
|
51 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_ENTRY, this ); |
|
52 // ... |
|
53 OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS2_DUP_EXIT, this ); |
|
54 } |
|
55 |
|
56 void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8, TUint16 aParam16, |
|
57 TUint32 aParam32, TUint64 aParam64) |
|
58 { |
|
59 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_ENTRY, this ); |
|
60 // ... |
|
61 OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS2_DUP_EXIT, this ); |
|
62 } |
|
63 |
|
64 |
|
65 inline TInt CHelloTraceFn::OutputsTIntReturnValueDup() |
|
66 { |
|
67 OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_ENTRY, this ); |
|
68 TInt ret = KErrNone; |
|
69 // ... |
|
70 OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE2_DUP_EXIT, this, ret ); |
|
71 return ret; |
|
72 } |
|
73 |
|
74 inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup() |
|
75 { |
|
76 OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_ENTRY, this ); |
|
77 TInt64 ret = (TInt64) 2 << 40; |
|
78 // ... |
|
79 OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE2_DUP_EXIT, this, ret ); |
|
80 return ret; |
|
81 } |
|
82 |
|
83 inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup() |
|
84 { |
|
85 OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_ENTRY, this ); |
|
86 TFnEnum ret = EExample1; |
|
87 // ... |
|
88 OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE2_DUP_EXIT, this, ret ); |
|
89 return ret; |
|
90 } |
|
91 |
|
92 inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive) |
|
93 { |
|
94 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_ENTRY, this ); |
|
95 // ... |
|
96 OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE2_DUP_EXIT, this, (TUint) aActive ); |
|
97 return aActive; |
|
98 } |
|
99 |
|
100 inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive) |
|
101 { |
|
102 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_ENTRY, this ); |
|
103 // ... |
|
104 OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE2_DUP_EXIT, this, (TUint) &aActive ); |
|
105 return aActive; |
|
106 } |
|
107 |
|
108 // The following doesn't compile as the Trace Compiler doesn't generate |
|
109 // the correct OstTraceGenExt(...) function for it |
|
110 //void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt) |
|
111 // { |
|
112 // OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this ); |
|
113 // // ... |
|
114 // OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this ); |
|
115 // } |
|
116 |
|
117 // The following compiles and works but outputs the following warning |
|
118 // warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace |
|
119 // The fact that this cannot be suppressed is a known problem we're working on. |
|
120 inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt) |
|
121 { |
|
122 OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_ENTRY, this ); |
|
123 // ... |
|
124 OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS2_DUP_EXIT, this ); |
|
125 } |
|
126 |
|
127 // The following doesn't work as the Trace Compiler outputs: |
|
128 // error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3 |
|
129 //#ifdef _DEBUG |
|
130 //void CHelloTraceFn::PreProcessedFn(TInt aDbgParam) |
|
131 // { |
|
132 // OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this ); |
|
133 //#else |
|
134 //void CHelloTraceFn::PreProcessedFn() |
|
135 // { |
|
136 // OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this ); |
|
137 //#endif |
|
138 // Simple(); |
|
139 // OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this ); |
|
140 // } |
|
141 |
|
142 // Workaround example code until a proper fix is provided |
|
143 #ifdef _DEBUG |
|
144 inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam) |
|
145 { |
|
146 OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this); |
|
147 #else |
|
148 inline void CHelloTraceFn::PreProcessedFnDup() |
|
149 { |
|
150 OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this); |
|
151 #endif |
|
152 SimpleDup(); |
|
153 OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN2_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this); |
|
154 } |
|
155 |
|
156 #endif /* HELLOTRACEFN2DUP_H_ */ |