Home | History | Annotate | Download | only in hardware_PerfCounterVerification
      1 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 AUTHOR = "David Sharp <dhsharp (a] chromium.org>"
      6 NAME = "hardware_PerfCounterVerification"
      7 TIME = "SHORT"
      8 TEST_CATEGORY = "Functional"
      9 TEST_CLASS = "hardware"
     10 TEST_TYPE = "client"
     11 JOB_RETRIES = 2
     12 ATTRIBUTES = "suite:experimental"
     13 SUITE = "experimental"
     14 
     15 BUG_TEMPLATE = {
     16     'owner': 'dhsharp (a] chromium.org',
     17     'cc': ['cwp-team (a] google.com']
     18 }
     19 
     20 DOC = """
     21 Verify performance counters
     22 
     23 Arguments:
     24   events: Events to pass to perf's -e argument. Events are passed in together,
     25     so multiplexing may occur if more than one is specified.
     26   perf_cmd: Which perf command to use to collect events. Supported values are
     27     "stat" and "record -b" (for branch record).
     28   program: Benchmark binary
     29   multiplier: Multiplier on the number of loop iterations passed to the
     30     benchmark binary. i.e., run 1*multiplier, 2*multiplier, etc loop iterations.
     31 """
     32 
     33 job.run_test('hardware_PerfCounterVerification', tag='cycles_instructions',
     34              perf_cmd='stat', events=('cycles', 'instructions'),
     35              program='noploop', multiplier=10000000)
     36 
     37 job.run_test('hardware_PerfCounterVerification', tag='LBR',
     38              perf_cmd='record -b', events=('br_inst_retired.all_branches',),
     39              program='noploop', multiplier=10000000)
     40 
     41 job.run_test('hardware_PerfCounterVerification', tag='iTLB_misses',
     42              perf_cmd='stat', events=('iTLB-misses','cycles'),
     43              program='iTLB_benchmark', multiplier=100)
     44 
     45 job.run_test('hardware_PerfCounterVerification', tag='dTLB_misses',
     46              perf_cmd='stat', events=('dTLB-misses','cycles'),
     47              program='dTLB_benchmark', multiplier=10000)
     48