Skip to content

[lldb] Fix caching, add lookup failures to TSSTyperef's LookupClangType #11066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from

Conversation

augusto2112
Copy link

@augusto2112 augusto2112 commented Jul 25, 2025

By profiling LLDB running frame variable in a large application with
many many .o files, I noticed that one of the biggest bottlenecks of the
operation was looking (and failing) to find a certain potential clang
type over and over again.

While fixing this I found that we will cache the result, but not the
decl context to find that result, which introduces the risk of
returning the wrong type if the type is cached, but a different decl
context is used.

@augusto2112 augusto2112 requested a review from a team as a code owner July 25, 2025 21:46
@augusto2112
Copy link
Author

@swift-ci test

By profiling LLDB running frame variable in a large application with
many many .o files, I noticed that one of the biggest bottlenecks of the
operation was looking (and failing) to find a certain potential clang
type over and over again.

While fixing this I found that we will cache the result, but not the
decl context to find that result, which introduces the risk of
returning the wrong type if the type is cached, but a different decl
context is used.
@augusto2112 augusto2112 force-pushed the cache-failure-find-types branch from d88fac5 to b0964e9 Compare July 29, 2025 00:25
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112 augusto2112 changed the title [lldb] Add lookup failures to TypeSystemSwiftTypeRef's clang type cache [lldb] Fix caching, add lookup failures to TSSTyperef's LookupClangType Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants