windowing/windowserver/inc/wstraces.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-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 // Definitions of performance tracing macros
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __WS_TRACES_H__
       
    19 #define __WS_TRACES_H__
       
    20 
       
    21 #include <e32btrace.h>
       
    22 
       
    23 #ifdef USE_TRACECORE_CATEGORY
       
    24 enum TWsPerformanceTraceCategories 
       
    25 {
       
    26 	EWsPerformanceTraceProcessRawEvent = 0x10,
       
    27 	EWsPerformanceTraceQueueEvent,
       
    28 	EWsPerformanceTraceGetEvent,
       
    29 	EWsPerformanceTraceEventReady,
       
    30 
       
    31 	EWsPerformanceTraceTriggerRedraw = 0x20,
       
    32 	EWsPerformanceTraceGetRedraw,
       
    33 	EWsPerformanceTraceRedrawReady,
       
    34 	
       
    35 	EWsPerformanceTraceStartRedraw = 0x30,
       
    36 	EWsPerformanceTraceStopRedraw
       
    37 };
       
    38 #else
       
    39 enum TWsPerformanceTraceCategories 
       
    40 {
       
    41 	EWsPerformanceTraceProcessRawEvent = 130,
       
    42 	EWsPerformanceTraceQueueEvent,
       
    43 	EWsPerformanceTraceGetEvent,
       
    44 	EWsPerformanceTraceEventReady,
       
    45 
       
    46 	EWsPerformanceTraceTriggerRedraw = 140,
       
    47 	EWsPerformanceTraceGetRedraw,
       
    48 	EWsPerformanceTraceRedrawReady,
       
    49 	
       
    50 	EWsPerformanceTraceStartRedraw = 150,
       
    51 	EWsPerformanceTraceStopRedraw
       
    52 };
       
    53 #endif
       
    54 
       
    55 #ifndef USE_WS_PERFORMANCE_TRACING
       
    56 	#define WS_TRACE0(category) 
       
    57 	#define WS_TRACE_CONTEXT0(category)
       
    58 #else
       
    59 	// TraceCore BTrace Handler
       
    60 	#ifdef USE_TRACECORE_CATEGORY
       
    61 		#define WS_TRACE0(category) BTrace4(0xA0, 0, category)
       
    62 		#define WS_TRACE_CONTEXT0(category) BTraceContext4(0xA0, 0, category)
       
    63 	#else
       
    64 		#define WS_TRACE0(category) BTrace0(category, 0)
       
    65 		#define WS_TRACE_CONTEXT0(category) BTraceContext0(category, 0)
       
    66 	#endif // USE_TRACECORE_CATEGORY
       
    67 #endif // USE_WS_PERFORMANCE_TRACING
       
    68 
       
    69 #define WS_TRACE_SERVER_PROCESSRAWEVENT() WS_TRACE0(EWsPerformanceTraceProcessRawEvent)
       
    70 #define WS_TRACE_SERVER_QUEUEEVENT() WS_TRACE0(EWsPerformanceTraceQueueEvent)
       
    71 #define WS_TRACE_CLIENT_GETEVENT() WS_TRACE_CONTEXT0(EWsPerformanceTraceGetEvent)
       
    72 #define WS_TRACE_CLIENT_EVENTREADY() WS_TRACE_CONTEXT0(EWsPerformanceTraceEventReady)
       
    73 
       
    74 #define WS_TRACE_SERVER_TRIGGERREDRAW() WS_TRACE0(EWsPerformanceTraceTriggerRedraw)
       
    75 #define WS_TRACE_CLIENT_GETREDRAW() WS_TRACE_CONTEXT0(EWsPerformanceTraceGetRedraw)
       
    76 #define WS_TRACE_CLIENT_REDRAWREADY() WS_TRACE_CONTEXT0(EWsPerformanceTraceRedrawReady)
       
    77 
       
    78 #define WS_TRACE_SERVER_STARTDRAW() WS_TRACE0(EWsPerformanceTraceStartRedraw)
       
    79 #define WS_TRACE_SERVER_STOPDRAW() WS_TRACE0(EWsPerformanceTraceStopRedraw)
       
    80 
       
    81 #endif