[Lldb-commits] [PATCH] [NativeProcessLinux] Use fast memory reads, if the system supports it
Oleksiy Vyalov
ovyalov at google.com
Tue Jun 16 17:13:05 PDT 2015
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:84
@@ +83,3 @@
+
+ if (is_supported != eLazyBoolCalculate)
+ return is_supported == eLazyBoolYes;
----------------
Could you wrap check with std::call_once to make sure that it's thread-safe?
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:85
@@ +84,3 @@
+ if (is_supported != eLazyBoolCalculate)
+ return is_supported == eLazyBoolYes;
+
----------------
Indentation.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:102
@@ +101,3 @@
+ {
+ if (is_supported == eLazyBoolYes)
+ log->Printf("%s: Detected kernel support for process_vm_readv syscall. Fast memory reads enabled.",
----------------
ditto.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3282
@@ +3281,3 @@
+ if (ProcessVmReadvSupported()) {
+ // The process_vm_readv path is about 50 times faster than ptrace api. We want to use
+ // this syscall if it is supported.
----------------
indentation.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3299
@@ +3298,3 @@
+ log->Printf ("NativeProcessLinux::%s using process_vm_readv to read %zd bytes from inferior address 0x%" PRIx64": %s",
+ __FUNCTION__, size, addr, success?"Success":strerror(errno));
+
----------------
Please add separation spaces - success?"Success":strerror(errno))
http://reviews.llvm.org/D10488
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list