[all-commits] [llvm/llvm-project] a8abb6: [lldb] Parallelize fetching symbol files in crashl...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Fri May 13 12:25:56 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8abb695859ad4e7fe695b9ee238a2b0cd00af7c
https://github.com/llvm/llvm-project/commit/a8abb695859ad4e7fe695b9ee238a2b0cd00af7c
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2022-05-13 (Fri, 13 May 2022)
Changed paths:
M lldb/examples/python/crashlog.py
Log Message:
-----------
[lldb] Parallelize fetching symbol files in crashlog.py
When using dsymForUUID, the majority of time symbolication a crashlog
with crashlog.py is spent waiting for it to complete. Currently, we're
calling dsymForUUID sequentially when iterating over the modules. We can
drastically cut down this time by calling dsymForUUID in parallel. This
patch uses Python's ThreadPoolExecutor (introduced in Python 3.2) to
parallelize this IO-bound operation.
The performance improvement is hard to benchmark, because even with an
empty local cache, consecutive calls to dsymForUUID for the same UUID
complete faster. With warm caches, I'm seeing a ~30% performance
improvement (~90s -> ~60s). I suspect the gains will be much bigger for
a cold cache.
dsymForUUID supports batching up multiple UUIDs. I considered going that
route, but that would require more intrusive changes. It would require
hoisting the logic out of locate_module_and_debug_symbols which we
explicitly document [1] as a feature of Symbolication.py to locate
symbol files.
[1] https://lldb.llvm.org/use/symbolication.html
Differential reviison: https://reviews.llvm.org/D125107
More information about the All-commits
mailing list