about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
AgeCommit message (Collapse)AuthorLines
2025-02-14Start using latest release where -f checks all local linksMartin Liska-1/+1
2025-02-14Fix borked linkMartin Liska-1/+1
2025-02-14add notes for perf issueyukang-0/+7
2025-02-13Rollup merge of #136924 - Kobzol:bootstrap-tracing, r=jieyouxuJubilee-0/+8
Add profiling of bootstrap commands using Chrome events Since we now have support for tracing in bootstrap, and the execution of most commands is centralized within a few functions, it's quite trivial to also trace command execution, and visualize it using the Chrome profiler. This can be helpful both to profile what takes time in bootstrap and also to get a visual idea of what happens in a given bootstrap invocation (since the execution of external commands is usually the most interesting thing). This is how it looks: ![image](https://github.com/user-attachments/assets/3351489e-3a0f-4729-9082-5bf40c586d4b) I first tried to use [tracing-flame](https://github.com/tokio-rs/tracing/tree/master/tracing-flame), but the output wasn't very useful, because the event/stackframe names were bootstrap code locations, instead of the command contents. r? ``@jieyouxu``
2025-02-13Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obkbors-2/+2
valtree performance tuning Summary: This PR makes type checking of code with many type-level constants faster. After https://github.com/rust-lang/rust/pull/136180 was merged, we observed a small perf regression (https://github.com/rust-lang/rust/pull/136318#issuecomment-2635562821). This happened because that PR introduced additional copies in the fast reject code path for consts, which is very hot for certain crates: https://github.com/rust-lang/rust/blob/6c1d960d88dd3755548b3818630acb63fa98187e/compiler/rustc_type_ir/src/fast_reject.rs#L486-L487 This PR improves the performance again by properly interning the valtrees so that copying and comparing them becomes faster. This will become especially useful with `feature(adt_const_params)`, so the fast reject code doesn't have to do a deep compare of the valtrees. Note that we can't just compare the interned consts themselves in the fast reject, because sometimes `'static` lifetimes in the type are be replaced with inference variables (due to canonicalization) on one side but not the other. A less invasive alternative that I considered is simply avoiding copies introduced by https://github.com/rust-lang/rust/pull/136180 and comparing the valtrees it in-place (see commit: https://github.com/rust-lang/rust/commit/9e91e50ac5920f0b9b4a3b1e0880c85336ba5c64 / perf results: https://github.com/rust-lang/rust/pull/136593#issuecomment-2642303245), however that was still measurably slower than interning. There are some minor regressions in secondary benchmarks: These happen due to changes in memory allocations and seem acceptable to me. The crates that make heavy use of valtrees show no significant changes in memory usage.
2025-02-13Document bootstrap profilingJakub Beránek-0/+8
2025-02-13Rollup merge of #136858 - safinaskar:parallel-cleanup-2025-02-11-07-54, ↵Jacob Pratt-5/+0
r=SparrowLii Parallel-compiler-related cleanup Parallel-compiler-related cleanup I carefully split changes into commits. Commit messages are self-explanatory. Squashing is not recommended. cc "Parallel Rustc Front-end" https://github.com/rust-lang/rust/issues/113349 r? SparrowLii ``@rustbot`` label: +WG-compiler-parallel
2025-02-12document bootstrap loggingjyn-2/+41
2025-02-13intern valtreesLukas Markeffsky-2/+2
2025-02-12Rollup merge of #136871 - madsmtm:link-to-lang-procedures, r=scottmcmGuillaume Gomez-0/+4
dev-guide: Link to `t-lang` procedures for new features I was confused in https://github.com/rust-lang/rust/pull/136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
2025-02-12Auto merge of #135336 - tshepang:patch-5, r=jieyouxubors-0/+2
clarify and document needs-dynamic-linking try-job: test-various
2025-02-12Run CI multiple times a dayMartin Liska-2/+2
2025-02-11document the directiveTshepang Mbambo-0/+2
2025-02-11dev-guide: Link to t-lang procedures for new featuresMads Marquart-0/+4
2025-02-11src/doc/rustc-dev-guide/src/parallel-rustc.md: remove Arc and Rc (it seems ↵Askar Safin-2/+0
they are left-over after my PR)
2025-02-11compiler/rustc_data_structures/src/sync.rs: remove atomics, but not AtomicU64!Askar Safin-1/+0
2025-02-11compiler/rustc_data_structures/src/sync.rs: delete WeakAskar Safin-1/+0
2025-02-11compiler/rustc_data_structures/src/sync.rs: delete MappedLockGuardAskar Safin-1/+0
It seems it is left-over after some refactoring
2025-02-10Merge from rustcThe rustc-dev-guide Cronjob Bot-9/+6
2025-02-10Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-02-09Rollup merge of #136530 - Kobzol:x-perf, r=onur-ozkanUrgau-3/+1
Implement `x perf` directly in bootstrap Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Turning.20.60x.20perf.60.20into.20a.20first.20class.20command). Implementing the command directly in bootstrap let's us correctly build the compiler toolchain based on input arguments (such as include rustdoc in the toolchain [only] when needed), and it also makes the CLI interface nicer. r? ``@onur-ozkan``
2025-02-07Remove reference to enum.RevealMartin Liska-4/+2
2025-02-06Update links to type schemasMichael Howell-4/+4
What used to be in externs.js is now in rustdoc.d.ts.
2025-02-06improve CI cache docsMarcoIeni-4/+20
2025-02-06Replace link with a https based oneMartin Liska-1/+1
2025-02-05Update rustc-dev-guideJakub Beránek-3/+1
2025-02-04Merge pull request #2243 from Kobzol/pull-cron许杰友 Jieyou Xu (Joe)-2/+2
2025-02-03Make the rustc-pull workflow run less oftenJakub Beránek-2/+2
2025-02-04Merge pull request #2242 from DuskyElf/master许杰友 Jieyou Xu (Joe)-1/+0
2025-02-03overlong lineTshepang Mbambo-2/+4
2025-02-04Remove "Port run-make tests from Make to Rust" tracking issue from Recurring ↵Rehmatpal Singh-1/+0
work
2025-02-03tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc`Askar Safin-6/+5
2025-02-03Merge from rustcThe rustc-dev-guide Cronjob Bot-4/+4
2025-02-03Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-02-02Replace ParseSess::set_dcx with DiagCtxt::set_emitterbjorn3-4/+4
Replacing the error emitter doesn't accidentally clear the error count.
2025-02-02Merge pull request #2236 from rust-lang/rustc-pullYuki Okushi-7/+12
2025-02-02Apply suggestions from code reviewYuki Okushi-2/+2
2025-02-02Merge pull request #2233 from chiichen/nix-shell-devnora-26/+19
Use a more convinient way of developing rustc on NixOS
2025-02-02Merge pull request #2235 from Kobzol/docker-tests-rewriteOnur Özkan-33/+32
Rewrite section on executing Docker tests
2025-02-02Merge from rustcThe rustc-dev-guide Cronjob Bot-6/+11
2025-02-02Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-02-01Reword submodule handlingJakub Beránek-1/+1
2025-02-01Checkout repository sources in rustc-pull CI actionJakub Beránek-0/+1
This is needed for the `gh` command to work.
2025-01-31Auto merge of #136350 - matthiaskrgr:rollup-6eqfyvh, r=matthiaskrgrbors-0/+5
Rollup of 9 pull requests Successful merges: - #134531 ([rustdoc] Add `--extract-doctests` command-line flag) - #135860 (Compiler: Finalize dyn compatibility renaming) - #135992 (Improve documentation when adding a new target) - #136194 (Support clobber_abi in BPF inline assembly) - #136325 (Delay a bug when indexing unsized slices) - #136326 (Replace our `LLVMRustDIBuilderRef` with LLVM-C's `LLVMDIBuilderRef`) - #136330 (Remove unnecessary hooks) - #136336 (Overhaul `rustc_middle::util`) - #136341 (Remove myself from vacation) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-31Pass `GITHUB_TOKEN` to Zulip CI stepJakub Beránek-2/+4
2025-01-31Rollup merge of #135992 - madsmtm:new-target-docs, r=jieyouxuMatthias Krüger-0/+5
Improve documentation when adding a new target https://github.com/rust-lang/rust/pull/133631#issuecomment-2607877936 shows that it can be a bit difficult process-wise to add a new target. I've added a bit of text to the docs, suggesting that users add the target defintion/spec first, and later work on `std` support. I also found that we have two places where we document how to add a new target. I've linked these for now, but they should probably be merged somehow in the future. `@rustbot` label A-docs r? compiler CC `@workingjubilee` who's worked a lot on target specs IIRC.
2025-01-31Auto merge of #136332 - jhpratt:rollup-aa69d0e, r=jhprattbors-1/+1
Rollup of 9 pull requests Successful merges: - #132156 (When encountering unexpected closure return type, point at return type/expression) - #133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle) - #136281 (`rustc_hir_analysis` cleanups) - #136297 (Fix a typo in profile-guided-optimization.md) - #136300 (atomic: extend compare_and_swap migration docs) - #136310 (normalize `*.long-type.txt` paths for compare-mode tests) - #136312 (Disable `overflow_delimited_expr` in edition 2024) - #136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics) - #136323 (Fix a typo in conventions.md) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-31Fix a typo in conventions.mdRyan Cumming-1/+1
Introduced in #135950
2025-01-30Run rustc-pull CI every day, don't notify when there is nothing to updateJakub Beránek-7/+33
2025-01-30Rewrite section on executing Docker testsJakub Beránek-33/+32