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

[c2cpg] Implemented cached header file loading #4997

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

max-leuthaeuser
Copy link
Contributor

Needs some testing for (very) large projects.
Caching all the header file contents may make things worse compared to (re-) reading them from disk and GC immediately/soonish.

@mpollmeier
Copy link
Contributor

Tested on linux kernel, results look good. No difference in timing, stdout is much shorter.

export SL_LOGGING_LEVEL=debug
time ./c2cpg.sh -J-Xmx90g -o /home/mp/tmp/cpgtesting/linux-kernel/linux4.fg ~/tmp/cpgtesting/linux-kernel/linux-4.1.16/ | tee c2cpg.out

git:(max/cachedHeaderLoading)$ 
15043,57s user 9879,91s system 1070% cpu 38:48,85 total
-rw-r--r-- 1 mp mp 12M 11. Okt 09:57 c2cpg-cached-header-loading.out

git:(master)$
14664,01s user 9992,68s system 1058% cpu 38:48,77 total
-rw-r--r-- 1 mp mp 21M 11. Okt 10:52 c2cpg-master.out

std outputs:
c2cpg.out.zip

@max-leuthaeuser max-leuthaeuser changed the title WIP: [c2cpg] Implemented cached header file loading [c2cpg] Implemented cached header file loading Oct 11, 2024
@max-leuthaeuser max-leuthaeuser marked this pull request as ready for review October 11, 2024 10:05
@max-leuthaeuser max-leuthaeuser merged commit e0e493d into master Oct 11, 2024
5 checks passed
@max-leuthaeuser max-leuthaeuser deleted the max/cachedHeaderLoading branch October 11, 2024 11:58
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

Successfully merging this pull request may close these issues.

2 participants