[Lldb-commits] [PATCH] [NativeProcessLinux] Use fast memory reads, if the system supports it
Pavel Labath
labath at google.com
Wed Jun 17 10:25:42 PDT 2015
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:84
@@ +83,3 @@
+
+ if (is_supported != eLazyBoolCalculate)
+ return is_supported == eLazyBoolYes;
----------------
ovyalov wrote:
> Could you wrap check with std::call_once to make sure that it's thread-safe?
done.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:85
@@ +84,3 @@
+ if (is_supported != eLazyBoolCalculate)
+ return is_supported == eLazyBoolYes;
+
----------------
ovyalov wrote:
> Indentation.
Oops. I blame new editor. :(
================
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.",
----------------
ovyalov wrote:
> ditto.
done.
================
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.
----------------
ovyalov wrote:
> indentation.
done.
================
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));
+
----------------
ovyalov wrote:
> Please add separation spaces - success?"Success":strerror(errno))
done.
http://reviews.llvm.org/D10488
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list