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

Stabilize -Ztimings as --timings #10245

Merged
merged 7 commits into from
Feb 5, 2022
Merged

Conversation

joshtriplett
Copy link
Member

@joshtriplett joshtriplett commented Jan 2, 2022

The -Ztimings option has existed for years, and many people use it to
profile and optimize their builds. It's one of the common reasons people
use nightly cargo.

The machine-readable JSON output may warrant further careful inspection
before we commit to a stable format. However, for the human-readable
output we don't need to make any commitment about the exact output.

Add a --timings option, as the stable equivalent to -Ztimings.
(Passing html or json requires -Zunstable-options, but the default --timings does not.)

Document the new option, and update the testsuite.

@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 2, 2022
@joshtriplett joshtriplett added I-nominated-to-discuss To be discussed during issue triage on the next Cargo team meeting T-cargo Team: Cargo labels Jan 2, 2022
@ehuss
Copy link
Contributor

ehuss commented Jan 2, 2022

Thanks for moving this forward!

I'm reluctant to block progress, because I know some people find this feature useful as-is. However, from my perspective it was never finished. I'm just a little leery of stabilizing something that might be somewhat buggy or a poor user experience. There are some concerns I'd like to talk about:

  • I don't know if it is useful to have the info form. I haven't seen anyone indicate that it is useful, and it does add a lot of noise (I have never found it useful). The tracking issue also had some discussion about different ways it could be presented.
  • The location where the html file is saved may not be ideal (the current directory). It creates a mess of files that the user then needs to manually clean up. I've been thinking it may make more sense to save them somewhere in the target directory?
  • The canvas drawing mechanism has issues. It breaks on large graphs (no graphs appear). Adjusting the sliders incorrectly can cause it to break. It is dependent on the browser and graphics card memory limits. Perhaps it works well enough for most people?
  • I've noticed some people being a little confused about how to read the information. Ideally I think there would be more built-in help to understand the information. (This isn't any sort of blocker, just a note about it being an overall poor user experience.)
    • Relatedly, some users have been confused due to it not being obvious that you need to scroll horizontally.
  • The mouse hover drawing can be quite slow on large graphs.
  • The presentation is a little on the ugly side.

Also, just FYI, I've been wanting to support generating reports after the build. Maybe something like cargo report timings, which would generate a report for the most recent build. This would require saving the raw information every time, assuming it isn't too slow. I think it is still useful to have something like --timings to generate reports on every build, though.

Overall I'm excited to move forward! However, I think there might be a few small things to address first (especially the first two points).

@joshtriplett
Copy link
Member Author

@ehuss wrote:

Thanks for moving this forward!

I'm reluctant to block progress, because I know some people find this feature useful as-is. However, from my perspective it was never finished. I'm just a little leery of stabilizing something that might be somewhat buggy or a poor user experience. There are some concerns I'd like to talk about:

* I don't know if it is useful to have the `info` form. I haven't seen anyone indicate that it is useful, and it does add a lot of noise (I have never found it useful). The tracking issue also had some discussion about different ways it could be presented.

While I think it's noisy enough to debate whether to include by default, I do think it adds value when trying to investigate build performance. Sometimes you want the full HTML graph, but sometimes you just want information at the granularity of "Did that specific crate take as long as it looked like it did? Wow, that one takes 20 seconds all by itself."

I think it adds enough value to be worth turning on by default with --timings, but I'm not especially attached to it if you consider it a blocker.

* The location where the html file is saved may not be ideal (the current directory). It creates a mess of files that the user then needs to manually clean up. I've been thinking it may make more sense to save them somewhere in the target directory?

The target directory has the disadvantage of being cleaned by cargo clean, and when benchmarking build performance you may want to do many clean builds and compare the results. Yes, the user has to manually clean them up when done with them, but this avoids accidentally losing valuable data that takes time to collect.

Plus, git status will show them, which will get the user to notice them and clean them up eventually when not needed.

I agree that it isn't the perfect place to put them, but I also don't have a better suggestion. We don't currently have anything else of the form "semi-precious but still a build output, don't clean lightly but make easy to clean".

If you'd prefer, I could make the option create a directory cargo-timing and create all the reports under that, which would make them much easier to clean up with one rm -r cargo-timing.

* The canvas drawing mechanism has issues.  It breaks on large graphs (no graphs appear). Adjusting the sliders incorrectly can cause it to break. It is dependent on the browser and graphics card memory limits.  Perhaps it works well enough for most people?

I haven't seen the former, but I have seen the latter with settings of the sliders. I think it works well enough to be quite useful, and we can always fix further issues in the future.

* I've noticed some people being a little confused about how to read the information.  Ideally I think there would be more built-in help to understand the information.  (This isn't any sort of blocker, just a note about it being an overall poor user experience.)

  * Relatedly, some users have been confused due to it not being obvious that you need to scroll horizontally.

* The mouse hover drawing can be quite slow on large graphs.

* The presentation is a little on the ugly side.

I think all four of these points ware worth evaluating and working on further; it could be more self-explanatory and better presented. But I don't think these are blockers either. And once --timings becomes more widely available, I'm hoping that leads more people to contribute to its usability.

I think the information is more valuable than the exact format.

Also, just FYI, I've been wanting to support generating reports after the build. Maybe something like cargo report timings, which would generate a report for the most recent build. This would require saving the raw information every time, assuming it isn't too slow. I think it is still useful to have something like --timings to generate reports on every build, though.

I love that idea, if it doesn't add significantly to build time. I did notice that the Timings class went out of its way to turn itself into a stub if disabled, so I assumed that it had a non-trivial performance impact. (Not least of which, it appears that having it enabled at all will make rmeta_required return true when it otherwise wouldn't have.)

Overall I'm excited to move forward! However, I think there might be a few small things to address first (especially the first two points).

Happy to address any of these that you consider blockers, and happy to document the rest in issues with an appropriate label.

@alexcrichton
Copy link
Member

Personally I agree that it's probably time to stabilize this given how useful it's been throughout its unstable lifecycle (yay nightly sorta?). I agree with all of @ehuss's points but I think that for stabilization, as @joshtriplett mentions as well, we don't necessarily need to solve all of them. I think it'd be good to think about what stability of this option means and only focus on that part. For example I wouldn't consider the literal HTML output stable at all, only that we do output HTML with something human-readable. In that sense any UI issues or performance issues of the HTML itself I think are fine to say "good enough for now and can be improved later".

On the other hand though the fact that we output HTML I think is something worth scrutinizing, in addition to the interface requesting it (e.g. --timings or not). In that sense I don't think that we ever really seriously considered what a stable interface for this would be, so I think it might be worthwhile to consider that before stabilizing.

Personally I would love it if we could enable this by default and always emit target/debug/timings/cargo-timings.html or something like that (along with a duplicate timestamped-file). If we did that then we wouldn't need a CLI flag at all and we could have a section of documentation explaining it and how to read the output as well (and the generated HTML itself could perhaps link to our documentation as well). If we could go this route it's also the smallest to stabilize I think where it's simply an extra file being produced on the build, and deciding the path for that shouldn't be too too bad.

@bors
Copy link
Collaborator

bors commented Jan 4, 2022

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

@joshtriplett joshtriplett removed the I-nominated-to-discuss To be discussed during issue triage on the next Cargo team meeting label Jan 5, 2022
@joshtriplett joshtriplett force-pushed the stabilize-timings branch 2 times, most recently from 9d883af to d4076c4 Compare January 15, 2022 02:12
@joshtriplett
Copy link
Member Author

I've rewritten this PR to remove -Ztimings=info, and to move the timings reports to target/cargo-timings.

@joshtriplett
Copy link
Member Author

Rebased on current HEAD to pick up recent CI fixes.

The text-based timing information emits many additional lines, creating
quite a bit of verbosity. Remove in favor of the HTML report, as
suggested at
rust-lang#10245 (comment) .

If we re-add text-based timing information in the future, it could come
in the form of a text-based report, or as a duration printed on the same
line as the crate it measures rather than a separate line.
The `-Ztimings` option has existed for years, and many people use it to
profile and optimize their builds. It's one of the common reasons people
use nightly cargo.

The machine-readable JSON output may warrant further careful inspection
before we commit to a stable format. However, for the human-readable
output we don't need to make any commitment about the exact output.

Add a `--timings` option, as the stable equivalent to `-Ztimings`.
Stabilize the `html` output format, and require `-Zunstable-options` for
the `json` output format.

Document the new option, and update the testsuite.
This avoids dropping them wherever Cargo happens to run from, and
instead places them under the target directory.

This has the advantage, and disadvantage, that `cargo clean` will remove
them.
This avoids ambiguity between its optional argument and positional
arguments.
@rfcbot rfcbot removed the proposed-final-comment-period An FCP proposal has started, but not yet signed off. label Feb 1, 2022
@joshtriplett
Copy link
Member Author

Since we have unanimous signoff:

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 5, 2022

📌 Commit 85589e1 has been approved by joshtriplett

@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 5, 2022
@bors
Copy link
Collaborator

bors commented Feb 5, 2022

⌛ Testing commit 85589e1 with merge 3bc0e6d...

@bors
Copy link
Collaborator

bors commented Feb 5, 2022

☀️ Test successful - checks-actions
Approved by: joshtriplett
Pushing 3bc0e6d to master...

@bors bors merged commit 3bc0e6d into rust-lang:master Feb 5, 2022
@joshtriplett joshtriplett deleted the stabilize-timings branch February 8, 2022 15:26
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2022
Update cargo

5 commits in 25fcb135d02ea897ce894b67ae021f48107d522b..c082648646cbb2be266df9ecbcdc253058158d68
2022-02-01 01:32:48 +0000 to 2022-02-08 14:55:05 +0000
- Add rustup link (rust-lang/cargo#10371)
- Improve startup time of bash completion. (rust-lang/cargo#10365)
- Stabilize `-Ztimings` as `--timings` (rust-lang/cargo#10245)
- Remove needless borrow (rust-lang/cargo#10360)
- Compute non custom build and non transitive deps for doc (rust-lang/cargo#10341)
@rfcbot rfcbot added finished-final-comment-period FCP complete to-announce and removed final-comment-period FCP — a period for last comments before action is taken labels Feb 11, 2022
@ehuss ehuss added this to the 1.60.0 milestone Feb 24, 2022
bors-servo added a commit to servo/servo that referenced this pull request Mar 6, 2022
Update rustc to 3/6 nightly.

The only breaking change comes from rust-lang/rust#93148, which a warning from rust-lang/cargo#10245.
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Apr 15, 2022
Pkgsrc changes:
 * Bump available bootstraps to 1.59.0.
 * Delete one patch which no longer applies,
   adjust another.

Upstream changes:

Version 1.60.0 (2022-04-07)
==========================

Language
--------
- [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.]
  [93658]
- [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer
  size and `"ptr"`.][93824]

Compiler
--------
- [Enable combining `+crt-static` and `relocation-model=pic` on
  `x86_64-unknown-linux-gnu`][86374]
- [Fixes wrong `unreachable_pub` lints on nested and glob public
  reexport][87487]
- [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132]
- [Stabilize `-Z print-link-args` as `--print link-args`][91606]
- [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300]
- [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383]
- [Fix invalid removal of newlines from doc comments][92357]
- [Add kernel target for RustyHermit][92670]
- [Deny mixing bin crate type with lib crate types][92933]
- [Make rustc use `RUST_BACKTRACE=full` by default][93566]
- [Upgrade to LLVM 14][93577]

\* Refer to Rust's [platform support page][platform-support-doc] for more
   information on Rust's tiered platform support.

Libraries
---------
- [Guarantee call order for `sort_by_cached_key`][89621]
- [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly
  processing exponent and mantissa][90247]
- [Make `Instant::{duration_since, elapsed, sub}` saturating][89926]
- [Remove non-monotonic clocks workarounds in `Instant::now`][89926]
- [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending`
  covariant][92630]

Stabilized APIs
---------------
- [`Arc::new_cyclic`][arc_new_cyclic]
- [`Rc::new_cyclic`][rc_new_cyclic]
- [`slice::EscapeAscii`][slice_escape_ascii]
- [`<[u8]>::escape_ascii`][slice_u8_escape_ascii]
- [`u8::escape_ascii`][u8_escape_ascii]
- [`Vec::spare_capacity_mut`][vec_spare_capacity_mut]
- [`MaybeUninit::assume_init_drop`][assume_init_drop]
- [`MaybeUninit::assume_init_read`][assume_init_read]
- [`i8::abs_diff`][i8_abs_diff]
- [`i16::abs_diff`][i16_abs_diff]
- [`i32::abs_diff`][i32_abs_diff]
- [`i64::abs_diff`][i64_abs_diff]
- [`i128::abs_diff`][i128_abs_diff]
- [`isize::abs_diff`][isize_abs_diff]
- [`u8::abs_diff`][u8_abs_diff]
- [`u16::abs_diff`][u16_abs_diff]
- [`u32::abs_diff`][u32_abs_diff]
- [`u64::abs_diff`][u64_abs_diff]
- [`u128::abs_diff`][u128_abs_diff]
- [`usize::abs_diff`][usize_abs_diff]
- [`Display for io::ErrorKind`][display_error_kind]
- [`From<u8> for ExitCode`][from_u8_exit_code]
- [`Not for !` (the "never" type)][not_never]
- [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops]
- [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected]

Cargo
-----
- [Port cargo from `toml-rs` to `toml_edit`][cargo/10086]
- [Stabilize `-Ztimings` as `--timings`][cargo/10245]
- [Stabilize namespaced and weak dependency features.][cargo/10269]
- [Accept more `cargo:rustc-link-arg-*` types from build script
  output.][cargo/10274]
- [cargo-new should not add ignore rule on Cargo.lock inside
  subdirs][cargo/10379]

Misc
----
- [Ship docs on Tier 2 platforms by reusing the closest Tier 1
  platform docs][92800]
- [Drop rustc-docs from complete profile][93742]
- [bootstrap: tidy up flag handling for llvm build][93918]

Compatibility Notes
-------------------
- [Remove compiler-rt linking hack on Android][83822]
- [Mitigations for platforms with non-monotonic clocks have been removed from
  `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an
  instant is not guaranteed to be greater than an earlier instant anymore.
- [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow,
  saturating to `0` instead][89926]. In the real world the panic happened mostly
  on platforms with buggy monotonic clock implementations rather than catching
  programming errors like reversing the start and end times. Such programming
  errors will now results in `0` rather than a panic.
- In a future release we're planning to increase the baseline requirements for
  the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
  your feedback in [PR #95026][95026].

Internal Changes
----------------

These changes provide no direct user facing benefits, but represent
significant improvements to the internals and overall performance
of rustc and related tools.

- [Switch all libraries to the 2021 edition][92068]

[83822]: rust-lang/rust#83822
[86374]: rust-lang/rust#86374
[87487]: rust-lang/rust#87487
[89621]: rust-lang/rust#89621
[89926]: rust-lang/rust#89926
[90132]: rust-lang/rust#90132
[90247]: rust-lang/rust#90247
[91606]: rust-lang/rust#91606
[92068]: rust-lang/rust#92068
[92300]: rust-lang/rust#92300
[92357]: rust-lang/rust#92357
[92383]: rust-lang/rust#92383
[92630]: rust-lang/rust#92630
[92670]: rust-lang/rust#92670
[92800]: rust-lang/rust#92800
[92933]: rust-lang/rust#92933
[93566]: rust-lang/rust#93566
[93577]: rust-lang/rust#93577
[93658]: rust-lang/rust#93658
[93742]: rust-lang/rust#93742
[93824]: rust-lang/rust#93824
[93918]: rust-lang/rust#93918
[95026]: rust-lang/rust#95026

[cargo/10086]: rust-lang/cargo#10086
[cargo/10245]: rust-lang/cargo#10245
[cargo/10269]: rust-lang/cargo#10269
[cargo/10274]: rust-lang/cargo#10274
[cargo/10379]: rust-lang/cargo#10379

[arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic
[rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic
[slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html
[slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii
[u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii
[vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut
[assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop
[assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read
[i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff
[i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff
[i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff
[i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff
[i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff
[isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff
[u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff
[u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff
[u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff
[u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff
[u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff
[usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff
[display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display
[from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E
[not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not
[wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations
[is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 25, 2022
Pkgsrc changes:
 * Bump available bootstraps to 1.59.0.
 * Adjust line number in patches which had non-zero offsets.

Upstream changes:

Version 1.60.0 (2022-04-07)
===========================

Language
--------
- [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.]
  [93658]
- [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer
  size and `"ptr"`.][93824]

Compiler
--------
- [Enable combining `+crt-static` and `relocation-model=pic` on
  `x86_64-unknown-linux-gnu`][86374]
- [Fixes wrong `unreachable_pub` lints on nested and glob public
  reexport][87487]
- [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132]
- [Stabilize `-Z print-link-args` as `--print link-args`][91606]
- [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300]
- [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383]
- [Fix invalid removal of newlines from doc comments][92357]
- [Add kernel target for RustyHermit][92670]
- [Deny mixing bin crate type with lib crate types][92933]
- [Make rustc use `RUST_BACKTRACE=full` by default][93566]
- [Upgrade to LLVM 14][93577]

\* Refer to Rust's [platform support page][platform-support-doc] for more
   information on Rust's tiered platform support.

Libraries
---------
- [Guarantee call order for `sort_by_cached_key`][89621]
- [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly
  processing exponent and mantissa][90247]
- [Make `Instant::{duration_since, elapsed, sub}` saturating][89926]
- [Remove non-monotonic clocks workarounds in `Instant::now`][89926]
- [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending`
  covariant][92630]

Stabilized APIs
---------------
- [`Arc::new_cyclic`][arc_new_cyclic]
- [`Rc::new_cyclic`][rc_new_cyclic]
- [`slice::EscapeAscii`][slice_escape_ascii]
- [`<[u8]>::escape_ascii`][slice_u8_escape_ascii]
- [`u8::escape_ascii`][u8_escape_ascii]
- [`Vec::spare_capacity_mut`][vec_spare_capacity_mut]
- [`MaybeUninit::assume_init_drop`][assume_init_drop]
- [`MaybeUninit::assume_init_read`][assume_init_read]
- [`i8::abs_diff`][i8_abs_diff]
- [`i16::abs_diff`][i16_abs_diff]
- [`i32::abs_diff`][i32_abs_diff]
- [`i64::abs_diff`][i64_abs_diff]
- [`i128::abs_diff`][i128_abs_diff]
- [`isize::abs_diff`][isize_abs_diff]
- [`u8::abs_diff`][u8_abs_diff]
- [`u16::abs_diff`][u16_abs_diff]
- [`u32::abs_diff`][u32_abs_diff]
- [`u64::abs_diff`][u64_abs_diff]
- [`u128::abs_diff`][u128_abs_diff]
- [`usize::abs_diff`][usize_abs_diff]
- [`Display for io::ErrorKind`][display_error_kind]
- [`From<u8> for ExitCode`][from_u8_exit_code]
- [`Not for !` (the "never" type)][not_never]
- [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops]
- [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected]

Cargo
-----
- [Port cargo from `toml-rs` to `toml_edit`][cargo/10086]
- [Stabilize `-Ztimings` as `--timings`][cargo/10245]
- [Stabilize namespaced and weak dependency features.][cargo/10269]
- [Accept more `cargo:rustc-link-arg-*` types from build script
  output.][cargo/10274]
- [cargo-new should not add ignore rule on Cargo.lock inside
  subdirs][cargo/10379]

Misc
----
- [Ship docs on Tier 2 platforms by reusing the closest Tier 1
  platform docs][92800]
- [Drop rustc-docs from complete profile][93742]
- [bootstrap: tidy up flag handling for llvm build][93918]

Compatibility Notes
-------------------
- [Remove compiler-rt linking hack on Android][83822]
- [Mitigations for platforms with non-monotonic clocks have been removed from
  `Instant::now`][89926]. On platforms that don't provide monotonic clocks, an
  instant is not guaranteed to be greater than an earlier instant anymore.
- [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow,
  saturating to `0` instead][89926]. In the real world the panic happened mostly
  on platforms with buggy monotonic clock implementations rather than catching
  programming errors like reversing the start and end times. Such programming
  errors will now results in `0` rather than a panic.
- In a future release we're planning to increase the baseline requirements for
  the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
  your feedback in [PR #95026][95026].

Internal Changes
----------------

These changes provide no direct user facing benefits, but represent
significant improvements to the internals and overall performance
of rustc and related tools.

- [Switch all libraries to the 2021 edition][92068]

[83822]: rust-lang/rust#83822
[86374]: rust-lang/rust#86374
[87487]: rust-lang/rust#87487
[89621]: rust-lang/rust#89621
[89926]: rust-lang/rust#89926
[90132]: rust-lang/rust#90132
[90247]: rust-lang/rust#90247
[91606]: rust-lang/rust#91606
[92068]: rust-lang/rust#92068
[92300]: rust-lang/rust#92300
[92357]: rust-lang/rust#92357
[92383]: rust-lang/rust#92383
[92630]: rust-lang/rust#92630
[92670]: rust-lang/rust#92670
[92800]: rust-lang/rust#92800
[92933]: rust-lang/rust#92933
[93566]: rust-lang/rust#93566
[93577]: rust-lang/rust#93577
[93658]: rust-lang/rust#93658
[93742]: rust-lang/rust#93742
[93824]: rust-lang/rust#93824
[93918]: rust-lang/rust#93918
[95026]: rust-lang/rust#95026

[cargo/10086]: rust-lang/cargo#10086
[cargo/10245]: rust-lang/cargo#10245
[cargo/10269]: rust-lang/cargo#10269
[cargo/10274]: rust-lang/cargo#10274
[cargo/10379]: rust-lang/cargo#10379

[arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic
[rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic
[slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html
[slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii
[u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii
[vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut
[assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop
[assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read
[i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff
[i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff
[i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff
[i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff
[i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff
[isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff
[u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff
[u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff
[u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff
[u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff
[u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff
[usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff
[display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display
[from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E
[not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not
[wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations
[is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
bors bot pushed a commit to bevyengine/bevy that referenced this pull request May 30, 2022
…4850)

As of rust-lang/cargo#10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
bors bot pushed a commit to bevyengine/bevy that referenced this pull request May 30, 2022
…4850)

As of rust-lang/cargo#10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
bors bot pushed a commit to bevyengine/bevy that referenced this pull request May 30, 2022
…4850)

As of rust-lang/cargo#10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
james7132 pushed a commit to james7132/bevy that referenced this pull request Jun 7, 2022
…evyengine#4850)

As of rust-lang/cargo#10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…evyengine#4850)

As of rust-lang/cargo#10245 `--timings` has been stabilized.
Update profiling.md to reflect this.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge FCP with intent to merge finished-final-comment-period FCP complete S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-cargo Team: Cargo to-announce
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants