-
Notifications
You must be signed in to change notification settings - Fork 148
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
Include self-profiler results #299
Comments
I discussed this around a week ago with @nikomatsakis and we arrived at the conclusion that just collecting the data would be an excellent start; I hope to have some time this next week to do just that. |
I'm seeing the following results which are not valid JSON on a file just containing
|
@Mark-Simulacrum Nope, looks like you found a bug. I filed a fix here |
The category labels are not currently allowed per the JSON spec; they need to be strings. I'm working on a patch now. |
…r=wesleywiser Make JSON output from -Zprofile-json valid r? @wesleywiser cc rust-lang/rustc-perf#299
…r=wesleywiser Make JSON output from -Zprofile-json valid r? @wesleywiser cc rust-lang/rustc-perf#299
…r=wesleywiser Make JSON output from -Zprofile-json valid r? @wesleywiser cc rust-lang/rustc-perf#299
@wesleywiser Could we not print out the table if the |
@Mark-Simulacrum Absolutely! |
Empirically, I'm also seeing high
|
I suspect this is because of the many queries tagged as Other. I tagged the stuff that was obvious to me with an appropriate category but I put everything else in Other so that at least the other categories wouldn't be erroneously inflated. |
Okay, that would make sense -- would it be possible for the JSON to contain per-query counts perhaps (maybe summed up into categories, but with per-query counts also available?) I suspect that some of these queries are not strictly in any category (i.e., they're used throughout multiple)... cc @nikomatsakis @michaelwoerister, perhaps you could help us decide if the "Other" being that large would help |
Data for self-profiling is now being collected -- e.g. https://raw.githubusercontent.com/rust-lang-nursery/rustc-timing/481d47377a20d85a676acebedd0a92e094c04a55/times/commit-14997d56a550f4aa99fe737593cd2758227afc56-x86_64-unknown-linux-gnu.json. I'm not quite sure how we want to visualize it yet, so would like some feedback on that bit. Maybe some graphs in e.g. Google spreadsheets or something along those lines. For now though we are at least collecting the data. |
I haven't used this feature at all but I can't help but make the following observations.
|
…, r=Mark-Simulacrum Don't print the profiling summary to stdout when -Zprofile-json is set cc rust-lang/rustc-perf#299
Okay, I think the next step here is to add |
Closing this as we now have an implementation that collects self-profiler results and displays them. |
rustc
has the option to emit self-profiling data at the end of a compilation. It would be cool to include this data in the performance metrics which would allow us to see what parts of the compiler are broadly responsible for performance gains/regressions.Running the compiler with
rustc -Z self-profile -Z profile-json
will cause aself_profiler_results.json
file to be created in the working directory. The output looks like this:cc @nikomatsakis who's wanted this for a while and probably has ideas for what it should look like 😃
The text was updated successfully, but these errors were encountered: