1AUTHOR = "Autotest Team <autotest@test.kernel.org>"
2TIME = "MEDIUM"
3NAME = "Sample - Using oprofile - specific power5 options"
4TEST_TYPE = "client"
5TEST_CLASS = "Kernel"
6TEST_CATEGORY = "Functional"
7
8DOC = """
9Runs our sleeptest (bogus test that only sleeps for a given amount of time),
10while running the oprofile profilers, with and without special parameters
11passed to the profiler. This particular control shows special features of
12oprofile under power 5 cpu architecture.
13"""
14
15import logging
16
17logging.info("Testing default event")
18job.profilers.add('oprofile')
19job.run_test('sleeptest', seconds=5, tag='default')
20job.profilers.delete('oprofile')
21
22logging.info("Testing specified vmlinux")
23job.profilers.add('oprofile', '/boot/vmlinux-autotest')
24job.run_test('sleeptest', seconds=5, tag='vmlinux')
25job.profilers.delete('oprofile')
26
27logging.info("Testing one event")
28job.profilers.add('oprofile', None, ['PM_RUN_CYC_GRP153:100000'])
29job.run_test('sleeptest', seconds=5, tag='one')
30job.profilers.delete('oprofile')
31
32logging.info("Testing multiple events")
33job.profilers.add('oprofile', None,
34                  ['PM_RUN_CYC_GRP153:100000', 'PM_INST_CMPL_GRP153:10000'])
35job.run_test('sleeptest', seconds=5, tag='multi')
36job.profilers.delete('oprofile')
37
38logging.info("Testing other args")
39job.profilers.add('oprofile', None,
40                  ['PM_RUN_CYC_GRP153:150000', 'PM_INST_CMPL_GRP153:150000'],
41                  '--callgraph=3')
42job.run_test('sleeptest', seconds=5, tag='other')
43job.profilers.delete('oprofile')
44