#include <XnOS.h>
Go to the source code of this file.
Defines | |
#define | _XN_PROFILING_START_SECTION(name, mt) |
#define | INVALID_PROFILING_HANDLE -1 |
#define | XN_PROFILING_END_FUNCTION XN_PROFILING_END_SECTION |
#define | XN_PROFILING_END_SECTION |
#define | XN_PROFILING_START_FUNCTION XN_PROFILING_START_SECTION(__FUNCTION__) |
#define | XN_PROFILING_START_MT_SECTION(name) _XN_PROFILING_START_SECTION(name, TRUE) |
#define | XN_PROFILING_START_SECTION(name) _XN_PROFILING_START_SECTION(name, FALSE) |
Typedefs | |
typedef XnInt32 | XnProfilingHandle |
Functions | |
XN_C_API XnStatus | xnProfilingInit (XnUInt32 nProfilingInterval=0) |
XN_C_API XnStatus | xnProfilingInitFromINI (const XnChar *cpINIFileName, const XnChar *cpSectionName) |
XN_C_API XnBool | xnProfilingIsActive () |
XN_C_API XnStatus | xnProfilingSectionEnd (XnProfilingHandle *pHandle) |
XN_C_API XnStatus | xnProfilingSectionStart (const char *csSectionName, XnBool bMT, XnProfilingHandle *pHandle) |
XN_C_API XnStatus | xnProfilingShutdown () |
#define _XN_PROFILING_START_SECTION | ( | name, | |
mt | |||
) |
{ \ static XnProfilingHandle __profiling = INVALID_PROFILING_HANDLE; \ if (xnProfilingIsActive()) \ { \ xnProfilingSectionStart(name, mt, &__profiling); \ }
Starts a profiled section. The code section between this declaration and the following XN_PROFILING_END_SECTION declaration will be time-measured.
name | [in] The name of the section (for printing purposes). |
mt | [in] TRUE if this section is multi-threaded, FALSE otherwise. |
Definition at line 100 of file XnProfiling.h.
#define INVALID_PROFILING_HANDLE -1 |
Definition at line 37 of file XnProfiling.h.
Ends a profiled function.
Definition at line 133 of file XnProfiling.h.
#define XN_PROFILING_END_SECTION |
if (__profiling != INVALID_PROFILING_HANDLE) \ { \ xnProfilingSectionEnd(&__profiling); \ } \ }
Ends a profiled section.
Definition at line 114 of file XnProfiling.h.
#define XN_PROFILING_START_FUNCTION XN_PROFILING_START_SECTION(__FUNCTION__) |
Starts a profiled section, giving it the name of the current function. The code section between this declaration and the following XN_PROFILING_END_FUNCTION declaration will be time-measured.
name | [in] The name of the section (for printing purposes). |
Definition at line 128 of file XnProfiling.h.
#define XN_PROFILING_START_MT_SECTION | ( | name | ) | _XN_PROFILING_START_SECTION(name, TRUE) |
Definition at line 109 of file XnProfiling.h.
#define XN_PROFILING_START_SECTION | ( | name | ) | _XN_PROFILING_START_SECTION(name, FALSE) |
Definition at line 108 of file XnProfiling.h.
typedef XnInt32 XnProfilingHandle |
Definition at line 42 of file XnProfiling.h.
XN_C_API XnStatus xnProfilingInit | ( | XnUInt32 | nProfilingInterval = 0 | ) |
Initializes profiling.
nProfilingInterval | [in] The number of milliseconds between profiler printings. A value of zero means profiling is off. |
XN_C_API XnStatus xnProfilingInitFromINI | ( | const XnChar * | cpINIFileName, |
const XnChar * | cpSectionName | ||
) |
Initializes using INI file.
cpINIFileName | [in] Name of INI file. |
cpSectionName | [in] Name of section in INI file. |
Returns TRUE if profiling is active, or FALSE otherwise.
XN_C_API XnStatus xnProfilingSectionEnd | ( | XnProfilingHandle * | pHandle | ) |
Ends a profiled section. This function is not meant to be used directly. Please use the XN_PROFILING_END_SECTION macro.
pHandle | [in] A handle returned from xnProfilingSectionStart. |
XN_C_API XnStatus xnProfilingSectionStart | ( | const char * | csSectionName, |
XnBool | bMT, | ||
XnProfilingHandle * | pHandle | ||
) |
Start a profiled section. This function is not meant to be used directly. Please use the XN_PROFILING_START_SECTION macro.
csSectionName | [in] The name of the profiled section. |
bMT | [in] TRUE if this section is multi-threaded, FALSE otherwise. |
pHandle | [out] A handle to be used each time this section executes again. |
Shuts down profiling.