-
Notifications
You must be signed in to change notification settings - Fork 527
Add optional support for microsecond tracing #280
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
Conversation
The regular path (for performance) would be: - set compiler argument to an absolute path - use an external tempdir, clean elsewhere - disable logging, i.e. don't use a logfile
In order to trace "config", we need to start tracing before logging - since that requires that we have completed config. Currently config takes about 10% (!) of the total time of a cache hit, or about 100 us. For a best case, total of 1 ms.
Try to wrap the actual function call
Note in the log file if trying to trace, without tracing being enabled in ccache. Since there is some (minor) overhead, by default the minitrace code is not enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Will move these to a separate PR, if still needed Added in 74772df
Travis seems to have given up on this |
@jrosdahl : suggestions look good, haven't had time to implement yet |
@afbjorklund: I merged latest master into your branch for your convenience. However, I'm moving this feature out of 3.6 since it doesn't feel quite ready yet, mainly documentation. If you want to work on it near term, I'll happily move it back. |
Interestingly, it had already been merged to my fork (guess that is what you wrote above). |
Hmm, seems like support for old clang is broken on master ?
Fixed in #343 |
Yes, GitHub by default allows maintainers to push to the pull request branch. I intend to make use of that feature to make minor fixes directly on the pull request branch instead of making review change requests since they tend to stall very often. |
Confusing with all the extra warnings, only for clang ? Especially when happending to third parties. |
I agree. How about only passing |
Done in 39c531f. |
And always generate the file name, rather than read the variable.
Thanks! |
Unfortunately the tracefiles were lost in all the refactoring, they remain in the tmp directory... Will submit a patch to fix it. |
By setting $CCACHE_TRACEFILE, one can obtain a trace of an individual compile.
Setting a unique file per compile, there is a script to combine them all into one trace...
This trace can then be loaded into the
chrome://tracing
page of Chromium/Chrome:Currently there are 7 main event categories: config, main, hash, manifest, cache, file, execute