mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +00:00 
			
		
		
		
	perf: support report-sample
devlib learnt to use report-sample in ARM-software/devlib@fe2fe3ae04 ("collector/perf: run simpleperf report-sample in the target if requested"). Adapt the perf instrument to use the new parameters of the PerfCollector.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							31d306c23a
						
					
				
				
					commit
					43cb80d854
				
			| @@ -95,6 +95,11 @@ class PerfInstrument(Instrument): | |||||||
|                   description="""Specifies options to be used to gather report when record command |                   description="""Specifies options to be used to gather report when record command | ||||||
|                   is used. It's highly recommended to use perf_type simpleperf when running on |                   is used. It's highly recommended to use perf_type simpleperf when running on | ||||||
|                   android devices as reporting options are unstable with perf"""), |                   android devices as reporting options are unstable with perf"""), | ||||||
|  |         Parameter('run_report_sample', kind=bool, default=False, description="""If true, run | ||||||
|  |                   'perf/simpleperf report-sample'. It only works with the record command."""), | ||||||
|  |         Parameter('report_sample_options', kind=str, default=None, | ||||||
|  |                   description="""Specifies options to pass to report-samples when run_report_sample | ||||||
|  |                   is true."""), | ||||||
|         Parameter('labels', kind=list_of_strs, default=None, |         Parameter('labels', kind=list_of_strs, default=None, | ||||||
|                   global_alias='perf_labels', |                   global_alias='perf_labels', | ||||||
|                   description="""Provides labels for perf/simpleperf output for each optionstring. |                   description="""Provides labels for perf/simpleperf output for each optionstring. | ||||||
| @@ -112,12 +117,17 @@ class PerfInstrument(Instrument): | |||||||
|         self.outdir = None |         self.outdir = None | ||||||
|  |  | ||||||
|     def initialize(self, context): |     def initialize(self, context): | ||||||
|  |         if self.report_sample_options: | ||||||
|  |             self.run_report_sample = True | ||||||
|  |  | ||||||
|         self.collector = PerfCollector(self.target, |         self.collector = PerfCollector(self.target, | ||||||
|                                        self.perf_type, |                                        self.perf_type, | ||||||
|                                        self.command, |                                        self.command, | ||||||
|                                        self.events, |                                        self.events, | ||||||
|                                        self.optionstring, |                                        self.optionstring, | ||||||
|                                        self.report_option_string, |                                        self.report_option_string, | ||||||
|  |                                        self.run_report_sample, | ||||||
|  |                                        self.report_sample_options, | ||||||
|                                        self.labels, |                                        self.labels, | ||||||
|                                        self.force_install) |                                        self.force_install) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user