os/graphics/windowing/windowserver/inc/wstraces.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/inc/wstraces.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,81 @@
     1.4 +// Copyright (c) 2007-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 "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 +// Definitions of performance tracing macros
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __WS_TRACES_H__
    1.22 +#define __WS_TRACES_H__
    1.23 +
    1.24 +#include <e32btrace.h>
    1.25 +
    1.26 +#ifdef USE_TRACECORE_CATEGORY
    1.27 +enum TWsPerformanceTraceCategories 
    1.28 +{
    1.29 +	EWsPerformanceTraceProcessRawEvent = 0x10,
    1.30 +	EWsPerformanceTraceQueueEvent,
    1.31 +	EWsPerformanceTraceGetEvent,
    1.32 +	EWsPerformanceTraceEventReady,
    1.33 +
    1.34 +	EWsPerformanceTraceTriggerRedraw = 0x20,
    1.35 +	EWsPerformanceTraceGetRedraw,
    1.36 +	EWsPerformanceTraceRedrawReady,
    1.37 +	
    1.38 +	EWsPerformanceTraceStartRedraw = 0x30,
    1.39 +	EWsPerformanceTraceStopRedraw
    1.40 +};
    1.41 +#else
    1.42 +enum TWsPerformanceTraceCategories 
    1.43 +{
    1.44 +	EWsPerformanceTraceProcessRawEvent = 130,
    1.45 +	EWsPerformanceTraceQueueEvent,
    1.46 +	EWsPerformanceTraceGetEvent,
    1.47 +	EWsPerformanceTraceEventReady,
    1.48 +
    1.49 +	EWsPerformanceTraceTriggerRedraw = 140,
    1.50 +	EWsPerformanceTraceGetRedraw,
    1.51 +	EWsPerformanceTraceRedrawReady,
    1.52 +	
    1.53 +	EWsPerformanceTraceStartRedraw = 150,
    1.54 +	EWsPerformanceTraceStopRedraw
    1.55 +};
    1.56 +#endif
    1.57 +
    1.58 +#ifndef USE_WS_PERFORMANCE_TRACING
    1.59 +	#define WS_TRACE0(category) 
    1.60 +	#define WS_TRACE_CONTEXT0(category)
    1.61 +#else
    1.62 +	// TraceCore BTrace Handler
    1.63 +	#ifdef USE_TRACECORE_CATEGORY
    1.64 +		#define WS_TRACE0(category) BTrace4(0xA0, 0, category)
    1.65 +		#define WS_TRACE_CONTEXT0(category) BTraceContext4(0xA0, 0, category)
    1.66 +	#else
    1.67 +		#define WS_TRACE0(category) BTrace0(category, 0)
    1.68 +		#define WS_TRACE_CONTEXT0(category) BTraceContext0(category, 0)
    1.69 +	#endif // USE_TRACECORE_CATEGORY
    1.70 +#endif // USE_WS_PERFORMANCE_TRACING
    1.71 +
    1.72 +#define WS_TRACE_SERVER_PROCESSRAWEVENT() WS_TRACE0(EWsPerformanceTraceProcessRawEvent)
    1.73 +#define WS_TRACE_SERVER_QUEUEEVENT() WS_TRACE0(EWsPerformanceTraceQueueEvent)
    1.74 +#define WS_TRACE_CLIENT_GETEVENT() WS_TRACE_CONTEXT0(EWsPerformanceTraceGetEvent)
    1.75 +#define WS_TRACE_CLIENT_EVENTREADY() WS_TRACE_CONTEXT0(EWsPerformanceTraceEventReady)
    1.76 +
    1.77 +#define WS_TRACE_SERVER_TRIGGERREDRAW() WS_TRACE0(EWsPerformanceTraceTriggerRedraw)
    1.78 +#define WS_TRACE_CLIENT_GETREDRAW() WS_TRACE_CONTEXT0(EWsPerformanceTraceGetRedraw)
    1.79 +#define WS_TRACE_CLIENT_REDRAWREADY() WS_TRACE_CONTEXT0(EWsPerformanceTraceRedrawReady)
    1.80 +
    1.81 +#define WS_TRACE_SERVER_STARTDRAW() WS_TRACE0(EWsPerformanceTraceStartRedraw)
    1.82 +#define WS_TRACE_SERVER_STOPDRAW() WS_TRACE0(EWsPerformanceTraceStopRedraw)
    1.83 +
    1.84 +#endif