about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2021-02-19 13:27:39 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2021-02-25 11:38:52 -0500
commitf2d70c5d188472f5655c9cc8ba47e52d89d8fdd7 (patch)
tree438cf0cc56a247284d1fe203ac28fbba31ca67fa /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent0d8bf72a36eb78c1a9bf721b9af3055f62cfc3dc (diff)
downloadrust-f2d70c5d188472f5655c9cc8ba47e52d89d8fdd7.tar.gz
rust-f2d70c5d188472f5655c9cc8ba47e52d89d8fdd7.zip
Implementation of build.print_step_rusage.
On non-unix platforms, does not try to call `getrusage` (and does not attempt to
implement its own shim; that could be follow-on work, though its probably best
to not invest too much effort there, versus using separate dedicated tooling).

On unix platforms, calls libc::rusage and attempts to emit the subset of fields
that are supported on Linux and Mac OS X. Omits groups of related stats which
appear to be unsupported on the platform (due to them all remaining zero).

Adjusts output to compensate for Mac using bytes instead of kb (a well known
discrepancy on Mac OS X). However, so far I observe a lot of strange values
(orders of magnitude wrong) reported on Mac OS X in some cases, so I would not
trust this in that context currently.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions