sprof
-rw-rw-r-- 1 u01 u01 59 11月 11 15:17 test-thai_kigen.txt -rw-rw-r-- 1 u01 u01 24576 11月 11 15:52 typescript u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ export LD_PROFILE u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ export LD_PROFILE=~/usr/lib/libpango-1.0.so u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ echo $LD_PROFILE /home/u01/usr/lib/libpango-1.0.so u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ pango-view --font="Garuda 50" test-thai_kigen.txt u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ export LD_PROFILE=libpango-1.0.so u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ pango-view --font="Garuda 50" test-thai_kigen.txt u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ ls foo.dot foo.png get-pip.py gmon.out pango-view pv_kigen.png test-thai_kigen.txt typescript u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ export LD_PROFILE=libpango-1.0.so.0 u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ pango-view --font="Garuda 50" test-thai_kigen.txt u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$ ls foo.dot get-pip.py libpango-1.0.so.0.profile pv_kigen.png typescript foo.png gmon.out pango-view test-thai_kigen.txt u01@vm01:~/layout/oss/pango-1.36.8/pango-view/.libs$
Summary from the 2nd link:
Compile your shared library (libmylib.so) in debug (-g) mode. No -pg.
export LD_PROFILE_OUTPUT=`pwd`
export LD_PROFILE=libmylib.so
rm -f $LD_PROFILE.profile
execute your program that loads libmylib.so
sprof PATH-TO-LIB/$LD_PROFILE $LD_PROFILE.profile -p >log
See the log.
What is causing sprof to complain about ???inconsistency detected by ld.so????