diff options
| -rw-r--r-- | tools/perf/Makefile | 10 | ||||
| -rw-r--r-- | tools/perf/util/util.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 5216ade909d0..f9126f89efef 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -45,6 +45,8 @@ include config/utilities.mak | |||
| 45 | # | 45 | # |
| 46 | # Define NO_LIBUNWIND if you do not want libunwind dependency for dwarf | 46 | # Define NO_LIBUNWIND if you do not want libunwind dependency for dwarf |
| 47 | # backtrace post unwind. | 47 | # backtrace post unwind. |
| 48 | # | ||
| 49 | # Define NO_BACKTRACE if you do not want stack backtrace debug feature | ||
| 48 | 50 | ||
| 49 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 51 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
| 50 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) | 52 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
| @@ -749,11 +751,9 @@ ifndef NO_STRLCPY | |||
| 749 | endif | 751 | endif |
| 750 | endif | 752 | endif |
| 751 | 753 | ||
| 752 | ifdef NO_BACKTRACE | 754 | ifndef NO_BACKTRACE |
| 753 | BASIC_CFLAGS += -DNO_BACKTRACE | 755 | ifeq ($(call try-cc,$(SOURCE_BACKTRACE),),y) |
| 754 | else | 756 | BASIC_CFLAGS += -DBACKTRACE_SUPPORT |
| 755 | ifneq ($(call try-cc,$(SOURCE_BACKTRACE),),y) | ||
| 756 | BASIC_CFLAGS += -DNO_BACKTRACE | ||
| 757 | endif | 757 | endif |
| 758 | endif | 758 | endif |
| 759 | 759 | ||
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 |
| 169 | void dump_stack(void) | 169 | void dump_stack(void) |
| 170 | { | 170 | { |
| 171 | void *array[16]; | 171 | void *array[16]; |
