diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Profiler/IntelGPAProfiler.h |
Diffstat (limited to 'Runtime/Profiler/IntelGPAProfiler.h')
-rw-r--r-- | Runtime/Profiler/IntelGPAProfiler.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Runtime/Profiler/IntelGPAProfiler.h b/Runtime/Profiler/IntelGPAProfiler.h new file mode 100644 index 0000000..bd538d0 --- /dev/null +++ b/Runtime/Profiler/IntelGPAProfiler.h @@ -0,0 +1,25 @@ +#pragma once + +#include "Configuration/UnityConfigure.h" + +#define INTEL_GPA_PROFILER_AVAILABLE (ENABLE_PROFILER && UNITY_WIN && !UNITY_EDITOR && !WEBPLUG && !UNITY_64 && !UNITY_WINRT) + +#if INTEL_GPA_PROFILER_AVAILABLE +#include "External/IntelGPASDK/include/ittnotify.h" + +void InitializeIntelGPAProfiler(); +extern __itt_domain* g_IntelGPADomain; + +#define INTEL_GPA_INFORMATION_DATA __itt_string_handle* intelGPAData; +#define INTEL_GPA_INFORMATION_INITIALIZE() intelGPAData = __itt_string_handle_create(functionName) +#define INTEL_GPA_SAMPLE_BEGIN(info) __itt_task_begin(g_IntelGPADomain, __itt_null, __itt_null, (__itt_string_handle*) info->intelGPAData) +#define INTEL_GPA_SAMPLE_END() __itt_task_end(g_IntelGPADomain) + +#else + +#define INTEL_GPA_INFORMATION_DATA +#define INTEL_GPA_INFORMATION_INITIALIZE() +#define INTEL_GPA_SAMPLE_BEGIN(info) +#define INTEL_GPA_SAMPLE_END() + +#endif |