9 Replies
      Latest reply on Aug 12, 2019 2:06 AM by ErichK
      ErichK Level 1 Level 1 (10 points)

        Hello,

        perhaps someone can help me with the following question :-)

         

        I have set some Points Of Interests in the startup phase of our application:

         

        kdebug_signpost_start (0, 0, 0, 0, 0);

        // some work is done

        kdebug_signpost_end (0, 0, 0, 0, 0);

         

        ...

         

        kdebug_signpost_start (1, 0, 0, 0, 0);

        // some other work is done

        kdebug_signpost_end (1, 0, 0, 0, 0);

         

        ...

         

        What I would like to do is run this special build on some systems without having to install Xcode and Instruments, profile the startup time and get the data back.

        What would be perfect is if I could import that data into Instruments and analyse it there ;-)

         

        I just need the information for our application process, not the whole system. And the profiling should run at least as long as the startup of the application.

         

        Any ideas?

         

        Thanks!

        • Re: Getting a profile of systems without installing Xcode
          cwoolf Apple Staff Apple Staff (40 points)

          You can try 'ktrace artrace' if you're able to access the terminal on the target Mac.  That will take a recording of just about everything.  It's heavy handed but it probably will record those signposts too.  Just run that as root, then CMD-C it when your app finishes launching, then take the file it produces back to your development machine and open it with Instruments.  The recording isn't as full featured as what you get when Instruments is installed, but it might have what you need.

           

          When you open the file, Instruments will ask you to pick a template, and your template choice will more or less dictate what parts of the file you want to model in Instruments.  So in your case it could be the System Trace template or a Time Profiler template since they both have a Points of Interest instrument in them.

          • Re: Getting a profile of systems without installing Xcode
            ErichK Level 1 Level 1 (10 points)

            Hey cwoolf,

            I have one more question

            I tried the procedure with a customer. He did a trace using:

            "sudo ktrace artrace -p 3534 --type=profile"

            and send it to me. I can load it in Instruments perfectly but the symbols are missing. How do I symbolize the trace correctly? Going to the Symbols... Menu Entry in Instruments shows an empty window. The customer is on OSX 10.14.5 and I'am on 10.14.6. I do not need the symbols of the OSX system but the ones from the application I'am working on.

             

            Best regards,

            Erich