[Lldb-commits] [lldb] [lldb] Serve MemoryCache::ReadRanges from the L2 cache as well as L1 (PR #216318)
Yao Qi via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 17 04:47:39 PDT 2026
================
@@ -138,6 +138,20 @@ const uint8_t *MemoryCache::FindL1CacheEntry(lldb::addr_t addr,
return pos->second->GetBytes() + (addr - chunk_range.GetRangeBase());
}
+const uint8_t *MemoryCache::FindL2CacheEntry(lldb::addr_t addr,
+ size_t len) const {
+ if (m_L2_cache.empty())
+ return nullptr;
+ const lldb::addr_t line_offset = addr % m_L2_cache_line_byte_size;
+ BlockMap::const_iterator pos = m_L2_cache.find(addr - line_offset);
+ if (pos == m_L2_cache.end())
+ return nullptr;
+ // Like the L1 lookup, a read spanning two lines is treated as a miss.
----------------
qiyao wrote:
This one-liner comment is removed.
https://github.com/llvm/llvm-project/pull/216318
More information about the lldb-commits
mailing list