Skip to content

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented Jun 13, 2025

InitNameIndexes loops over symbols and builds internal indexes. For Swift symbols (of type eSymbolTypeCode), the symbol is demangled into a node tree, and the node tree is used to extract method names, etc.

Previously, all other Swift symbols (non-code), were being demangled into strings. However this appears unnecessary, skipping such Swift symbols has the following benefits:

  • saves time and memory costs of demangling into a string
  • reduces entries in the string pool
  • reduces sizes of the symbol table indexes

In a trivial example, the number of log entries for demangling to strings went from 58682 to 0.

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione kastiglione changed the title [lldb] Stop demangling all swift symbols [lldb] Stop demangling every swift symbol into strings Jun 16, 2025
@kastiglione kastiglione marked this pull request as ready for review June 16, 2025 17:15
@kastiglione kastiglione requested a review from a team as a code owner June 16, 2025 17:15
Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it would be nice if we could find a way to detangle all the Swift-specific code in this file and move it into plugins/Language(Runtime)/Swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants