This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: for getting millisecond resolution in profiling with -pg option


On Mar 18, 2006, at 6:47 AM, jayaraj wrote:
I want to profile an application in linux. I used -pg option and
profiled the data with gprof. Here I am getting the resolution in
seconds only. but I wants in terms of milliseconds and microseconds.
can anybody help me. or any other options and tools available.

Wrong list, please use gcc-help instead.


http://en.wikipedia.org/wiki/RDTSC

Do it twice, once before and once after, then subtract. It will give it to you in clock cycles, clock cycles are best. You can also use gettimeofday.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]