Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent cache #17

Open
chc4 opened this issue Sep 12, 2021 · 1 comment
Open

Persistent cache #17

chc4 opened this issue Sep 12, 2021 · 1 comment

Comments

@chc4
Copy link
Owner

chc4 commented Sep 12, 2021

We optimally cache a lot of the JIT metadata we collect, for things like e.g. loop entry points from #8 or which control flows merge from #7 or DWARF abi information from #3.

All of this data should be identical across runs with the same binary. So hypothetically we should be able to not only cache the data for one run, but all future runs of the JIT.

We should look into dropping the data to disk, and mmapping it back in when we start back up again to have the best information we can, and atomically updating the database if we get new information in a run.

Slight problems are we have to handle cache invalidation if the binary is updated, or any data that depended on a symbol from a dynamic library that was updated.

@chc4
Copy link
Owner Author

chc4 commented Sep 12, 2021

There are a few libraries for implementations of persistent databases. https://github.com/NVSL/Corundum seems fairly generic, or https://crates.io/crates/sled if we only need key-value pairs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant