From f23392b95af39256420fe71c3ac14f3170917a09 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 20 Mar 2025 14:41:33 -0400 Subject: [PATCH] Retain platform-specific timestamp field that are being added in bug 1961012. --- src/profile-logic/process-profile.js | 6 ++++++ .../profile-conversion.test.js.snap | 18 ++++++++++++++++++ .../profile-upgrading.test.js.snap | 3 +++ src/types/gecko-profile.js | 3 +++ src/types/profile.js | 3 +++ 5 files changed, 33 insertions(+) diff --git a/src/profile-logic/process-profile.js b/src/profile-logic/process-profile.js index c4f374356e..d26dc6bb35 100644 --- a/src/profile-logic/process-profile.js +++ b/src/profile-logic/process-profile.js @@ -1697,6 +1697,12 @@ export function processGeckoProfile(geckoProfile: GeckoProfile): Profile { const meta: ProfileMeta = { interval: geckoProfile.meta.interval, startTime: geckoProfile.meta.startTime, + startTimeAsClockMonotonicNanosecondsSinceBoot: + geckoProfile.meta.startTimeAsClockMonotonicNanosecondsSinceBoot, + startTimeAsMachAbsoluteTimeNanoseconds: + geckoProfile.meta.startTimeAsMachAbsoluteTimeNanoseconds, + startTimeAsQueryPerformanceCounterValue: + geckoProfile.meta.startTimeAsQueryPerformanceCounterValue, abi: geckoProfile.meta.abi, extensions: extensions, misc: geckoProfile.meta.misc, diff --git a/src/test/unit/__snapshots__/profile-conversion.test.js.snap b/src/test/unit/__snapshots__/profile-conversion.test.js.snap index 19e97edb66..efc9b2b291 100644 --- a/src/test/unit/__snapshots__/profile-conversion.test.js.snap +++ b/src/test/unit/__snapshots__/profile-conversion.test.js.snap @@ -563,6 +563,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 0, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, @@ -86311,6 +86314,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 0, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, @@ -444374,6 +444380,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 2574592839.818, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, @@ -450634,6 +450643,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 2782992.2430000002, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, @@ -465519,6 +465531,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 36556170.907, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, @@ -471713,6 +471728,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 115539936.601, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, diff --git a/src/test/unit/__snapshots__/profile-upgrading.test.js.snap b/src/test/unit/__snapshots__/profile-upgrading.test.js.snap index 70b9dba30b..ba5c8243d6 100644 --- a/src/test/unit/__snapshots__/profile-upgrading.test.js.snap +++ b/src/test/unit/__snapshots__/profile-upgrading.test.js.snap @@ -47,6 +47,9 @@ Object { "sourceURL": undefined, "stackwalk": 1, "startTime": 2574592839.818, + "startTimeAsClockMonotonicNanosecondsSinceBoot": undefined, + "startTimeAsMachAbsoluteTimeNanoseconds": undefined, + "startTimeAsQueryPerformanceCounterValue": undefined, "symbolicated": true, "toolkit": undefined, "updateChannel": undefined, diff --git a/src/types/gecko-profile.js b/src/types/gecko-profile.js index a96f8680d2..b74cbaa174 100644 --- a/src/types/gecko-profile.js +++ b/src/types/gecko-profile.js @@ -405,6 +405,9 @@ export type GeckoProfileShortMeta = {| // When the main process started. Timestamp expressed in milliseconds since // midnight January 1, 1970 GMT. startTime: Milliseconds, + startTimeAsClockMonotonicNanosecondsSinceBoot?: number, + startTimeAsMachAbsoluteTimeNanoseconds?: number, + startTimeAsQueryPerformanceCounterValue?: number, shutdownTime: Milliseconds | null, categories: CategoryList, markerSchema: GeckoMetaMarkerSchema[], diff --git a/src/types/profile.js b/src/types/profile.js index 15a313a119..9c74d197be 100644 --- a/src/types/profile.js +++ b/src/types/profile.js @@ -768,6 +768,9 @@ export type ProfileMeta = {| // When the main process started. Timestamp expressed in milliseconds since // midnight January 1, 1970 GMT. startTime: Milliseconds, + startTimeAsClockMonotonicNanosecondsSinceBoot?: number, + startTimeAsMachAbsoluteTimeNanoseconds?: number, + startTimeAsQueryPerformanceCounterValue?: number, // The number of milliseconds since midnight January 1, 1970 GMT. endTime?: Milliseconds, // When the recording started (in milliseconds after startTime).