1 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_EVENT_TRACER_H_
6 #define COMMON_EVENT_TRACER_H_
8 #include "common/platform.h"
10 #if !defined(TRACE_ENTRY)
11 # ifdef ANGLE_PLATFORM_WINDOWS
12 # define TRACE_ENTRY __stdcall
15 # endif // ANGLE_PLATFORM_WINDOWS
20 typedef const unsigned char* (*GetCategoryEnabledFlagFunc)(const char* name);
21 typedef void (*AddTraceEventFunc)(char phase, const unsigned char* categoryGroupEnabled, const char* name,
22 unsigned long long id, int numArgs, const char** argNames,
23 const unsigned char* argTypes, const unsigned long long* argValues,
26 // extern "C" so that it has a reasonable name for GetProcAddress.
27 void TRACE_ENTRY SetTraceFunctionPointers(GetCategoryEnabledFlagFunc get_category_enabled_flag,
28 AddTraceEventFunc add_trace_event_func);
35 const unsigned char* TraceGetTraceCategoryEnabledFlag(const char* name);
37 void TraceAddTraceEvent(char phase, const unsigned char* categoryGroupEnabled, const char* name, unsigned long long id,
38 int numArgs, const char** argNames, const unsigned char* argTypes,
39 const unsigned long long* argValues, unsigned char flags);
43 #endif // COMMON_EVENT_TRACER_H_