commit
66c60d1aef
|
|
@ -15,9 +15,9 @@ extern crate rustc_span;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use rustc_ast_pretty::pprust::item_to_string;
|
use rustc_ast_pretty::pprust::item_to_string;
|
||||||
use rustc_data_structures::sync::Lrc;
|
|
||||||
use rustc_driver::{Compilation, run_compiler};
|
use rustc_driver::{Compilation, run_compiler};
|
||||||
use rustc_interface::interface::{Compiler, Config};
|
use rustc_interface::interface::{Compiler, Config};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
@ -43,7 +43,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
|
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
|
||||||
Err(io::Error::other("oops"))
|
Err(io::Error::other("oops"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ extern crate rustc_span;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use rustc_ast_pretty::pprust::item_to_string;
|
use rustc_ast_pretty::pprust::item_to_string;
|
||||||
use rustc_data_structures::sync::Lrc;
|
|
||||||
use rustc_driver::{Compilation, run_compiler};
|
use rustc_driver::{Compilation, run_compiler};
|
||||||
use rustc_interface::interface::{Compiler, Config};
|
use rustc_interface::interface::{Compiler, Config};
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
|
|
@ -43,7 +43,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_binary_file(&self, _path: &Path) -> io::Result<Lrc<[u8]>> {
|
fn read_binary_file(&self, _path: &Path) -> io::Result<Arc<[u8]>> {
|
||||||
Err(io::Error::other("oops"))
|
Err(io::Error::other("oops"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
613bdd49978298648ed05ace086bd1ecad54b44a
|
124cc92199ffa924f6b4c7cc819a85b65e0c3984
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ Lints are registered via the [`LintStore::register_lint`] function. This should
|
||||||
happen just once for any lint, or an ICE will occur.
|
happen just once for any lint, or an ICE will occur.
|
||||||
|
|
||||||
Once the registration is complete, we "freeze" the lint store by placing it in
|
Once the registration is complete, we "freeze" the lint store by placing it in
|
||||||
an `Lrc`.
|
an `Arc`.
|
||||||
|
|
||||||
Lint passes are registered separately into one of the categories
|
Lint passes are registered separately into one of the categories
|
||||||
(pre-expansion, early, late, late module). Passes are registered as a closure
|
(pre-expansion, early, late, late module). Passes are registered as a closure
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ are implemented differently depending on whether `parallel-compiler` is true.
|
||||||
|
|
||||||
| data structure | parallel | non-parallel |
|
| data structure | parallel | non-parallel |
|
||||||
| -------------------------------- | --------------------------------------------------- | ------------ |
|
| -------------------------------- | --------------------------------------------------- | ------------ |
|
||||||
| Lrc | std::sync::Arc | std::rc::Rc |
|
|
||||||
| Weak | std::sync::Weak | std::rc::Weak |
|
| Weak | std::sync::Weak | std::rc::Weak |
|
||||||
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
|
| Atomic{Bool}/{Usize}/{U32}/{U64} | std::sync::atomic::Atomic{Bool}/{Usize}/{U32}/{U64} | (std::cell::Cell<bool/usize/u32/u64>) |
|
||||||
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
|
| OnceCell | std::sync::OnceLock | std::cell::OnceCell |
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@ However, using the suite manually can be a bit cumbersome. To make this easier f
|
||||||
the compiler build system (`bootstrap`) also provides built-in integration with the benchmarking suite,
|
the compiler build system (`bootstrap`) also provides built-in integration with the benchmarking suite,
|
||||||
which will download and build the suite for you, build a local compiler toolchain and let you profile it using a simplified command-line interface.
|
which will download and build the suite for you, build a local compiler toolchain and let you profile it using a simplified command-line interface.
|
||||||
|
|
||||||
You can use the `./x perf -- <command> [options]` command to use this integration.
|
You can use the `./x perf <command> [options]` command to use this integration.
|
||||||
|
|
||||||
> Note that you need to specify arguments after `--` in the `x perf` command! You will not be able to pass arguments without the double dashes.
|
|
||||||
|
|
||||||
You can use normal bootstrap flags for this command, such as `--stage 1` or `--stage 2`, for example to modify the stage of the created sysroot. It might also be useful to configure `config.toml` to better support profiling, e.g. set `rust.debuginfo-level = 1` to add source line information to the built compiler.
|
You can use normal bootstrap flags for this command, such as `--stage 1` or `--stage 2`, for example to modify the stage of the created sysroot. It might also be useful to configure `config.toml` to better support profiling, e.g. set `rust.debuginfo-level = 1` to add source line information to the built compiler.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue