Why nload? Because its a simple application with minimum UI capability, but a wholistic application. Now what did i intend to do? Learn how gprof works
. Downloaded the nload source and extracted the souces into the nload directory.
And then i did,
$ ./configure
from the nload directory. And got three Makefile’s in the following directories.
nload/
nload/src
nload/docs
And when edited the all the three Makefile’s by adding the ‘-pg’ option to following flags…
CFLAGS
CXXFLAGS
And then i did…
$ make
Which created the nload executable in the nload/src directory. When ran
$ ./nload
and exited, from the nload/src directory, it did generate the gmon.out file in there. And all i needed to do now was(from nload/src)…
$ gprof nload gmon.out>g.out
I ended up getting “No symbols found”. Now what did i do wrong. I scratched my head and looked at various documentations and finally posted a question on google groups. And a generous mind answered,’ Try “objdump -W” or “nm” on your executable.’ And I did exactly with no symbols being returned. And queried the wise mind again when he said, ‘The build system is stripping your symbols’ and found exactly that ‘-s’ option was set in the Makefile’s for the LDFLAG.
And having readup quite a bit by now saw tha setting the -O options on the compiler would result in undesired output of gprof so i removed the -O2 option set for the. CFLAGS and CXXFLAGS. And then i did
$ make clean
$ make
$ cd src
$ ./nload
$ gprof nload gmon.out> g.out
$ vi g.out
And found all that i needed in there. I hope this would help some one if it did pls comment. If it did not pls comment