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

Store metrics from metrics.json to CI PGO timer #107733

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Feb 6, 2023

With this change, we'll be able to easily see how long does it take to compile LLVM vs rustc.

r? @Mark-Simulacrum

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 6, 2023

@bors try

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 6, 2023
@bors
Copy link
Contributor

bors commented Feb 6, 2023

⌛ Trying commit 533f368a4a249b4d633523138d191a7071255093 with merge 5da6158be72dc13b1d22ab9b26314934c006606c...

@bors
Copy link
Contributor

bors commented Feb 6, 2023

☀️ Try build successful - checks-actions
Build commit: 5da6158be72dc13b1d22ab9b26314934c006606c (5da6158be72dc13b1d22ab9b26314934c006606c)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 6, 2023

@bors try

@bors
Copy link
Contributor

bors commented Feb 6, 2023

⌛ Trying commit 508e09054a83b6b91f6a4851d5fb72ba01c2ff2a with merge e2cfad8a2d202916fcb725b89988bb10d1ff13e7...

@bors
Copy link
Contributor

bors commented Feb 7, 2023

☀️ Try build successful - checks-actions
Build commit: e2cfad8a2d202916fcb725b89988bb10d1ff13e7 (e2cfad8a2d202916fcb725b89988bb10d1ff13e7)

1 similar comment
@bors
Copy link
Contributor

bors commented Feb 7, 2023

☀️ Try build successful - checks-actions
Build commit: e2cfad8a2d202916fcb725b89988bb10d1ff13e7 (e2cfad8a2d202916fcb725b89988bb10d1ff13e7)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 7, 2023

@bors try

@bors
Copy link
Contributor

bors commented Feb 7, 2023

⌛ Trying commit dc25abab8fe0e97ae516498cdccf9d41e939b693 with merge 05450d2fadee98bbacea208d4fec9338d5306134...

@Kobzol Kobzol marked this pull request as ready for review February 7, 2023 10:03
@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 7, 2023

This is how the output currently looks like:

------------------------------------------------
Stage 1 (LLVM PGO):            1936.16s (21.44%)
  Build rustc and LLVM:        1447.07s (16.02%)
    LLVM:                       322.39s ( 3.57%)
    Rustc:                     1105.31s (12.24%)
  Gather profiles:              489.10s ( 5.41%)
Stage 2 (rustc PGO):           1579.59s (17.49%)
  Build rustc and LLVM:         650.87s ( 7.21%)
    LLVM:                       290.31s ( 3.21%)
    Rustc:                      342.16s ( 3.79%)
  Gather profiles:              928.72s (10.28%)
Stage 3 (LLVM BOLT):           2722.61s (30.14%)
  Build rustc and LLVM:        1892.67s (20.95%)
    LLVM:                      1141.65s (12.64%)
    Rustc:                      725.08s ( 8.03%)
  Gather profiles:              829.94s ( 9.19%)
Stage 4 (final build):         2794.01s (30.93%)
  LLVM:                         984.42s (10.90%)
  Rustc:                        414.21s ( 4.59%)
                                                
Total duration:                       2h 30m 32s
------------------------------------------------

Some notes:

  • As expected, the LLVM builds that are "context free" are cached well by sccache, but the ones that use profiles are much slower.
  • The final LLVM build, which uses PGO profiles, should be cached by sccache, because the profiles were already used in the BOLT build. This does not seem to be happening.
  • I wonder why the first rustc build is so much slower. I guess that the stage1 build is cached in later invocations?

@rustbot ready

@bors
Copy link
Contributor

bors commented Feb 7, 2023

☀️ Try build successful - checks-actions
Build commit: 05450d2fadee98bbacea208d4fec9338d5306134 (05450d2fadee98bbacea208d4fec9338d5306134)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 8, 2023

@bors try

@bors
Copy link
Contributor

bors commented Feb 8, 2023

⌛ Trying commit 405ae93b3c65f5eb8aeff9f3031d625216f2e32d with merge 673cf0b55804c7f35afa1fe06ac1e171a40021af...

@bors
Copy link
Contributor

bors commented Feb 8, 2023

☀️ Try build successful - checks-actions
Build commit: 673cf0b55804c7f35afa1fe06ac1e171a40021af (673cf0b55804c7f35afa1fe06ac1e171a40021af)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 8, 2023

@bors try

@bors
Copy link
Contributor

bors commented Feb 8, 2023

⌛ Trying commit 68647501a87537dd11b4005907e1a18c7f20332f with merge a57fd671624190eee8b3ef0bab0e966e141b1e42...

@bors
Copy link
Contributor

bors commented Feb 8, 2023

☀️ Try build successful - checks-actions
Build commit: a57fd671624190eee8b3ef0bab0e966e141b1e42 (a57fd671624190eee8b3ef0bab0e966e141b1e42)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 8, 2023

Ok, now we have a nicely formatted output of the individual build steps duration in the log. There's no one single "bottleneck" in the dist build, it just takes time to build Clippy, Rust analyzer, Cargo, docs etc.

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

r=me with nit fixed

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 12, 2023

Added an assertion that at least one LLVM/rustc build step was found.
I don't have merge rights, so can't r=you :)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 13, 2023

@bors try

(just to make sure that nothing broke after I rebased on master).

@bors
Copy link
Contributor

bors commented Feb 13, 2023

⌛ Trying commit afe9553 with merge 86befc5b181576165e2498d800391fa3efde56c5...

@bors
Copy link
Contributor

bors commented Feb 13, 2023

☀️ Try build successful - checks-actions
Build commit: 86befc5b181576165e2498d800391fa3efde56c5 (86befc5b181576165e2498d800391fa3efde56c5)

1 similar comment
@bors
Copy link
Contributor

bors commented Feb 13, 2023

☀️ Try build successful - checks-actions
Build commit: 86befc5b181576165e2498d800391fa3efde56c5 (86befc5b181576165e2498d800391fa3efde56c5)

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 13, 2023

Looks good. @Mark-Simulacrum should be ready for merging.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 14, 2023

📌 Commit afe9553 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Feb 14, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 14, 2023
…imulacrum

Store metrics from `metrics.json` to CI PGO timer

With this change, we'll be able to easily see how long does it take to compile LLVM vs `rustc`.

r? `@Mark-Simulacrum`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 14, 2023
…imulacrum

Store metrics from `metrics.json` to CI PGO timer

With this change, we'll be able to easily see how long does it take to compile LLVM vs `rustc`.

r? ``@Mark-Simulacrum``
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#107573 (Update the minimum external LLVM to 14)
 - rust-lang#107626 (Fix `x fix` on the standard library itself)
 - rust-lang#107673 (update ICU4X to 1.1.0)
 - rust-lang#107733 (Store metrics from `metrics.json` to CI PGO timer)
 - rust-lang#108007 (Use `is_str` instead of string kind comparison)
 - rust-lang#108033 (add an unstable `#[rustc_coinductive]` attribute)
 - rust-lang#108039 (Refactor refcounted structural_impls via functors)
 - rust-lang#108040 (Use derive attributes for uninteresting traversals)
 - rust-lang#108044 (interpret: rename Pointer::from_addr → from_addr_invalid)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 74d018e into rust-lang:master Feb 15, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 15, 2023
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Feb 26, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#107573 (Update the minimum external LLVM to 14)
 - rust-lang#107626 (Fix `x fix` on the standard library itself)
 - rust-lang#107673 (update ICU4X to 1.1.0)
 - rust-lang#107733 (Store metrics from `metrics.json` to CI PGO timer)
 - rust-lang#108007 (Use `is_str` instead of string kind comparison)
 - rust-lang#108033 (add an unstable `#[rustc_coinductive]` attribute)
 - rust-lang#108039 (Refactor refcounted structural_impls via functors)
 - rust-lang#108040 (Use derive attributes for uninteresting traversals)
 - rust-lang#108044 (interpret: rename Pointer::from_addr → from_addr_invalid)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@Kobzol Kobzol deleted the opt-build-metrics branch July 31, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants