diff options
author | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
commit | 0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch) | |
tree | 09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/Target/Memory.cpp | |
parent | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff) | |
download | FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz |
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
This corresponds with the branchpoint for the 3.6 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Target/Memory.cpp')
-rw-r--r-- | source/Target/Memory.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source/Target/Memory.cpp b/source/Target/Memory.cpp index b212fcd..934bc96 100644 --- a/source/Target/Memory.cpp +++ b/source/Target/Memory.cpp @@ -26,7 +26,7 @@ using namespace lldb_private; //---------------------------------------------------------------------- MemoryCache::MemoryCache(Process &process) : m_process (process), - m_cache_line_byte_size (512), + m_cache_line_byte_size (process.GetMemoryCacheLineSize()), m_mutex (Mutex::eMutexTypeRecursive), m_cache (), m_invalid_ranges () @@ -47,6 +47,7 @@ MemoryCache::Clear(bool clear_invalid_ranges) m_cache.clear(); if (clear_invalid_ranges) m_invalid_ranges.Clear(); + m_cache_line_byte_size = m_process.GetMemoryCacheLineSize(); } void @@ -250,7 +251,8 @@ AllocatedBlock::ReserveBlock (uint32_t size) { m_offset_to_chunk_size[0] = needed_chunks; if (log) - log->Printf ("[1] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks", this, size, size, 0, needed_chunks, m_chunk_size); + log->Printf("[1] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks", (void *)this, + size, size, 0, needed_chunks, m_chunk_size); addr = m_addr; } else @@ -268,7 +270,9 @@ AllocatedBlock::ReserveBlock (uint32_t size) { m_offset_to_chunk_size[last_offset] = needed_chunks; if (log) - log->Printf ("[2] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks - num_chunks %lu", this, size, size, last_offset, needed_chunks, m_chunk_size, m_offset_to_chunk_size.size()); + log->Printf("[2] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks - " + "num_chunks %lu", + (void *)this, size, size, last_offset, needed_chunks, m_chunk_size, m_offset_to_chunk_size.size()); addr = m_addr + last_offset; break; } @@ -284,7 +288,9 @@ AllocatedBlock::ReserveBlock (uint32_t size) { m_offset_to_chunk_size[last_offset] = needed_chunks; if (log) - log->Printf ("[3] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks - num_chunks %lu", this, size, size, last_offset, needed_chunks, m_chunk_size, m_offset_to_chunk_size.size()); + log->Printf("[3] AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => offset = 0x%x, %u %u bit chunks - " + "num_chunks %lu", + (void *)this, size, size, last_offset, needed_chunks, m_chunk_size, m_offset_to_chunk_size.size()); addr = m_addr + last_offset; break; } @@ -345,7 +351,7 @@ AllocatedBlock::ReserveBlock (uint32_t size) } if (log) - log->Printf ("AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => 0x%16.16" PRIx64, this, size, size, (uint64_t)addr); + log->Printf("AllocatedBlock::ReserveBlock(%p) (size = %u (0x%x)) => 0x%16.16" PRIx64, (void *)this, size, size, (uint64_t)addr); return addr; } @@ -362,7 +368,8 @@ AllocatedBlock::FreeBlock (addr_t addr) } Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE)); if (log) - log->Printf ("AllocatedBlock::FreeBlock(%p) (addr = 0x%16.16" PRIx64 ") => %i, num_chunks: %lu", this, (uint64_t)addr, success, m_offset_to_chunk_size.size()); + log->Printf("AllocatedBlock::FreeBlock(%p) (addr = 0x%16.16" PRIx64 ") => %i, num_chunks: %lu", (void *)this, (uint64_t)addr, + success, m_offset_to_chunk_size.size()); return success; } |