mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Check EnableTimestampPacket debug variable once and set as CSR mode
Change-Id: Ia6e7caa96f3b46b30590fb46a1fb37fa153adeb4
This commit is contained in:
committed by
sys_ocldev
parent
a8beec98e0
commit
b74280beb6
@@ -242,7 +242,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
}
|
||||
|
||||
TimestampPacket *timestampPacket = nullptr;
|
||||
if (DebugManager.flags.EnableTimestampPacket.get()) {
|
||||
if (device->peekCommandStreamReceiver()->peekTimestampPacketWriteEnabled()) {
|
||||
obtainNewTimestampPacketNode();
|
||||
timestampPacket = timestampPacketNode->tag;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ LinearStream &getCommandStream(CommandQueue &commandQueue, bool reserveProfiling
|
||||
SchedulerKernel &scheduler = commandQueue.getDevice().getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(parentKernel->getContext());
|
||||
expectedSizeCS += EnqueueOperation<GfxFamily>::getSizeRequiredCS(eventType, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, commandQueue, &scheduler);
|
||||
}
|
||||
if (DebugManager.flags.EnableTimestampPacket.get()) {
|
||||
if (commandQueue.getDevice().peekCommandStreamReceiver()->peekTimestampPacketWriteEnabled()) {
|
||||
expectedSizeCS += 2 * sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||
}
|
||||
return commandQueue.getCS(expectedSizeCS);
|
||||
|
||||
@@ -48,6 +48,8 @@ CommandStreamReceiver::CommandStreamReceiver(ExecutionEnvironment &executionEnvi
|
||||
for (int i = 0; i < IndirectHeap::NUM_TYPES; ++i) {
|
||||
indirectHeap[i] = nullptr;
|
||||
}
|
||||
|
||||
timestampPacketWriteEnabled = DebugManager.flags.EnableTimestampPacket.get();
|
||||
}
|
||||
|
||||
CommandStreamReceiver::~CommandStreamReceiver() {
|
||||
|
||||
@@ -155,6 +155,8 @@ class CommandStreamReceiver {
|
||||
return kmdNotifyHelper.get();
|
||||
}
|
||||
|
||||
bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; }
|
||||
|
||||
size_t defaultSshSize;
|
||||
|
||||
protected:
|
||||
@@ -162,6 +164,8 @@ class CommandStreamReceiver {
|
||||
disableL3Cache = val;
|
||||
}
|
||||
|
||||
bool timestampPacketWriteEnabled = false;
|
||||
|
||||
// taskCount - # of tasks submitted
|
||||
uint32_t taskCount = 0;
|
||||
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
||||
|
||||
@@ -181,7 +181,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
|
||||
epiloguePipeControlLocation = ptrOffset(commandStreamTask.getCpuBase(), commandStreamTask.getUsed());
|
||||
|
||||
if ((dispatchFlags.outOfOrderExecutionAllowed || DebugManager.flags.EnableTimestampPacket.get()) &&
|
||||
if ((dispatchFlags.outOfOrderExecutionAllowed || timestampPacketWriteEnabled) &&
|
||||
!dispatchFlags.dcFlush) {
|
||||
currentPipeControlForNooping = epiloguePipeControlLocation;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
|
||||
// Add a PC if we have a dependency on a previous walker to avoid concurrency issues.
|
||||
if (taskLevel > this->taskLevel) {
|
||||
if (!DebugManager.flags.EnableTimestampPacket.get()) {
|
||||
if (!timestampPacketWriteEnabled) {
|
||||
addPipeControl(commandStreamCSR, false);
|
||||
}
|
||||
this->taskLevel = taskLevel;
|
||||
|
||||
Reference in New Issue
Block a user