Thursday, August 4, 2011

gprof enabling

  • Add the ”-pg” option to every .o compilation + to the exe also.
  • Link with static versions of libraries that need being profiled.

Example given:

cd /vob/signalware/Master/scos
swmake gprof
cd /vob/signalware/Master/test/tcap/c7
rm /vob/signalware/Master/library/libscos.so
clearmake -V "PROT_FLAGS=-DC7_Q" gprof

Then running c7icptrans should produce a gmon.out.

To extract the information from gmon.out, use gprof:

gprof /export/home/omni_9S5/bin/test/c7icptrans gmon.out > gprof.txt