Skip to content

Commit

Permalink
kram-profile - fix InstantiateClass ordering, Perfetto seems to have …
Browse files Browse the repository at this point in the history
…bug establishing hierarchy
  • Loading branch information
alecazam committed Mar 18, 2024
1 parent 67abcd2 commit cc111d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kram-profile/kram-profile/kram_profileApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc111d0

Please sign in to comment.