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