Skip to content

Commit 5ac5556

Browse files
committed
Upgrade to measureme 9.0.0
1 parent f58ffc9 commit 5ac5556

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
@@ -1957,6 +1957,17 @@ dependencies = [
19571957
"rustc-hash",
19581958
]
19591959

1960+
[[package]]
1961+
name = "measureme"
1962+
version = "9.0.0"
1963+
source = "registry+https://github.com/rust-lang/crates.io-index"
1964+
checksum = "22bf8d885d073610aee20e7fa205c4341ed32a761dbde96da5fd96301a8d3e82"
1965+
dependencies = [
1966+
"parking_lot 0.11.0",
1967+
"rustc-hash",
1968+
"smallvec 1.4.2",
1969+
]
1970+
19601971
[[package]]
19611972
name = "memchr"
19621973
version = "2.3.3"
@@ -3089,7 +3100,7 @@ dependencies = [
30893100
"indexmap",
30903101
"jobserver",
30913102
"libc",
3092-
"measureme",
3103+
"measureme 0.7.1",
30933104
"parking_lot 0.11.0",
30943105
"rustc-ap-rustc_graphviz",
30953106
"rustc-ap-rustc_index",
@@ -3491,7 +3502,7 @@ version = "0.0.0"
34913502
dependencies = [
34923503
"bitflags",
34933504
"libc",
3494-
"measureme",
3505+
"measureme 9.0.0",
34953506
"rustc-demangle",
34963507
"rustc_ast",
34973508
"rustc_attr",
@@ -3557,7 +3568,7 @@ dependencies = [
35573568
"indexmap",
35583569
"jobserver",
35593570
"libc",
3560-
"measureme",
3571+
"measureme 9.0.0",
35613572
"parking_lot 0.11.0",
35623573
"rustc-hash",
35633574
"rustc-rayon",
@@ -3862,7 +3873,7 @@ version = "0.0.0"
38623873
dependencies = [
38633874
"bitflags",
38643875
"chalk-ir",
3865-
"measureme",
3876+
"measureme 9.0.0",
38663877
"polonius-engine",
38673878
"rustc-rayon-core",
38683879
"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)