PC Sampling: Disable coredump when sessions active

When doing a coredump, we try to park the wave and save its PC in
ttmp7/ttmp11, but these registers will be overwritten by PC Sampling
requests.

Change-Id: I60fb734eb3bed4ee3cc8d8bba9ec4a527fff9671
This commit is contained in:
David Yat Sin
2024-03-28 18:45:28 +00:00
parent 49e56ce782
commit 3443fdf665
4 changed files with 16 additions and 4 deletions
+5 -2
View File
@@ -1804,8 +1804,11 @@ bool Runtime::VMFaultHandler(hsa_signal_value_t val, void* arg) {
// generated by hsa-runtime.
if (faulty_agent && faulty_agent->isa()->GetMajorVersion() != 11 &&
!runtime_singleton_->KfdVersion().supports_core_dump) {
if (amd::coredump::dump_gpu_core())
debug_print("GPU core dump failed\n");
if (pcs::PcsRuntime::instance()->SessionsActive())
fprintf(stderr, "GPU core dump skipped because PC Sampling active\n");
else if (amd::coredump::dump_gpu_core())
fprintf(stderr, "GPU core dump failed\n");
}
assert(false && "GPU memory access fault.");
std::abort();