Commit [f8a53f]  Maximize  Restore  History

Add test for the ocount tool

The patch adds support for two additional testsuites for testing the ocount
tool. The first testsuite runs a series of tests on the ocount tool. The
tests include:

- each event generates non-zero counts
- counting for each event for an interval of n seconds, 2*n and 4*n scale as
- the sum of the counts for each event in user mode only, kernel mode
only match counting in user and kernel mode
- the output using the brief output format is verified

The above tests are run when the tool "oprofile" or "oprofile-ocount" are run.

The second testsuite includes the additional test:

- counting cycles for an interval of n seconds matches n*proc_frequency

This testsuite is only run when the tool "cycle-check-ocount" is specified.
The testsuite checks the event count against the reported CPU frequency which
may or may not be the actual operating CPU frequency. The reported frequency
and the actual frequency may differ if the CPU is running in the Intel "turbo"
mode or at a lower frequency for thermal management. The user may need to
manually verify any test failures based on the actual operating CPU frequency
not the reported CPU frequency.

Signed-off-by: Carl Love <>

Carl Love Carl Love 2013-08-16

Maynard Johnson Maynard Johnson 2013-08-16

added testsuite/cycle-check-ocount
added testsuite/cycle-check-ocount/ocount-cycle-check-run.exp
added testsuite/lib/ocount_util.exp
added testsuite/oprofile-ocount
added testsuite/oprofile-ocount/ocount-run.exp
added testsuite/workload_ocount
added testsuite/workload_ocount/load.c
changed testsuite
changed testsuite/README
changed testsuite/lib
testsuite/cycle-check-ocount/ocount-cycle-check-run.exp Diff Switch to side-by-side view
testsuite/lib/ocount_util.exp Diff Switch to side-by-side view
testsuite/oprofile-ocount/ocount-run.exp Diff Switch to side-by-side view
testsuite/workload_ocount/load.c Diff Switch to side-by-side view
testsuite/README Diff Switch to side-by-side view