mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-30 01:47:31 +00:00 
			
		
		
		
	 1dad2ce973
			
		
	
	
		1dad2ce973
		
	
	
	
	
		
			
			Backends now only contain the essential backend-specific code, and most of the work is moved to frontend code. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			800 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			800 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| #!/usr/bin/env python
 | |
| # -*- coding: utf-8 -*-
 | |
| 
 | |
| """
 | |
| LTTng User Space Tracing backend.
 | |
| """
 | |
| 
 | |
| __author__     = "Lluís Vilanova <vilanova@ac.upc.edu>"
 | |
| __copyright__  = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
 | |
| __license__    = "GPL version 2 or (at your option) any later version"
 | |
| 
 | |
| __maintainer__ = "Stefan Hajnoczi"
 | |
| __email__      = "stefanha@linux.vnet.ibm.com"
 | |
| 
 | |
| 
 | |
| from tracetool import out
 | |
| 
 | |
| 
 | |
| PUBLIC = True
 | |
| 
 | |
| 
 | |
| def generate_h_begin(events):
 | |
|     out('#include <lttng/tracepoint.h>',
 | |
|         '#include "trace/generated-ust-provider.h"',
 | |
|         '')
 | |
| 
 | |
| 
 | |
| def generate_h(event):
 | |
|     argnames = ", ".join(event.args.names())
 | |
|     if len(event.args) > 0:
 | |
|         argnames = ", " + argnames
 | |
| 
 | |
|     out('    tracepoint(qemu, %(name)s%(tp_args)s);',
 | |
|         name=event.name,
 | |
|         tp_args=argnames)
 |