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

Feature request: Save results of analysis to disk after scanning #1224

Open
throwaway96 opened this issue Dec 13, 2022 · 1 comment
Open
Assignees
Labels
enhancement This is a feature request performance This issue details a performance problem

Comments

@throwaway96
Copy link
Contributor

Scanning can take a long time, so storing the outcome would be desirable.

@uxmal uxmal self-assigned this Dec 16, 2022
@uxmal uxmal added enhancement This is a feature request performance This issue details a performance problem labels Dec 16, 2022
@uxmal
Copy link
Owner

uxmal commented Dec 16, 2022

I think a good compromise is to save the interprocedural control flow graph (ICFG) after the scanning has been completed. That way, when reloading a program, Reko only has to disassemble/rewrite the blocks without having to perform actual scanning. This could probably be parallelized for great speed.

Saving would store the properties of all Procedures and Blocks in a file. Each procedure would save the graph of addresses of the blocks that it consists of. Each block would save its start address and its length in memory units (read: bytes on most CPUs).

When loading, the skeleton of the ICFG would be created by loading all the procedures' and blocks' data from the file. Empty procedures and blocks would be created, complete with the graph structure. Then, the contents of the blocks would be read, using as many threads as possible in parallel. Since basic blocks are independent of each other, there would be no contention.

It's probably valuable to create a prototype to measure how much this would speed up loading files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a feature request performance This issue details a performance problem
Projects
None yet
Development

No branches or pull requests

2 participants