Speed up NativeProcessLinux::GetLoadedModuleFileSpec
authorPavel Labath <labath@google.com>
Thu, 23 Jul 2015 14:47:33 +0000 (14:47 +0000)
committerPavel Labath <labath@google.com>
Thu, 23 Jul 2015 14:47:33 +0000 (14:47 +0000)
commit162fb8e8ab296d27b16683cc65d8f8cedcc5d678
tree6455f6e749e2d33076b9624931a55f9becab558b
parentbfa859bba4e8510c597b7958acc208063f72bf6d
Speed up NativeProcessLinux::GetLoadedModuleFileSpec

Summary:
GetLoadedModuleFileSpec was reading /proc/pid/maps character by character, which was very slow,
since we do that for every shared library, which android tends to have a lot. Switching to
ProcFileReader saves us about 0.4 seconds in attach time.

Reviewers: tberghammer

Subscribers: tberghammer, danalbert, lldb-commits

Differential Revision: http://reviews.llvm.org/D11460

llvm-svn: 243019
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp