Add logging to VA sharing api

Change-Id: I5c68995db4d2dcde9505210030d9c63b5e86ddbd
This commit is contained in:
Hoppe, Mateusz
2018-08-14 10:23:10 +02:00
committed by sys_ocldev
parent 815bd9e027
commit 22f80a8a2c
4 changed files with 90 additions and 13 deletions

View File

@@ -131,6 +131,22 @@ const std::string DebugSettingsManager<DebugLevel>::getEvents(const uintptr_t *i
return os.str();
}
template <DebugFunctionalityLevel DebugLevel>
const std::string DebugSettingsManager<DebugLevel>::getMemObjects(const uintptr_t *input, uint32_t numOfObjects) {
if (false == debugLoggingAvailable()) {
return "";
}
std::stringstream os;
for (uint32_t i = 0; i < numOfObjects; i++) {
if (input != nullptr) {
cl_mem mem = const_cast<cl_mem>(reinterpret_cast<const cl_mem *>(input)[i]);
os << "cl_mem " << mem << ", MemObj " << static_cast<MemObj *>(mem) << ", ";
}
}
return os.str();
}
template <DebugFunctionalityLevel DebugLevel>
void DebugSettingsManager<DebugLevel>::dumpBinaryProgram(int32_t numDevices, const size_t *lengths, const unsigned char **binaries) {
if (false == debugKernelDumpingAvailable()) {