SWDEV-301667 - Cleanup unused paths
- Refactor code and cleanup logic for callback saving for event records Change-Id: I5c56aa8e9c968a5bca70fb07ad1796da318e9e89
This commit is contained in:
@@ -335,7 +335,6 @@ void Command::releaseResources() {
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr uint32_t kMarkerTsCount = 1;
|
||||
// ================================================================================================
|
||||
void Command::enqueue() {
|
||||
assert(queue_ != NULL && "Cannot be enqueued");
|
||||
@@ -344,7 +343,8 @@ void Command::enqueue() {
|
||||
Agent::postEventCreate(as_cl(static_cast<Event*>(this)), type_);
|
||||
}
|
||||
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "Command (%s) enqueued: %p", getOclCommandKindString(this->type()), this);
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "Command (%s) enqueued: %p",
|
||||
getOclCommandKindString(this->type()), this);
|
||||
|
||||
// Direct dispatch logic below will submit the command immediately, but the command status
|
||||
// update will occur later after flush() with a wait
|
||||
@@ -362,21 +362,9 @@ void Command::enqueue() {
|
||||
ScopedLock sl(queue_->vdev()->execution());
|
||||
queue_->FormSubmissionBatch(this);
|
||||
|
||||
bool isMarker = (type() == CL_COMMAND_MARKER || type() == 0);
|
||||
if (isMarker) {
|
||||
if (type() == CL_COMMAND_MARKER || type() == 0) {
|
||||
// The current HSA signal tracking logic requires profiling enabled for the markers
|
||||
EnableProfiling();
|
||||
}
|
||||
|
||||
bool submitBatch = !profilingInfo().marker_ts_;
|
||||
// Flush the batch if ther marker_ts have been continuously submitted until a threashold
|
||||
// is reached. This helps recycling the commands and frees memory.
|
||||
if (queue_->GetMarkerTsCount() >= kMarkerTsCount) {
|
||||
submitBatch = true;
|
||||
queue_->ResetMarkerTsCount();
|
||||
}
|
||||
|
||||
if (isMarker && submitBatch) {
|
||||
// Update batch head for the current marker. Hence the status of all commands can be
|
||||
// updated upon the marker completion
|
||||
SetBatchHead(queue_->GetSubmittionBatch());
|
||||
@@ -394,6 +382,7 @@ void Command::enqueue() {
|
||||
queue_->append(*this);
|
||||
queue_->flush();
|
||||
}
|
||||
|
||||
if ((queue_->device().settings().waitCommand_ && (type_ != 0)) ||
|
||||
((commandWaitBits_ & 0x2) != 0)) {
|
||||
awaitCompletion();
|
||||
|
||||
Reference in New Issue
Block a user