HomePhabricator

[lldb] Remove cache in get_demangled_name_without_arguments

Authored by teemperor on Wed, May 26, 8:52 AM.

Description

[lldb] Remove cache in get_demangled_name_without_arguments

This function has a single-value caching based on function local static variables.

This causes two problems:

  • There is no synchronization, so this function randomly returns the demangled name of other functions that are demangled at the same time.
  • The 1-element cache is not very effective (the cache rate is around 0% when running the LLDB test suite that calls this function around 30k times).

I would propose just removing it.

To prevent anyone else the git archeology: the static result variables were
originally added as this returned a ConstString reference, but that has since
been changed so that this returns by value.

Reviewed By: #lldb, JDevlieghere, shafik

Differential Revision: https://reviews.llvm.org/D103107

Details

Committed
teemperorWed, May 26, 9:27 AM
Reviewer
Restricted Project
Differential Revision
D103107: [lldb] Remove cache in get_demangled_name_without_arguments
Parents
rG1b47a3de48d2: [RISCV] Enable cross basic block aware vsetvli insertion
Branches
Unknown
Tags
Unknown