forked from OSchip/llvm-project
Add scoped timers to ReadMemoryFromInferior and ReadMemoryFromFileCache.
This commit is contained in:
parent
3338819b08
commit
d124133f17
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue