Change IoctlHelper::ioctl function to return int.
Change IoctlHelper::createGemExt function to return int.
Change IoctlHelper::queryDistances function to return int.
Change UuidRegisterResult::retVal type to int32_t.
Rename res to ret in debug_session.cpp for consistency.
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
- getInternalEvent() should wait on cv that is notified when new event is
read
- this change speeds up application execution under debugger
- refactor unit tests - do not start async thread in ults when not
needed , use synchronous read mode instead
Related-To: NEO-7641
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- do not trigger incorrect / spurious events from internal modules
for debugger
- do not register Elf for internal modules
Related-To: NEO-7605
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
Some L0 debug CTSs intentionnally written to exit w/o proper
resource clenup, f.e do not call zetDebugDetach() etc.
On windows it could be the situation when cleanup of DebugSession is
called in context of DllMain(DLL_PROCESS_DETACH).
At this point all threads other then main already terminated by Windows,
see remarks for DLL_PROCESS_DETACH in
https://learn.microsoft.com/en-us/windows/win32/dlls/dllmain
In this case worker thread object still exists, handle and Id are not
null but corresponding Windows thread does not exist any more and
application waits forever for threadFinished variable. We can safely
omit this waiting since join() will either return immediately in case of
thread was killed by Windows or wait until thread is terminated in normal way.
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
Move Linux DebugSession thread conversion functions up to
DebugSessionImp to allow reuse in windows implementation
Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
Related-To: NEO-7366
- if VM BIND comes with VM that cannot be mapped to tile,
push the event to pending events and process next events
until context params event with comes
- when pending event is handled - remove it from queue
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- all tileInstanced ISAs must be received before sending
MODULE LOAD/UNLOAD events for zebin modules
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- enable tile attach mode by default
- both root device and subdevice may be attached to
Related-To: NEO-7347
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- converting physical/api thread ids should account for
devicebitfield
- debug events for ISA filtered - skip events for not
relevant tiles
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- notify module allocation for (sub)device used to create module,
makeResident called within (sub)device contexts
- access ISA with vmHandle specific to device index
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- keep track of all loaded modules
- keep track of process entry/exit state
- restore valid events on attach
- acknowledge/clean events on detach
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- after last tile DebugSession is detached, root DebugSession
must close fd
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- ThreadId is preferred beacuse it uniquely identifies thread and is
not related to device topology
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
- enhance register access tests
- remove not used param from resume wa function
Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>