From fdb22679e76fea8b5b4b86c270a0f8eb66c7f117 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 2 Jan 2020 14:22:34 +0100 Subject: [PATCH 1/3] Add big-endian CI tests. --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index b4f863c..6383240 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,15 @@ language: rust +before_install: + - rustup target add powerpc64-unknown-linux-gnu rust: - stable - beta - nightly +fast_finish: true +env: + - CARGO_INCREMENTAL=0 +install: skip +script: + - cargo check --verbose --target powerpc64-unknown-linux-gnu --lib --bins --tests || exit 1 + - cargo build --verbose --all || exit 1 + - cargo test --verbose --all From c18032dcbf1e7e1fd2ccb5ef77eebdbb62320b25 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 2 Jan 2020 15:45:19 +0100 Subject: [PATCH 2/3] Fix compilation error on big endian platforms. --- measureme/src/event_id.rs | 7 +++++++ measureme/src/raw_event.rs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/measureme/src/event_id.rs b/measureme/src/event_id.rs index 64af40e..affbbf6 100644 --- a/measureme/src/event_id.rs +++ b/measureme/src/event_id.rs @@ -44,6 +44,13 @@ impl EventId { pub fn from_virtual(virtual_id: StringId) -> EventId { EventId(virtual_id) } + + /// Create an EventId from a raw u32 value. Only used internally for + /// deserialization. + #[inline] + pub fn from_u32(raw_id: u32) -> EventId { + EventId(StringId::new(raw_id)) + } } pub struct EventIdBuilder<'p, S: SerializationSink> { diff --git a/measureme/src/raw_event.rs b/measureme/src/raw_event.rs index 557ff31..68ec2ba 100644 --- a/measureme/src/raw_event.rs +++ b/measureme/src/raw_event.rs @@ -149,8 +149,8 @@ impl RawEvent { { use byteorder::{ByteOrder, LittleEndian}; RawEvent { - event_kind: StringId::reserved(LittleEndian::read_u32(&bytes[0..])), - event_id: StringId::reserved(LittleEndian::read_u32(&bytes[4..])), + event_kind: StringId::new(LittleEndian::read_u32(&bytes[0..])), + event_id: EventId::from_u32(LittleEndian::read_u32(&bytes[4..])), thread_id: LittleEndian::read_u32(&bytes[8..]), start_time_lower: LittleEndian::read_u32(&bytes[12..]), end_time_lower: LittleEndian::read_u32(&bytes[16..]), From 645025b4c18210b01e031b2d276a01718d0c00a3 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 2 Jan 2020 15:48:24 +0100 Subject: [PATCH 3/3] Bump version to 0.7.1 --- analyzeme/Cargo.toml | 2 +- crox/Cargo.toml | 2 +- flamegraph/Cargo.toml | 2 +- measureme/Cargo.toml | 2 +- mmview/Cargo.toml | 2 +- stack_collapse/Cargo.toml | 2 +- summarize/Cargo.toml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/analyzeme/Cargo.toml b/analyzeme/Cargo.toml index b035da2..aaf679e 100644 --- a/analyzeme/Cargo.toml +++ b/analyzeme/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "analyzeme" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/crox/Cargo.toml b/crox/Cargo.toml index e5b1ec1..070d7fd 100644 --- a/crox/Cargo.toml +++ b/crox/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crox" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser "] edition = "2018" diff --git a/flamegraph/Cargo.toml b/flamegraph/Cargo.toml index e9088f5..ff4b4f5 100644 --- a/flamegraph/Cargo.toml +++ b/flamegraph/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flamegraph" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/measureme/Cargo.toml b/measureme/Cargo.toml index f15b638..c8c554f 100644 --- a/measureme/Cargo.toml +++ b/measureme/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "measureme" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" description = "Support crate for rustc's self-profiling feature" diff --git a/mmview/Cargo.toml b/mmview/Cargo.toml index 4edcaf5..62d42df 100644 --- a/mmview/Cargo.toml +++ b/mmview/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mmview" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/stack_collapse/Cargo.toml b/stack_collapse/Cargo.toml index ad8f223..b18421a 100644 --- a/stack_collapse/Cargo.toml +++ b/stack_collapse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stack_collapse" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" license = "MIT OR Apache-2.0" diff --git a/summarize/Cargo.toml b/summarize/Cargo.toml index f8fc856..0a87668 100644 --- a/summarize/Cargo.toml +++ b/summarize/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "summarize" -version = "0.7.0" +version = "0.7.1" authors = ["Wesley Wiser ", "Michael Woerister "] edition = "2018" license = "MIT OR Apache-2.0"