instruments command line not always work, where to check error log

Hi there,

I am suffering from the instruments command line, and I am wondering if someone could help me out? Thanks in advanced

When I run the following instruments command line, sometimes it prints out 'Instruments Trace Complete' and no error is shown

but it quits so soon, and no data is profiled. The time limit is 8000ms, and the command line finishes in 2 or 3 seconds. What I could not understand is it doesn't show any error.

The command line:

instruments -t "Metal System Trace" -D ~/output_trace -l 8000 -w myUDID -p myProcessID -v

Its output:

instruments[9119]: Loading template 'file:///Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Packages/GPU.instrdst/Contents/Templates/Metal%20System%20Trace.tracetemplate'

instruments[9119]: Stopping Recording

Instruments Trace Complete: /Users/***/output_trace.trace


The question is, why no data output in output_trace.trace and where to check the error log message? Thanks.



Xcode Version: Version 10.0 (10A255)

Instruments Command line Version: instruments, version 10.0 (64293.19)

IPhone Version: 12.0 (16A366)

Replies

Does it work to use the Instruments.app UI to do the same trace? In particular, attaching to an already-running process. If not, I wonder if it gives any additional diagnostic information about why it failed.

Thanks for your reply, Ken. The GUI Instruments tool always works well while the command line doesn't. I need to profile one of my scenrios 100 times and more. I couldn't do that via GUI, but unfortunately, the command line tool failed without any error message.