[NativeAOT] Avoid redundant unwind info lookup during stackwalks (#87419)
authorJan Kotas <jkotas@microsoft.com>
Tue, 13 Jun 2023 04:56:15 +0000 (21:56 -0700)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2023 04:56:15 +0000 (21:56 -0700)
commit2a9b152b8b13732bbf145c5c11386fff5eaa7d90
tree8dfa0d53394b67cca3fc762a8a36d42f1364f1c2
parent01053863e7f4485b35ba1ee3a0f132127151719f
[NativeAOT] Avoid redundant unwind info lookup during stackwalks (#87419)

Unwind info was looked up twice on non-Windows: Once during initial frame inspection
and second during the actual unwind. Cache the lookup results from the
initial frame inspection and use them from the actual unwind later, same
as it is done on Windows.
src/coreclr/nativeaot/Runtime/unix/UnixNativeCodeManager.cpp
src/coreclr/nativeaot/Runtime/unix/UnixNativeCodeManager.h
src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp
src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.h