Enable Linux performance counters.
Change-Id: I688d3669d1791081074626ef474ab1edbc018034
This commit is contained in:
parent
9cc493ec3e
commit
9bb625185f
|
@ -17,6 +17,8 @@
|
|||
#include "runtime/os_interface/linux/drm_neo.h"
|
||||
#include "runtime/os_interface/linux/os_interface.h"
|
||||
|
||||
#include "instrumentation.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace NEO {
|
||||
|
@ -145,7 +147,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
|
|||
hwHelper.adjustDefaultEngineType(outHwInfo);
|
||||
outHwInfo->capabilityTable.defaultEngineType = getChosenEngineType(*outHwInfo);
|
||||
|
||||
outHwInfo->capabilityTable.instrumentationEnabled = false;
|
||||
outHwInfo->capabilityTable.instrumentationEnabled &= haveInstrumentation;
|
||||
outHwInfo->capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo->capabilityTable.ftrRenderCompressedImages = false;
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
namespace NEO {
|
||||
void DeviceInstrumentationFixture::SetUp(bool instrumentation) {
|
||||
ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo);
|
||||
if (instrumentation)
|
||||
hwInfo->capabilityTable.instrumentationEnabled = true;
|
||||
hwInfo->capabilityTable.instrumentationEnabled = instrumentation;
|
||||
device = std::unique_ptr<Device>(Device::create<Device>(executionEnvironment, 0));
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -379,3 +379,17 @@ TEST_F(HwInfoConfigTestLinuxDummy, givenPointerToHwInfoWhenConfigureHwInfoCalled
|
|||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ(outHwInfo.gtSystemInfo.CsrSizeInMb * MemoryConstants::megaByte, outHwInfo.capabilityTable.requiredPreemptionSurfaceSize);
|
||||
}
|
||||
|
||||
TEST_F(HwInfoConfigTestLinuxDummy, givenInstrumentationForHardwareIsEnabledOrDisabledWhenConfiguringHwInfoThenOverrideItUsingHaveInstrumentation) {
|
||||
int ret;
|
||||
|
||||
pInHwInfo.capabilityTable.instrumentationEnabled = false;
|
||||
ret = hwConfig.configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
ASSERT_EQ(0, ret);
|
||||
EXPECT_FALSE(outHwInfo.capabilityTable.instrumentationEnabled);
|
||||
|
||||
pInHwInfo.capabilityTable.instrumentationEnabled = true;
|
||||
ret = hwConfig.configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
ASSERT_EQ(0, ret);
|
||||
EXPECT_TRUE(outHwInfo.capabilityTable.instrumentationEnabled == haveInstrumentation);
|
||||
}
|
Loading…
Reference in New Issue