rust-lang / rustc-perf

Website for graphing performance of rustc
https://perf.rust-lang.org
628 stars 148 forks source link

Binary size on multiple targets #1760

Open tgross35 opened 10 months ago

tgross35 commented 10 months ago

Based on https://github.com/rust-lang/wg-binary-size/issues/3, we would like to see binary size outputs on a few different targets show up as perf results. Just checking output size should be relatively fast compared to benchmarking so we can probably include any std targets that we can cross compile to, as well as something WASM and a few popular no_std targets.

It would be extra nice if the report could hold expanded details about the size of each section, but that is a bonus rather than a core feature.

Kobzol commented 10 months ago

I guess that we should do something first-class for measuring the binary size, rather than the current two hacky "-tiny" benchmarks. For the use-cases that you have envisioned, would it be enough to all of them to cross-compile from Linux x64?

Regarding the binary sections, I thought about it, and it would be possible, but we'd need to store relatively a lot of data into the DB, if we did it eagerly. And we can't really do it lazely, because the server does not get access to the built binaries (they are actually immediately deleted).

I wonder if it would be useful as a start to have a command in rustc-perf to show the binary sections at least locally?

tgross35 commented 10 months ago

I think cross compilation is definitely fine, especially since some targets are always cross compiled.

Sections really isn't necessary. That was just an idea for a quick geiger counter of where changes were, without replicating the build locally.

Kobzol commented 9 months ago

https://github.com/rust-lang/rustc-perf/pull/1772 implemented a new local command to examine the section and symbol sizes of compile benchmarks.