GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — sess: default to v0 symbol mangling on nightly by davidtwco · Pull Request #89917 · rust-lang/rust Conversation
|
|
It looks like the valgrind and LLVM tool patches were only just merged in the last couple months - are they included in published releases? It'll probably take at least a year or two for them to get into e.g. LTS releases on distros, which we may not want to wait for, but having at least some release seems reasonable to me and is probably not that long a wait. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bors try @rust-timer queue |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
⌛ Trying commit 4f1bf2a with merge d6cf5a91f80fba50e1594bddce52ee42486468c6... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
As far as I can tell, the LLVM patch is in LLVM 13 (GitHub says llvm/llvm-project@0a2d4f3 is on the branch at least) and valgrind 3.18.0 has support (release notes). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
☀️ Try build successful - checks-actions |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Queued d6cf5a91f80fba50e1594bddce52ee42486468c6 with parent af9b508, future comparison URL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Finished benchmarking commit (d6cf5a91f80fba50e1594bddce52ee42486468c6): comparison url. Summary: This change led to very large relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
FTR, on the just released Ubuntu 21.10, the llvm available in the repos is 13.0, and the valgrind available is 3.17.0. Debian sid however is still on LLVM 11.0. Nix OS has just updated to the new valgrind on their master branch, and I think it'll take a few days until it arrives on hydra. Stable users on 21.05 still get 3.16.1, but 21.11 seems to be on track to getting the new version. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As discussed in the compiler team triage meeting a while ago, we will do a @rust-lang/compiler team FCP on this PR. That will take at least 10 days, so that the new default would make it to stable 1.58 (released January 13th 2022). With that timeline in mind, do you still think it is necessary to wait for a valgrind release, @Mark-Simulacrum? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think the latest valgrind release already contains the relevant patches. I'm not sure how I feel about the default being not supported by tooling on LTS distros, but I don't know that we want to wait for the potentially long time that would take -- it seems unlikely to be too impactful -- rustfilt is pretty fast and easy to install. I think we can see how much trouble we might run into by flipping the default for the compiler itself now (perhaps even before an FCP concludes) so that we can get some sense of the impact -- to maximize the time for identifying any problems we can observe in the wild from users and compiler developers using these. Another concern I'll note that as of now this increases the compiler's install size by ~27 MB (from 378 to 405 MB) -- not a huge increase, but also not particularly small. The download size only goes up by ~5MB so I guess the extended symbols compress well. The stripped binaries avoid this extra cost, but those aren't what we ship today. Maybe it's worth blocking this on stable support for split-debuginfo, which would give a smoother path toward stripping binaries (right?) for most users. But this is not any hard blockers IMO, just some concerns to think through as we make this decision. I think a writeup of each of these and why we're making a particular tradeoff here would be helpful to me at least. On the other hand, there are definite benefits to the new mangling -- e.g., I've been using it for some of the performance triage + improvement work I'm doing locally -- so generally I think we should move ahead. Timeline wise, I don't know whether we expect much breakage or issues filed, but I'll note that shipping in early January probably means most of the beta/nightly cycles will be during holidays and generally we don't have as much speed. So maybe delaying 1 releases (to ~1.59 or 1.60) would be of benefit regardless. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think split-debuginfo can handle linking (import/export) symbols - and I've only heard of a way to split the latter on Windows (mapping names to "ordinals"). (I sometimes "symbols" used ambiguously - the distinction I'm making is that debuginfo is non-semantic, but "linking names" are semantic and allow less wiggle room) It would be great to keep linking names compressed (esp. since a lot of names would share very similar crate roots, path components, etc.) until some Sadly I'm worried platform tooling is decades behind having this kind of infrastructure directly supported, and we'd have to do a lot of it ourselves (and in brittle ways). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, that sounds like a good idea. I'll open a PR shortly.
What format would you like that to have? Extending the PR message maybe?
I think that's an important point: there's also a cost to keeping the old mangling scheme around. We developed the new scheme because the old one is lacking in a number of ways.
That's good point. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Implemented in PR #90054. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, I was thinking about adding to the PR message. I skimmed the RFC but I think it didn't directly address the tradeoffs I mentioned. Another aspect which seems like it's worth including is our plans for eventual removal of the old mangling scheme. I could also imagine that some users might be interested in an alternate mangling that is just a hash and so is as short as possible.
Hm, I guess. I think there's probably still an increase in debuginfo size with the new mangling but I suppose it's probably not as important. Seems good to call out this support / lack thereof, though. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yes, we might want to extend the new scheme with a well-defined "hash mode" for cases like this. E.g. I would also be interested in a "zstd mode" with a predefined dictionary. That might give additional compression without losing information. But we'd need to collect numbers for that and make sure zstd dictionaries are standardized enough for something like that. But both things would need a proper RFC amendment. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've labeled the PR as blocked for now because of @Mark-Simulacrum's point about this becoming stable right after the holiday season. I'll look into a writeup about tradeoffs some time next week. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…piler, r=Mark-Simulacrum Make new symbol mangling scheme default for compiler itself. As suggest in rust-lang#89917 (comment), this PR enables the new symbol mangling scheme for the compiler itself. The standard library is still compiled using the legacy mangling scheme so that the new symbol format does not show up in user code (yet). r? `@Mark-Simulacrum`
…ler, r=Mark-Simulacrum Make new symbol mangling scheme default for compiler itself. As suggest in rust-lang#89917 (comment), this PR enables the new symbol mangling scheme for the compiler itself. The standard library is still compiled using the legacy mangling scheme so that the new symbol format does not show up in user code (yet). r? `@Mark-Simulacrum`
I think this is a really good point! Perhaps it would make sense to land this change on nightly and disable it once beta branches for a few cycles? That would give us extra testing time on nightly while not putting us on a path toward shipping in 1.58 when many people would have been on holiday. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
☀️ Test successful - checks-actions |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing d2f8873 (parent) -> 683dd08 (this PR) Test differencesShow 2 test diffs2 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 683dd08db5808c41baceef49368fc82a6c4767bb --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Finished benchmarking commit (683dd08): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -1.7%, secondary -3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 4.2%, secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 474.035s -> 470.773s (-0.69%) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
v0 mangling for std on nightly Following #89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
…td, r=Kobzol v0 mangling for std on nightly Following rust-lang#89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
|
The binary size regressions are expected, as the v0 mangling scheme produces larger symbols than the legacy mangling scheme, in general. The compile-time regressions were likely caused by the same thing, more symbol string handling and more time spent in LLVM due to processing longer symbols, the query timings show more ~1% more time spent in LLVM for the affected benchmarks. @rustbot label: +perf-regression-triaged |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
v0 mangling for std on nightly Following #89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
v0 mangling for std on nightly Following rust-lang/rust#89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
v0 mangling for std on nightly Following rust-lang/rust#89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
v0 mangling for std on nightly Following rust-lang/rust#89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`. r? `@Kobzol`
|
FYI this broke several debuginfo tests on old versions of GDB. In particular, I don't think we necessarily need to support versions that old but it would be nice to at least mark them with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This surprisingly was not mentioned in the 1.93 release notes, and the fact that it would ship in 1.93 was not mentioned in the blog post announcing the switch on nightly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In fact, the announcement says "on nightly", just as much as this PR title. Was it an oversight that this was not actually limited to nightly, and propagated to beta and stable unnoticed? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
1.96 stable is still using the legacy symbol mangling scheme for me: https://rust.godbolt.org/z/KaM8YK441 Note that rustc itself is compiled with v0, but user code and the standard library should still be compiled with legacy on stable. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Aaaah, sorry for the confusion, I was using local builds of rust stable as "-dev", thus nightly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.