aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-10-01 12:32:51 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-02 17:36:45 -0400
commit4e34d9588b46f44a4dba718606913133f15e4b21 (patch)
tree0b9d6f410d12a6695f20cef47f7ec1047a6e2958 /tools/perf/util/util.c
parent4d8061faca7a50010f037374410f0c3647c3ecf8 (diff)
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>
Diffstat (limited to 'tools/perf/util/util.c')
-rw-r--r--tools/perf/util/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 2055cf38041c..99664598bc1a 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -1,7 +1,7 @@
1#include "../perf.h" 1#include "../perf.h"
2#include "util.h" 2#include "util.h"
3#include <sys/mman.h> 3#include <sys/mman.h>
4#ifndef NO_BACKTRACE 4#ifdef BACKTRACE_SUPPORT
5#include <execinfo.h> 5#include <execinfo.h>
6#endif 6#endif
7#include <stdio.h> 7#include <stdio.h>
@@ -165,7 +165,7 @@ size_t hex_width(u64 v)
165} 165}
166 166
167/* Obtain a backtrace and print it to stdout. */ 167/* Obtain a backtrace and print it to stdout. */
168#ifndef NO_BACKTRACE 168#ifdef BACKTRACE_SUPPORT
169void dump_stack(void) 169void dump_stack(void)
170{ 170{
171 void *array[16]; 171 void *array[16];