diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-30 06:07:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:28 -0400 |
commit | 89fe808ae777728da6e1d78b7d13562792310d17 (patch) | |
tree | fd8771bb2e99e0801fbb16b742c4d425ee4f2bda /tools/perf | |
parent | 429eb051011a580beae2dc9f8caed5dade9591dc (diff) |
tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT
Standardize all the feature flags based on the HAVE_{FEATURE}_SUPPORT naming convention:
HAVE_ARCH_X86_64_SUPPORT
HAVE_BACKTRACE_SUPPORT
HAVE_CPLUS_DEMANGLE_SUPPORT
HAVE_DWARF_SUPPORT
HAVE_ELF_GETPHDRNUM_SUPPORT
HAVE_GTK2_SUPPORT
HAVE_GTK_INFO_BAR_SUPPORT
HAVE_LIBAUDIT_SUPPORT
HAVE_LIBELF_MMAP_SUPPORT
HAVE_LIBELF_SUPPORT
HAVE_LIBNUMA_SUPPORT
HAVE_LIBUNWIND_SUPPORT
HAVE_ON_EXIT_SUPPORT
HAVE_PERF_REGS_SUPPORT
HAVE_SLANG_SUPPORT
HAVE_STRLCPY_SUPPORT
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-u3zvqejddfZhtrbYbfhi3spa@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf')
30 files changed, 86 insertions, 86 deletions
diff --git a/tools/perf/arch/x86/include/perf_regs.h b/tools/perf/arch/x86/include/perf_regs.h index 7fcdcdbee917..e84ca76aae77 100644 --- a/tools/perf/arch/x86/include/perf_regs.h +++ b/tools/perf/arch/x86/include/perf_regs.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include "../../util/types.h" | 5 | #include "../../util/types.h" |
6 | #include <asm/perf_regs.h> | 6 | #include <asm/perf_regs.h> |
7 | 7 | ||
8 | #ifndef ARCH_X86_64 | 8 | #ifndef HAVE_ARCH_X86_64_SUPPORT |
9 | #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1) | 9 | #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1) |
10 | #else | 10 | #else |
11 | #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \ | 11 | #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \ |
@@ -52,7 +52,7 @@ static inline const char *perf_reg_name(int id) | |||
52 | return "FS"; | 52 | return "FS"; |
53 | case PERF_REG_X86_GS: | 53 | case PERF_REG_X86_GS: |
54 | return "GS"; | 54 | return "GS"; |
55 | #ifdef ARCH_X86_64 | 55 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
56 | case PERF_REG_X86_R8: | 56 | case PERF_REG_X86_R8: |
57 | return "R8"; | 57 | return "R8"; |
58 | case PERF_REG_X86_R9: | 58 | case PERF_REG_X86_R9: |
@@ -69,7 +69,7 @@ static inline const char *perf_reg_name(int id) | |||
69 | return "R14"; | 69 | return "R14"; |
70 | case PERF_REG_X86_R15: | 70 | case PERF_REG_X86_R15: |
71 | return "R15"; | 71 | return "R15"; |
72 | #endif /* ARCH_X86_64 */ | 72 | #endif /* HAVE_ARCH_X86_64_SUPPORT */ |
73 | default: | 73 | default: |
74 | return NULL; | 74 | return NULL; |
75 | } | 75 | } |
diff --git a/tools/perf/arch/x86/util/unwind.c b/tools/perf/arch/x86/util/unwind.c index 78d956eff96f..456a88cf5b37 100644 --- a/tools/perf/arch/x86/util/unwind.c +++ b/tools/perf/arch/x86/util/unwind.c | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "perf_regs.h" | 4 | #include "perf_regs.h" |
5 | #include "../../util/unwind.h" | 5 | #include "../../util/unwind.h" |
6 | 6 | ||
7 | #ifdef ARCH_X86_64 | 7 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
8 | int unwind__arch_reg_id(int regnum) | 8 | int unwind__arch_reg_id(int regnum) |
9 | { | 9 | { |
10 | int id; | 10 | int id; |
@@ -108,4 +108,4 @@ int unwind__arch_reg_id(int regnum) | |||
108 | 108 | ||
109 | return id; | 109 | return id; |
110 | } | 110 | } |
111 | #endif /* ARCH_X86_64 */ | 111 | #endif /* HAVE_ARCH_X86_64_SUPPORT */ |
diff --git a/tools/perf/bench/mem-memcpy-arch.h b/tools/perf/bench/mem-memcpy-arch.h index a72e36cb5394..57b4ed871459 100644 --- a/tools/perf/bench/mem-memcpy-arch.h +++ b/tools/perf/bench/mem-memcpy-arch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | #ifdef ARCH_X86_64 | 2 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
3 | 3 | ||
4 | #define MEMCPY_FN(fn, name, desc) \ | 4 | #define MEMCPY_FN(fn, name, desc) \ |
5 | extern void *fn(void *, const void *, size_t); | 5 | extern void *fn(void *, const void *, size_t); |
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index 8cdca43016b2..5ce71d3b72cf 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c | |||
@@ -58,7 +58,7 @@ struct routine routines[] = { | |||
58 | { "default", | 58 | { "default", |
59 | "Default memcpy() provided by glibc", | 59 | "Default memcpy() provided by glibc", |
60 | memcpy }, | 60 | memcpy }, |
61 | #ifdef ARCH_X86_64 | 61 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
62 | 62 | ||
63 | #define MEMCPY_FN(fn, name, desc) { name, desc, fn }, | 63 | #define MEMCPY_FN(fn, name, desc) { name, desc, fn }, |
64 | #include "mem-memcpy-x86-64-asm-def.h" | 64 | #include "mem-memcpy-x86-64-asm-def.h" |
diff --git a/tools/perf/bench/mem-memset-arch.h b/tools/perf/bench/mem-memset-arch.h index a040fa77665b..633800cb0dcb 100644 --- a/tools/perf/bench/mem-memset-arch.h +++ b/tools/perf/bench/mem-memset-arch.h | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | #ifdef ARCH_X86_64 | 2 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
3 | 3 | ||
4 | #define MEMSET_FN(fn, name, desc) \ | 4 | #define MEMSET_FN(fn, name, desc) \ |
5 | extern void *fn(void *, int, size_t); | 5 | extern void *fn(void *, int, size_t); |
diff --git a/tools/perf/bench/mem-memset.c b/tools/perf/bench/mem-memset.c index 4a2f12081964..9af79d2b18e5 100644 --- a/tools/perf/bench/mem-memset.c +++ b/tools/perf/bench/mem-memset.c | |||
@@ -58,7 +58,7 @@ static const struct routine routines[] = { | |||
58 | { "default", | 58 | { "default", |
59 | "Default memset() provided by glibc", | 59 | "Default memset() provided by glibc", |
60 | memset }, | 60 | memset }, |
61 | #ifdef ARCH_X86_64 | 61 | #ifdef HAVE_ARCH_X86_64_SUPPORT |
62 | 62 | ||
63 | #define MEMSET_FN(fn, name, desc) { name, desc, fn }, | 63 | #define MEMSET_FN(fn, name, desc) { name, desc, fn }, |
64 | #include "mem-memset-x86-64-asm-def.h" | 64 | #include "mem-memset-x86-64-asm-def.h" |
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c index 77298bf892b8..33af80fa49cf 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c | |||
@@ -35,7 +35,7 @@ struct bench_suite { | |||
35 | /* sentinel: easy for help */ | 35 | /* sentinel: easy for help */ |
36 | #define suite_all { "all", "Test all benchmark suites", NULL } | 36 | #define suite_all { "all", "Test all benchmark suites", NULL } |
37 | 37 | ||
38 | #ifdef LIBNUMA_SUPPORT | 38 | #ifdef HAVE_LIBNUMA_SUPPORT |
39 | static struct bench_suite numa_suites[] = { | 39 | static struct bench_suite numa_suites[] = { |
40 | { "mem", | 40 | { "mem", |
41 | "Benchmark for NUMA workloads", | 41 | "Benchmark for NUMA workloads", |
@@ -80,7 +80,7 @@ struct bench_subsys { | |||
80 | }; | 80 | }; |
81 | 81 | ||
82 | static struct bench_subsys subsystems[] = { | 82 | static struct bench_subsys subsystems[] = { |
83 | #ifdef LIBNUMA_SUPPORT | 83 | #ifdef HAVE_LIBNUMA_SUPPORT |
84 | { "numa", | 84 | { "numa", |
85 | "NUMA scheduling and MM behavior", | 85 | "NUMA scheduling and MM behavior", |
86 | numa_suites }, | 86 | numa_suites }, |
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index afe377b2884f..f51a9637f69b 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c | |||
@@ -231,7 +231,7 @@ static int perf_event__inject_buildid(struct perf_tool *tool, | |||
231 | * account this as unresolved. | 231 | * account this as unresolved. |
232 | */ | 232 | */ |
233 | } else { | 233 | } else { |
234 | #ifdef LIBELF_SUPPORT | 234 | #ifdef HAVE_LIBELF_SUPPORT |
235 | pr_warning("no symbols found in %s, maybe " | 235 | pr_warning("no symbols found in %s, maybe " |
236 | "install a debug package?\n", | 236 | "install a debug package?\n", |
237 | al.map->dso->long_name); | 237 | al.map->dso->long_name); |
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index e8a66f9a6715..89acc17cf2a0 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -173,7 +173,7 @@ static int opt_set_target(const struct option *opt, const char *str, | |||
173 | if (str && !params.target) { | 173 | if (str && !params.target) { |
174 | if (!strcmp(opt->long_name, "exec")) | 174 | if (!strcmp(opt->long_name, "exec")) |
175 | params.uprobes = true; | 175 | params.uprobes = true; |
176 | #ifdef DWARF_SUPPORT | 176 | #ifdef HAVE_DWARF_SUPPORT |
177 | else if (!strcmp(opt->long_name, "module")) | 177 | else if (!strcmp(opt->long_name, "module")) |
178 | params.uprobes = false; | 178 | params.uprobes = false; |
179 | #endif | 179 | #endif |
@@ -187,7 +187,7 @@ static int opt_set_target(const struct option *opt, const char *str, | |||
187 | return ret; | 187 | return ret; |
188 | } | 188 | } |
189 | 189 | ||
190 | #ifdef DWARF_SUPPORT | 190 | #ifdef HAVE_DWARF_SUPPORT |
191 | static int opt_show_lines(const struct option *opt __maybe_unused, | 191 | static int opt_show_lines(const struct option *opt __maybe_unused, |
192 | const char *str, int unset __maybe_unused) | 192 | const char *str, int unset __maybe_unused) |
193 | { | 193 | { |
@@ -257,7 +257,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
257 | "perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]", | 257 | "perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]", |
258 | "perf probe [<options>] --del '[GROUP:]EVENT' ...", | 258 | "perf probe [<options>] --del '[GROUP:]EVENT' ...", |
259 | "perf probe --list", | 259 | "perf probe --list", |
260 | #ifdef DWARF_SUPPORT | 260 | #ifdef HAVE_DWARF_SUPPORT |
261 | "perf probe [<options>] --line 'LINEDESC'", | 261 | "perf probe [<options>] --line 'LINEDESC'", |
262 | "perf probe [<options>] --vars 'PROBEPOINT'", | 262 | "perf probe [<options>] --vars 'PROBEPOINT'", |
263 | #endif | 263 | #endif |
@@ -271,7 +271,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
271 | OPT_CALLBACK('d', "del", NULL, "[GROUP:]EVENT", "delete a probe event.", | 271 | OPT_CALLBACK('d', "del", NULL, "[GROUP:]EVENT", "delete a probe event.", |
272 | opt_del_probe_event), | 272 | opt_del_probe_event), |
273 | OPT_CALLBACK('a', "add", NULL, | 273 | OPT_CALLBACK('a', "add", NULL, |
274 | #ifdef DWARF_SUPPORT | 274 | #ifdef HAVE_DWARF_SUPPORT |
275 | "[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT" | 275 | "[EVENT=]FUNC[@SRC][+OFF|%return|:RL|;PT]|SRC:AL|SRC;PT" |
276 | " [[NAME=]ARG ...]", | 276 | " [[NAME=]ARG ...]", |
277 | #else | 277 | #else |
@@ -283,7 +283,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
283 | "\t\tFUNC:\tFunction name\n" | 283 | "\t\tFUNC:\tFunction name\n" |
284 | "\t\tOFF:\tOffset from function entry (in byte)\n" | 284 | "\t\tOFF:\tOffset from function entry (in byte)\n" |
285 | "\t\t%return:\tPut the probe at function return\n" | 285 | "\t\t%return:\tPut the probe at function return\n" |
286 | #ifdef DWARF_SUPPORT | 286 | #ifdef HAVE_DWARF_SUPPORT |
287 | "\t\tSRC:\tSource code path\n" | 287 | "\t\tSRC:\tSource code path\n" |
288 | "\t\tRL:\tRelative line number from function entry.\n" | 288 | "\t\tRL:\tRelative line number from function entry.\n" |
289 | "\t\tAL:\tAbsolute line number in file.\n" | 289 | "\t\tAL:\tAbsolute line number in file.\n" |
@@ -296,7 +296,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
296 | opt_add_probe_event), | 296 | opt_add_probe_event), |
297 | OPT_BOOLEAN('f', "force", ¶ms.force_add, "forcibly add events" | 297 | OPT_BOOLEAN('f', "force", ¶ms.force_add, "forcibly add events" |
298 | " with existing name"), | 298 | " with existing name"), |
299 | #ifdef DWARF_SUPPORT | 299 | #ifdef HAVE_DWARF_SUPPORT |
300 | OPT_CALLBACK('L', "line", NULL, | 300 | OPT_CALLBACK('L', "line", NULL, |
301 | "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]", | 301 | "FUNC[:RLN[+NUM|-RLN2]]|SRC:ALN[+NUM|-ALN2]", |
302 | "Show source code lines.", opt_show_lines), | 302 | "Show source code lines.", opt_show_lines), |
@@ -408,7 +408,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) | |||
408 | return ret; | 408 | return ret; |
409 | } | 409 | } |
410 | 410 | ||
411 | #ifdef DWARF_SUPPORT | 411 | #ifdef HAVE_DWARF_SUPPORT |
412 | if (params.show_lines && !params.uprobes) { | 412 | if (params.show_lines && !params.uprobes) { |
413 | if (params.mod_events) { | 413 | if (params.mod_events) { |
414 | pr_err(" Error: Don't use --line with" | 414 | pr_err(" Error: Don't use --line with" |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index a78db3f31b25..cf36ba2a1591 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <sched.h> | 29 | #include <sched.h> |
30 | #include <sys/mman.h> | 30 | #include <sys/mman.h> |
31 | 31 | ||
32 | #ifndef HAVE_ON_EXIT | 32 | #ifndef HAVE_ON_EXIT_SUPPORT |
33 | #ifndef ATEXIT_MAX | 33 | #ifndef ATEXIT_MAX |
34 | #define ATEXIT_MAX 32 | 34 | #define ATEXIT_MAX 32 |
35 | #endif | 35 | #endif |
@@ -687,7 +687,7 @@ error: | |||
687 | return ret; | 687 | return ret; |
688 | } | 688 | } |
689 | 689 | ||
690 | #ifdef LIBUNWIND_SUPPORT | 690 | #ifdef HAVE_LIBUNWIND_SUPPORT |
691 | static int get_stack_size(char *str, unsigned long *_size) | 691 | static int get_stack_size(char *str, unsigned long *_size) |
692 | { | 692 | { |
693 | char *endptr; | 693 | char *endptr; |
@@ -713,7 +713,7 @@ static int get_stack_size(char *str, unsigned long *_size) | |||
713 | max_size, str); | 713 | max_size, str); |
714 | return -1; | 714 | return -1; |
715 | } | 715 | } |
716 | #endif /* LIBUNWIND_SUPPORT */ | 716 | #endif /* HAVE_LIBUNWIND_SUPPORT */ |
717 | 717 | ||
718 | int record_parse_callchain_opt(const struct option *opt, | 718 | int record_parse_callchain_opt(const struct option *opt, |
719 | const char *arg, int unset) | 719 | const char *arg, int unset) |
@@ -751,7 +751,7 @@ int record_parse_callchain_opt(const struct option *opt, | |||
751 | "needed for -g fp\n"); | 751 | "needed for -g fp\n"); |
752 | break; | 752 | break; |
753 | 753 | ||
754 | #ifdef LIBUNWIND_SUPPORT | 754 | #ifdef HAVE_LIBUNWIND_SUPPORT |
755 | /* Dwarf style */ | 755 | /* Dwarf style */ |
756 | } else if (!strncmp(name, "dwarf", sizeof("dwarf"))) { | 756 | } else if (!strncmp(name, "dwarf", sizeof("dwarf"))) { |
757 | const unsigned long default_stack_dump_size = 8192; | 757 | const unsigned long default_stack_dump_size = 8192; |
@@ -771,7 +771,7 @@ int record_parse_callchain_opt(const struct option *opt, | |||
771 | if (!ret) | 771 | if (!ret) |
772 | pr_debug("callchain: stack dump size %d\n", | 772 | pr_debug("callchain: stack dump size %d\n", |
773 | opts->stack_dump_size); | 773 | opts->stack_dump_size); |
774 | #endif /* LIBUNWIND_SUPPORT */ | 774 | #endif /* HAVE_LIBUNWIND_SUPPORT */ |
775 | } else { | 775 | } else { |
776 | pr_err("callchain: Unknown -g option " | 776 | pr_err("callchain: Unknown -g option " |
777 | "value: %s\n", arg); | 777 | "value: %s\n", arg); |
@@ -818,7 +818,7 @@ static struct perf_record record = { | |||
818 | 818 | ||
819 | #define CALLCHAIN_HELP "do call-graph (stack chain/backtrace) recording: " | 819 | #define CALLCHAIN_HELP "do call-graph (stack chain/backtrace) recording: " |
820 | 820 | ||
821 | #ifdef LIBUNWIND_SUPPORT | 821 | #ifdef HAVE_LIBUNWIND_SUPPORT |
822 | const char record_callchain_help[] = CALLCHAIN_HELP "[fp] dwarf"; | 822 | const char record_callchain_help[] = CALLCHAIN_HELP "[fp] dwarf"; |
823 | #else | 823 | #else |
824 | const char record_callchain_help[] = CALLCHAIN_HELP "[fp]"; | 824 | const char record_callchain_help[] = CALLCHAIN_HELP "[fp]"; |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 5f6f9b3271bb..34be7432d567 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -23,7 +23,7 @@ ifeq ($(ARCH),x86_64) | |||
23 | endif | 23 | endif |
24 | ifeq (${IS_X86_64}, 1) | 24 | ifeq (${IS_X86_64}, 1) |
25 | RAW_ARCH := x86_64 | 25 | RAW_ARCH := x86_64 |
26 | CFLAGS += -DARCH_X86_64 | 26 | CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT |
27 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S | 27 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S |
28 | endif | 28 | endif |
29 | NO_PERF_REGS := 0 | 29 | NO_PERF_REGS := 0 |
@@ -31,7 +31,7 @@ ifeq ($(ARCH),x86_64) | |||
31 | endif | 31 | endif |
32 | 32 | ||
33 | ifeq ($(NO_PERF_REGS),0) | 33 | ifeq ($(NO_PERF_REGS),0) |
34 | CFLAGS += -DHAVE_PERF_REGS | 34 | CFLAGS += -DHAVE_PERF_REGS_SUPPORT |
35 | endif | 35 | endif |
36 | 36 | ||
37 | ifeq ($(src-perf),) | 37 | ifeq ($(src-perf),) |
@@ -175,13 +175,13 @@ endif # SOURCE_LIBELF | |||
175 | endif # NO_LIBELF | 175 | endif # NO_LIBELF |
176 | 176 | ||
177 | ifndef NO_LIBELF | 177 | ifndef NO_LIBELF |
178 | CFLAGS += -DLIBELF_SUPPORT | 178 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
179 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) | 179 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) |
180 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y) | 180 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) |
181 | CFLAGS += -DLIBELF_MMAP | 181 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
182 | endif | 182 | endif |
183 | ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM),y) | 183 | ifeq ($(call try-cc,$(SOURCE_ELF_GETPHDRNUM),$(FLAGS_LIBELF),-DHAVE_ELF_GETPHDRNUM_SUPPORT),y) |
184 | CFLAGS += -DHAVE_ELF_GETPHDRNUM | 184 | CFLAGS += -DHAVE_ELF_GETPHDRNUM_SUPPORT |
185 | endif | 185 | endif |
186 | 186 | ||
187 | # include ARCH specific config | 187 | # include ARCH specific config |
@@ -192,7 +192,7 @@ ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | |||
192 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 192 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
193 | NO_DWARF := 1 | 193 | NO_DWARF := 1 |
194 | else | 194 | else |
195 | CFLAGS += -DDWARF_SUPPORT $(LIBDW_CFLAGS) | 195 | CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS) |
196 | LDFLAGS += $(LIBDW_LDFLAGS) | 196 | LDFLAGS += $(LIBDW_LDFLAGS) |
197 | EXTLIBS += -lelf -ldw | 197 | EXTLIBS += -lelf -ldw |
198 | endif # PERF_HAVE_DWARF_REGS | 198 | endif # PERF_HAVE_DWARF_REGS |
@@ -201,10 +201,10 @@ endif # NO_DWARF | |||
201 | endif # NO_LIBELF | 201 | endif # NO_LIBELF |
202 | 202 | ||
203 | ifndef NO_LIBELF | 203 | ifndef NO_LIBELF |
204 | CFLAGS += -DLIBELF_SUPPORT | 204 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
205 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) | 205 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) |
206 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y) | 206 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DHAVE_LIBELF_MMAP_SUPPORT),y) |
207 | CFLAGS += -DLIBELF_MMAP | 207 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
208 | endif # try-cc | 208 | endif # try-cc |
209 | endif # NO_LIBELF | 209 | endif # NO_LIBELF |
210 | 210 | ||
@@ -229,7 +229,7 @@ endif # Libunwind support | |||
229 | endif # NO_LIBUNWIND | 229 | endif # NO_LIBUNWIND |
230 | 230 | ||
231 | ifndef NO_LIBUNWIND | 231 | ifndef NO_LIBUNWIND |
232 | CFLAGS += -DLIBUNWIND_SUPPORT | 232 | CFLAGS += -DHAVE_LIBUNWIND_SUPPORT |
233 | EXTLIBS += $(LIBUNWIND_LIBS) | 233 | EXTLIBS += $(LIBUNWIND_LIBS) |
234 | CFLAGS += $(LIBUNWIND_CFLAGS) | 234 | CFLAGS += $(LIBUNWIND_CFLAGS) |
235 | LDFLAGS += $(LIBUNWIND_LDFLAGS) | 235 | LDFLAGS += $(LIBUNWIND_LDFLAGS) |
@@ -241,7 +241,7 @@ ifndef NO_LIBAUDIT | |||
241 | msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); | 241 | msg := $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev); |
242 | NO_LIBAUDIT := 1 | 242 | NO_LIBAUDIT := 1 |
243 | else | 243 | else |
244 | CFLAGS += -DLIBAUDIT_SUPPORT | 244 | CFLAGS += -DHAVE_LIBAUDIT_SUPPORT |
245 | EXTLIBS += -laudit | 245 | EXTLIBS += -laudit |
246 | endif | 246 | endif |
247 | endif | 247 | endif |
@@ -258,7 +258,7 @@ ifndef NO_SLANG | |||
258 | else | 258 | else |
259 | # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h | 259 | # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h |
260 | CFLAGS += -I/usr/include/slang | 260 | CFLAGS += -I/usr/include/slang |
261 | CFLAGS += -DSLANG_SUPPORT | 261 | CFLAGS += -DHAVE_SLANG_SUPPORT |
262 | EXTLIBS += -lslang | 262 | EXTLIBS += -lslang |
263 | endif | 263 | endif |
264 | endif | 264 | endif |
@@ -269,10 +269,10 @@ ifndef NO_GTK2 | |||
269 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); | 269 | msg := $(warning GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev); |
270 | NO_GTK2 := 1 | 270 | NO_GTK2 := 1 |
271 | else | 271 | else |
272 | ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR),y) | 272 | ifeq ($(call try-cc,$(SOURCE_GTK2_INFOBAR),$(FLAGS_GTK2),-DHAVE_GTK_INFO_BAR_SUPPORT),y) |
273 | CFLAGS += -DHAVE_GTK_INFO_BAR | 273 | CFLAGS += -DHAVE_GTK_INFO_BAR_SUPPORT |
274 | endif | 274 | endif |
275 | CFLAGS += -DGTK2_SUPPORT | 275 | CFLAGS += -DHAVE_GTK2_SUPPORT |
276 | CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null) | 276 | CFLAGS += $(shell pkg-config --cflags gtk+-2.0 2>/dev/null) |
277 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) | 277 | EXTLIBS += $(shell pkg-config --libs gtk+-2.0 2>/dev/null) |
278 | endif | 278 | endif |
@@ -365,9 +365,9 @@ endif | |||
365 | ifdef NO_DEMANGLE | 365 | ifdef NO_DEMANGLE |
366 | CFLAGS += -DNO_DEMANGLE | 366 | CFLAGS += -DNO_DEMANGLE |
367 | else | 367 | else |
368 | ifdef HAVE_CPLUS_DEMANGLE | 368 | ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
369 | EXTLIBS += -liberty | 369 | EXTLIBS += -liberty |
370 | CFLAGS += -DHAVE_CPLUS_DEMANGLE | 370 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT |
371 | else | 371 | else |
372 | FLAGS_BFD=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd | 372 | FLAGS_BFD=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd |
373 | has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd) | 373 | has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD),libbfd) |
@@ -388,7 +388,7 @@ else | |||
388 | has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle) | 388 | has_cplus_demangle := $(call try-cc,$(SOURCE_CPLUS_DEMANGLE),$(FLAGS_CPLUS_DEMANGLE),demangle) |
389 | ifeq ($(has_cplus_demangle),y) | 389 | ifeq ($(has_cplus_demangle),y) |
390 | EXTLIBS += -liberty | 390 | EXTLIBS += -liberty |
391 | CFLAGS += -DHAVE_CPLUS_DEMANGLE | 391 | CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT |
392 | else | 392 | else |
393 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) | 393 | msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling) |
394 | CFLAGS += -DNO_DEMANGLE | 394 | CFLAGS += -DNO_DEMANGLE |
@@ -400,20 +400,20 @@ else | |||
400 | endif | 400 | endif |
401 | 401 | ||
402 | ifndef NO_STRLCPY | 402 | ifndef NO_STRLCPY |
403 | ifeq ($(call try-cc,$(SOURCE_STRLCPY),,-DHAVE_STRLCPY),y) | 403 | ifeq ($(call try-cc,$(SOURCE_STRLCPY),,-DHAVE_STRLCPY_SUPPORT),y) |
404 | CFLAGS += -DHAVE_STRLCPY | 404 | CFLAGS += -DHAVE_STRLCPY_SUPPORT |
405 | endif | 405 | endif |
406 | endif | 406 | endif |
407 | 407 | ||
408 | ifndef NO_ON_EXIT | 408 | ifndef NO_ON_EXIT |
409 | ifeq ($(call try-cc,$(SOURCE_ON_EXIT),,-DHAVE_ON_EXIT),y) | 409 | ifeq ($(call try-cc,$(SOURCE_ON_EXIT),,-DHAVE_ON_EXIT_SUPPORT),y) |
410 | CFLAGS += -DHAVE_ON_EXIT | 410 | CFLAGS += -DHAVE_ON_EXIT_SUPPORT |
411 | endif | 411 | endif |
412 | endif | 412 | endif |
413 | 413 | ||
414 | ifndef NO_BACKTRACE | 414 | ifndef NO_BACKTRACE |
415 | ifeq ($(call try-cc,$(SOURCE_BACKTRACE),,-DBACKTRACE_SUPPORT),y) | 415 | ifeq ($(call try-cc,$(SOURCE_BACKTRACE),,-DHAVE_BACKTRACE_SUPPORT),y) |
416 | CFLAGS += -DBACKTRACE_SUPPORT | 416 | CFLAGS += -DHAVE_BACKTRACE_SUPPORT |
417 | endif | 417 | endif |
418 | endif | 418 | endif |
419 | 419 | ||
@@ -423,7 +423,7 @@ ifndef NO_LIBNUMA | |||
423 | msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numa-libs-devel or libnuma-dev); | 423 | msg := $(warning No numa.h found, disables 'perf bench numa mem' benchmark, please install numa-libs-devel or libnuma-dev); |
424 | NO_LIBNUMA := 1 | 424 | NO_LIBNUMA := 1 |
425 | else | 425 | else |
426 | CFLAGS += -DLIBNUMA_SUPPORT | 426 | CFLAGS += -DHAVE_LIBNUMA_SUPPORT |
427 | EXTLIBS += -lnuma | 427 | EXTLIBS += -lnuma |
428 | endif | 428 | endif |
429 | endif | 429 | endif |
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 85e1aed95204..245020cc6180 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -49,14 +49,14 @@ static struct cmd_struct commands[] = { | |||
49 | { "version", cmd_version, 0 }, | 49 | { "version", cmd_version, 0 }, |
50 | { "script", cmd_script, 0 }, | 50 | { "script", cmd_script, 0 }, |
51 | { "sched", cmd_sched, 0 }, | 51 | { "sched", cmd_sched, 0 }, |
52 | #ifdef LIBELF_SUPPORT | 52 | #ifdef HAVE_LIBELF_SUPPORT |
53 | { "probe", cmd_probe, 0 }, | 53 | { "probe", cmd_probe, 0 }, |
54 | #endif | 54 | #endif |
55 | { "kmem", cmd_kmem, 0 }, | 55 | { "kmem", cmd_kmem, 0 }, |
56 | { "lock", cmd_lock, 0 }, | 56 | { "lock", cmd_lock, 0 }, |
57 | { "kvm", cmd_kvm, 0 }, | 57 | { "kvm", cmd_kvm, 0 }, |
58 | { "test", cmd_test, 0 }, | 58 | { "test", cmd_test, 0 }, |
59 | #ifdef LIBAUDIT_SUPPORT | 59 | #ifdef HAVE_LIBAUDIT_SUPPORT |
60 | { "trace", cmd_trace, 0 }, | 60 | { "trace", cmd_trace, 0 }, |
61 | #endif | 61 | #endif |
62 | { "inject", cmd_inject, 0 }, | 62 | { "inject", cmd_inject, 0 }, |
diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c index c95012cdb438..c24d91221290 100644 --- a/tools/perf/ui/gtk/browser.c +++ b/tools/perf/ui/gtk/browser.c | |||
@@ -43,7 +43,7 @@ const char *perf_gtk__get_percent_color(double percent) | |||
43 | return NULL; | 43 | return NULL; |
44 | } | 44 | } |
45 | 45 | ||
46 | #ifdef HAVE_GTK_INFO_BAR | 46 | #ifdef HAVE_GTK_INFO_BAR_SUPPORT |
47 | GtkWidget *perf_gtk__setup_info_bar(void) | 47 | GtkWidget *perf_gtk__setup_info_bar(void) |
48 | { | 48 | { |
49 | GtkWidget *info_bar; | 49 | GtkWidget *info_bar; |
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h index 3d96785ef155..a72acbc565e0 100644 --- a/tools/perf/ui/gtk/gtk.h +++ b/tools/perf/ui/gtk/gtk.h | |||
@@ -12,7 +12,7 @@ struct perf_gtk_context { | |||
12 | GtkWidget *main_window; | 12 | GtkWidget *main_window; |
13 | GtkWidget *notebook; | 13 | GtkWidget *notebook; |
14 | 14 | ||
15 | #ifdef HAVE_GTK_INFO_BAR | 15 | #ifdef HAVE_GTK_INFO_BAR_SUPPORT |
16 | GtkWidget *info_bar; | 16 | GtkWidget *info_bar; |
17 | GtkWidget *message_label; | 17 | GtkWidget *message_label; |
18 | #endif | 18 | #endif |
@@ -39,7 +39,7 @@ void perf_gtk__resize_window(GtkWidget *window); | |||
39 | const char *perf_gtk__get_percent_color(double percent); | 39 | const char *perf_gtk__get_percent_color(double percent); |
40 | GtkWidget *perf_gtk__setup_statusbar(void); | 40 | GtkWidget *perf_gtk__setup_statusbar(void); |
41 | 41 | ||
42 | #ifdef HAVE_GTK_INFO_BAR | 42 | #ifdef HAVE_GTK_INFO_BAR_SUPPORT |
43 | GtkWidget *perf_gtk__setup_info_bar(void); | 43 | GtkWidget *perf_gtk__setup_info_bar(void); |
44 | #else | 44 | #else |
45 | static inline GtkWidget *perf_gtk__setup_info_bar(void) | 45 | static inline GtkWidget *perf_gtk__setup_info_bar(void) |
diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c index c06942a41c78..696c1fbe4248 100644 --- a/tools/perf/ui/gtk/util.c +++ b/tools/perf/ui/gtk/util.c | |||
@@ -53,7 +53,7 @@ static int perf_gtk__error(const char *format, va_list args) | |||
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | 55 | ||
56 | #ifdef HAVE_GTK_INFO_BAR | 56 | #ifdef HAVE_GTK_INFO_BAR_SUPPORT |
57 | static int perf_gtk__warning_info_bar(const char *format, va_list args) | 57 | static int perf_gtk__warning_info_bar(const char *format, va_list args) |
58 | { | 58 | { |
59 | char *msg; | 59 | char *msg; |
@@ -105,7 +105,7 @@ static int perf_gtk__warning_statusbar(const char *format, va_list args) | |||
105 | 105 | ||
106 | struct perf_error_ops perf_gtk_eops = { | 106 | struct perf_error_ops perf_gtk_eops = { |
107 | .error = perf_gtk__error, | 107 | .error = perf_gtk__error, |
108 | #ifdef HAVE_GTK_INFO_BAR | 108 | #ifdef HAVE_GTK_INFO_BAR_SUPPORT |
109 | .warning = perf_gtk__warning_info_bar, | 109 | .warning = perf_gtk__warning_info_bar, |
110 | #else | 110 | #else |
111 | .warning = perf_gtk__warning_statusbar, | 111 | .warning = perf_gtk__warning_statusbar, |
diff --git a/tools/perf/ui/ui.h b/tools/perf/ui/ui.h index 70cb0d4eb8aa..1349d142a005 100644 --- a/tools/perf/ui/ui.h +++ b/tools/perf/ui/ui.h | |||
@@ -12,7 +12,7 @@ extern int use_browser; | |||
12 | void setup_browser(bool fallback_to_pager); | 12 | void setup_browser(bool fallback_to_pager); |
13 | void exit_browser(bool wait_for_ok); | 13 | void exit_browser(bool wait_for_ok); |
14 | 14 | ||
15 | #ifdef SLANG_SUPPORT | 15 | #ifdef HAVE_SLANG_SUPPORT |
16 | int ui__init(void); | 16 | int ui__init(void); |
17 | void ui__exit(bool wait_for_ok); | 17 | void ui__exit(bool wait_for_ok); |
18 | #else | 18 | #else |
@@ -23,7 +23,7 @@ static inline int ui__init(void) | |||
23 | static inline void ui__exit(bool wait_for_ok __maybe_unused) {} | 23 | static inline void ui__exit(bool wait_for_ok __maybe_unused) {} |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifdef GTK2_SUPPORT | 26 | #ifdef HAVE_GTK2_SUPPORT |
27 | int perf_gtk__init(void); | 27 | int perf_gtk__init(void); |
28 | void perf_gtk__exit(bool wait_for_ok); | 28 | void perf_gtk__exit(bool wait_for_ok); |
29 | #else | 29 | #else |
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index af755156d278..f0699e9bcc6f 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h | |||
@@ -150,7 +150,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map, | |||
150 | struct perf_evsel *evsel, bool print_lines, | 150 | struct perf_evsel *evsel, bool print_lines, |
151 | bool full_paths, int min_pcnt, int max_lines); | 151 | bool full_paths, int min_pcnt, int max_lines); |
152 | 152 | ||
153 | #ifdef SLANG_SUPPORT | 153 | #ifdef HAVE_SLANG_SUPPORT |
154 | int symbol__tui_annotate(struct symbol *sym, struct map *map, | 154 | int symbol__tui_annotate(struct symbol *sym, struct map *map, |
155 | struct perf_evsel *evsel, | 155 | struct perf_evsel *evsel, |
156 | struct hist_browser_timer *hbt); | 156 | struct hist_browser_timer *hbt); |
@@ -165,7 +165,7 @@ static inline int symbol__tui_annotate(struct symbol *sym __maybe_unused, | |||
165 | } | 165 | } |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | #ifdef GTK2_SUPPORT | 168 | #ifdef HAVE_GTK2_SUPPORT |
169 | int symbol__gtk_annotate(struct symbol *sym, struct map *map, | 169 | int symbol__gtk_annotate(struct symbol *sym, struct map *map, |
170 | struct perf_evsel *evsel, | 170 | struct perf_evsel *evsel, |
171 | struct hist_browser_timer *hbt); | 171 | struct hist_browser_timer *hbt); |
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 26e367239873..442953c1ce85 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -70,7 +70,7 @@ extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2 | |||
70 | extern char *perf_pathdup(const char *fmt, ...) | 70 | extern char *perf_pathdup(const char *fmt, ...) |
71 | __attribute__((format (printf, 1, 2))); | 71 | __attribute__((format (printf, 1, 2))); |
72 | 72 | ||
73 | #ifndef HAVE_STRLCPY | 73 | #ifndef HAVE_STRLCPY_SUPPORT |
74 | extern size_t strlcpy(char *dest, const char *src, size_t size); | 74 | extern size_t strlcpy(char *dest, const char *src, size_t size); |
75 | #endif | 75 | #endif |
76 | 76 | ||
diff --git a/tools/perf/util/generate-cmdlist.sh b/tools/perf/util/generate-cmdlist.sh index 3ac38031d534..36a885d2cd22 100755 --- a/tools/perf/util/generate-cmdlist.sh +++ b/tools/perf/util/generate-cmdlist.sh | |||
@@ -22,7 +22,7 @@ do | |||
22 | }' "Documentation/perf-$cmd.txt" | 22 | }' "Documentation/perf-$cmd.txt" |
23 | done | 23 | done |
24 | 24 | ||
25 | echo "#ifdef LIBELF_SUPPORT" | 25 | echo "#ifdef HAVE_LIBELF_SUPPORT" |
26 | sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt | | 26 | sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt | |
27 | sort | | 27 | sort | |
28 | while read cmd | 28 | while read cmd |
@@ -35,5 +35,5 @@ do | |||
35 | p | 35 | p |
36 | }' "Documentation/perf-$cmd.txt" | 36 | }' "Documentation/perf-$cmd.txt" |
37 | done | 37 | done |
38 | echo "#endif /* LIBELF_SUPPORT */" | 38 | echo "#endif /* HAVE_LIBELF_SUPPORT */" |
39 | echo "};" | 39 | echo "};" |
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 6a048c09cd64..ed4f90ebe0d5 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -187,7 +187,7 @@ struct hist_browser_timer { | |||
187 | int refresh; | 187 | int refresh; |
188 | }; | 188 | }; |
189 | 189 | ||
190 | #ifdef SLANG_SUPPORT | 190 | #ifdef HAVE_SLANG_SUPPORT |
191 | #include "../ui/keysyms.h" | 191 | #include "../ui/keysyms.h" |
192 | int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel, | 192 | int hist_entry__tui_annotate(struct hist_entry *he, struct perf_evsel *evsel, |
193 | struct hist_browser_timer *hbt); | 193 | struct hist_browser_timer *hbt); |
@@ -228,7 +228,7 @@ static inline int script_browse(const char *script_opt __maybe_unused) | |||
228 | #define K_SWITCH_INPUT_DATA -3000 | 228 | #define K_SWITCH_INPUT_DATA -3000 |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | #ifdef GTK2_SUPPORT | 231 | #ifdef HAVE_GTK2_SUPPORT |
232 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help, | 232 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, const char *help, |
233 | struct hist_browser_timer *hbt __maybe_unused, | 233 | struct hist_browser_timer *hbt __maybe_unused, |
234 | float min_pcnt); | 234 | float min_pcnt); |
diff --git a/tools/perf/util/include/dwarf-regs.h b/tools/perf/util/include/dwarf-regs.h index cf6727e99c44..8f149655f497 100644 --- a/tools/perf/util/include/dwarf-regs.h +++ b/tools/perf/util/include/dwarf-regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _PERF_DWARF_REGS_H_ | 1 | #ifndef _PERF_DWARF_REGS_H_ |
2 | #define _PERF_DWARF_REGS_H_ | 2 | #define _PERF_DWARF_REGS_H_ |
3 | 3 | ||
4 | #ifdef DWARF_SUPPORT | 4 | #ifdef HAVE_DWARF_SUPPORT |
5 | const char *get_arch_regstr(unsigned int n); | 5 | const char *get_arch_regstr(unsigned int n); |
6 | #endif | 6 | #endif |
7 | 7 | ||
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 4f6680d2043b..17ee458a0870 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c | |||
@@ -172,7 +172,7 @@ int map__load(struct map *map, symbol_filter_t filter) | |||
172 | pr_warning(", continuing without symbols\n"); | 172 | pr_warning(", continuing without symbols\n"); |
173 | return -1; | 173 | return -1; |
174 | } else if (nr == 0) { | 174 | } else if (nr == 0) { |
175 | #ifdef LIBELF_SUPPORT | 175 | #ifdef HAVE_LIBELF_SUPPORT |
176 | const size_t len = strlen(name); | 176 | const size_t len = strlen(name); |
177 | const size_t real_len = len - sizeof(DSO__DELETED); | 177 | const size_t real_len = len - sizeof(DSO__DELETED); |
178 | 178 | ||
diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index a8c49548ca48..f3958743b743 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c | |||
@@ -22,7 +22,7 @@ static const char *get_perf_dir(void) | |||
22 | return "."; | 22 | return "."; |
23 | } | 23 | } |
24 | 24 | ||
25 | #ifndef HAVE_STRLCPY | 25 | #ifndef HAVE_STRLCPY_SUPPORT |
26 | size_t strlcpy(char *dest, const char *src, size_t size) | 26 | size_t strlcpy(char *dest, const char *src, size_t size) |
27 | { | 27 | { |
28 | size_t ret = strlen(src); | 28 | size_t ret = strlen(src); |
diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h index 5a4f2b6f3738..a3d42cd74919 100644 --- a/tools/perf/util/perf_regs.h +++ b/tools/perf/util/perf_regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __PERF_REGS_H | 1 | #ifndef __PERF_REGS_H |
2 | #define __PERF_REGS_H | 2 | #define __PERF_REGS_H |
3 | 3 | ||
4 | #ifdef HAVE_PERF_REGS | 4 | #ifdef HAVE_PERF_REGS_SUPPORT |
5 | #include <perf_regs.h> | 5 | #include <perf_regs.h> |
6 | #else | 6 | #else |
7 | #define PERF_REGS_MASK 0 | 7 | #define PERF_REGS_MASK 0 |
@@ -10,5 +10,5 @@ static inline const char *perf_reg_name(int id __maybe_unused) | |||
10 | { | 10 | { |
11 | return NULL; | 11 | return NULL; |
12 | } | 12 | } |
13 | #endif /* HAVE_PERF_REGS */ | 13 | #endif /* HAVE_PERF_REGS_SUPPORT */ |
14 | #endif /* __PERF_REGS_H */ | 14 | #endif /* __PERF_REGS_H */ |
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index aa04bf9c9ad7..779b2dacd43f 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -201,7 +201,7 @@ static int convert_to_perf_probe_point(struct probe_trace_point *tp, | |||
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
204 | #ifdef DWARF_SUPPORT | 204 | #ifdef HAVE_DWARF_SUPPORT |
205 | /* Open new debuginfo of given module */ | 205 | /* Open new debuginfo of given module */ |
206 | static struct debuginfo *open_debuginfo(const char *module) | 206 | static struct debuginfo *open_debuginfo(const char *module) |
207 | { | 207 | { |
@@ -630,7 +630,7 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs, | |||
630 | return ret; | 630 | return ret; |
631 | } | 631 | } |
632 | 632 | ||
633 | #else /* !DWARF_SUPPORT */ | 633 | #else /* !HAVE_DWARF_SUPPORT */ |
634 | 634 | ||
635 | static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp, | 635 | static int kprobe_convert_to_perf_probe(struct probe_trace_point *tp, |
636 | struct perf_probe_point *pp) | 636 | struct perf_probe_point *pp) |
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 3b7d63018960..3f0c29dd6ac5 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -14,7 +14,7 @@ static inline int is_c_varname(const char *name) | |||
14 | return isalpha(name[0]) || name[0] == '_'; | 14 | return isalpha(name[0]) || name[0] == '_'; |
15 | } | 15 | } |
16 | 16 | ||
17 | #ifdef DWARF_SUPPORT | 17 | #ifdef HAVE_DWARF_SUPPORT |
18 | 18 | ||
19 | #include "dwarf-aux.h" | 19 | #include "dwarf-aux.h" |
20 | 20 | ||
@@ -105,6 +105,6 @@ struct line_finder { | |||
105 | int found; | 105 | int found; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | #endif /* DWARF_SUPPORT */ | 108 | #endif /* HAVE_DWARF_SUPPORT */ |
109 | 109 | ||
110 | #endif /*_PROBE_FINDER_H */ | 110 | #endif /*_PROBE_FINDER_H */ |
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index a9c829be5216..c37693052800 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include "symbol.h" | 8 | #include "symbol.h" |
9 | #include "debug.h" | 9 | #include "debug.h" |
10 | 10 | ||
11 | #ifndef HAVE_ELF_GETPHDRNUM | 11 | #ifndef HAVE_ELF_GETPHDRNUM_SUPPORT |
12 | static int elf_getphdrnum(Elf *elf, size_t *dst) | 12 | static int elf_getphdrnum(Elf *elf, size_t *dst) |
13 | { | 13 | { |
14 | GElf_Ehdr gehdr; | 14 | GElf_Ehdr gehdr; |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index fd5b70ea2981..2a97bb1a8097 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <libgen.h> | 13 | #include <libgen.h> |
14 | #include "build-id.h" | 14 | #include "build-id.h" |
15 | 15 | ||
16 | #ifdef LIBELF_SUPPORT | 16 | #ifdef HAVE_LIBELF_SUPPORT |
17 | #include <libelf.h> | 17 | #include <libelf.h> |
18 | #include <gelf.h> | 18 | #include <gelf.h> |
19 | #endif | 19 | #endif |
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include "dso.h" | 22 | #include "dso.h" |
23 | 23 | ||
24 | #ifdef HAVE_CPLUS_DEMANGLE | 24 | #ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
25 | extern char *cplus_demangle(const char *, int); | 25 | extern char *cplus_demangle(const char *, int); |
26 | 26 | ||
27 | static inline char *bfd_demangle(void __maybe_unused *v, const char *c, int i) | 27 | static inline char *bfd_demangle(void __maybe_unused *v, const char *c, int i) |
@@ -46,7 +46,7 @@ static inline char *bfd_demangle(void __maybe_unused *v, | |||
46 | * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; | 46 | * libelf 0.8.x and earlier do not support ELF_C_READ_MMAP; |
47 | * for newer versions we can use mmap to reduce memory usage: | 47 | * for newer versions we can use mmap to reduce memory usage: |
48 | */ | 48 | */ |
49 | #ifdef LIBELF_MMAP | 49 | #ifdef HAVE_LIBELF_MMAP_SUPPORT |
50 | # define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP | 50 | # define PERF_ELF_C_READ_MMAP ELF_C_READ_MMAP |
51 | #else | 51 | #else |
52 | # define PERF_ELF_C_READ_MMAP ELF_C_READ | 52 | # define PERF_ELF_C_READ_MMAP ELF_C_READ |
@@ -178,7 +178,7 @@ struct symsrc { | |||
178 | int fd; | 178 | int fd; |
179 | enum dso_binary_type type; | 179 | enum dso_binary_type type; |
180 | 180 | ||
181 | #ifdef LIBELF_SUPPORT | 181 | #ifdef HAVE_LIBELF_SUPPORT |
182 | Elf *elf; | 182 | Elf *elf; |
183 | GElf_Ehdr ehdr; | 183 | GElf_Ehdr ehdr; |
184 | 184 | ||
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h index cb6bc503a792..ec0c71a2ca2e 100644 --- a/tools/perf/util/unwind.h +++ b/tools/perf/util/unwind.h | |||
@@ -13,7 +13,7 @@ struct unwind_entry { | |||
13 | 13 | ||
14 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); | 14 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); |
15 | 15 | ||
16 | #ifdef LIBUNWIND_SUPPORT | 16 | #ifdef HAVE_LIBUNWIND_SUPPORT |
17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, | 17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, |
18 | struct machine *machine, | 18 | struct machine *machine, |
19 | struct thread *thread, | 19 | struct thread *thread, |
@@ -31,5 +31,5 @@ unwind__get_entries(unwind_entry_cb_t cb __maybe_unused, | |||
31 | { | 31 | { |
32 | return 0; | 32 | return 0; |
33 | } | 33 | } |
34 | #endif /* LIBUNWIND_SUPPORT */ | 34 | #endif /* HAVE_LIBUNWIND_SUPPORT */ |
35 | #endif /* __UNWIND_H */ | 35 | #endif /* __UNWIND_H */ |
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 6d17b18e915d..ccfdeb62f576 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 | #ifdef BACKTRACE_SUPPORT | 4 | #ifdef HAVE_BACKTRACE_SUPPORT |
5 | #include <execinfo.h> | 5 | #include <execinfo.h> |
6 | #endif | 6 | #endif |
7 | #include <stdio.h> | 7 | #include <stdio.h> |
@@ -204,7 +204,7 @@ int hex2u64(const char *ptr, u64 *long_val) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | /* Obtain a backtrace and print it to stdout. */ | 206 | /* Obtain a backtrace and print it to stdout. */ |
207 | #ifdef BACKTRACE_SUPPORT | 207 | #ifdef HAVE_BACKTRACE_SUPPORT |
208 | void dump_stack(void) | 208 | void dump_stack(void) |
209 | { | 209 | { |
210 | void *array[16]; | 210 | void *array[16]; |