================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to