refactor: share acknowledgeEvent code for I915 and XE

Also remove not needed resumeImp and interruptImp methods
from level_zero/tools/source/debug/linux/xe/debug_session.h
The correct implementation is in DebugSessionLinux and
the overrides in DebugSessionLinuxXe are not needed

Related-To: NEO-8407
Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2024-03-22 16:06:34 +00:00
committed by Compute-Runtime-Automation
parent 4d797890af
commit f0bdd5765b
6 changed files with 120 additions and 125 deletions

View File

@@ -29,11 +29,6 @@ struct DebugSessionLinuxXe : DebugSessionLinux {
bool closeConnection() override;
ze_result_t acknowledgeEvent(const zet_debug_event_t *event) override {
UNRECOVERABLE_IF(true);
return ZE_RESULT_SUCCESS;
}
struct IoctlHandlerXe : DebugSessionLinux::IoctlHandler {
int ioctl(int fd, unsigned long request, void *arg) override {
int ret = 0;
@@ -79,6 +74,12 @@ struct DebugSessionLinuxXe : DebugSessionLinux {
void handleMetadataEvent(drm_xe_eudebug_event_metadata *pMetaData);
bool handleMetadataOpEvent(drm_xe_eudebug_event_vm_bind_op_metadata *vmBindOpMetadata);
void updateContextAndLrcHandlesForThreadsWithAttention(EuThread::ThreadId threadId, AttentionEventFields &attention) override;
int eventAckIoctl(EventToAck &event) override;
Module &getModule(uint64_t moduleHandle) override {
auto connection = clientHandleToConnection[clientHandle].get();
DEBUG_BREAK_IF(connection->metaDataToModule.find(moduleHandle) == connection->metaDataToModule.end());
return connection->metaDataToModule[moduleHandle];
}
void startAsyncThread() override;
static void *asyncThreadFunction(void *arg);
@@ -88,16 +89,6 @@ struct DebugSessionLinuxXe : DebugSessionLinux {
UNRECOVERABLE_IF(true);
}
ze_result_t resumeImp(const std::vector<EuThread::ThreadId> &threads, uint32_t deviceIndex) override {
UNRECOVERABLE_IF(true);
return ZE_RESULT_SUCCESS;
}
ze_result_t interruptImp(uint32_t deviceIndex) override {
UNRECOVERABLE_IF(true);
return ZE_RESULT_SUCCESS;
}
int openVmFd(uint64_t vmHandle, bool readOnly) override;
int flushVmCache(int vmfd) override;