Can I use tools using the command line?

You can use replacement tools

Valgrind

If you want to check for a memory leak using tools, can it be used from the terminal?

+6
c xcode instruments
Jan 27 '11 at 16:29
source share
2 answers

Tools have a command line interface:

$ instruments -h 

Usage example:

 $ instruments -t mytemplate -a myapp.app 

For leaks, try Leaks.tracetemplate . To view all available patterns, use -s .

There is another executable file, simply called leaks . You can check any running application by specifying leaks its PID:

 $ ps aux | grep "[b]ash" | awk '{print $2}' 620 $ leaks 620 leaks Report Version: 2.0 Process: bash [620] Path: /bin/bash Load Address: 0x100000000 ... Process 620: 37983 nodes malloced for 1123 KB Process 620: 0 leaks for 0 total leaked bytes. 

Learn more about leaks in the Apple Developer Library.

+15
Jan 27 '11 at 16:39
source share

For Xcode 9, if you want to profile an iOS application, enter the following command:

 instruments -t Zombies -w 'iPhone SE (11.0.1) [XXX] (Simulator)' MyApp.app 

ref tools command:

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Recording,Pausing,andStoppingTraces.html#//apple_ref/doc/uid/TP40004652-CH12-SW3

0
Jan 21 '18 at 23:09
source share



All Articles