Reduce tag pool size to 1 for AUBs

Change-Id: I3a3513250b10e899795e149bff2739193a725f84
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2018-11-15 14:47:52 +01:00
committed by sys_ocldev
parent 96d07db545
commit d6870a896b
17 changed files with 110 additions and 85 deletions

View File

@@ -123,18 +123,18 @@ Event::~Event() {
}
if (cmdQueue != nullptr) {
if (timeStampNode != nullptr) {
TagAllocator<HwTimeStamps> *allocator = cmdQueue->getDevice().getMemoryManager()->peekEventTsAllocator();
allocator->returnTag(timeStampNode);
}
if (perfCounterNode != nullptr) {
TagAllocator<HwPerfCounter> *allocator = cmdQueue->getDevice().getMemoryManager()->peekEventPerfCountAllocator();
allocator->returnTag(perfCounterNode);
}
cmdQueue->decRefInternal();
}
if (ctx != nullptr) {
if (timeStampNode != nullptr) {
TagAllocator<HwTimeStamps> *allocator = ctx->getDevice(0)->getMemoryManager()->getEventTsAllocator();
allocator->returnTag(timeStampNode);
}
if (perfCounterNode != nullptr) {
TagAllocator<HwPerfCounter> *allocator = ctx->getDevice(0)->getMemoryManager()->getEventPerfCountAllocator();
allocator->returnTag(perfCounterNode);
}
ctx->decRefInternal();
}
if (perfConfigurationData) {
@@ -205,7 +205,7 @@ cl_int Event::getEventProfilingInfo(cl_profiling_info paramName,
if (!cmdQueue->getPerfCounters()->processEventReport(paramValueSize,
paramValue,
paramValueSizeRet,
getHwPerfCounter(),
getHwPerfCounterNode()->tag,
perfConfigurationData,
updateStatusAndCheckCompletion())) {
return CL_PROFILING_INFO_NOT_AVAILABLE;
@@ -667,46 +667,24 @@ void Event::setEndTimeStamp() {
}
}
HwTimeStamps *Event::getHwTimeStamp() {
TagNode<HwTimeStamps> *node = nullptr;
TagNode<HwTimeStamps> *Event::getHwTimeStampNode() {
if (!timeStampNode) {
TagAllocator<HwTimeStamps> *allocator = getCommandQueue()->getDevice().getMemoryManager()->getEventTsAllocator();
timeStampNode = allocator->getTag();
auto &device = getCommandQueue()->getDevice();
auto preferredPoolSize = device.getCommandStreamReceiver().getPreferredTagPoolSize();
timeStampNode = device.getMemoryManager()->obtainEventTsAllocator(preferredPoolSize)->getTag();
}
node = timeStampNode;
return node->tag;
return timeStampNode;
}
GraphicsAllocation *Event::getHwTimeStampAllocation() {
GraphicsAllocation *gfxalloc = nullptr;
if (!timeStampNode) {
TagAllocator<HwTimeStamps> *allocator = getCommandQueue()->getDevice().getMemoryManager()->getEventTsAllocator();
timeStampNode = allocator->getTag();
}
gfxalloc = timeStampNode->getGraphicsAllocation();
return gfxalloc;
}
HwPerfCounter *Event::getHwPerfCounter() {
TagNode<HwPerfCounter> *node = nullptr;
TagNode<HwPerfCounter> *Event::getHwPerfCounterNode() {
if (!perfCounterNode) {
TagAllocator<HwPerfCounter> *allocator = getCommandQueue()->getDevice().getMemoryManager()->getEventPerfCountAllocator();
perfCounterNode = allocator->getTag();
}
node = perfCounterNode;
return node->tag;
}
auto &device = getCommandQueue()->getDevice();
auto preferredPoolSize = device.getCommandStreamReceiver().getPreferredTagPoolSize();
GraphicsAllocation *Event::getHwPerfCounterAllocation() {
GraphicsAllocation *gfxalloc = nullptr;
if (!perfCounterNode) {
TagAllocator<HwPerfCounter> *allocator = getCommandQueue()->getDevice().getMemoryManager()->getEventPerfCountAllocator();
perfCounterNode = allocator->getTag();
perfCounterNode = device.getMemoryManager()->obtainEventPerfCountAllocator(preferredPoolSize)->getTag();
}
gfxalloc = perfCounterNode->getGraphicsAllocation();
return gfxalloc;
return perfCounterNode;
}
void Event::copyPerfCounters(InstrPmRegsCfg *config) {