orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxProfiler.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- Orx-Project
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 *
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 *
21 * 3. This notice may not be removed or altered from any source
22 * distribution.
23 */
24
32
41
42
43#ifndef _orxPROFILER_H_
44#define _orxPROFILER_H_
45
46
47#include "orxInclude.h"
48
49#include "core/orxThread.h"
50
51
52/* *** Uncomment the line below to enable orx profiling in non debug builds *** */
53//#define __orxPROFILER__
54
55
58#ifdef __orxPROFILER__
59
60 #define orxPROFILER_PUSH_MARKER(NAME) \
61 do \
62 { \
63 static orxS32 s32ProfilerID = orxPROFILER_KS32_MARKER_ID_NONE; \
64 \
65 if(orxProfiler_IsMarkerIDValid(s32ProfilerID) == orxFALSE) \
66 { \
67 s32ProfilerID = orxProfiler_GetIDFromName(NAME); \
68 } \
69 \
70 orxProfiler_PushMarker(s32ProfilerID); \
71 } while(orxFALSE)
72
73
74 #define orxPROFILER_POP_MARKER() \
75 do \
76 { \
77 orxProfiler_PopMarker(); \
78 } while(orxFALSE)
79
80 #define orxPROFILER_KU32_HISTORY_LENGTH (3 * 60)
81
82#else /* __orxPROFILER__ */
83
84 #define orxPROFILER_PUSH_MARKER(NAME)
85
86 #define orxPROFILER_POP_MARKER()
87
88 #define orxPROFILER_KU32_HISTORY_LENGTH 2
89
90#endif /* __orxPROFILER__ */
91
92
95#define orxPROFILER_KS32_MARKER_ID_NONE -1
96
97
99extern orxDLLAPI void orxFASTCALL orxProfiler_Setup();
100
105
107extern orxDLLAPI void orxFASTCALL orxProfiler_Exit();
108
109
114extern orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetIDFromName(const orxSTRING _zName);
115
120extern orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsMarkerIDValid(orxS32 _s32MarkerID);
121
122
126extern orxDLLAPI void orxFASTCALL orxProfiler_PushMarker(orxS32 _s32MarkerID);
127
130extern orxDLLAPI void orxFASTCALL orxProfiler_PopMarker();
131
135extern orxDLLAPI void orxFASTCALL orxProfiler_EnableMarkerOperations(orxBOOL _bEnable);
136
141
145extern orxDLLAPI void orxFASTCALL orxProfiler_Pause(orxBOOL _bPause);
146
150extern orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsPaused();
151
152
155extern orxDLLAPI void orxFASTCALL orxProfiler_ResetAllMarkers();
156
159extern orxDLLAPI void orxFASTCALL orxProfiler_ResetAllMaxima();
160
164extern orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetResetTime();
165
169extern orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMaxResetTime();
170
171
175extern orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetMarkerCount();
176
177
182extern orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetNextMarkerID(orxS32 _s32MarkerID);
183
188extern orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetNextSortedMarkerID(orxS32 _s32MarkerID);
189
190
196extern orxDLLAPI orxSTATUS orxFASTCALL orxProfiler_SelectQueryFrame(orxU32 _u32QueryFrame, orxU32 _u32ThreadID);
197
198
203extern orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMarkerTime(orxS32 _s32MarkerID);
204
209extern orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMarkerMaxTime(orxS32 _s32MarkerID);
210
215extern orxDLLAPI const orxSTRING orxFASTCALL orxProfiler_GetMarkerName(orxS32 _s32MarkerID);
216
221extern orxDLLAPI orxU32 orxFASTCALL orxProfiler_GetMarkerPushCount(orxS32 _s32MarkerID);
222
223
228extern orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsUniqueMarker(orxS32 _s32MarkerID);
229
230
235extern orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetUniqueMarkerStartTime(orxS32 _s32MarkerID);
236
241extern orxDLLAPI orxU32 orxFASTCALL orxProfiler_GetUniqueMarkerDepth(orxS32 _s32MarkerID);
242
243
244#endif /* _orxPROFILER_H_ */
245
#define orxDLLAPI
Definition orxDecl.h:381
orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMarkerTime(orxS32 _s32MarkerID)
orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsUniqueMarker(orxS32 _s32MarkerID)
orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetResetTime()
orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsMarkerIDValid(orxS32 _s32MarkerID)
orxDLLAPI orxU32 orxFASTCALL orxProfiler_GetUniqueMarkerDepth(orxS32 _s32MarkerID)
orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetNextSortedMarkerID(orxS32 _s32MarkerID)
orxDLLAPI void orxFASTCALL orxProfiler_ResetAllMarkers()
orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMarkerMaxTime(orxS32 _s32MarkerID)
orxDLLAPI orxU32 orxFASTCALL orxProfiler_GetMarkerPushCount(orxS32 _s32MarkerID)
orxDLLAPI void orxFASTCALL orxProfiler_EnableMarkerOperations(orxBOOL _bEnable)
orxDLLAPI const orxSTRING orxFASTCALL orxProfiler_GetMarkerName(orxS32 _s32MarkerID)
orxDLLAPI void orxFASTCALL orxProfiler_Setup()
orxDLLAPI void orxFASTCALL orxProfiler_ResetAllMaxima()
orxDLLAPI void orxFASTCALL orxProfiler_PushMarker(orxS32 _s32MarkerID)
orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetUniqueMarkerStartTime(orxS32 _s32MarkerID)
orxDLLAPI void orxFASTCALL orxProfiler_Pause(orxBOOL _bPause)
orxDLLAPI void orxFASTCALL orxProfiler_PopMarker()
orxDLLAPI void orxFASTCALL orxProfiler_Exit()
orxDLLAPI orxSTATUS orxFASTCALL orxProfiler_Init()
orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetNextMarkerID(orxS32 _s32MarkerID)
orxDLLAPI orxSTATUS orxFASTCALL orxProfiler_SelectQueryFrame(orxU32 _u32QueryFrame, orxU32 _u32ThreadID)
orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetIDFromName(const orxSTRING _zName)
orxDLLAPI orxS32 orxFASTCALL orxProfiler_GetMarkerCount()
orxDLLAPI orxDOUBLE orxFASTCALL orxProfiler_GetMaxResetTime()
orxDLLAPI orxBOOL orxFASTCALL orxProfiler_IsPaused()
orxDLLAPI orxBOOL orxFASTCALL orxProfiler_AreMarkerOperationsEnabled()
orxSTATUS
Definition orxType.h:270

Generated for orx by doxygen 1.8.11