Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs-developer/CHANGELOG-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Note that this is not an exhaustive list. Processed profile format upgraders can

## Processed profile format

### Version 69

A new marker schema display location, `timeline-network`, was added. A marker schema can list `timeline-network` in its `display` array to have markers of that type surfaced in the Network track.

### Version 68

The `startTime` and `endTime` columns of the raw marker table (`thread.markers`) can now optionally be stored as `Float64Array`, for profiles loaded from [JsonSlabs](https://github.com/mstange/json-slabs/) files (.jslb, .jslb.gz). Regular JS / JSON arrays are still accepted.
Expand Down
2 changes: 1 addition & 1 deletion src/app-logic/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const GECKO_PROFILE_VERSION = 35;
// The current version of the "processed" profile format.
// Please don't forget to update the processed profile format changelog in
// `docs-developer/CHANGELOG-formats.md`.
export const PROCESSED_PROFILE_VERSION = 68;
export const PROCESSED_PROFILE_VERSION = 69;

// The following are the margin sizes for the left and right of the timeline. Independent
// components need to share these values.
Expand Down
2 changes: 1 addition & 1 deletion src/profile-logic/marker-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const markerSchemaFrontEndOnly: MarkerSchema[] = [
// `display` property is used to decide where to display these markers, and
// we need it to hide them from the marker chart.
name: 'Network',
display: ['marker-table', 'marker-chart'],
display: ['marker-table', 'marker-chart', 'timeline-network'],
chartLabel: '{marker.data.URI}',
fields: [
{
Expand Down
13 changes: 13 additions & 0 deletions src/profile-logic/processed-profile-versioning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,19 @@ const _upgraders: {
// are still accepted. All valid v67 profiles are valid v68 profiles, so
// no upgrader is needed.
},
[69]: (profile: any) => {
// A new marker schema display location, "timeline-network", was added.
Comment thread
fatadel marked this conversation as resolved.
// Add it to any "Network" marker schema already present in the profile.
for (const schema of profile.meta.markerSchema ?? []) {
if (
schema.name === 'Network' &&
schema.display &&
!schema.display.includes('timeline-network')
) {
schema.display.push('timeline-network');
}
}
},
// If you add a new upgrader here, please document the change in
// `docs-developer/CHANGELOG-formats.md`.
};
Expand Down
10 changes: 9 additions & 1 deletion src/profile-logic/tracks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ export function computeLocalTracksByPid(
markerSchema,
'timeline-ipc'
);
const networkTimelineMarkerTypes = getMarkerTypesForDisplay(
markerSchema,
'timeline-network'
);

for (
let threadIndex = 0;
Expand All @@ -362,7 +366,11 @@ export function computeLocalTracksByPid(
tracks.push({ type: 'thread', threadIndex });
}

if (markers.data.some((datum) => datum && datum.type === 'Network')) {
if (
markers.data.some(
(datum) => datum && networkTimelineMarkerTypes.has(datum.type)
)
) {
// This thread has network markers.
tracks.push({ type: 'network', threadIndex });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Object {
"markerSchema": Array [],
"oscpu": "macOS 14.6.1",
"pausedRanges": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "a.out",
"sampleUnits": Object {
Expand Down Expand Up @@ -1452,7 +1452,7 @@ Object {
"markerSchema": Array [],
"oscpu": "macOS 14.6.1",
"pausedRanges": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "a.out",
"sampleUnits": Object {
Expand Down Expand Up @@ -2817,7 +2817,7 @@ Object {
"markerSchema": Array [],
"oscpu": "macOS 14.6.1",
"pausedRanges": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "a.out",
"sampleUnits": Object {
Expand Down Expand Up @@ -4182,7 +4182,7 @@ Object {
"markerSchema": Array [],
"oscpu": "macOS 14.6.1",
"pausedRanges": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "a.out",
"sampleUnits": Object {
Expand Down
2 changes: 1 addition & 1 deletion src/test/store/__snapshots__/profile-view.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Object {
"oscpu": "",
"physicalCPUs": 0,
"platform": "",
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "Firefox",
"sourceURL": "",
Expand Down
36 changes: 18 additions & 18 deletions src/test/unit/__snapshots__/profile-conversion.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Object {
"RefreshDriverTick",
"Network",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "ART Trace (Android)",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -1022,7 +1022,7 @@ Object {
"RefreshDriverTick",
"Network",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "ART Trace (Android)",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -2305,7 +2305,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -2697,7 +2697,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3086,7 +3086,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3187,7 +3187,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3540,7 +3540,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3605,7 +3605,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3759,7 +3759,7 @@ Object {
"markerSchemaNames": Array [
"EventDispatch",
],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Chrome Trace",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -3817,7 +3817,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Firefox",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -4207,7 +4207,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Firefox",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -4265,7 +4265,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Firefox",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -4323,7 +4323,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Firefox",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -4643,7 +4643,7 @@ Object {
"importedFrom": "Simpleperf",
"interval": 0,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "com.example.sampleapplication",
"symbolicated": undefined,
"version": 30,
Expand Down Expand Up @@ -5019,7 +5019,7 @@ Object {
"importedFrom": "Simpleperf",
"interval": 0,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "com.example.sampleapplication",
"symbolicated": undefined,
"version": 30,
Expand Down Expand Up @@ -5319,7 +5319,7 @@ Object {
"importedFrom": "dhat",
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "target/debug/examples/work_log (dhat)",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -5452,7 +5452,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Flamegraph",
"symbolicated": true,
"version": 35,
Expand Down Expand Up @@ -5510,7 +5510,7 @@ Object {
"importedFrom": undefined,
"interval": 1,
"markerSchemaNames": Array [],
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"product": "Flamegraph",
"symbolicated": true,
"version": 35,
Expand Down
11 changes: 7 additions & 4 deletions src/test/unit/__snapshots__/profile-upgrading.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Object {
"oscpu": undefined,
"physicalCPUs": undefined,
"platform": undefined,
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "Firefox",
"sampleUnits": undefined,
Expand Down Expand Up @@ -7620,6 +7620,7 @@ Object {
Object {
"display": Array [
"marker-table",
"timeline-network",
],
"fields": Array [],
"name": "Network",
Expand All @@ -7643,7 +7644,7 @@ Object {
"misc": "rv:48.0",
"oscpu": "Intel Mac OS X 10.11",
"platform": "Macintosh",
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "Firefox",
"stackwalk": 1,
Expand Down Expand Up @@ -8996,6 +8997,7 @@ Object {
Object {
"display": Array [
"marker-table",
"timeline-network",
],
"fields": Array [],
"name": "Network",
Expand All @@ -9019,7 +9021,7 @@ Object {
"misc": "rv:48.0",
"oscpu": "Intel Mac OS X 10.11",
"platform": "Macintosh",
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "Firefox",
"stackwalk": 1,
Expand Down Expand Up @@ -10540,6 +10542,7 @@ Object {
Object {
"display": Array [
"marker-table",
"timeline-network",
],
"fields": Array [],
"name": "Network",
Expand All @@ -10563,7 +10566,7 @@ Object {
"misc": "rv:48.0",
"oscpu": "Intel Mac OS X 10.11",
"platform": "Macintosh",
"preprocessedProfileVersion": 68,
"preprocessedProfileVersion": 69,
"processType": 0,
"product": "Firefox",
"stackwalk": 1,
Expand Down
2 changes: 2 additions & 0 deletions src/types/markers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export type MarkerDisplayLocation =
| 'timeline-ipc'
// This adds markers to the FileIO timeline area in the header.
| 'timeline-fileio'
// This adds markers to the Network track.
| 'timeline-network'
Comment thread
fatadel marked this conversation as resolved.
// TODO - This is not supported yet.
| 'stack-chart';

Expand Down
Loading