How to Profile a C-Program in a Loop of Shell Script, Using Shark on Mac?

Posted by Peter Lee on Stack Overflow See other posts from Stack Overflow or by Peter Lee
Published on 2010-03-25T04:36:18Z Indexed on 2010/03/25 4:43 UTC
Read the original article Hit count: 457

Filed under:
|
|

Hi all,

I have a question about Shark-profiling on mac.

Say if I have a C-program, compiled with:

gcc -o mycprog mycprog.c -g -pg

and also I have a shell script something like:

for file in ($SomeDirectory)
do
    mycprog $file
done

I need to profile the average performance for all files in $SomeDirectory.

Where should I put the shark -i command? Thanks.

© Stack Overflow or respective owner

Related posts about shark

Related posts about profiling