diff --git a/kram-profile/kram-profile/kram_profileApp.swift b/kram-profile/kram-profile/kram_profileApp.swift index a8d96be..43e72a1 100644 --- a/kram-profile/kram-profile/kram_profileApp.swift +++ b/kram-profile/kram-profile/kram_profileApp.swift @@ -1484,14 +1484,16 @@ func convertStatsToTotalTrack(_ stats: BuildStats) -> [CatapultEvent] { event.ts = stats.frontendStart + stats.totalSource totalEvents.append(event) - event = makeDurEvent(tid, "Total InstantiateClass", stats.totalInstantiateClass, total) - event.ts = stats.frontendStart + stats.totalSource - totalEvents.append(event) - + // put this first, or else InstantiateClass isn't ordered properly + // Perfetto must not be sorting the events properly. So order this one first event = makeDurEvent(tid, "Total CodeGen Function", stats.totalCodeGenFunction, total) event.ts = stats.frontendStart + stats.totalSource + stats.totalInstantiateFunction totalEvents.append(event) + event = makeDurEvent(tid, "Total InstantiateClass", stats.totalInstantiateClass, total) + event.ts = stats.frontendStart + stats.totalSource + totalEvents.append(event) + // backend event = makeDurEvent(tid, "Total Backend", stats.totalBackend, total) event.ts = stats.backendStart