diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-21 20:06:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-21 20:06:08 +0200 |
| commit | 9ec88ce78a9640324a2ad801b294ea5b8710139e (patch) | |
| tree | c872c57739a4e692c16838ce6cab52d3af3ea418 | |
| parent | 3f0bc5c23ba537be1f88eab5520711b3f400efcc (diff) | |
| parent | b3218d3d5d4aeed5f08bf761bbeabdbadb922f02 (diff) | |
| download | rust-9ec88ce78a9640324a2ad801b294ea5b8710139e.tar.gz rust-9ec88ce78a9640324a2ad801b294ea5b8710139e.zip | |
Rollup merge of #85550 - pnkfelix:fix-max-rss-division-on-mac, r=Mark-Simulacrum
facepalm: operator precedence fail on my part. This bug was only visible on mac. Also, print_step_rusage is a relatively new internal feature, that is not heavily used, and has no tests. All of these factors contributed to how this went uncaught this long. Thanks to Josh Triplett for pointing it out!
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index d462dc4d116..4b98abfb308 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -305,7 +305,7 @@ fn format_rusage_data(_child: Child) -> Option<String> { }; // Mac OS X reports the maxrss in bytes, not kb. let divisor = if env::consts::OS == "macos" { 1024 } else { 1 }; - let maxrss = rusage.ru_maxrss + (divisor - 1) / divisor; + let maxrss = (rusage.ru_maxrss + (divisor - 1)) / divisor; let mut init_str = format!( "user: {USER_SEC}.{USER_USEC:03} \ |
