diff options
author | Jason Molenda <jmolenda@apple.com> | 2014-09-03 22:30:54 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2014-09-03 22:30:54 +0000 |
commit | f0340c9ab5ee7c087703951948571fc02bada900 (patch) | |
tree | e8a7a0b11730e9ceba0f0a33cfda25410f702352 /lldb/source/Target/Process.cpp | |
parent | b67bc4ea0d23c2dc11d2123aaf37d1b3ef83c940 (diff) | |
download | bcm5719-llvm-f0340c9ab5ee7c087703951948571fc02bada900.tar.gz bcm5719-llvm-f0340c9ab5ee7c087703951948571fc02bada900.zip |
Add a new target.process.memory-cache-line-size to change the size of
lldb's internal memory cache chunks that are read from the remote
system. For a remote connection that is especially slow, a user may
need to reduce it; reading a 512 byte chunk of memory whenever a
4-byte region is requested may not be the right decision in these
kinds of environments.
<rdar://problem/18175117>
llvm-svn: 217083
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index a1049787d82..02f96358433 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -108,6 +108,7 @@ g_properties[] = { "python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, NULL, NULL, "A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class." }, { "stop-on-sharedlibrary-events" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, stop when a shared library is loaded or unloaded." }, { "detach-keeps-stopped" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "If true, detach will attempt to keep the process stopped." }, + { "memory-cache-line-size" , OptionValue::eTypeUInt64, false, 512, NULL, NULL, "The memory cache line size" }, { NULL , OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL } }; @@ -118,7 +119,8 @@ enum { ePropertyUnwindOnErrorInExpressions, ePropertyPythonOSPluginPath, ePropertyStopOnSharedLibraryEvents, - ePropertyDetachKeepsStopped + ePropertyDetachKeepsStopped, + ePropertyMemCacheLineSize }; ProcessProperties::ProcessProperties (bool is_global) : @@ -148,6 +150,13 @@ ProcessProperties::GetDisableMemoryCache() const return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0); } +uint64_t +ProcessProperties::GetMemoryCacheLineSize() const +{ + const uint32_t idx = ePropertyMemCacheLineSize; + return m_collection_sp->GetPropertyAtIndexAsUInt64 (NULL, idx, g_properties[idx].default_uint_value); +} + Args ProcessProperties::GetExtraStartupCommands () const { |