Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conformance_tests/tools/debug/src/test_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ void zetDebugThreadControlTest::SetUpThreadControl(ze_device_handle_t &device,

LOG_INFO << "[Debugger] Interrupting all threads";
// give time to app to launch the kernel
std::this_thread::sleep_for(std::chrono::seconds(60));
std::this_thread::sleep_for(std::chrono::seconds(6));

lzt::debug_interrupt(debugSession, thread);
stopped_threads = {};
Expand Down
13 changes: 12 additions & 1 deletion conformance_tests/tools/debug/src/test_debug_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ bool check_events_unordered(const zet_debug_session_handle_t &debug_session,
return true;
}

std::string to_string(ze_device_thread_t &thread) {

std::stringstream ss;
ss << "{SLICE: " << thread.slice << " SUBSLICE: " << thread.subslice
<< " EU: " << thread.eu << " THREAD: " << thread.thread << "}";
return ss.str();
}

void attach_and_get_module_event(uint32_t pid, process_synchro *synchro,
ze_device_handle_t device,
zet_debug_session_handle_t &debug_session,
Expand Down Expand Up @@ -121,8 +129,11 @@ void attach_and_get_module_event(uint32_t pid, process_synchro *synchro,
break;
}

auto suffix = (debug_event.type == ZET_DEBUG_EVENT_TYPE_THREAD_STOPPED)
? to_string(debug_event.info.thread.thread)
: "";
LOG_INFO << "[Debugger] received event: "
<< lzt::debuggerEventTypeString[debug_event.type];
<< lzt::debuggerEventTypeString[debug_event.type] << suffix;

if (ZET_DEBUG_EVENT_TYPE_MODULE_LOAD == debug_event.type) {
LOG_INFO << "[Debugger]"
Expand Down
Loading