On Sun, 2014-08-17 at 09:48 +0200, Julian Seward wrote: > On 08/16/2014 03:19 AM, Van Snyder wrote: > > It seems that cachegrind could be extended to do complete precise > > profiling. > > What do you mean by "complete precise profiling"? Can you clarify?
Trace execution of every instruction and account for its execution time, including the analyses that cachegrind does to model caches. Produce two reports, one sorted in decreasing order of the time spent on each line of source, and another sorted in decreasing order of the time spent in each basic block, at last basic blocks as they are discovered by tracing execution. I used such a tool to productive advantage thirty years ago. It didn't matter that the cost was eighty times the cost of running the program on its own. Maybe cachegrind already does this, but the description isn't clear. Statistical profilers such as gprof put random numbers into a timer, and analyze where the interrupts occur. This isn't usually as accurate. ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users