L0Debug - Notify cmdQueue create for subdevices

- PROCESS ENTRY triggered for first cmdQ created

Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-07-22 12:07:36 +00:00
committed by Compute-Runtime-Automation
parent 92f3fe1306
commit 4da6f65d1a
16 changed files with 251 additions and 49 deletions

View File

@@ -12,6 +12,7 @@
#include <cstdint>
#include <memory>
#include <type_traits>
#include <unordered_map>
namespace NEO {
@@ -91,8 +92,8 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
void captureStateBaseAddress(NEO::LinearStream &cmdStream, SbaAddresses sba) override;
void printTrackedAddresses(uint32_t contextId);
MOCKABLE_VIRTUAL void registerElf(NEO::DebugData *debugData, NEO::GraphicsAllocation *isaAllocation);
MOCKABLE_VIRTUAL void notifyCommandQueueCreated();
MOCKABLE_VIRTUAL void notifyCommandQueueDestroyed();
MOCKABLE_VIRTUAL void notifyCommandQueueCreated(NEO::Device *device);
MOCKABLE_VIRTUAL void notifyCommandQueueDestroyed(NEO::Device *device);
MOCKABLE_VIRTUAL void notifyModuleLoadAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs);
MOCKABLE_VIRTUAL void notifyModuleCreate(void *module, uint32_t moduleSize, uint64_t moduleLoadAddress);
MOCKABLE_VIRTUAL void registerAllocationType(GraphicsAllocation *allocation);
@@ -110,6 +111,11 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
}
bool getSingleAddressSpaceSbaTracking() { return singleAddressSpaceSbaTracking; }
struct CommandQueueNotification {
uint32_t subDeviceIndex = 0;
uint32_t subDeviceCount = 0;
};
protected:
static bool isAnyTrackedAddressChanged(SbaAddresses sba) {
return sba.GeneralStateBaseAddress != 0 ||
@@ -125,12 +131,14 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
std::unordered_map<uint32_t, NEO::GraphicsAllocation *> perContextSbaAllocations;
NEO::AddressRange sbaTrackingGpuVa{};
NEO::GraphicsAllocation *moduleDebugArea = nullptr;
std::atomic<uint32_t> commandQueueCount = 0u;
uint32_t uuidL0CommandQueueHandle = 0;
std::vector<uint32_t> commandQueueCount;
std::vector<uint32_t> uuidL0CommandQueueHandle;
bool singleAddressSpaceSbaTracking = false;
std::mutex debuggerL0Mutex;
};
static_assert(std::is_standard_layout<DebuggerL0::CommandQueueNotification>::value, "DebuggerL0::CommandQueueNotification issue");
using DebugerL0CreateFn = DebuggerL0 *(*)(NEO::Device *device);
extern DebugerL0CreateFn debuggerL0Factory[];