Instrumentation refactoring

Use bool instead of int where it should be.
Tweak naming.
Removed unused members

Change-Id: I468be28d78e9da7c7fa1632e362ed077929fb91a
This commit is contained in:
Artur Harasimiuk
2018-01-05 13:35:03 +01:00
committed by sys_ocldev
parent dd601ff73a
commit 3883f790cc
19 changed files with 196 additions and 139 deletions

View File

@@ -70,16 +70,16 @@ bool PerformanceCountersLinux::verifyPmRegsCfg(InstrPmRegsCfg *pCfg, uint32_t *p
return false;
}
bool PerformanceCountersLinux::getPerfmonConfig(InstrPmRegsCfg *pCfg) {
unsigned int oaCfgHandle = pCfg->oaCounters.handle;
unsigned int gpCfgHandle = pCfg->gpCounters.handle;
unsigned int oaCfgHandle = pCfg->OaCounters.Handle;
unsigned int gpCfgHandle = pCfg->GpCounters.Handle;
int fd = osInterface->get()->getDrm()->getFileDescriptor();
if (perfmonLoadConfigFunc(fd, nullptr, &oaCfgHandle, &gpCfgHandle) != 0) {
return false;
}
if (pCfg->oaCounters.handle != 0 && oaCfgHandle != pCfg->oaCounters.handle) {
if (pCfg->OaCounters.Handle != 0 && oaCfgHandle != pCfg->OaCounters.Handle) {
return false;
}
if (pCfg->gpCounters.handle != 0 && gpCfgHandle != pCfg->gpCounters.handle) {
if (pCfg->GpCounters.Handle != 0 && gpCfgHandle != pCfg->GpCounters.Handle) {
return false;
}
return true;