perf tools: Convert to BACKTRACE_SUPPORT
For building perf without stack backtrace debug, we can set NO_BACKTRACE=1 as a argument of make. It then defines NO_BACKTRACE macro for C code to do the proper handling. However it usually used in a negative semantics - e.g. #ifndef - so we saw double negations which can be misleading. Convert it to a positive form to make it more readable and add _SUPPORT suffix for consistency. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Irina Tirdea <irina.tirdea@gmail.com> Cc: Irina Tirdea <irina.tirdea@intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1349109171-1942-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
		
					parent
					
						
							
								4d8061faca
							
						
					
				
			
			
				commit
				
					
						4e34d9588b
					
				
			
		
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
#include "../perf.h"
 | 
			
		||||
#include "util.h"
 | 
			
		||||
#include <sys/mman.h>
 | 
			
		||||
#ifndef NO_BACKTRACE
 | 
			
		||||
#ifdef BACKTRACE_SUPPORT
 | 
			
		||||
#include <execinfo.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -165,7 +165,7 @@ size_t hex_width(u64 v)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
/* Obtain a backtrace and print it to stdout. */
 | 
			
		||||
#ifndef NO_BACKTRACE
 | 
			
		||||
#ifdef BACKTRACE_SUPPORT
 | 
			
		||||
void dump_stack(void)
 | 
			
		||||
{
 | 
			
		||||
	void *array[16];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue