Alexey Khrabrov
Alexey Khrabrov
You can already get the number of bytes allocated for all the AOT caches at the JITServer as `TR::Compiler->persistentGlobalMemory()->_totalPersistentAllocations[TR_Memory::JITServerAOTCache]`. Please note that `AOTCacheRecord::allocate()` only allocates individual records, but not the...
I agree that it should be the total memory usage by all caches. That also makes the implementation much easier. Maybe we should also have a limit for the number...
> Is setting `_aotCacheStore` to false the only thing that needs to be done? After looking at the code, that's not actually enough since AOT cache records can still be...
I think we should start with the simple case of immutable snapshot files. Later we can consider whether it's worth it to implement a merge operation. It's easy to merge...
Here is an outline of how storing and loading a snapshot can be implemented (since I've already sketched out the design in the past but never implemented it). Store: 1....
> At the moment individual fresh AOT cache instances are created and held separately for each client. How would that interact with the persistence mechanism? Depends on when/how we load...
> When new records are added to a map, all their dependencies should already exist in the cache, right? So we could just keep that list around and append new...
This also made me think of a simpler way to synchronize taking a snapshot with concurrent additions of new records without marking the newly added records. We can simply remember...
> Is the plan to add a linked list for each hashtable we have today, and to insert a pointer to a record both in hashtable and the linked list?...
> I am ok with it, but we need to quantify the memory increase this change brings. 8 bytes per record, which amounts to ~220 KB for AcmeAir with a...