• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5AUTHOR = "David Sharp <dhsharp@chromium.org>"
6NAME = "hardware_PerfCounterVerification"
7TIME = "SHORT"
8TEST_CATEGORY = "Functional"
9TEST_CLASS = "hardware"
10TEST_TYPE = "client"
11JOB_RETRIES = 2
12ATTRIBUTES = "suite:experimental"
13SUITE = "experimental"
14
15BUG_TEMPLATE = {
16    'owner': 'dhsharp@chromium.org',
17    'cc': ['cwp-team@google.com']
18}
19
20DOC = """
21Verify performance counters
22
23Arguments:
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
33job.run_test('hardware_PerfCounterVerification', tag='cycles_instructions',
34             perf_cmd='stat', events=('cycles', 'instructions'),
35             program='noploop', multiplier=10000000)
36
37job.run_test('hardware_PerfCounterVerification', tag='LBR',
38             perf_cmd='record -b', events=('br_inst_retired.all_branches',),
39             program='noploop', multiplier=10000000)
40
41job.run_test('hardware_PerfCounterVerification', tag='iTLB_misses',
42             perf_cmd='stat', events=('iTLB-misses','cycles'),
43             program='iTLB_benchmark', multiplier=100)
44
45job.run_test('hardware_PerfCounterVerification', tag='dTLB_misses',
46             perf_cmd='stat', events=('dTLB-misses','cycles'),
47             program='dTLB_benchmark', multiplier=10000)
48