 Wei Huang
		
	
	
		874b1cfad5
		
	
	
	
	kvm_stat: Print errno when syscall to perf_event_open() fails
			Wei Huang
		
	
	
		874b1cfad5
		
	
	
	
	kvm_stat: Print errno when syscall to perf_event_open() fails
		
			
			kvm_stat uses syscall() to call perf_event_open(). If this function call fails, the returned value is -1, which doesn't tell the details of such failure (i.e. ENOSYS or EINVAL). This patch retrieves errno and prints it when syscall() fails. The error message will look like "Exception: perf_event_open failed, errno = 38". Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org - QEMU team
Description
				
					Languages
				
				
								
								
									C
								
								90.3%
							
						
							
								
								
									Dylan
								
								2.5%
							
						
							
								
								
									Python
								
								2.1%
							
						
							
								
								
									C++
								
								2%
							
						
							
								
								
									Shell
								
								1.7%
							
						
							
								
								
									Other
								
								1.4%