From 241c60536627d169f8f22f6298b21a29cab5d250 Mon Sep 17 00:00:00 2001 From: fatadel Date: Thu, 23 Jul 2026 10:36:04 +0200 Subject: [PATCH] Create the IPC track from the timeline-ipc schema display location The IPC timeline track was added whenever a thread had a marker with data.type === 'IPC', even though the markers shown inside that track were already selected via the timeline-ipc marker-schema display location. Drive track creation from that same display location so the two agree, and so IPC handling no longer hardcodes the payload type. The combined (front-end + Gecko) schema list is used so the front-end IPC schema override always contributes its timeline-ipc location. Part of #6194 --- src/profile-logic/tracks.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/profile-logic/tracks.ts b/src/profile-logic/tracks.ts index 0419d35430..32dd6ebb8f 100644 --- a/src/profile-logic/tracks.ts +++ b/src/profile-logic/tracks.ts @@ -24,6 +24,10 @@ import { computeStackTableFromRawStackTable, computeFrameTableFromRawFrameTable, } from './profile-data'; +import { + computeCombinedMarkerSchemaList, + getMarkerTypesForDisplay, +} from './marker-data'; import { intersectSets, subtractSets } from '../utils/set'; import { StringTable } from '../utils/string-table'; import { splitSearchString, stringsToRegExp } from '../utils/string'; @@ -324,9 +328,16 @@ export function computeLocalTracksByPid( } // find markers that might have their own track. - const markerSchemasWithGraphs = (profile.meta.markerSchema || []).filter( + const markerSchema = computeCombinedMarkerSchemaList( + profile.meta.markerSchema || [] + ); + const markerSchemasWithGraphs = markerSchema.filter( (schema) => Array.isArray(schema.graphs) && schema.graphs.length > 0 ); + const ipcTimelineMarkerTypes = getMarkerTypesForDisplay( + markerSchema, + 'timeline-ipc' + ); for ( let threadIndex = 0; @@ -356,7 +367,11 @@ export function computeLocalTracksByPid( tracks.push({ type: 'network', threadIndex }); } - if (markers.data.some((datum) => datum && datum.type === 'IPC')) { + if ( + markers.data.some( + (datum) => datum && ipcTimelineMarkerTypes.has(datum.type) + ) + ) { // This thread has IPC markers. tracks.push({ type: 'ipc', threadIndex }); }