For stepping performance I added the ability to outlaw all memory accesseses

to the __PAGEZERO segment on darwin. The dynamic loader now correctly doesn't
slide __PAGEZERO and it also registers it as an invalid region of memory. This
allows us to not make any memory requests from the local or remote debug session
for any addresses in this region. Stepping performance can improve when uninitialized
local variables that point to locations in __PAGEZERO are attempted to be read 
from memory as we won't even make the memory read or write request.

llvm-svn: 151128
This commit is contained in:
Greg Clayton
2012-02-22 04:37:26 +00:00
parent 337cfaf757
commit a9f40ad80a
7 changed files with 162 additions and 42 deletions

View File

@@ -4451,6 +4451,19 @@ Process::GetThreadStatus (Stream &strm,
return num_thread_infos_dumped;
}
void
Process::AddInvalidMemoryRegion (const LoadRange &region)
{
m_memory_cache.AddInvalidRange(region.GetRangeBase(), region.GetByteSize());
}
bool
Process::RemoveInvalidMemoryRange (const LoadRange &region)
{
return m_memory_cache.RemoveInvalidRange(region.GetRangeBase(), region.GetByteSize());
}
//--------------------------------------------------------------
// class Process::SettingsController
//--------------------------------------------------------------