mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
create infrastructure for gen specific performance counters
Change-Id: I6ef471ade14ce27b6e5949726b57453a6fe69abc
This commit is contained in:
committed by
sys_ocldev
parent
d7687e32c4
commit
c9180fec65
@@ -27,6 +27,10 @@
|
||||
#include "runtime/os_interface/os_time.h"
|
||||
|
||||
namespace OCLRT {
|
||||
decltype(&instrGetPerfCountersQueryData) getPerfCountersQueryDataFactory[IGFX_MAX_CORE] = {
|
||||
nullptr,
|
||||
};
|
||||
|
||||
PerformanceCounters::PerformanceCounters(OSTime *osTime) {
|
||||
this->osTime = osTime;
|
||||
DEBUG_BREAK_IF(osTime == nullptr);
|
||||
@@ -66,6 +70,10 @@ void PerformanceCounters::shutdown() {
|
||||
void PerformanceCounters::initialize(const HardwareInfo *hwInfo) {
|
||||
useMIRPC = !(hwInfo->pWaTable->waDoNotUseMIReportPerfCount);
|
||||
gfxFamily = hwInfo->pPlatform->eRenderCoreFamily;
|
||||
|
||||
if (getPerfCountersQueryDataFactory[gfxFamily] != nullptr) {
|
||||
getPerfCountersQueryDataFunc = getPerfCountersQueryDataFactory[gfxFamily];
|
||||
}
|
||||
}
|
||||
void PerformanceCounters::enableImpl() {
|
||||
hwMetricsEnabled = hwMetricsEnableFunc(cbData, true);
|
||||
|
||||
Reference in New Issue
Block a user