Export full callstack/backtrace with `xctrace export`

Hello,

When exporting a time CPU profiling .trace with xctrace export --output foo.xml --input PATH/TO/TRACE/FILE.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="time-sample"] , I am unable to reconstruct the full callstack/backtrace, despite the GUI doing so.

Sample row:

<row>
  <sample-time id="22" fmt="00:00.039.455">39...</sample-time>
  <thread ref="2"/>
  <process ref="4"/>
  <core ref="14"/>
  <thread-state ref="8"/>
  <weight ref="9"/>
  <backtrace id="23" fmt="test::test::foo ← (11 other frames)">
    <process ref="4"/>
    <text-addresses id="24" fmt="frag 1732">4331406713 4331406716</text-addresses>
    <process ref="4"/>
    <text-addresses id="25" fmt="frag 1733">4331403 ...</text-addresses>
  </backtrace>
</row>

As you can see the backtrace is cropped "(11 other frames)", but according to the backtrace documentation:

In extended views, the entire symbolicated backtrace is listed.

So how to export that extended view?

Alternatively, is it possible to symbolicate the backtrace using the text-addresses list? That question was asked a year ago without answer so far.

Best regards

Hi there,

Thank you for the feedback. Would you be able to file a feedback report for Instruments and attach a number here? We will take a look.

Thanks,

Kacper

Hello,

Thank you for your answer, I have filled a report: https://feedbackassistant.apple.com/feedback/10445507

Regards,

This is fixed in Xcode 14.3. Seems like you have to use "time-profile" instead of "time-sample"

Export full callstack/backtrace with `xctrace export`
 
 
Q