Skip to content

Commit 17cc9b6

Browse files
committed
Auto merge of #77398 - wesleywiser:measureme_0_8, r=Mark-Simulacrum
Upgrade to measureme 9.0.0 I believe I did this correctly but there's still a reference to `[email protected]` coming from `rustc-ap-rustc_data_structures` and I'm not sure how to resolve that. r? `@Mark-Simulacrum` We'll also need to deploy the new version of the tools on perf.rlo.
2 parents 36a7494 + 5ac5556 commit 17cc9b6

File tree

5 files changed

+22
-25
lines changed

5 files changed

+22
-25
lines changed

Cargo.lock

+15-4
Original file line numberDiff line numberDiff line change
@@ -1967,6 +1967,17 @@ dependencies = [
19671967
"rustc-hash",
19681968
]
19691969

1970+
[[package]]
1971+
name = "measureme"
1972+
version = "9.0.0"
1973+
source = "registry+https://github.com/rust-lang/crates.io-index"
1974+
checksum = "22bf8d885d073610aee20e7fa205c4341ed32a761dbde96da5fd96301a8d3e82"
1975+
dependencies = [
1976+
"parking_lot 0.11.0",
1977+
"rustc-hash",
1978+
"smallvec 1.4.2",
1979+
]
1980+
19701981
[[package]]
19711982
name = "memchr"
19721983
version = "2.3.3"
@@ -3099,7 +3110,7 @@ dependencies = [
30993110
"indexmap",
31003111
"jobserver",
31013112
"libc",
3102-
"measureme",
3113+
"measureme 0.7.1",
31033114
"parking_lot 0.11.0",
31043115
"rustc-ap-rustc_graphviz",
31053116
"rustc-ap-rustc_index",
@@ -3501,7 +3512,7 @@ version = "0.0.0"
35013512
dependencies = [
35023513
"bitflags",
35033514
"libc",
3504-
"measureme",
3515+
"measureme 9.0.0",
35053516
"rustc-demangle",
35063517
"rustc_ast",
35073518
"rustc_attr",
@@ -3567,7 +3578,7 @@ dependencies = [
35673578
"indexmap",
35683579
"jobserver",
35693580
"libc",
3570-
"measureme",
3581+
"measureme 9.0.0",
35713582
"parking_lot 0.11.0",
35723583
"rustc-hash",
35733584
"rustc-rayon",
@@ -3872,7 +3883,7 @@ version = "0.0.0"
38723883
dependencies = [
38733884
"bitflags",
38743885
"chalk-ir",
3875-
"measureme",
3886+
"measureme 9.0.0",
38763887
"polonius-engine",
38773888
"rustc-rayon-core",
38783889
"rustc_apfloat",

compiler/rustc_codegen_llvm/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111
[dependencies]
1212
bitflags = "1.0"
1313
libc = "0.2"
14-
measureme = "0.7.1"
14+
measureme = "9.0.0"
1515
snap = "1"
1616
tracing = "0.1"
1717
rustc_middle = { path = "../rustc_middle" }

compiler/rustc_data_structures/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ rustc-hash = "1.1.0"
2525
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
2626
rustc_index = { path = "../rustc_index", package = "rustc_index" }
2727
bitflags = "1.2.1"
28-
measureme = "0.7.1"
28+
measureme = "9.0.0"
2929
libc = "0.2"
3030
stacker = "0.1.12"
3131
tempfile = "3.0.5"

compiler/rustc_data_structures/src/profiling.rs

+4-18
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,9 @@ use std::process;
9494
use std::sync::Arc;
9595
use std::time::{Duration, Instant};
9696

97-
use measureme::{EventId, EventIdBuilder, SerializableString, StringId};
97+
use measureme::{EventId, EventIdBuilder, Profiler, SerializableString, StringId};
9898
use parking_lot::RwLock;
9999

100-
cfg_if! {
101-
if #[cfg(any(windows, target_os = "wasi"))] {
102-
/// FileSerializationSink is faster on Windows
103-
type SerializationSink = measureme::FileSerializationSink;
104-
} else if #[cfg(target_arch = "wasm32")] {
105-
type SerializationSink = measureme::ByteVecSink;
106-
} else {
107-
/// MmapSerializatioSink is faster on macOS and Linux
108-
type SerializationSink = measureme::MmapSerializationSink;
109-
}
110-
}
111-
112-
type Profiler = measureme::Profiler<SerializationSink>;
113-
114100
bitflags::bitflags! {
115101
struct EventFilter: u32 {
116102
const GENERIC_ACTIVITIES = 1 << 0;
@@ -389,7 +375,7 @@ impl SelfProfiler {
389375
output_directory: &Path,
390376
crate_name: Option<&str>,
391377
event_filters: &Option<Vec<String>>,
392-
) -> Result<SelfProfiler, Box<dyn Error>> {
378+
) -> Result<SelfProfiler, Box<dyn Error + Send + Sync>> {
393379
fs::create_dir_all(output_directory)?;
394380

395381
let crate_name = crate_name.unwrap_or("unknown-crate");
@@ -500,13 +486,13 @@ impl SelfProfiler {
500486
self.event_filter_mask.contains(EventFilter::QUERY_KEYS)
501487
}
502488

503-
pub fn event_id_builder(&self) -> EventIdBuilder<'_, SerializationSink> {
489+
pub fn event_id_builder(&self) -> EventIdBuilder<'_> {
504490
EventIdBuilder::new(&self.profiler)
505491
}
506492
}
507493

508494
#[must_use]
509-
pub struct TimingGuard<'a>(Option<measureme::TimingGuard<'a, SerializationSink>>);
495+
pub struct TimingGuard<'a>(Option<measureme::TimingGuard<'a>>);
510496

511497
impl<'a> TimingGuard<'a> {
512498
#[inline]

compiler/rustc_middle/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ rustc_ast = { path = "../rustc_ast" }
2828
rustc_span = { path = "../rustc_span" }
2929
chalk-ir = "0.32.0"
3030
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
31-
measureme = "0.7.1"
31+
measureme = "9.0.0"
3232
rustc_session = { path = "../rustc_session" }

0 commit comments

Comments
 (0)