[all-commits] [llvm/llvm-project] d28bc5: [lldb] Remove cache in get_demangled_name_without_...
Raphael Isemann via All-commits
all-commits at lists.llvm.org
Wed May 26 09:28:23 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d28bc54ff44aad7b080177ef85764d7c5444f031
https://github.com/llvm/llvm-project/commit/d28bc54ff44aad7b080177ef85764d7c5444f031
Author: Raphael Isemann <teemperor at gmail.com>
Date: 2021-05-26 (Wed, 26 May 2021)
Changed paths:
M lldb/source/Core/Mangled.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list