felipepiovezan wrote:

> But your example is exactly the clustered case: 1000 ranges 16 bytes apart 
> span 

The reason I mentioned this is that there a few places in the code where we 
read a _lot_ of pointers from memory all at once (from strided addresses, using 
MultiMemRead), so I think the case where we reach quadratic complexity are real.

> Only invalidation has to be exhaustive. So:
> 
> * `Flush` walks the L1 cache and erases every chunk that intersects the 
> range: `O(n)`, one caller (`Process::WriteMemory`), which then does a packet 
> round trip anyway.
> * `AddL1CacheData` goes back to a plain insert: `O(log n)`.
> * `FindL1CacheEntry` goes back to checking only the nearest chunk starting at 
> or below the address: `O(log n)`, identical to what we ship today, so no new 
> data structure is needed.

I think this is a good compromise. If we detect we're missing too many cache 
hits when we shouldn't, we can design a more elaborate solution




https://github.com/llvm/llvm-project/pull/208347
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to