you can use -pg option of gcc along with gprof utility. read more about this on http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html regards, -Gaurav On 2/21/06, Manav Kataria <manav@xxxxxxxxxxxxx> wrote: > > Greetings, > Hi I wanted to profile time taken by a particular funtion in an > application. I had been using gettimeofday() till now and calculating the > time diff b/w the call of the function and its return. > I read in a forum that even though it shows a resolution of microseconds > it is incorrect. The true resolution is only the order of microseconds. Is > the microsecond part really unreliable (fake) ?? > How do I profile my code other wise ? > Thanks in advance, > MK -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/