Move NativeLib::filename to the rmeta-link archive member#156735
Move NativeLib::filename to the rmeta-link archive member#156735mehdiakiki wants to merge 1 commit into
Conversation
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
053432f to
8f96681
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
8f96681 to
5a93c75
Compare
|
r? @petrochenkov |
5a93c75 to
3b0d8b8
Compare
|
Started working on it today. Should have it ready soon. |
3b0d8b8 to
e923f64
Compare
This comment has been minimized.
This comment has been minimized.
e923f64 to
2414bd9
Compare
This comment has been minimized.
This comment has been minimized.
2414bd9 to
b0da354
Compare
This comment has been minimized.
This comment has been minimized.
b0da354 to
92610ca
Compare
This comment has been minimized.
This comment has been minimized.
92610ca to
70f18ca
Compare
This comment has been minimized.
This comment has been minimized.
70f18ca to
578ba56
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Move NativeLib::filename to the rmeta-link archive member
We need something similar to |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (7894972): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never 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 8.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 509.672s -> 510.294s (0.12%) |
|
Some regressions on linking-heavy workloads like |
|
|
|
I won't have time to look until next week. |
|
@petrochenkov sure will do. |
ac119d2 to
b8f2284
Compare
|
|
@rustbot ready |
|
@petrochenkov I split the cstore out into #158194 once it lands I will rebase this PR on top of it so that the native_lib_filenames reads go through the cache instead of redoing the parsing for each rlib. |
…oded lib.rmeta-link archive members, and routes add_archive read through it so each rlib link metadata is decoded at most once per link. This is a demand that originated from the discussion in rust-lang#156735 and we split it out as its own PR. It gives that PR a decode once path tp read instead of reparsing each rlib per crate once native_lib_filenames moves to a link time read.
…=petrochenkov Adds RmetaLinkCache a per-link cache that uses path as the key of dec… Adds `RmetaLinkCache` a per link and path keyed cache of decoded `lib.rmeta-link` archive members and routes the add_archive read through it so that each rlib link metadata is decoded only one per link at most. This is a request that originated from the discussion in rust-lang#156735 and we split it out as its own PR. It gives that PR a decode once path to read instead of reparsing each `rlib` per crate, and this will be in effect once `native_lib_filenames` moves to a link-time read. Part of rust-lang#138243
…=petrochenkov Adds RmetaLinkCache a per-link cache that uses path as the key of dec… Adds `RmetaLinkCache` a per link and path keyed cache of decoded `lib.rmeta-link` archive members and routes the add_archive read through it so that each rlib link metadata is decoded only one per link at most. This is a request that originated from the discussion in rust-lang#156735 and we split it out as its own PR. It gives that PR a decode once path to read instead of reparsing each `rlib` per crate, and this will be in effect once `native_lib_filenames` moves to a link-time read. Part of rust-lang#138243
…=petrochenkov Adds RmetaLinkCache a per-link cache that uses path as the key of dec… Adds `RmetaLinkCache` a per link and path keyed cache of decoded `lib.rmeta-link` archive members and routes the add_archive read through it so that each rlib link metadata is decoded only one per link at most. This is a request that originated from the discussion in rust-lang#156735 and we split it out as its own PR. It gives that PR a decode once path to read instead of reparsing each `rlib` per crate, and this will be in effect once `native_lib_filenames` moves to a link-time read. Part of rust-lang#138243
View all comments
Second PR in #138243
Moves
NativeLib::filenameout ofrmetaintolib.rmeta-linkarchive member that was introduced in the first PR. Filename is a link time only data so requiring a full metadata decode should be avoided. It is stored as(name, filename)pairs keyed by name, the newMetadataLoader::get_rlib_native_lib_filenamespatches it back on decode. Also bumpedMETADATA_VERSIONfrom version 10 to 11. Added also new round trip test and existing bundled-libs tests still pass.