[Lldb-commits] [PATCH] D67111: Adding caching to libc++ std::function formatter for lookups that require scanning symbols

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 3 10:34:27 PDT 2019


shafik created this revision.
shafik added reviewers: jingham, jasonmolenda, aprantl.
Herald added a reviewer: EricWF.
Herald added subscribers: ldionne, christof.

Performance issues lead to the libc++ `std::function` formatter to be disabled, see D65666 <https://reviews.llvm.org/D65666>

This change is the first of two changes that should address the performance issues and allow us to enable the formatter again.

In some cases we end up scanning the symbol table for the callable wrapped by `std::function` for those cases we will now cache the results and used the cache in subsequent look-ups. This still leaves a large cost for the initial lookup which will be addressed in the next change.

We are also expanding the tests but they will remain disabled.


https://reviews.llvm.org/D67111

Files:
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
  packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
  source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
  source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67111.218481.patch
Type: text/x-patch
Size: 7164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190903/d9b7a734/attachment-0001.bin>


More information about the lldb-commits mailing list