Skip to content

fix(ios): parse Xcode 27 <tagged-backtrace> in xctrace CPU profile reports #2860

Description

@thymikee

Purpose

perf cpu profile report fails with Apple xctrace CPU report contained no samples on Xcode 27, even when the trace holds thousands of samples. The Xcode 27 time-profile export wraps each sample's stack in <tagged-backtrace>. The parser only reads <backtrace> (packages/platform-apple/src/core/perf-time-profile.ts:81-88, at fd8277e39), so every row resolves to no stack.

Evidence: Xcode 27.0 beta 6, xctrace 27.0 (27A5252f), iPhone 17 Pro simulator. I ran xctrace record --template 'Time Profiler' --all-processes --time-limit 3s and then exported /trace-toc/run/data/table[@schema="time-profile"]. The export has 38,327 <tagged-backtrace> elements and 0 <backtrace> elements. This predates #2823; main before that PR parses the same export to zero samples.

Required behavior

  • The time-profile parser reads the sample stack from <tagged-backtrace> as well as <backtrace>, and resolves ref/id the same way for both.
  • Profiles from older Xcode keep parsing unchanged.
  • The report output shape does not change.

Completion conditions

  • An XML fixture captured from Xcode 27 covers <tagged-backtrace>, and the existing <backtrace> fixture test stays green.
  • Live: perf cpu profile start --kind xctrace, then stop, then report on an iOS 27 simulator returns samples. Record the commands in the PR.
  • pnpm check:affected --run is green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions