[Lldb-commits] [PATCH] D123128: don't extra notify ModulesDidLoad() from LoadModuleAtAddress()

Luboš Luňák via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 5 06:52:04 PDT 2022


llunak created this revision.
llunak added a reviewer: jasonmolenda.
llunak added a project: LLDB.
Herald added a subscriber: JDevlieghere.
Herald added a project: All.
llunak requested review of this revision.
Herald added a subscriber: lldb-commits.

Places calling LoadModuleAddress() already call ModulesDidLoad() after a loop calling LoadModuleAtAddress(), so it's not necessary to call it from there, and the batched ModulesDidLoad() may be more efficient than this place calling it one after one.

This also makes the ModuleLoadedNotifys test pass on Linux now that the duplicates no longer bring down the average of modules notified per call.

This change is a prerequisite for parallelizing PreloadSymbols() in D122975 <https://reviews.llvm.org/D122975>.

Note that this patch could have been shorter if I simply changed LoadModuleAtAddress() to always pass false for `notify` (all callers currently call ModulesDidLoad() afterwards) and added a note to LoadModuleAtAddress() docs about it, but I don't know if that's a good design choice. I can change the patch to be that way if you want.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123128

Files:
  lldb/include/lldb/Target/DynamicLoader.h
  lldb/source/Core/DynamicLoader.cpp
  lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
  lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  lldb/test/API/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123128.420489.patch
Type: text/x-patch
Size: 8754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220405/b5ea881f/attachment-0001.bin>


More information about the lldb-commits mailing list