You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb] Defer checking CFA memory region (swiftlang#7877)
To support stepping in Swift async code, LLDB uses the memory region (ie stack vs heap)
of the Canonical Frame Address (CFA) to identify when an async function calls a
synchronous function.
But this has resulted in a performance regression, as determining the memory region of
the CFA is not free, and eagerly performing this query for every `StackID`,
particularly during backtracing/unwinding – when stepping is not yet occurring, is
wasteful.
This change proposes a solution that defers the memory region query until required to
perform stepping logic. The logic that checks heaps vs stacks was moved into
`ThreadPlan`, the only place that currently needs to make that determination.
Performing this check in `ThreadPlan` provides access to the process, allowing
stack/heap determination to happen as needed. Previously, the stack/heap determination
was made eagerly when the `StackID` was constructed.
rdar://117505613
0 commit comments