mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Lazy evaluate arguments of printDebugStrings(...) function
Change-Id: Ie44e109fd9235c5df32fb90b9e6fc6058e558a99 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
7d532f4f98
commit
55bd544402
@@ -52,12 +52,12 @@ void DebuggerL0::printTrackedAddresses(uint32_t contextId) {
|
||||
auto memory = perContextSbaAllocations[contextId]->getUnderlyingBuffer();
|
||||
auto sba = reinterpret_cast<SbaTrackedAddresses *>(memory);
|
||||
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"Debugger: SBA ssh = %" SCNx64
|
||||
" gsba = %" SCNx64
|
||||
" bsurfsba = %" SCNx64 "\n",
|
||||
sba->SurfaceStateBaseAddress, sba->GeneralStateBaseAddress,
|
||||
sba->BindlessSurfaceStateBaseAddress);
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"Debugger: SBA ssh = %" SCNx64
|
||||
" gsba = %" SCNx64
|
||||
" bsurfsba = %" SCNx64 "\n",
|
||||
sba->SurfaceStateBaseAddress, sba->GeneralStateBaseAddress,
|
||||
sba->BindlessSurfaceStateBaseAddress);
|
||||
}
|
||||
|
||||
DebuggerL0 ::~DebuggerL0() {
|
||||
@@ -77,4 +77,4 @@ void DebuggerL0::captureStateBaseAddress(NEO::CommandContainer &container, SbaAd
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
} // namespace L0
|
||||
|
||||
@@ -25,12 +25,12 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(NEO::LinearStream &cmdS
|
||||
using MI_STORE_DATA_IMM = typename GfxFamily::MI_STORE_DATA_IMM;
|
||||
auto gpuAddress = NEO::GmmHelper::decanonize(sbaTrackingGpuVa.address);
|
||||
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"Debugger: SBA stored ssh = %" SCNx64
|
||||
" gsba = %" SCNx64
|
||||
" bsurfsba = %" SCNx64 "\n",
|
||||
sba.SurfaceStateBaseAddress, sba.GeneralStateBaseAddress,
|
||||
sba.BindlessSurfaceStateBaseAddress);
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stdout,
|
||||
"Debugger: SBA stored ssh = %" SCNx64
|
||||
" gsba = %" SCNx64
|
||||
" bsurfsba = %" SCNx64 "\n",
|
||||
sba.SurfaceStateBaseAddress, sba.GeneralStateBaseAddress,
|
||||
sba.BindlessSurfaceStateBaseAddress);
|
||||
|
||||
if (sba.GeneralStateBaseAddress) {
|
||||
MI_STORE_DATA_IMM storeDataImmediate = GfxFamily::cmdInitStoreDataImm;
|
||||
|
||||
@@ -127,11 +127,11 @@ bool ModuleTranslationUnit::createFromNativeBinary(const char *input, size_t inp
|
||||
auto singleDeviceBinary = unpackSingleDeviceBinary(archive, NEO::ConstStringRef(productAbbreviation, strlen(productAbbreviation)), targetDevice,
|
||||
decodeErrors, decodeWarnings);
|
||||
if (decodeWarnings.empty() == false) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
|
||||
}
|
||||
|
||||
if (singleDeviceBinary.intermediateRepresentation.empty() && singleDeviceBinary.deviceBinary.empty()) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
|
||||
return false;
|
||||
} else {
|
||||
this->irBinary = makeCopy(reinterpret_cast<const char *>(singleDeviceBinary.intermediateRepresentation.begin()), singleDeviceBinary.intermediateRepresentation.size());
|
||||
@@ -172,11 +172,11 @@ bool ModuleTranslationUnit::processUnpackedBinary() {
|
||||
NEO::DeviceBinaryFormat singleDeviceBinaryFormat;
|
||||
std::tie(decodeError, singleDeviceBinaryFormat) = NEO::decodeSingleDeviceBinary(programInfo, binary, decodeErrors, decodeWarnings);
|
||||
if (decodeWarnings.empty() == false) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
|
||||
}
|
||||
|
||||
if (NEO::DecodeError::Success != decodeError) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
|
||||
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeErrors.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user