diff options
| author | bors <bors@rust-lang.org> | 2021-03-19 12:44:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-19 12:44:33 +0000 |
| commit | b97fd3e5a1545ab02e18c52e7f3d2e78a5c960bf (patch) | |
| tree | 6515b94799921ce5949633ef1dbff1fdf9205991 /compiler/rustc_codegen_llvm/src/common.rs | |
| parent | eb95acea8aeaeef834214eaffb15d64095fe9271 (diff) | |
| parent | 302867cf48db284cc666fff7c2953f6f94f30aac (diff) | |
| download | rust-b97fd3e5a1545ab02e18c52e7f3d2e78a5c960bf.tar.gz rust-b97fd3e5a1545ab02e18c52e7f3d2e78a5c960bf.zip | |
Auto merge of #82754 - rylev:rusage-windows, r=pnkfelix
Attempt to gather similar stats as rusage on Windows A follow up to #82532. This is a bit hacked in because I think we need to discuss this before merging, but this is an attempt to gather similar metrics as `libc::rusage` on Windows. Some comments on differences: * Currently, we're passing `RUSAGE_CHILDREN` to `rusage` which collects statistics on all children that have been waited on and terminated. I believe this is currently just the invocation of the real `rustc` that the shim is wrapping. Does `rustc` itself spawn children processes? The windows version gets the child processes handle when spawning it, and uses that to collect the statistics. For maxrss, `rusage` will return "the resident set size of the largest child, not the maximum resident set size of the process tree.", the Windows version will only collect statistics on the wrapped `rustc` child process directly even if some theoretical sub process has a larger memory footprint. * There might be subtle differences between `rusage`'s "resident set" and Window's "working set". The "working set" and "resident set" should both be the number of pages that are in memory and which would not cause a page fault when accessed. * I'm not yet sure how best to get the same information that `ru_minflt`, `ru_inblock`, `ru_oublock`, `ru_nivcsw ` and `ru_nvcsw` provide. r? `@pnkfelix`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
0 files changed, 0 insertions, 0 deletions
