[Lldb-commits] [PATCH] D77765: Fix incorrect L1 inferior memory cache flushing

Jaroslav Sevcik via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 8 16:52:08 PDT 2020


jarin created this revision.
jarin added reviewers: labath, clayborg.
jarin added a project: LLDB.
Herald added subscribers: lldb-commits, mgorny.
jarin retitled this revision from "Fix incorrect L1 cache flushing" to "Fix incorrect L1 inferior memory cache flushing".

As discussed in https://reviews.llvm.org/D74398, the L1 <https://reviews.llvm.org/L1> memory cache flushing is incorrect.

For instance, if the L1 <https://reviews.llvm.org/L1> cache contains two chunks (10, 10) and (30, 10) and we call MemoryCache::Flush(25, 10), the current code does not flush anything (because it just tries to flush the previous range (10, 10) and if that is not intersecting, it will bail out).

With this patch, if the previous chunk is not overlapping, we still try the next chunk, and only if that one is not overlapping, we bail out.

This also adds some unit tests for the cache (some of the tests fail with the current code). The unit tests required some changes for testability.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77765

Files:
  lldb/include/lldb/Target/Memory.h
  lldb/include/lldb/Target/Process.h
  lldb/source/Target/Memory.cpp
  lldb/source/Target/Process.cpp
  lldb/unittests/Target/CMakeLists.txt
  lldb/unittests/Target/MemoryCacheTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77765.256142.patch
Type: text/x-patch
Size: 15151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200408/a4bffac2/attachment-0001.bin>


More information about the lldb-commits mailing list