feature: add debug info for logging pat indexes

Related-To: HSD-18031172224
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2024-01-23 11:23:06 +00:00
committed by Compute-Runtime-Automation
parent a697a3f718
commit 7bbe57c671
15 changed files with 101 additions and 13 deletions

View File

@@ -9,6 +9,7 @@
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/memory_manager/residency.h"
@@ -45,6 +46,22 @@ std::string DrmAllocation::getAllocationInfoString() const {
return ss.str();
}
std::string DrmAllocation::getPatIndexInfoString() const {
std::stringstream ss;
auto bo = getBO();
if (bo) {
ss << " PATIndex: " << bo->peekPatIndex() << ",";
}
auto gmm = getDefaultGmm();
if (gmm) {
ss << " Gmm resource usage: "
<< "[ " << gmm->getUsageTypeString() << " ],";
ss << " Cacheable: " << gmm->resourceParams.Flags.Info.Cacheable;
}
return ss.str();
}
void DrmAllocation::clearInternalHandle(uint32_t handleId) {
handles[handleId] = std::numeric_limits<uint64_t>::max();
}