From 43db4f4242c5996d4ca29d5ee5475008e5445c99 Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 8 Jul 2024 21:08:33 +0200 Subject: [PATCH] update fxprof_processed_profile --- Cargo.lock | 5 +++-- tracing-trace/Cargo.toml | 2 +- tracing-trace/src/processor/firefox_profiler.rs | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94ae6e541..e16f55a53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2083,14 +2083,15 @@ dependencies = [ [[package]] name = "fxprof-processed-profile" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +checksum = "ce20bbb48248608ba4908b45fe36e17e40f56f8c6bb385ecf5d3c4a1e8b05a22" dependencies = [ "bitflags 2.6.0", "debugid", "fxhash", "serde", + "serde_derive", "serde_json", ] diff --git a/tracing-trace/Cargo.toml b/tracing-trace/Cargo.toml index ca9c07fe4..9afada3c2 100644 --- a/tracing-trace/Cargo.toml +++ b/tracing-trace/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] color-spantrace = "0.2.1" -fxprof-processed-profile = "0.6.0" +fxprof-processed-profile = "0.7.0" serde = { version = "1.0.204", features = ["derive"] } serde_json = "1.0.120" tracing = "0.1.40" diff --git a/tracing-trace/src/processor/firefox_profiler.rs b/tracing-trace/src/processor/firefox_profiler.rs index da3380e5c..9cb9540bb 100644 --- a/tracing-trace/src/processor/firefox_profiler.rs +++ b/tracing-trace/src/processor/firefox_profiler.rs @@ -1,9 +1,10 @@ use std::collections::HashMap; use fxprof_processed_profile::{ - CategoryPairHandle, CounterHandle, CpuDelta, Frame, FrameFlags, FrameInfo, MarkerDynamicField, - MarkerFieldFormat, MarkerLocation, MarkerSchema, MarkerSchemaField, ProcessHandle, Profile, - ProfilerMarker, ReferenceTimestamp, SamplingInterval, StringHandle, Timestamp, + CategoryHandle, CategoryPairHandle, CounterHandle, CpuDelta, Frame, FrameFlags, FrameInfo, + MarkerDynamicField, MarkerFieldFormat, MarkerLocation, MarkerSchema, MarkerSchemaField, + ProcessHandle, Profile, ProfilerMarker, ReferenceTimestamp, SamplingInterval, StringHandle, + Timestamp, }; use serde_json::json; @@ -129,6 +130,7 @@ pub fn to_firefox_profile( profile.add_marker_with_stack( *thread_handle, + CategoryHandle::OTHER, &callsite.name, marker, fxprof_processed_profile::MarkerTiming::Interval( @@ -179,6 +181,7 @@ pub fn to_firefox_profile( profile.add_marker_with_stack( *thread_handle, + CategoryHandle::OTHER, &callsite.name, marker, fxprof_processed_profile::MarkerTiming::Instant(timestamp),