Feature #1010

Tasks #824: Measure CPU time via callgrind

Valgrind as intrinsic execution engine

Added by M. Rolf over 8 years ago. Updated over 8 years ago.

Status:In ProgressStart date:06/19/2012
Priority:NormalDue date:
Assignee:M. Rolf% Done:

10%

Category:-
Target version:-

Description

Allow benchmark calls that execute valgrind in background. Something like

MyBenchmarkExecutable --engine cpu
Benchcase [mu_suite:my_case]
    Total (corrected) time:    1.3 s
    Estimated cost per operation:    1.7 us
    Operations per second:    5.9e5

vs.
MyBenchmarkExecutable --engine valgrind
Benchcase [mu_suite:my_case]
    Total (corrected) time:    1.3 GCycles
    Estimated cost per operation:    1.7 MCycles
    Operations per second:    5.9e5

The "--engine valgrind" must call valgrind in background, read and parse the logfile and transfer the results into the internal result data-structure.

Some ideas...
  • Interally disable warmup and init-count (pointless when using valgrind)
  • Automatically reduce repitition-count, e.g. by factor 100

History

#1 Updated by M. Rolf over 8 years ago

  • Parent task set to #824

#2 Updated by M. Rolf over 8 years ago

Callgrind generates an aweful output format:
http://kcachegrind.sourceforge.net/html/CallgrindFormat.html

Better use callgrind_annotate to collect infos in a more comprehensive, yet still ASCII and new-line/blank-line separated, format:

callgrind_annotate --inclusive=yes --threshold=100 <callgrind.out>

This tool cannot write to files, so we would need to do some bash-pipe stuff. Not very platform-independent ^^

#3 Updated by M. Rolf over 8 years ago

  • % Done changed from 0 to 10

#4 Updated by M. Rolf over 8 years ago

  • Status changed from New to In Progress

Also available in: Atom PDF