From: Maynard J. <may...@us...> - 2013-08-16 18:58:40
|
On 08/16/2013 01:30 PM, Carl E. Love wrote: > Maynard: > > I added the procedure "ocount_get_version {}" to lib/ocount_util.exp. > It is similar to the "operf_get_version {}" in lib/operf_util.exp. The > ocount_get_version procedure is called by the cycle-check-ocount and > oprofile-ocount tools to verify that the ocount tool is supported. If > the ocount tool is not supported, the test prints a message to that > effect and exits. I tested the changes on systems that have and do not > have ocount installed. > > Carl Love > > ------------------------------------------------------------------------- > Add test for the ocount tool Thanks much, Carl! Patch committed. Please do a fresh checkout from the upstream git repo and verify the patch was applied properly. -Maynard > > 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 > expected > - 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 > > The 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 <ce...@us...> > --- > testsuite/README | 111 ++++++++--- > .../cycle-check-ocount/ocount-cycle-check-run.exp | 95 ++++++++++ > testsuite/lib/ocount_util.exp | 208 +++++++++++++++++++++ > testsuite/oprofile-ocount/ocount-run.exp | 191 +++++++++++++++++++ > testsuite/workload_ocount/load.c | 81 ++++++++ > 5 files changed, 655 insertions(+), 31 deletions(-) > create mode 100644 testsuite/cycle-check-ocount/ocount-cycle-check-run.exp > create mode 100644 testsuite/lib/ocount_util.exp > create mode 100644 testsuite/oprofile-ocount/ocount-run.exp > create mode 100644 testsuite/workload_ocount/load.c > [snip] |