Skip to content

Commit 30f4e0c

Browse files
committed
Auto merge of #224 - rust-lang:master, r=wesleywiser
Update stable branch to 11.0.1 release See https://github.com/rust-lang/measureme/releases/tag/11.0.1 r? `@wesleywiser`
2 parents f291450 + b0d7923 commit 30f4e0c

File tree

15 files changed

+82
-99
lines changed

15 files changed

+82
-99
lines changed

.github/workflows/nightly.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ jobs:
1414
- uses: actions/checkout@v4
1515
with:
1616
ref: stable
17-
- uses: actions-rs/toolchain@v1
18-
with:
19-
toolchain: nightly
17+
- name: Set up Rust toolchain
18+
run: rustup toolchain install --no-self-update --profile minimal nightly
2019
- name: Build
21-
run: cargo build --all
20+
run: cargo +nightly build --all
2221
- name: Generate self-profile
2322
run: RUSTFLAGS="-Zself-profile" cargo +nightly build --bin crox
2423
- name: Check crox

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
publish:
8+
name: Publish to crates.io
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install Rust (rustup)
13+
run: rustup update stable && rustup default stable
14+
- name: Publish
15+
env:
16+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
17+
run: cargo publish -p measureme

.github/workflows/rust.yml

Lines changed: 22 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -14,80 +14,31 @@ env:
1414
CARGO_TERM_COLOR: always
1515

1616
jobs:
17-
build_stable:
18-
17+
build:
18+
strategy:
19+
matrix:
20+
rust: [ stable, beta, nightly ]
21+
include:
22+
- rust: nightly
23+
check_cfg: '-Zcheck-cfg'
1924
runs-on: ubuntu-latest
20-
2125
steps:
22-
- uses: actions/checkout@v2
23-
- uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: stable
26+
- uses: actions/checkout@v4
27+
- name: Set up Rust toolchain
28+
run: |
29+
rustup toolchain install --no-self-update --profile minimal ${{ matrix.rust }}
30+
rustup default ${{ matrix.rust }}
31+
# Add a big endian target so we can check that everything at least
32+
# compiles on big endian.
33+
rustup target add --toolchain ${{ matrix.rust }} powerpc64-unknown-linux-gnu
2634
- name: Build
27-
run: cargo build --verbose --all
35+
run: cargo build --verbose --all ${{ matrix.check_cfg }}
2836
- name: Run tests
29-
run: cargo test --verbose --all
37+
run: cargo test --verbose --all ${{ matrix.check_cfg }}
3038
- name: Docs
31-
run: cargo doc --verbose --all
32-
33-
build_beta:
34-
runs-on: ubuntu-latest
35-
36-
steps:
37-
- uses: actions/checkout@v2
38-
- uses: actions-rs/toolchain@v1
39-
with:
40-
toolchain: beta
41-
override: true
42-
- uses: actions-rs/cargo@v1
43-
with:
44-
command: build
45-
args: --verbose --all
46-
- uses: actions-rs/cargo@v1
47-
with:
48-
command: test
49-
args: --verbose --all
50-
- uses: actions-rs/cargo@v1
51-
with:
52-
command: doc
53-
args: --verbose --all
54-
55-
build_nightly:
56-
runs-on: ubuntu-latest
57-
58-
steps:
59-
- uses: actions/checkout@v2
60-
- uses: actions-rs/toolchain@v1
61-
with:
62-
toolchain: nightly
63-
override: true
64-
- uses: actions-rs/cargo@v1
65-
with:
66-
command: build
67-
args: --verbose --all -Zcheck-cfg
68-
- uses: actions-rs/cargo@v1
69-
with:
70-
command: test
71-
args: --verbose --all -Zcheck-cfg
72-
- uses: actions-rs/cargo@v1
73-
with:
74-
command: doc
75-
args: --verbose --all
76-
77-
check_big_endian:
78-
runs-on: ubuntu-latest
79-
80-
steps:
81-
- uses: actions/checkout@v2
82-
- uses: actions-rs/toolchain@v1
83-
with:
84-
toolchain: stable
85-
target: powerpc64-unknown-linux-gnu
86-
override: true
87-
- uses: actions-rs/cargo@v1
88-
with:
89-
command: check
90-
args: --verbose --lib --bins --tests
39+
run: cargo doc --verbose --no-deps
40+
- name: Check big endian
41+
run: cargo check --target powerpc64-unknown-linux-gnu --verbose --all
9142

9243
# These jobs doesn't actually test anything, but they're only used to tell
9344
# bors the build completed, as there is no practical way to detect when a
@@ -97,7 +48,7 @@ jobs:
9748
end-success:
9849
name: bors build finished
9950
runs-on: ubuntu-latest
100-
needs: [build_stable, build_beta, build_nightly, check_big_endian]
51+
needs: [build]
10152
if: github.event.pusher.name == 'bors' && success()
10253
steps:
10354
- name: mark the job as a success
@@ -106,7 +57,7 @@ jobs:
10657
end-failure:
10758
name: bors build finished
10859
runs-on: ubuntu-latest
109-
needs: [build_stable, build_beta, build_nightly, check_big_endian]
60+
needs: [build]
11061
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
11162
steps:
11263
- name: mark the job as a failure

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
# Changelog
22

3+
## [11.0.1] - 2024-01-11
4+
5+
### Changed
6+
7+
- `measureme`: Fix compilation error and regression tests for big endian platforms ([GH-220])
8+
9+
### Added
10+
11+
- Add GitHub Workflow for publishing measureme ([GH-221])
12+
313
## [11.0.0] - 2023-12-14
414

515
### Changed
16+
617
- `measureme`: Update StringId and Addr sizes from u32 to u64 ([GH-216])
718
- `analyzeme`: v9 file format, which uses larger events ([GH-216])
819

@@ -239,3 +250,5 @@
239250
[GH-209]: https://github.com/rust-lang/measureme/pull/209
240251
[GH-211]: https://github.com/rust-lang/measureme/pull/211
241252
[GH-216]: https://github.com/rust-lang/measureme/pull/216
253+
[GH-220]: https://github.com/rust-lang/measureme/pull/220
254+
[GH-221]: https://github.com/rust-lang/measureme/pull/221

analyzeme/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "analyzeme"
3-
version = "11.0.0"
3+
version = "11.0.1"
44
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"

crox/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "crox"
3-
version = "11.0.0"
3+
version = "11.0.1"
44
authors = ["Wesley Wiser <wwiser@gmail.com>"]
55
edition = "2018"
66

decodeme/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "decodeme"
3-
version = "11.0.0"
3+
version = "11.0.1"
44
edition = "2018"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

flamegraph/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
[package]
22
name = "flamegraph"
3-
version = "11.0.0"
4-
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
3+
version = "11.0.1"
4+
authors = [
5+
"Wesley Wiser <wwiser@gmail.com>",
6+
"Michael Woerister <michaelwoerister@posteo>",
7+
]
58
edition = "2018"
69
license = "MIT OR Apache-2.0"
710

811
[dependencies]
912
measureme = { path = "../measureme" }
1013
analyzeme = { path = "../analyzeme" }
1114
clap = { version = "3.2", features = ["derive"] }
12-
inferno = { version="0.9.1", default-features = false }
15+
inferno = { version = "0.11", default-features = false }

measureme/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "measureme"
3-
version = "11.0.0"
3+
version = "11.0.1"
44
authors = ["Wesley Wiser <wwiser@gmail.com>", "Michael Woerister <michaelwoerister@posteo>"]
55
edition = "2018"
66
description = "Support crate for rustc's self-profiling feature"

measureme/src/raw_event.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ impl RawEvent {
154154
{
155155
// We always emit data as little endian, which we have to do
156156
// manually on big endian targets.
157-
bytes[0..4].copy_from_slice(&self.event_kind.as_u32().to_le_bytes());
158-
bytes[4..8].copy_from_slice(&self.event_id.as_u32().to_le_bytes());
159-
bytes[8..12].copy_from_slice(&self.thread_id.to_le_bytes());
160-
bytes[12..16].copy_from_slice(&self.payload1_lower.to_le_bytes());
161-
bytes[16..20].copy_from_slice(&self.payload2_lower.to_le_bytes());
162-
bytes[20..24].copy_from_slice(&self.payloads_upper.to_le_bytes());
157+
bytes[0..8].copy_from_slice(&self.event_kind.as_u64().to_le_bytes());
158+
bytes[8..16].copy_from_slice(&self.event_id.as_u64().to_le_bytes());
159+
bytes[16..20].copy_from_slice(&self.thread_id.to_le_bytes());
160+
bytes[20..24].copy_from_slice(&self.payload1_lower.to_le_bytes());
161+
bytes[24..28].copy_from_slice(&self.payload2_lower.to_le_bytes());
162+
bytes[28..32].copy_from_slice(&self.payloads_upper.to_le_bytes());
163163
}
164164
}
165165

@@ -183,12 +183,12 @@ impl RawEvent {
183183
#[cfg(target_endian = "big")]
184184
{
185185
RawEvent {
186-
event_kind: StringId::new(u32::from_le_bytes(bytes[0..4].try_into().unwrap())),
187-
event_id: EventId::from_u32(u32::from_le_bytes(bytes[4..8].try_into().unwrap())),
188-
thread_id: u32::from_le_bytes(bytes[8..12].try_into().unwrap()),
189-
payload1_lower: u32::from_le_bytes(bytes[12..16].try_into().unwrap()),
190-
payload2_lower: u32::from_le_bytes(bytes[16..20].try_into().unwrap()),
191-
payloads_upper: u32::from_le_bytes(bytes[20..24].try_into().unwrap()),
186+
event_kind: StringId::new(u64::from_le_bytes(bytes[0..8].try_into().unwrap())),
187+
event_id: EventId::from_u64(u64::from_le_bytes(bytes[8..16].try_into().unwrap())),
188+
thread_id: u32::from_le_bytes(bytes[16..20].try_into().unwrap()),
189+
payload1_lower: u32::from_le_bytes(bytes[20..24].try_into().unwrap()),
190+
payload2_lower: u32::from_le_bytes(bytes[24..28].try_into().unwrap()),
191+
payloads_upper: u32::from_le_bytes(bytes[28..32].try_into().unwrap()),
192192
}
193193
}
194194
}

0 commit comments

Comments
 (0)