mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Revert "Improve GPU breakpoint support"
This reverts commit a6d898a026.
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ca84fdd64a
commit
1494205e28
@@ -17,7 +17,6 @@
|
||||
#include "shared/source/helpers/cache_policy.h"
|
||||
#include "shared/source/helpers/flush_stamp.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/pause_on_gpu_properties.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/timestamp_packet.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
@@ -409,50 +408,48 @@ void CommandStreamReceiver::setExperimentalCmdBuffer(std::unique_ptr<Experimenta
|
||||
void *CommandStreamReceiver::asyncDebugBreakConfirmation(void *arg) {
|
||||
auto self = reinterpret_cast<CommandStreamReceiver *>(arg);
|
||||
|
||||
auto debugPauseStateValue = DebugPauseState::waitingForUserStartConfirmation;
|
||||
|
||||
do {
|
||||
auto debugPauseStateValue = DebugPauseState::waitingForUserStartConfirmation;
|
||||
if (DebugManager.flags.PauseOnGpuMode.get() != PauseOnGpuProperties::PauseMode::AfterWorkload) {
|
||||
do {
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
debugPauseStateValue = *self->debugPauseStateAddress;
|
||||
}
|
||||
|
||||
if (debugPauseStateValue == DebugPauseState::terminate) {
|
||||
return nullptr;
|
||||
}
|
||||
std::this_thread::yield();
|
||||
} while (debugPauseStateValue != DebugPauseState::waitingForUserStartConfirmation);
|
||||
std::cout << "Debug break: Press enter to start workload" << std::endl;
|
||||
self->debugConfirmationFunction();
|
||||
debugPauseStateValue = DebugPauseState::hasUserStartConfirmation;
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
*self->debugPauseStateAddress = debugPauseStateValue;
|
||||
}
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
debugPauseStateValue = *self->debugPauseStateAddress;
|
||||
}
|
||||
|
||||
if (DebugManager.flags.PauseOnGpuMode.get() != PauseOnGpuProperties::PauseMode::BeforeWorkload) {
|
||||
do {
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
debugPauseStateValue = *self->debugPauseStateAddress;
|
||||
}
|
||||
if (debugPauseStateValue == DebugPauseState::terminate) {
|
||||
return nullptr;
|
||||
}
|
||||
std::this_thread::yield();
|
||||
} while (debugPauseStateValue != DebugPauseState::waitingForUserEndConfirmation);
|
||||
|
||||
std::cout << "Debug break: Workload ended, press enter to continue" << std::endl;
|
||||
self->debugConfirmationFunction();
|
||||
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
*self->debugPauseStateAddress = DebugPauseState::hasUserEndConfirmation;
|
||||
}
|
||||
if (debugPauseStateValue == DebugPauseState::terminate) {
|
||||
return nullptr;
|
||||
}
|
||||
} while (DebugManager.flags.PauseOnEnqueue.get() == PauseOnGpuProperties::DebugFlagValues::OnEachEnqueue || DebugManager.flags.PauseOnBlitCopy.get() == PauseOnGpuProperties::DebugFlagValues::OnEachEnqueue);
|
||||
std::this_thread::yield();
|
||||
} while (debugPauseStateValue != DebugPauseState::waitingForUserStartConfirmation);
|
||||
|
||||
std::cout << "Debug break: Press enter to start workload" << std::endl;
|
||||
self->debugConfirmationFunction();
|
||||
|
||||
debugPauseStateValue = DebugPauseState::hasUserStartConfirmation;
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
*self->debugPauseStateAddress = debugPauseStateValue;
|
||||
}
|
||||
|
||||
do {
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
debugPauseStateValue = *self->debugPauseStateAddress;
|
||||
}
|
||||
if (debugPauseStateValue == DebugPauseState::terminate) {
|
||||
return nullptr;
|
||||
}
|
||||
std::this_thread::yield();
|
||||
} while (debugPauseStateValue != DebugPauseState::waitingForUserEndConfirmation);
|
||||
|
||||
std::cout << "Debug break: Workload ended, press enter to continue" << std::endl;
|
||||
self->debugConfirmationFunction();
|
||||
|
||||
{
|
||||
std::unique_lock<SpinLock> lock{self->debugPauseStateLock};
|
||||
*self->debugPauseStateAddress = DebugPauseState::hasUserEndConfirmation;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user