Thursday, July 29, 2010

profile c++

1. g++ -o foo foo.cpp -pg #compile with -pg
2. $ ./foo args #creates gmon.out
3. $ gprof gmon.out

No comments: