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

Cache Results - especially clang-sa #4139

Open
cmorty opened this issue Dec 19, 2023 · 1 comment
Open

Cache Results - especially clang-sa #4139

cmorty opened this issue Dec 19, 2023 · 1 comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) clang sa 🐉 The Clang Static Analyzer is a source code analysis tool that finds bugs in C-family programs. enhancement 🌟

Comments

@cmorty
Copy link

cmorty commented Dec 19, 2023

I am running code-checker in a CI without the web-frontend, only generating HTML-output. The codechecker-run is the longest running job. Caching results could greatly improve the performance.

I searched the net for caching clang-sa. However as ccache does not support this, and I haven't found other solutions.

I'm just a user of codechecker and no clang-sa/tidy/.. - expert. Yet if I understand things right: As long as no CTU-Analysis is active, hashing the pre-processor-output, clangsa-flags and -version should probably do the job, right?

@bruntib
Copy link
Contributor

bruntib commented Jan 16, 2024

I think, the best performance could be gained by some ccache-like cache for Clang analysis results. Unfortunately I'm not aware of any. From CodeChecker point of view the analysis performance can be controlled only by running non-CTU as you mentioned, or turning off unnecessary and/or style checkers.

Yes, you're right, it sounds technically feasible to implement some caching of analysis results (i.e. plist files) based on the pre-processor output and some further data. The only difficulty should be generating a build command which does the pre-processing. According to my experiences, it's not always as simple as adding a -E flag, but having a study on this issue and some prototype implementation would be great.

@whisperity whisperity added enhancement 🌟 analyzer 📈 Related to the analyze commands (analysis driver) clang sa 🐉 The Clang Static Analyzer is a source code analysis tool that finds bugs in C-family programs. labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) clang sa 🐉 The Clang Static Analyzer is a source code analysis tool that finds bugs in C-family programs. enhancement 🌟
Projects
None yet
Development

No branches or pull requests

3 participants