Skip to content

Commit bd5a42f

Browse files
author
The rustc-dev-guide Cronjob Bot
committed
Merge from rustc
2 parents 7db11ae + b81c7f0 commit bd5a42f

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

src/building/bootstrapping/debugging-bootstrap.md

+8
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ For `#[instrument]`, it's recommended to:
160160
- Explicitly pick an instrumentation name via `name = ".."` to distinguish between e.g. `run` of different steps.
161161
- Take care to not cause diverging behavior via tracing, e.g. building extra things only when tracing infra is enabled.
162162

163+
### Profiling bootstrap
164+
165+
You can use the `COMMAND` tracing target to trace execution of most commands spawned by bootstrap. If you also use the `BOOTSTRAP_PROFILE=1` environment variable, bootstrap will generate a Chrome JSON trace file, which can be visualized in Chrome's `chrome://tracing` page or on https://ui.perfetto.dev.
166+
167+
```bash
168+
$ BOOTSTRAP_TRACING=COMMAND=trace BOOTSTRAP_PROFILE=1 ./x build library
169+
```
170+
163171
### rust-analyzer integration?
164172

165173
Unfortunately, because bootstrap is a `rust-analyzer.linkedProjects`, you can't ask r-a to check/build bootstrap itself with `tracing` feature enabled to get relevant completions, due to lack of support as described in <https://github.com/rust-lang/rust-analyzer/issues/8521>.

src/implementing_new_features.md

+4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ smoothly.
99
**NOTE: this section is for *language* features, not *library* features,
1010
which use [a different process].**
1111

12+
See also [the Rust Language Design Team's procedures][lang-propose] for
13+
proposing changes to the language.
14+
1215
[a different process]: ./stability.md
16+
[lang-propose]: https://lang-team.rust-lang.org/how_to/propose.html
1317

1418
## The @rfcbot FCP process
1519

src/mir/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ The most important rule for
304304
this representation is that every value must be uniquely represented. In other
305305
words: a specific value must only be representable in one specific way. For example: there is only
306306
one way to represent an array of two integers as a `ValTree`:
307-
`ValTree::Branch(&[ValTree::Leaf(first_int), ValTree::Leaf(second_int)])`.
307+
`Branch([Leaf(first_int), Leaf(second_int)])`.
308308
Even though theoretically a `[u32; 2]` could be encoded in a `u64` and thus just be a
309-
`ValTree::Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree`
309+
`Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree`
310310
(and is very complex to do, so it is unlikely anyone is tempted to do so).
311311

312312
These rules also mean that some values are not representable. There can be no `union`s in type

src/parallel-rustc.md

-5
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
4646

4747
| data structure | parallel | non-parallel |
4848
| -------------------------------- | --------------------------------------------------- | ------------ |
49-
| Weak | std::sync::Weak | std::rc::Weak |
50-
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
5149
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
5250
| Lock\<T> | (parking_lot::Mutex\<T>) | (std::cell::RefCell) |
5351
| RwLock\<T> | (parking_lot::RwLock\<T>) | (std::cell::RefCell) |
@@ -58,7 +56,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
5856
| WriteGuard | parking_lot::RwLockWriteGuard | std::cell::RefMut |
5957
| MappedWriteGuard | parking_lot::MappedRwLockWriteGuard | std::cell::RefMut |
6058
| LockGuard | parking_lot::MutexGuard | std::cell::RefMut |
61-
| MappedLockGuard | parking_lot::MappedMutexGuard | std::cell::RefMut |
6259

6360
- These thread-safe data structures are interspersed during compilation which
6461
can cause lock contention resulting in degraded performance as the number of
@@ -173,12 +170,10 @@ Here are some resources that can be used to learn more:
173170
- [This list of interior mutability in the compiler by nikomatsakis][imlist]
174171

175172
[`rayon`]: https://crates.io/crates/rayon
176-
[Arc]: https://doc.rust-lang.org/std/sync/struct.Arc.html
177173
[imlist]: https://github.com/nikomatsakis/rustc-parallelization/blob/master/interior-mutability-list.md
178174
[irlo0]: https://internals.rust-lang.org/t/parallelizing-rustc-using-rayon/6606
179175
[irlo1]: https://internals.rust-lang.org/t/help-test-parallel-rustc/11503
180176
[monomorphization]: backend/monomorph.md
181177
[parallel-rustdoc]: https://github.com/rust-lang/rust/issues/82741
182-
[Rc]: https://doc.rust-lang.org/std/rc/struct.Rc.html
183178
[rustc-rayon]: https://github.com/rust-lang/rustc-rayon
184179
[tracking]: https://github.com/rust-lang/rust/issues/48685

src/tests/directives.md

+3
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Some examples of `X` in `ignore-X` or `only-X`:
154154
`ignore-coverage-map`, `ignore-coverage-run`
155155
- When testing a dist toolchain: `dist`
156156
- This needs to be enabled with `COMPILETEST_ENABLE_DIST_TESTS=1`
157+
- The `rustc_abi` of the target: e.g. `rustc_abi-x86_64-sse2`
157158

158159
The following directives will check rustc build settings and target
159160
settings:
@@ -192,6 +193,8 @@ settings:
192193
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
193194
16, ptr` will only run if it supports the comma-separated list of atomic
194195
widths.
196+
- `needs-dynamic-linking` - ignores if target does not support dynamic linking
197+
(which is orthogonal to it being unable to create `dylib` and `cdylib` crate types)
195198

196199
The following directives will check LLVM support:
197200

0 commit comments

Comments
 (0)