os/kernelhwsrv/kernel/eka/debug/crashMonitor/inc/scmtrace.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/debug/crashMonitor/inc/scmtrace.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,61 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// scmdatatypes.h
    1.18 +// 
    1.19 +// WARNING: This file contains some APIs which are internal and are subject
    1.20 +//          to change without notice. Such APIs should therefore not be used
    1.21 +//          outside the Kernel and Hardware Services package.
    1.22 +//
    1.23 +
    1.24 +
    1.25 +#ifndef __SCMTRACE_H_INCLUDED__
    1.26 +#define __SCMTRACE_H_INCLUDED__
    1.27 +
    1.28 +#ifdef _DEBUG	
    1.29 +	#define __SCMFUNCTIONLOGGING __PRETTY_FUNCTION__ 
    1.30 +#else
    1.31 +	#define __SCMFUNCTIONLOGGING ""
    1.32 +#endif
    1.33 +
    1.34 +// logger macro
    1.35 +#ifdef __KERNEL_MODE__
    1.36 +
    1.37 +#include <kernel/kernel.h>
    1.38 +#include <nk_trace.h>
    1.39 +
    1.40 +#define LOG_CONTEXT //__KTRACE_OPT(KALWAYS, Kern::Printf("Context --> <%s>", __SCMFUNCTIONLOGGING));
    1.41 +#define CLTRACE(s) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s));
    1.42 +#define CLTRACE1(s, p1) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1));
    1.43 +#define CLTRACE2(s, p1, p2)  __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2));
    1.44 +#define CLTRACE3(s, p1, p2, p3) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3));
    1.45 +#define CLTRACE4(s, p1, p2, p3, p4) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3, p4));
    1.46 +#define CLTRACE5(s, p1, p2, p3, p4, p5) __KTRACE_OPT(KDEBUGGER, Kern::Printf(s, p1, p2, p3, p4, p5));
    1.47 +
    1.48 +#else
    1.49 +
    1.50 +#include <e32debug.h>
    1.51 +
    1.52 +#define LOG_CONTEXT RDebug::Printf("Context --> <%s>", __SCMFUNCTIONLOGGING);
    1.53 +#define CLTRACE(s)  RDebug::Printf(s) ;
    1.54 +#define CLTRACE1(s, p1) RDebug::Printf(s, p1) ;
    1.55 +#define CLTRACE2(s, p1, p2) RDebug::Printf(s, p1, p2) ;
    1.56 +#define CLTRACE3(s, p1, p2, p3) RDebug::Printf(s, p1, p2, p3);
    1.57 +#define CLTRACE4(s, p1, p2, p3, p4) RDebug::Printf(s, p1, p2, p3, p4);
    1.58 +#define CLTRACE5(s, p1, p2, p3, p4, p5) RDebug::Printf(s, p1, p2, p3, p4, p5);
    1.59 +
    1.60 +
    1.61 +#endif
    1.62 +
    1.63 +
    1.64 +#endif /*__SCMTRACE_H_INCLUDED__*/