[Lldb-commits] [lldb] d124133 - Add scoped timers to ReadMemoryFromInferior and ReadMemoryFromFileCache.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 9 13:37:17 PDT 2021
Author: Adrian Prantl
Date: 2021-07-09T13:37:04-07:00
New Revision: d124133f17357536c4034cb2b2c0bec537cd8fd5
URL: https://github.com/llvm/llvm-project/commit/d124133f17357536c4034cb2b2c0bec537cd8fd5
DIFF: https://github.com/llvm/llvm-project/commit/d124133f17357536c4034cb2b2c0bec537cd8fd5.diff
LOG: Add scoped timers to ReadMemoryFromInferior and ReadMemoryFromFileCache.
Added:
Modified:
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index f139479db13bd..c6411f6c2244b 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -68,6 +68,7 @@
#include "lldb/Utility/ProcessInfo.h"
#include "lldb/Utility/SelectHelper.h"
#include "lldb/Utility/State.h"
+#include "lldb/Utility/Timer.h"
using namespace lldb;
using namespace lldb_private;
@@ -2044,6 +2045,8 @@ size_t Process::ReadCStringFromMemory(addr_t addr, char *dst,
size_t Process::ReadMemoryFromInferior(addr_t addr, void *buf, size_t size,
Status &error) {
+ LLDB_SCOPED_TIMER();
+
if (buf == nullptr || size == 0)
return 0;
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index e73de43ef78df..839eb58878933 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -1691,6 +1691,7 @@ bool Target::ModuleIsExcludedForUnconstrainedSearches(
size_t Target::ReadMemoryFromFileCache(const Address &addr, void *dst,
size_t dst_len, Status &error) {
+ LLDB_SCOPED_TIMER();
SectionSP section_sp(addr.GetSection());
if (section_sp) {
// If the contents of this section are encrypted, the on-disk file is
More information about the lldb-commits
mailing list