diff --git a/Cargo.lock b/Cargo.lock index 8ff965f..5b7c199 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,7 +140,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -346,7 +346,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -366,15 +366,15 @@ dependencies = [ [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cc" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" +checksum = "47de7e88bbbd467951ae7f5a6f34f70d1b4d9cfce53d5fd70f74ebe118b3db56" [[package]] name = "cfg-if" @@ -432,7 +432,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -617,7 +617,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -639,7 +639,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -685,7 +685,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -780,7 +780,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -791,7 +791,7 @@ checksum = "ba7795da175654fe16979af73f81f26a8ea27638d8d9823d317016888a63dc4c" dependencies = [ "num-traits", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1014,7 +1014,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1500,7 +1500,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -1728,7 +1728,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2150,7 +2150,7 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2199,7 +2199,7 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2258,7 +2258,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2464,7 +2464,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2514,9 +2514,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -2579,7 +2579,7 @@ checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2665,7 +2665,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2734,9 +2734,9 @@ dependencies = [ [[package]] name = "trace-recorder-parser" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8ce2febf2745a34287e68369dac76d2724158b3c91bf8e1ef229d70c94596a" +checksum = "cde2ea4c9e06230237f3ec5be9728dfd8b30f8d89802ea31fa50a51a52a8656e" dependencies = [ "byteordered", "derive_more", @@ -2766,7 +2766,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", ] [[package]] @@ -2960,7 +2960,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", "wasm-bindgen-shared", ] @@ -2982,7 +2982,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 4103976..27d5223 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ bytes = "1" human_bytes = "0.4" simple_moving_average = "1.0" auxon-sdk = { version = "1.3", features = ["modality"] } -trace-recorder-parser = "0.16.1" +trace-recorder-parser = "0.17.0" [dev-dependencies] tempfile = "3.10" diff --git a/src/recorder_data.rs b/src/recorder_data.rs index f4d22c0..cae37bf 100644 --- a/src/recorder_data.rs +++ b/src/recorder_data.rs @@ -32,8 +32,9 @@ pub trait NanosecondsExt { /// Convert to nanosecond time base using the frequency if non-zero fn convert_timestamp>(&self, ticks: T) -> Option { let t = ticks.into(); + let ticks_ns = u128::from(t.get_raw()) * u128::from(Self::ONE_SECOND); self.timer_frequency() - .map(|freq| Nanoseconds::from((t.get_raw() * Self::ONE_SECOND) / freq)) + .map(|freq| Nanoseconds::from((ticks_ns / u128::from(freq)) as u64)) } } @@ -842,6 +843,7 @@ impl From> for MaybeUnknownObjectClass { fn arg_to_attr_val(arg: &Argument) -> AttrVal { match arg { + Argument::Char(v) => AttrVal::String(v.to_string().into()), Argument::I8(v) => AttrVal::Integer(i64::from(*v)), Argument::U8(v) => AttrVal::Integer(i64::from(*v)), Argument::I16(v) => AttrVal::Integer(i64::from(*v)), diff --git a/src/trc_reader.rs b/src/trc_reader.rs index 661db2a..2709e14 100644 --- a/src/trc_reader.rs +++ b/src/trc_reader.rs @@ -42,12 +42,14 @@ pub async fn run( Err(e) => { use trace_recorder_parser::streaming::Error as TrcError; match e { - TrcError::ObjectLookup(_) - | TrcError::InvalidObjectHandle(_) - | TrcError::FormattedString(_) => { + TrcError::ObjectLookup(_) | TrcError::InvalidObjectHandle(_) => { ctx_mngr.set_degraded(format!("Data error {e}")); continue; } + TrcError::FixedUserEventFmtStringLookup(_) | TrcError::FormattedString(_) => { + warn!("Encountered an invalid user event. {e}"); + continue; + } TrcError::TraceRestarted(psf_start_word_endianness) => { warn!("Detected a restarted trace stream"); trd =