mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 14:01:20 +00:00 
			
		
		
		
	trace/perf: Soften POSIX signal for termination
Replace the default SIGKILL signal sent to perf to "request" its termination by a SIGINT, allowing it to handle the signal by cleaning up before exit. This should address issues regarding corrupted perf.data output files.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							4c8f2430e2
						
					
				
				
					commit
					b5f36610ad
				
			| @@ -104,7 +104,11 @@ class PerfCollector(TraceCollector): | ||||
|             self.target.kick_off(command) | ||||
|  | ||||
|     def stop(self): | ||||
|         self.target.killall('perf', signal='SIGINT', | ||||
|                             as_root=self.target.is_rooted) | ||||
|         # perf doesn't transmit the signal to its sleep call so handled here: | ||||
|         self.target.killall('sleep', as_root=self.target.is_rooted) | ||||
|         # NB: we hope that no other "important" sleep is on-going | ||||
|  | ||||
|     # pylint: disable=arguments-differ | ||||
|     def get_trace(self, outdir): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user