SWDEV-404889 - Don't report trap handler
Trap handler shouldn't be reported for debugger and RGP Change-Id: I149dacfed49584503c1874120d5f552fdec323a7
Tento commit je obsažen v:
@@ -131,6 +131,7 @@ class Program : public amd::HeapObject {
|
||||
uint32_t hasGlobalStores_ : 1; //!< Program has writable program scope variables
|
||||
uint32_t isHIP_ : 1; //!< Determine if the program is for HIP
|
||||
uint32_t coLoaded_ : 1; //!< Has the code objected been loaded
|
||||
uint32_t trapHandler_ : 1; //!< It is a trap handler for debugger
|
||||
};
|
||||
uint32_t flags_; //!< Program flags
|
||||
};
|
||||
@@ -263,6 +264,9 @@ class Program : public amd::HeapObject {
|
||||
//! Return TRUE if the program has been loaded
|
||||
bool isCodeObjectLoaded() const { return coLoaded_; }
|
||||
|
||||
//! Returns TRUE if the program is a trap handler for debugger support
|
||||
bool isTrapHandler() const { return trapHandler_; }
|
||||
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
amd_comgr_metadata_node_t metadata() const { return metadata_; }
|
||||
|
||||
|
||||
@@ -782,7 +782,13 @@ bool LightningProgram::createKernels(void* binary, size_t binSize, bool useUnifo
|
||||
return false;
|
||||
}
|
||||
|
||||
status = loader_->FreezeExecutable(executable_, nullptr);
|
||||
if (isInternal() && (owner()->language() == amd::Program::Assembly)) {
|
||||
// Don't register trap handler with the debugger, since user shouldn't see this kernel
|
||||
status = executable_->Freeze(nullptr);
|
||||
trapHandler_ = true;
|
||||
} else {
|
||||
status = loader_->FreezeExecutable(executable_, nullptr);
|
||||
}
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
LogError("Error: Freezing the executable failed.");
|
||||
return false;
|
||||
@@ -795,8 +801,8 @@ bool LightningProgram::createKernels(void* binary, size_t binSize, bool useUnifo
|
||||
bool LightningProgram::setKernels(void* binary, size_t binSize, amd::Os::FileDesc fdesc,
|
||||
size_t foffset, std::string uri) {
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
// Collect the information about compiled binary
|
||||
if (!isNull() && (palDevice().rgpCaptureMgr() != nullptr)) {
|
||||
// Collect the information about compiled binary, except the trap handler
|
||||
if (!isNull() && (palDevice().rgpCaptureMgr() != nullptr) && !isTrapHandler()) {
|
||||
apiHash_ = palDevice().rgpCaptureMgr()->AddElfBinary(
|
||||
binary, binSize, binary, binSize, codeSegGpu_->iMem(), codeSegGpu_->offset());
|
||||
}
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele