core dump: Generates a core dump from a fault event
Extracts and creates a core dump ELF file from a fault event, using core dump front end. Signed-off-by: Alex Sierra <Alex.Sierra@amd.com> Change-Id: Ibbbe41b3d13dd3fcb90161e927d48c329cf513a9
This commit is contained in:
zatwierdzone przez
Alejandro Sierra Guiza
rodzic
54604654bd
commit
803e37ded5
@@ -70,6 +70,7 @@
|
||||
#include "core/util/os.h"
|
||||
#include "core/inc/exceptions.h"
|
||||
#include "inc/hsa_ven_amd_aqlprofile.h"
|
||||
#include "core/inc/amd_core_dump.hpp"
|
||||
|
||||
#ifndef HSA_VERSION_MAJOR
|
||||
#define HSA_VERSION_MAJOR 1
|
||||
@@ -1358,6 +1359,13 @@ bool Runtime::VMFaultHandler(hsa_signal_value_t val, void* arg) {
|
||||
HsaMemoryAccessFault& fault =
|
||||
vm_fault_event->EventData.EventData.MemoryAccessFault;
|
||||
|
||||
// Fallback if KFD does not support GPU core dump. In this case, there core dump is
|
||||
// generated by hsa-runtime.
|
||||
if (!runtime_singleton_->KfdVersion().supports_core_dump) {
|
||||
if (amd::coredump::dump_gpu_core())
|
||||
debug_print("GPU core dump failed\n");
|
||||
}
|
||||
|
||||
hsa_status_t custom_handler_status = HSA_STATUS_ERROR;
|
||||
auto system_event_handlers = runtime_singleton_->GetSystemEventHandlers();
|
||||
// If custom handler is registered, pack the fault info and call the handler
|
||||
|
||||
Reference in New Issue
Block a user