persistentstorage/sqlite3api/OsLayer/UTraceSqlite.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 0 08ec8eefde2f
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <e32std.h>
       
    17 
       
    18 //The file is used only to compile and include in the image only a single
       
    19 //copy of the trace strings.
       
    20 #define __SQLITETRACE_STRINGS__
       
    21 #include "UTraceSqlite.h"
       
    22 
       
    23 #ifdef SYMBIAN_TRACE_SQLITE_FUNC
       
    24 
       
    25 /**
       
    26 Create the TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function entry
       
    27 
       
    28 @param aFunctionStr 	A "const char" pointer describing the function to be profiled.
       
    29 						Currently this is the type signature of the function returned by 
       
    30 						the __PRETTY_FUNCTION__ macro.
       
    31 @param aObj  			A object pointer used to provide context for the function.
       
    32 
       
    33 @internalComponent
       
    34 */
       
    35 TSqlUTraceProfiler::TSqlUTraceProfiler(const TAny* aObj, const char* aFunctionStr):
       
    36 iObj(aObj), iFunctionStr(reinterpret_cast<const TUint8*>(aFunctionStr))
       
    37 	{
       
    38 	UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerBegin, &iFunctionStr, iObj);
       
    39 	}
       
    40 
       
    41 /**
       
    42 Destroys TSqlUTraceProfiler object which inserts a UTF trace, used to signal a function exit
       
    43 
       
    44 @internalComponent
       
    45 */
       
    46 TSqlUTraceProfiler::~TSqlUTraceProfiler()
       
    47 	{
       
    48 	UTF::Printf(UTF::TTraceContext(UTF::ESystemCharacteristicMetrics), KProfilerEnd, &iFunctionStr, iObj);
       
    49 	}
       
    50 
       
    51 #endif //SYMBIAN_TRACE_SQLITE_FUNC