xctrace ends immediately on real iOS devices.

I have tried to measure the performance on the real iOS device with xtrace.
The command I used is as below:
xcrun xctrace record --device 'UDID' --template 'Time Profiler' --time-limit 1m --all-processes

However, when I ran the command, it ends immediately (before the time limit).

I confirmed that this command works fine on local machine and simulator.
Could you please let me know how can I get it to work on the real iOS device?

Enviromment:
  • MacOS ver: 10.15.5

  • real iOS device ver: 13.4.1

Hi kariaduu,

Interesting! Can you see your device when you call xctrace list devices?

Can you please post output of xctrace? Also, when you open resulting trace, select Extended Detail — it should give you "Exit Reason" in the list of values. Can you please share what does it say?

Thanks,

Kacper
Hi Kacper,

thank you for your reply!

I can see target device in xctrace list devices.

The output of xctrace is as below:
Code Block
$ xcrun xctrace record --device 'UDID' --template 'Time Profiler' --time-limit 1m --all-processes
$ Starting recording with the Time Profiler template. Targeting All Processes. Time limit: 1.0 min
$ Ctrl-C to stop the recording
$ Recording completed. Saving output file...
$ Output file saved as: AllProcesses_2020-07-01_15.32.23_A826235F.trace.


I opened resulting trace, and it is saying:
End reason: Device disconnected
and
Duration: 0 seconds

Regards,

kariaduu
Hi kariaduu,

That's really interesting. It might be some incompatibility between our device side services and Instruments version (as the device is on the previous OS and not iOS 14.0).
To diagnose it further, I'd need some additional diagnostics, would you please be able to help me with this?
Would you be able to file a feedback assistant report with iOS side sysdiagnose and send me the number here?

On how to capture sysdiagnose: https://developer.apple.com/bug-reporting/profiles-and-logs/
It'd be nice to also have macOS side sysdiagnose as well, but it's not required.

Thank you so much for your feedback and help,

Kacper



Hi Kacper,

I sent feedback assistant report with sysdiagnose.
Report number is FB7841536.

I hope you can help us solve it.

kariaduu
Thanks so much kariaduu, really appreciate it.

We'll be looking into this and communicating through the report in case we need any more details.

Kacper
Hi, I have the same problem but my device is iOS 14.0. Any updates?
Hi kariaduu,

This has been fixed in the recently released Xcode Beta.

Thank you for your help and feedback,

Kacper
xctrace ends immediately on real iOS devices.
 
 
Q