iprofiler (Instruments command line) authorization failure

Hey all,

I am working with Xcode 9.2 on both High Sierra and Sierra machines. I am trying to use (for the first time) the iprofiler command line tool to record an instruments trace of my process. But I'm getting an authorization error at startup that I am finding hard to troubleshoot. Just to make sure it wasn't my app, I switched the iprofiler command line to run /bin/ls and still had problems. I also tried with sudo in case that was an issue and it didn't help.


machine:~ user$ iprofiler -systemtrace /bin/ls

iprofiler error: DTPerformanceSession: Authorization failure.


machine:~ user$ sudo iprofiler -systemtrace /bin/ls

iprofiler error: DTPerformanceSession: Authorization failure.


Any ideas on where to look to figure out what is going on here?


Thanks!

Matthew

I am experiencing the same problem, both on Sierra, and now High Sierra installations. I previously used the `iprofiler` command regularly without problems. As far as I know, I made no other configuration changes except upgrading the OS.


I just found this blog (in non-english script) that seems to have a solution:

http://watson.hatenablog.com/entry/2017/10/03/235305


It appears that now instead of `iprofiler`, we should use a call to `instruments`. This appears to work, although I'm not sure how all of the arguments translate.


Good luck!

I tried using `instruments` but unfortunately that launches the GUI tool. The app I'm trying to profile is a command-line based tool and needs to be able to be sent data via stdin/stdout which `instruments` doesn't seem to support.

iprofiler (Instruments command line) authorization failure
 
 
Q