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

compiler cache stats now display information on a per lang+compiler basis #1893

Conversation

robertmaynard
Copy link
Collaborator

So with the proposed expansion of clang as a CUDA compiler ( #1892 ) I have noticed that the stats tracking for sccache binned the clang++ cuda compilations as a C/C++ invocation due to the presumption that the clang compiler meant C/C++.

So this PR breaks down stats to be tracked on a way finer granulatiry so that people can see exactly what compinations of language + compiler are causing hits or misses.

@robertmaynard
Copy link
Collaborator Author

Previous sccache stat output would be:

Compile requests                     18
Compile requests executed            18
Cache hits                            9
Cache hits (C/C++)                    6
Cache hits (CUDA)                     3
Cache misses                          9
Cache misses (C/C++)                  6
Cache misses (CUDA)                   3

With this PR it would look like:

Compile requests                     18
Compile requests executed            18
Cache hits                            9
Cache hits (c [clang])                1
Cache hits (c [gcc])                  1
Cache hits (c [nvcc])                 1
Cache hits (c++ [clang])              1
Cache hits (c++ [gcc])                2
Cache hits (c++ [nvcc])               1
Cache hits (cuda [clang])             1
Cache hits (cuda [nvcc])              1
Cache misses                          9
Cache misses (c [clang])              1
Cache misses (c [gcc])                1
Cache misses (c [nvcc])               1
Cache misses (c++ [clang])            1
Cache misses (c++ [gcc])              2
Cache misses (c++ [nvcc])             1
Cache misses (cuda [clang])           1
Cache misses (cuda [nvcc])            1

This is an obvious worse case as I have used 3 different compilers, but I wanted to show the level of detail we now get

@sylvestre
Copy link
Collaborator

this will break projects parsing the output or json.
maybe we should keep the original information and add your break down ?

@robertmaynard
Copy link
Collaborator Author

this will break projects parsing the output or json. maybe we should keep the original information and add your break down ?

That was what I was wondering about.

Would it be better to guard the detailed stats behind a different command line switch ( sccache -s -v )? That would make it completly opt-in.

@sylvestre
Copy link
Collaborator

yeah, that works too :)

@robertmaynard
Copy link
Collaborator Author

I am going to close this PR in preference to more finer grained PR's that build up to more verbose stat tracking.

The first of those PRs is: #1895

@robertmaynard robertmaynard deleted the fea/per-language-stat-tracking branch November 29, 2023 17:53
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