tracesrv/tracecompiler/test/TracesInHeadersApps/singlemmp_samenames/dll/incDup/HelloTraceFnDup.h
author hgs
Fri, 08 Oct 2010 14:56:39 +0300
changeset 56 aa2539c91954
permissions -rw-r--r--
201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 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: 
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
#ifndef HELLOTRACEFNDUP_H_
hgs
parents:
diff changeset
    20
#define HELLOTRACEFNDUP_H_
hgs
parents:
diff changeset
    21
#include "OstTraceDefinitions.h"
hgs
parents:
diff changeset
    22
#ifdef OST_TRACE_COMPILER_IN_USE
hgs
parents:
diff changeset
    23
#include "HelloTraceFnDupTraces.h"
hgs
parents:
diff changeset
    24
#endif
hgs
parents:
diff changeset
    25
hgs
parents:
diff changeset
    26
inline void CHelloTraceFn::SimpleDup()
hgs
parents:
diff changeset
    27
    {
hgs
parents:
diff changeset
    28
    OstTraceFunctionEntry1( CHELLOTRACEFN_SIMPLE_DUP_ENTRY, this );
hgs
parents:
diff changeset
    29
    // ...
hgs
parents:
diff changeset
    30
    OstTraceFunctionExit1( CHELLOTRACEFN_SIMPLE_DUP_EXIT, this );
hgs
parents:
diff changeset
    31
    }
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
inline void CHelloTraceFn::OutputsParamsDup(TInt aParam, TFnEnum aEnumParam)
hgs
parents:
diff changeset
    34
    {
hgs
parents:
diff changeset
    35
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_ENTRY, this );
hgs
parents:
diff changeset
    36
    Simple();
hgs
parents:
diff changeset
    37
    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSPARAMS_DUP_EXIT, this );
hgs
parents:
diff changeset
    38
    }
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
inline void CHelloTraceFn::StaticOutputsParamsDupL(TInt aParam)
hgs
parents:
diff changeset
    41
    {
hgs
parents:
diff changeset
    42
    OstTraceFunctionEntryExt( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_ENTRY, NULL );
hgs
parents:
diff changeset
    43
    CHelloTraceFn* example = CHelloTraceFn::NewLC();
hgs
parents:
diff changeset
    44
    example->SimpleDup();    
hgs
parents:
diff changeset
    45
    CleanupStack::PopAndDestroy(example);
hgs
parents:
diff changeset
    46
    OstTraceFunctionExit0( CHELLOTRACEFN_STATICOUTPUTSPARAMS_DUP_EXIT );    
hgs
parents:
diff changeset
    47
    }
hgs
parents:
diff changeset
    48
hgs
parents:
diff changeset
    49
inline void CHelloTraceFn::OutputsSignedIntegersDup(TInt8 aParam8,   TInt16 aParam16, 
hgs
parents:
diff changeset
    50
                                          TInt32 aParam32, TInt64 aParam64)
hgs
parents:
diff changeset
    51
    {
hgs
parents:
diff changeset
    52
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_ENTRY, this );
hgs
parents:
diff changeset
    53
    // ...
hgs
parents:
diff changeset
    54
    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSSIGNEDINTEGERS_DUP_EXIT, this );
hgs
parents:
diff changeset
    55
    }
hgs
parents:
diff changeset
    56
hgs
parents:
diff changeset
    57
void CHelloTraceFn::OutputsUnsignedIntegersDup(TUint8 aParam8,   TUint16 aParam16, 
hgs
parents:
diff changeset
    58
                                            TUint32 aParam32, TUint64 aParam64)
hgs
parents:
diff changeset
    59
    {
hgs
parents:
diff changeset
    60
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_ENTRY, this );
hgs
parents:
diff changeset
    61
    // ...
hgs
parents:
diff changeset
    62
    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTSUNSIGNEDINTEGERS_DUP_EXIT, this );
hgs
parents:
diff changeset
    63
    }
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
hgs
parents:
diff changeset
    66
inline TInt CHelloTraceFn::OutputsTIntReturnValueDup()
hgs
parents:
diff changeset
    67
    {
hgs
parents:
diff changeset
    68
    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_ENTRY, this );
hgs
parents:
diff changeset
    69
    TInt ret = KErrNone;
hgs
parents:
diff changeset
    70
    // ...
hgs
parents:
diff changeset
    71
    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINTRETURNVALUE_DUP_EXIT, this, ret );
hgs
parents:
diff changeset
    72
    return ret;
hgs
parents:
diff changeset
    73
    }
hgs
parents:
diff changeset
    74
hgs
parents:
diff changeset
    75
inline TInt64 CHelloTraceFn::OutputsTInt64ReturnValueDup()
hgs
parents:
diff changeset
    76
    {
hgs
parents:
diff changeset
    77
    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_ENTRY, this );
hgs
parents:
diff changeset
    78
    TInt64 ret = (TInt64) 2 << 40;
hgs
parents:
diff changeset
    79
    // ...
hgs
parents:
diff changeset
    80
    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTINT64RETURNVALUE_DUP_EXIT, this, ret );
hgs
parents:
diff changeset
    81
    return ret;
hgs
parents:
diff changeset
    82
    }
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
inline CHelloTraceFn::TFnEnum CHelloTraceFn::OutputsTFnEnumReturnValueDup()
hgs
parents:
diff changeset
    85
    {
hgs
parents:
diff changeset
    86
    OstTraceFunctionEntry1( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_ENTRY, this );
hgs
parents:
diff changeset
    87
    TFnEnum ret = EExample1;
hgs
parents:
diff changeset
    88
    // ...
hgs
parents:
diff changeset
    89
    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSTFNENUMRETURNVALUE_DUP_EXIT, this, ret );
hgs
parents:
diff changeset
    90
    return ret;    
hgs
parents:
diff changeset
    91
    }
hgs
parents:
diff changeset
    92
hgs
parents:
diff changeset
    93
inline CActive* CHelloTraceFn::OutputsUnknownPtrTypeDup(CActive* aActive)
hgs
parents:
diff changeset
    94
    {
hgs
parents:
diff changeset
    95
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_ENTRY, this );    
hgs
parents:
diff changeset
    96
    // ...
hgs
parents:
diff changeset
    97
    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNPTRTYPE_DUP_EXIT, this, (TUint) aActive );
hgs
parents:
diff changeset
    98
    return aActive;
hgs
parents:
diff changeset
    99
    }
hgs
parents:
diff changeset
   100
hgs
parents:
diff changeset
   101
inline CActive& CHelloTraceFn::OutputsUnknownRefTypeDup(CActive& aActive)
hgs
parents:
diff changeset
   102
    {
hgs
parents:
diff changeset
   103
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_ENTRY, this );
hgs
parents:
diff changeset
   104
    // ...
hgs
parents:
diff changeset
   105
    OstTraceFunctionExitExt( CHELLOTRACEFN_OUTPUTSUNKNOWNREFTYPE_DUP_EXIT, this, (TUint) &aActive );    
hgs
parents:
diff changeset
   106
    return aActive;
hgs
parents:
diff changeset
   107
    }
hgs
parents:
diff changeset
   108
hgs
parents:
diff changeset
   109
// The following doesn't compile as the Trace Compiler doesn't generate
hgs
parents:
diff changeset
   110
// the correct OstTraceGenExt(...) function for it
hgs
parents:
diff changeset
   111
//void CHelloTraceFn::OutputMissingParamsBug(TInt /*aCommentParam*/, TInt)
hgs
parents:
diff changeset
   112
//    {
hgs
parents:
diff changeset
   113
//    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_ENTRY, this );
hgs
parents:
diff changeset
   114
//    // ...
hgs
parents:
diff changeset
   115
//    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMSBUG_EXIT, this );    
hgs
parents:
diff changeset
   116
//    }
hgs
parents:
diff changeset
   117
hgs
parents:
diff changeset
   118
// The following compiles and works but outputs the following warning
hgs
parents:
diff changeset
   119
// warning: HelloTraceFn.cpp, line xxx: Parameter did not have a name and was not added to trace
hgs
parents:
diff changeset
   120
// The fact that this cannot be suppressed is a known problem we're working on.
hgs
parents:
diff changeset
   121
inline void CHelloTraceFn::OutputMissingParamsDup(TInt aUsedParam, TInt /*aCommentParam*/, TInt)
hgs
parents:
diff changeset
   122
    {
hgs
parents:
diff changeset
   123
    OstTraceFunctionEntryExt( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_ENTRY, this );
hgs
parents:
diff changeset
   124
    // ...
hgs
parents:
diff changeset
   125
    OstTraceFunctionExit1( CHELLOTRACEFN_OUTPUTMISSINGPARAMS_DUP_EXIT, this );
hgs
parents:
diff changeset
   126
    }
hgs
parents:
diff changeset
   127
hgs
parents:
diff changeset
   128
// The following doesn't work as the Trace Compiler outputs:
hgs
parents:
diff changeset
   129
// error: HelloTraceFn.cpp, line xxx: Class / function name for trace could not be determined x3
hgs
parents:
diff changeset
   130
//#ifdef _DEBUG
hgs
parents:
diff changeset
   131
//void CHelloTraceFn::PreProcessedFn(TInt aDbgParam)
hgs
parents:
diff changeset
   132
//    {
hgs
parents:
diff changeset
   133
//    OstTraceFunctionEntryExt( PRE_PROCESSED_ENTRTY_1, this );
hgs
parents:
diff changeset
   134
//#else
hgs
parents:
diff changeset
   135
//void CHelloTraceFn::PreProcessedFn()
hgs
parents:
diff changeset
   136
//    {
hgs
parents:
diff changeset
   137
//    OstTraceFunctionEntry1( PRE_PROCESSED_ENTRTY_2, this );
hgs
parents:
diff changeset
   138
//#endif
hgs
parents:
diff changeset
   139
//    Simple();
hgs
parents:
diff changeset
   140
//    OstTraceFunctionExit1( CHELLOTRACEFN_PREPROCESSEDFN_EXIT, this );
hgs
parents:
diff changeset
   141
//    }
hgs
parents:
diff changeset
   142
hgs
parents:
diff changeset
   143
// Workaround example code until a proper fix is provided
hgs
parents:
diff changeset
   144
#ifdef _DEBUG
hgs
parents:
diff changeset
   145
inline void CHelloTraceFn::PreProcessedFnDup(TInt aDbgParam)
hgs
parents:
diff changeset
   146
    {
hgs
parents:
diff changeset
   147
    OstTraceExt2( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_1, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;aDbgParam=%d;this=%x", (TInt) aDbgParam, (TUint) this);
hgs
parents:
diff changeset
   148
#else
hgs
parents:
diff changeset
   149
    inline void CHelloTraceFn::PreProcessedFnDup()
hgs
parents:
diff changeset
   150
    {
hgs
parents:
diff changeset
   151
    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_ENTRY_2, "CHelloTraceFn::PreProcessedFn: > CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
hgs
parents:
diff changeset
   152
#endif
hgs
parents:
diff changeset
   153
    SimpleDup();
hgs
parents:
diff changeset
   154
    OstTrace1( TRACE_FLOW, CHELLOTRACEFN_PREPROCESSEDFN_DUP_EXIT, "CHelloTraceFn::PreProcessedFn: < CHelloTraceFn::PreProcessedFn;this=%x", (TUint) this);
hgs
parents:
diff changeset
   155
    }
hgs
parents:
diff changeset
   156
hgs
parents:
diff changeset
   157
#endif /* HELLOTRACEFNDUP_H_ */