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

Improve -Ztime-passes #62110

Merged
merged 2 commits into from
Jul 5, 2019
Merged

Conversation

nnethercote
Copy link
Contributor

Two improvements that make -Ztime-passes more useful.

r? @Zoxc

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2019
@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from 454167c to 27e3b06 Compare June 25, 2019 04:57
src/librustc_driver/lib.rs Outdated Show resolved Hide resolved
src/librustc_driver/lib.rs Outdated Show resolved Hide resolved
@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from 27e3b06 to f05bd80 Compare June 26, 2019 03:51
@nnethercote
Copy link
Contributor Author

@Zoxc: new code is up. It addresses some of your comments, but not all, as per the discussions above. I think it's a clear improvement over the status quo, see what you think.

@nnethercote
Copy link
Contributor Author

@Zoxc: what do you think about the latest code?

@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from f05bd80 to 2b749f1 Compare July 1, 2019 09:39
@nnethercote
Copy link
Contributor Author

@Zoxc: I updated the code to use the Callbacks trait instead of the run_compiler return value to propagate the bool.

@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from 2b749f1 to 7f1671e Compare July 1, 2019 23:11
src/librustc_driver/lib.rs Outdated Show resolved Hide resolved
@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from 7f1671e to 718a7c7 Compare July 2, 2019 21:23
@bors
Copy link
Contributor

bors commented Jul 3, 2019

☔ The latest upstream changes (presumably #61775) made this pull request unmergeable. Please resolve the merge conflicts.

…s` output.

Because it pollutes the output with hundreds or thousands of
uninteresting lines for which the time duration is always(?) 0.000s.
This is useful for getting the total compilation time at the end.
To do this, the patch changes `print_time_passes_entry` to not increment
the depth, which means that `print_time_passes_entry_internal` is no
longer needed.
@nnethercote nnethercote force-pushed the improve-Ztime-passes branch from 718a7c7 to 87b103d Compare July 4, 2019 22:36
@nnethercote
Copy link
Contributor Author

@Zoxc: I have rebased. As far as I can tell, I have addressed all your concerns and answered all your questions. I think it's ready to land.

@Zoxc
Copy link
Contributor

Zoxc commented Jul 5, 2019

@bors r+

I think we could probably just remove the indentation support. It's broken for LLVM and for the parallel compiler anyway.

@bors
Copy link
Contributor

bors commented Jul 5, 2019

📌 Commit 87b103d has been approved by Zoxc

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2019
@nnethercote
Copy link
Contributor Author

The indentation is crucial to understand which passes are sub-passes. I understand it's broken for the back-end, but even then it's still highly useful for the other passes.

Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=Zoxc

Improve -Ztime-passes

Two improvements that make `-Ztime-passes` more useful.

r? @Zoxc
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=Zoxc

Improve -Ztime-passes

Two improvements that make `-Ztime-passes` more useful.

r? @Zoxc
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=Zoxc

Improve -Ztime-passes

Two improvements that make `-Ztime-passes` more useful.

r? @Zoxc
bors added a commit that referenced this pull request Jul 5, 2019
Rollup of 13 pull requests

Successful merges:

 - #61545 (Implement another internal lints)
 - #62110 (Improve -Ztime-passes)
 - #62133 (Feature gate `rustc` attributes harder)
 - #62158 (Add MemoryExtra in InterpretCx constructor params)
 - #62168 (The (almost) culmination of HirIdification)
 - #62193 (Create async version of the dynamic-drop test)
 - #62369 (Remove `compile-pass` from compiletest)
 - #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.)
 - #62381 (Fix a typo in Write::write_vectored docs)
 - #62390 (Update README.md)
 - #62396 (remove Scalar::is_null_ptr)
 - #62406 (Lint on invalid values passed to x.py --warnings)
 - #62414 (Remove last use of mem::uninitialized in SGX)

Failed merges:

r? @ghost
@bors bors merged commit 87b103d into rust-lang:master Jul 5, 2019
@nnethercote nnethercote deleted the improve-Ztime-passes branch July 9, 2019 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants