-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Rollup of 10 pull requests #145601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 10 pull requests #145601
Conversation
previous code was perfectly sound because of MaybeUninit, but it did waste cycles on copying memory that is known to be uninitialized.
Third-party programs running on the VEX V5 platform need a linker script to ensure code and data are always placed in the allowed range `0x3800000-0x8000000` which is read/write/execute. However, users can also configure the operating system to preload a separate file at any location between these two addresses before the program starts (as a sort of basic linking system). Programs have to know about this at compile time - in the linker script - to avoid placing data in a spot that overlaps where the file will be loaded. This is a very popular feature with existing V5 runtimes because it can be used to modify a program's behavior without re-uploading the entire binary to the robot controller. Also, while VEXos's user-exposed file system APIs may only read data from an external SD card, linked files have the advantage of being able to load data directly from the device's onboard storage. This PR adds the `__linked_file_start` symbol to the existing VEX V5 linker script which can be used to shrink the stack and heap so that they do not overlap with the memory region containing a linked file. With these changes, a developer targeting VEX V5 might add a second linker script to their project by specifying `-Clink-arg=-Tcustom.ld` and creating the file `custom.ld` to configure their custom memory layout: ```ld /* Reserve 10MiB for a linked file. */ /* (0x7600000-0x8000000) */ __linked_file_start = __linked_file_end - 10M; /* Optional: specify one or more sections that */ /* represent the developer's custom format. */ SECTIONS { .linked_file_metadata (NOLOAD) : { __linked_file_metadata_start = . . += 1M; __linked_file_metadata_end = . } .linked_file_data (NOLOAD) : { __linked_file_data_start = . . += 9M; __linked_file_data_end = . } } INSERT AFTER .stack; ``` Then, using an external tool like the `vex-v5-serial` crate, they would configure the metadata of their uploaded program to specify the path of their linked file and the address where it should be loaded into memory (in this example, 0x7600000).
Using an error type instead of `()` avoids the duplicated errors on `struct SUnsizedField` in `deriving-from-wrong-target.rs`. It also improves the expanded output from this: ``` struct S2(u32, u32); impl ::core::convert::From<()> for S2 { #[inline] fn from(value: ()) -> S2 { (/*ERROR*/) } } ``` to this: ``` struct S2(u32, u32); impl ::core::convert::From<(/*ERROR*/)> for S2 { #[inline] fn from(value: (/*ERROR*/)) -> S2 { (/*ERROR*/) } } ``` The new code also only matchs on `item.kind` once.
…backshift-less, r=tgross35 bufreader::Buffer::backshift: don't move the uninit bytes previous code was perfectly sound because of MaybeUninit, but it did waste cycles on copying memory that is known to be uninitialized.
triagebot: Don't warn no-mentions on subtree updates Complement to rust-lang/triagebot#2137 r? ``@Urgau``
…jieyouxu Update rust maintainers in openharmony.md
…=Kobzol Avoid using `()` in `derive(From)` output. Using an error type instead of `()` avoids the duplicated errors on `struct SUnsizedField` in `deriving-from-wrong-target.rs`. It also improves the expanded output from this: ``` struct S2(u32, u32); impl ::core::convert::From<()> for S2 { #[inline] fn from(value: ()) -> S2 { (/*ERROR*/) } } ``` to this: ``` struct S2(u32, u32); impl ::core::convert::From<(/*ERROR*/)> for S2 { #[inline] fn from(value: (/*ERROR*/)) -> S2 { (/*ERROR*/) } } ``` The new code also only matchs on `item.kind` once. r? ``@Kobzol``
…e, r=jdonszelmann Allow stability attributes on extern crates Fixes rust-lang#145497 r? ``@jdonszelmann``
…youxu Remove unused `PartialOrd`/`Ord` from bootstrap It was just wasting compile-time. There is one remaining "old" bootstrap test that uses the `Ord` impl on one test step, I'll remove that later.
…s, r=fmease ignore frontmatters in `TokenStream::new` Fixes rust-lang#145520 for now, we'd likely want to figure the stripping part later, so I noted it down on the list on the tracking issue. cc `@fmease`
…oups, r=lqd remove myself from some adhoc-groups and pings Removing myself from some adhoc-groups related to the MIR as its been quite a while since I've worked in that area
Add change tracker entry for `--timings` Follow-up to rust-lang#145379. Forgor when reviewing. r? `@Kobzol`
… r=davidtwco Add VEXos "linked files" support to `armv7a-vex-v5` Third-party programs running on the VEX V5 platform need a linker script to ensure code and data are always placed in the allowed range `0x3800000-0x8000000` which is read/write/execute. However, developers can also configure the operating system (VEXos) to preload a separate file at any location between these two addresses before the program starts (as a sort of basic linking or configuration loading system). Programs have to know about this at compile time - in the linker script - to avoid placing data in a spot that overlaps where the linked file will be loaded. This is a very popular feature with existing V5 runtimes because it can be used to modify a program's behavior without re-uploading the entire binary to the robot controller. It's important for Rust to support this because while VEXos's runtime user-exposed file system APIs may only read data from an external SD card, linked files are allowed to load data directly from the device's onboard storage. This PR adds the `__linked_file_start` symbol to the existing VEX V5 linker script which can be used to shrink the stack and heap so that they do not overlap with a memory region containing a linked file. It expects the linked file to be loaded in the final N bytes of user RAM (this is not technically required but every existing runtime does it this way to avoid having discontinuous memory regions). With these changes, a developer targeting VEX V5 might add a second linker script to their project by specifying `-Clink-arg=-Tcustom.ld` and creating the file `custom.ld` to configure their custom memory layout. The linker would prepend this to the builtin target linker script. ```c /* custom.ld: Reserves 10MiB for a linked file. */ /* (0x7600000-0x8000000) */ __linked_file_length = 10M; /* The above line is equivalent to -Clink-arg=--defsym=__linked_file_length=10M */ /* Optional: specify one or more sections that */ /* represent the developer's custom format. */ SECTIONS { .linked_file_metadata (NOLOAD) : { __linked_file_metadata_start = .; . += 1M; __linked_file_metadata_end = .; } .linked_file_data (NOLOAD) : { __linked_file_data_start = .; . += 9M; __linked_file_data_end = .; } } INSERT AFTER .stack; ``` Then, using an external tool like the `vex-v5-serial` crate, they would configure the metadata of their uploaded program to specify the path of their linked file and the address where it should be loaded into memory (in the above example, `0x7600000`).
@bors r+ rollup=never p=4 |
@bors try jobs=test-various,aarch64-apple |
This comment has been minimized.
This comment has been minimized.
Rollup of 10 pull requests try-job: test-various try-job: aarch64-apple
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 05f5a58e84 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 05f5a58 (parent) -> f605b57 (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 f605b57042ffeb320d7ae44490113a827139b766 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (f605b57): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 4.4%, secondary -5.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.158s -> 470.836s (-0.28%) |
Successful merges:
()
inderive(From)
output. #145550 (Avoid using()
inderive(From)
output.)PartialOrd
/Ord
from bootstrap #145560 (Remove unusedPartialOrd
/Ord
from bootstrap)TokenStream::new
#145568 (ignore frontmatters inTokenStream::new
)--timings
#145576 (Add change tracker entry for--timings
)armv7a-vex-v5
#145578 (Add VEXos "linked files" support toarmv7a-vex-v5
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup