From c22d54c5d95f4d23629484579414387b0c7503ee Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 6 Apr 2025 20:00:00 -0400 Subject: [SharedCache] Replace write log with callback registration for reapplying slide info This improves performance by ~10x with the only real issue being a copy of the cache entry existing for each weak ref. Also fixes - Some old TODO's that are no longer relevant - Some function signatures not being const - FileAccessorCache not evicting enough accessors to fit under an adjusted cache size - Added a warning if we are over the global cache size in view initialization - Logger name not having a `.` in `SlideInfoProcessor::SlideInfoProcessor` - Re-added the accessor dirty check before applying slide info to fix https://github.com/Vector35/binaryninja-api/issues/6570 --- view/sharedcache/core/SlideInfo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view/sharedcache/core/SlideInfo.h') diff --git a/view/sharedcache/core/SlideInfo.h b/view/sharedcache/core/SlideInfo.h index bc165589..75134985 100644 --- a/view/sharedcache/core/SlideInfo.h +++ b/view/sharedcache/core/SlideInfo.h @@ -33,10 +33,10 @@ class SlideInfoProcessor public: explicit SlideInfoProcessor(uint64_t baseAddress); - std::vector ReadEntryInfo(VirtualMemory& vm, const CacheEntry& entry) const; + std::vector ReadEntryInfo(const MappedFileAccessor& accessor, const CacheEntry& entry) const; // Write the slide information back to the entries memory mapped regions. - void ApplyMappings(VirtualMemory& vm, const std::vector& mappings); + void ApplyMappings(MappedFileAccessor& accessor, const std::vector& mappings) const; - void ProcessEntry(VirtualMemory& vm, const CacheEntry& entry); + std::vector ProcessEntry(MappedFileAccessor& accessor, const CacheEntry& entry) const; }; -- cgit v1.3.1