[Lldb-commits] [PATCH] [NativeProcessLinux] Use fast memory reads, if the system supports it

Pavel Labath labath at google.com
Tue Jun 16 15:45:16 PDT 2015


Hi ovyalov, vharron,

Memory reads using the ptrace API need to be executed on a designated thread
and in 4-byte increments. The process_vm_read syscall has no such requirements
and it is about 50 times faster. This patch makes lldb-server use the faster
API if the target kernel supports it. Kernel support for this feature is
determined at runtime. Using process_vm_writev in the same manner is more
complicated since this syscall (unlike ptrace) respects page protection settings
and so it cannot be used to set a breakpoint, since code pages are typically
read-only. However, memory writes are not currently a performance bottleneck as
they happen much more rarely.

http://reviews.llvm.org/D10488

Files:
  include/lldb/Host/linux/Uio.h
  source/Host/android/LibcGlue.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10488.27789.patch
Type: text/x-patch
Size: 5063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150616/32c7add6/attachment.bin>


More information about the lldb-commits mailing list