Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'perf-core-for-mingo-4.17-20180413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull tooling improvements and fixes from Arnaldo Carvalho de Melo:

perf annotate fixes and improvements:

- Allow showing offsets in more than just jump targets, use the new
'O' hotkey in the TUI, config ~/.perfconfig annotate.offset_level
for it and for --stdio2 (Arnaldo Carvalho de Melo)

- Use the resolved variable names from objdump disassembled lines to
make them more compact, just like was already done for some instructions,
like "mov", this eventually will be done more generally, but lets now add
some more to the existing mechanism (Arnaldo Carvalho de Melo)

perf record fixes:

- Change warning for missing topology sysfs entry to debug, as not all
architectures have those files, s390 being one of those (Thomas Richter)

perf sched fixes:

- Fix -g/--call-graph documentation (Takuya Yamamoto)

perf stat:

- Enable 1ms interval for printing event counters values in (Alexey Budankov)

perf test fixes:

- Run dwarf unwind on arm32 (Kim Phillips)

- Remove unused ptrace.h include from LLVM test, sidesteping older
clang's lack of support for some asm constructs (Arnaldo Carvalho de Melo)

perf version fixes:

- Do not print info about HAVE_LIBAUDIT_SUPPORT in 'perf version --build-options'
when HAVE_SYSCALL_TABLE_SUPPORT is true, as libaudit won't be used in that
case, print info about syscall_table support instead (Jin Yao)

Build system fixes:

- Use HAVE_..._SUPPORT used consistently (Jin Yao)

- Restore READ_ONCE() C++ compatibility in tools/include (Mark Rutland)

- Give hints about package names needed to build jvmti (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+177 -47
-2
arch/x86/include/asm/asm.h
··· 136 136 #endif 137 137 138 138 #ifndef __ASSEMBLY__ 139 - #ifndef __BPF__ 140 139 /* 141 140 * This output constraint should be used for any inline asm which has a "call" 142 141 * instruction. Otherwise the asm may be inserted before the frame pointer ··· 144 145 */ 145 146 register unsigned long current_stack_pointer asm(_ASM_SP); 146 147 #define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer) 147 - #endif 148 148 #endif 149 149 150 150 #endif /* _ASM_X86_ASM_H */
+14 -4
tools/include/linux/compiler.h
··· 151 151 * required ordering. 152 152 */ 153 153 154 - #define READ_ONCE(x) \ 155 - ({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) 154 + #define READ_ONCE(x) \ 155 + ({ \ 156 + union { typeof(x) __val; char __c[1]; } __u = \ 157 + { .__c = { 0 } }; \ 158 + __read_once_size(&(x), __u.__c, sizeof(x)); \ 159 + __u.__val; \ 160 + }) 156 161 157 - #define WRITE_ONCE(x, val) \ 158 - ({ union { typeof(x) __val; char __c[1]; } __u = { .__val = (val) }; __write_once_size(&(x), __u.__c, sizeof(x)); __u.__val; }) 162 + #define WRITE_ONCE(x, val) \ 163 + ({ \ 164 + union { typeof(x) __val; char __c[1]; } __u = \ 165 + { .__val = (val) }; \ 166 + __write_once_size(&(x), __u.__c, sizeof(x)); \ 167 + __u.__val; \ 168 + }) 159 169 160 170 161 171 #ifndef __fallthrough
+5
tools/perf/Documentation/perf-config.txt
··· 334 334 335 335 99.93 │ mov %eax,%eax 336 336 337 + annotate.offset_level:: 338 + Default is '1', meaning just jump targets will have offsets show right beside 339 + the instruction. When set to '2' 'call' instructions will also have its offsets 340 + shown, 3 or higher will show offsets for all instructions. 341 + 337 342 hist.*:: 338 343 hist.percentage:: 339 344 This option control the way to calculate overhead of filtered entries -
+2 -2
tools/perf/Documentation/perf-sched.txt
··· 104 104 kallsyms pathname 105 105 106 106 -g:: 107 - --no-call-graph:: 108 - Do not display call chains if present. 107 + --call-graph:: 108 + Display call chains if present (default on). 109 109 110 110 --max-stack:: 111 111 Maximum number of functions to display in backtrace, default 5.
+1 -1
tools/perf/Documentation/perf-stat.txt
··· 153 153 154 154 -I msecs:: 155 155 --interval-print msecs:: 156 - Print count deltas every N milliseconds (minimum: 10ms) 156 + Print count deltas every N milliseconds (minimum: 1ms) 157 157 The overhead percentage could be high in some cases, for instance with small, sub 100ms intervals. Use with caution. 158 158 example: 'perf stat -I 1000 -e cycles -a sleep 5' 159 159
+2 -2
tools/perf/Makefile.config
··· 68 68 endif 69 69 70 70 ifneq ($(NO_SYSCALL_TABLE),1) 71 - CFLAGS += -DHAVE_SYSCALL_TABLE 71 + CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT 72 72 endif 73 73 74 74 # So far there's only x86 and arm libdw unwind support merged in perf. ··· 847 847 ifeq ($(feature-jvmti), 1) 848 848 $(call detected_var,JDIR) 849 849 else 850 - $(warning No openjdk development package found, please install JDK package) 850 + $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel) 851 851 NO_JVMTI := 1 852 852 endif 853 853 endif
+12
tools/perf/arch/arm/include/arch-tests.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef ARCH_TESTS_H 3 + #define ARCH_TESTS_H 4 + 5 + #ifdef HAVE_DWARF_UNWIND_SUPPORT 6 + struct thread; 7 + struct perf_sample; 8 + #endif 9 + 10 + extern struct test arch_tests[]; 11 + 12 + #endif
+2
tools/perf/arch/arm/tests/Build
··· 1 1 libperf-y += regs_load.o 2 2 libperf-y += dwarf-unwind.o 3 + 4 + libperf-y += arch-tests.o
+16
tools/perf/arch/arm/tests/arch-tests.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <string.h> 3 + #include "tests/tests.h" 4 + #include "arch-tests.h" 5 + 6 + struct test arch_tests[] = { 7 + #ifdef HAVE_DWARF_UNWIND_SUPPORT 8 + { 9 + .desc = "DWARF unwind", 10 + .func = test__dwarf_unwind, 11 + }, 12 + #endif 13 + { 14 + .func = NULL, 15 + }, 16 + };
+66 -1
tools/perf/arch/x86/annotate/instructions.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 static struct ins x86__instructions[] = { 3 + { .name = "adc", .ops = &mov_ops, }, 4 + { .name = "adcb", .ops = &mov_ops, }, 5 + { .name = "adcl", .ops = &mov_ops, }, 3 6 { .name = "add", .ops = &mov_ops, }, 4 7 { .name = "addl", .ops = &mov_ops, }, 5 8 { .name = "addq", .ops = &mov_ops, }, 9 + { .name = "addsd", .ops = &mov_ops, }, 6 10 { .name = "addw", .ops = &mov_ops, }, 7 11 { .name = "and", .ops = &mov_ops, }, 12 + { .name = "andb", .ops = &mov_ops, }, 13 + { .name = "andl", .ops = &mov_ops, }, 14 + { .name = "andpd", .ops = &mov_ops, }, 15 + { .name = "andps", .ops = &mov_ops, }, 16 + { .name = "andq", .ops = &mov_ops, }, 17 + { .name = "andw", .ops = &mov_ops, }, 18 + { .name = "bsr", .ops = &mov_ops, }, 19 + { .name = "bt", .ops = &mov_ops, }, 20 + { .name = "btr", .ops = &mov_ops, }, 8 21 { .name = "bts", .ops = &mov_ops, }, 22 + { .name = "btsq", .ops = &mov_ops, }, 9 23 { .name = "call", .ops = &call_ops, }, 10 24 { .name = "callq", .ops = &call_ops, }, 25 + { .name = "cmovbe", .ops = &mov_ops, }, 26 + { .name = "cmove", .ops = &mov_ops, }, 27 + { .name = "cmovae", .ops = &mov_ops, }, 11 28 { .name = "cmp", .ops = &mov_ops, }, 12 29 { .name = "cmpb", .ops = &mov_ops, }, 13 30 { .name = "cmpl", .ops = &mov_ops, }, 14 31 { .name = "cmpq", .ops = &mov_ops, }, 15 32 { .name = "cmpw", .ops = &mov_ops, }, 16 33 { .name = "cmpxch", .ops = &mov_ops, }, 34 + { .name = "cmpxchg", .ops = &mov_ops, }, 35 + { .name = "cs", .ops = &mov_ops, }, 17 36 { .name = "dec", .ops = &dec_ops, }, 18 37 { .name = "decl", .ops = &dec_ops, }, 38 + { .name = "divsd", .ops = &mov_ops, }, 39 + { .name = "divss", .ops = &mov_ops, }, 40 + { .name = "gs", .ops = &mov_ops, }, 19 41 { .name = "imul", .ops = &mov_ops, }, 20 42 { .name = "inc", .ops = &dec_ops, }, 21 43 { .name = "incl", .ops = &dec_ops, }, ··· 79 57 { .name = "lea", .ops = &mov_ops, }, 80 58 { .name = "lock", .ops = &lock_ops, }, 81 59 { .name = "mov", .ops = &mov_ops, }, 60 + { .name = "movapd", .ops = &mov_ops, }, 61 + { .name = "movaps", .ops = &mov_ops, }, 82 62 { .name = "movb", .ops = &mov_ops, }, 83 63 { .name = "movdqa", .ops = &mov_ops, }, 64 + { .name = "movdqu", .ops = &mov_ops, }, 84 65 { .name = "movl", .ops = &mov_ops, }, 85 66 { .name = "movq", .ops = &mov_ops, }, 67 + { .name = "movsd", .ops = &mov_ops, }, 86 68 { .name = "movslq", .ops = &mov_ops, }, 69 + { .name = "movss", .ops = &mov_ops, }, 70 + { .name = "movupd", .ops = &mov_ops, }, 71 + { .name = "movups", .ops = &mov_ops, }, 72 + { .name = "movw", .ops = &mov_ops, }, 87 73 { .name = "movzbl", .ops = &mov_ops, }, 88 74 { .name = "movzwl", .ops = &mov_ops, }, 75 + { .name = "mulsd", .ops = &mov_ops, }, 76 + { .name = "mulss", .ops = &mov_ops, }, 89 77 { .name = "nop", .ops = &nop_ops, }, 90 78 { .name = "nopl", .ops = &nop_ops, }, 91 79 { .name = "nopw", .ops = &nop_ops, }, 92 80 { .name = "or", .ops = &mov_ops, }, 81 + { .name = "orb", .ops = &mov_ops, }, 93 82 { .name = "orl", .ops = &mov_ops, }, 83 + { .name = "orps", .ops = &mov_ops, }, 84 + { .name = "orq", .ops = &mov_ops, }, 85 + { .name = "pand", .ops = &mov_ops, }, 86 + { .name = "paddq", .ops = &mov_ops, }, 87 + { .name = "pcmpeqb", .ops = &mov_ops, }, 88 + { .name = "por", .ops = &mov_ops, }, 89 + { .name = "rclb", .ops = &mov_ops, }, 90 + { .name = "rcll", .ops = &mov_ops, }, 91 + { .name = "retq", .ops = &ret_ops, }, 92 + { .name = "sbb", .ops = &mov_ops, }, 93 + { .name = "sbbl", .ops = &mov_ops, }, 94 + { .name = "sete", .ops = &mov_ops, }, 95 + { .name = "sub", .ops = &mov_ops, }, 96 + { .name = "subl", .ops = &mov_ops, }, 97 + { .name = "subq", .ops = &mov_ops, }, 98 + { .name = "subsd", .ops = &mov_ops, }, 99 + { .name = "subw", .ops = &mov_ops, }, 94 100 { .name = "test", .ops = &mov_ops, }, 95 101 { .name = "testb", .ops = &mov_ops, }, 96 102 { .name = "testl", .ops = &mov_ops, }, 103 + { .name = "ucomisd", .ops = &mov_ops, }, 104 + { .name = "ucomiss", .ops = &mov_ops, }, 105 + { .name = "vaddsd", .ops = &mov_ops, }, 106 + { .name = "vandpd", .ops = &mov_ops, }, 107 + { .name = "vmovdqa", .ops = &mov_ops, }, 108 + { .name = "vmovq", .ops = &mov_ops, }, 109 + { .name = "vmovsd", .ops = &mov_ops, }, 110 + { .name = "vmulsd", .ops = &mov_ops, }, 111 + { .name = "vorpd", .ops = &mov_ops, }, 112 + { .name = "vsubsd", .ops = &mov_ops, }, 113 + { .name = "vucomisd", .ops = &mov_ops, }, 97 114 { .name = "xadd", .ops = &mov_ops, }, 98 115 { .name = "xbeginl", .ops = &jump_ops, }, 99 116 { .name = "xbeginq", .ops = &jump_ops, }, 100 - { .name = "retq", .ops = &ret_ops, }, 117 + { .name = "xchg", .ops = &mov_ops, }, 118 + { .name = "xor", .ops = &mov_ops, }, 119 + { .name = "xorb", .ops = &mov_ops, }, 120 + { .name = "xorpd", .ops = &mov_ops, }, 121 + { .name = "xorps", .ops = &mov_ops, }, 101 122 }; 102 123 103 124 static bool x86__ins_is_fused(struct arch *arch, const char *ins1,
+1 -1
tools/perf/builtin-help.c
··· 439 439 #ifdef HAVE_LIBELF_SUPPORT 440 440 "probe", 441 441 #endif 442 - #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE) 442 + #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT) 443 443 "trace", 444 444 #endif 445 445 NULL };
+2 -2
tools/perf/builtin-script.c
··· 2801 2801 for_each_lang(scripts_path, scripts_dir, lang_dirent) { 2802 2802 scnprintf(lang_path, MAXPATHLEN, "%s/%s", scripts_path, 2803 2803 lang_dirent->d_name); 2804 - #ifdef NO_LIBPERL 2804 + #ifndef HAVE_LIBPERL_SUPPORT 2805 2805 if (strstr(lang_path, "perl")) 2806 2806 continue; 2807 2807 #endif 2808 - #ifdef NO_LIBPYTHON 2808 + #ifndef HAVE_LIBPYTHON_SUPPORT 2809 2809 if (strstr(lang_path, "python")) 2810 2810 continue; 2811 2811 #endif
+2 -12
tools/perf/builtin-stat.c
··· 1943 1943 OPT_STRING(0, "post", &post_cmd, "command", 1944 1944 "command to run after to the measured command"), 1945 1945 OPT_UINTEGER('I', "interval-print", &stat_config.interval, 1946 - "print counts at regular interval in ms (>= 10)"), 1946 + "print counts at regular interval in ms " 1947 + "(overhead is possible for values <= 100ms)"), 1947 1948 OPT_INTEGER(0, "interval-count", &stat_config.times, 1948 1949 "print counts for fixed number of times"), 1949 1950 OPT_UINTEGER(0, "timeout", &stat_config.timeout, ··· 2922 2921 goto out; 2923 2922 } 2924 2923 } 2925 - } 2926 - 2927 - if (interval && interval < 100) { 2928 - if (interval < 10) { 2929 - pr_err("print interval must be >= 10ms\n"); 2930 - parse_options_usage(stat_usage, stat_options, "I", 1); 2931 - goto out; 2932 - } else 2933 - pr_warning("print interval < 100ms. " 2934 - "The overhead percentage could be high in some cases. " 2935 - "Please proceed with caution.\n"); 2936 2924 } 2937 2925 2938 2926 if (stat_config.times && interval)
+3
tools/perf/builtin-version.c
··· 60 60 STATUS(HAVE_DWARF_GETLOCATIONS_SUPPORT, dwarf_getlocations); 61 61 STATUS(HAVE_GLIBC_SUPPORT, glibc); 62 62 STATUS(HAVE_GTK2_SUPPORT, gtk2); 63 + #ifndef HAVE_SYSCALL_TABLE_SUPPORT 63 64 STATUS(HAVE_LIBAUDIT_SUPPORT, libaudit); 65 + #endif 66 + STATUS(HAVE_SYSCALL_TABLE_SUPPORT, syscall_table); 64 67 STATUS(HAVE_LIBBFD_SUPPORT, libbfd); 65 68 STATUS(HAVE_LIBELF_SUPPORT, libelf); 66 69 STATUS(HAVE_LIBNUMA_SUPPORT, libnuma);
+2 -2
tools/perf/perf.c
··· 73 73 { "lock", cmd_lock, 0 }, 74 74 { "kvm", cmd_kvm, 0 }, 75 75 { "test", cmd_test, 0 }, 76 - #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE) 76 + #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT) 77 77 { "trace", cmd_trace, 0 }, 78 78 #endif 79 79 { "inject", cmd_inject, 0 }, ··· 491 491 argv[0] = cmd; 492 492 } 493 493 if (strstarts(cmd, "trace")) { 494 - #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE) 494 + #if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT) 495 495 setup_path(); 496 496 argv[0] = "trace"; 497 497 return cmd_trace(argc, argv);
-1
tools/perf/tests/bpf-script-test-kbuild.c
··· 9 9 #define SEC(NAME) __attribute__((section(NAME), used)) 10 10 11 11 #include <uapi/linux/fs.h> 12 - #include <uapi/asm/ptrace.h> 13 12 14 13 SEC("func=vfs_llseek") 15 14 int bpf_func__vfs_llseek(void *ctx)
+1
tools/perf/tests/builtin-test.c
··· 118 118 { 119 119 .desc = "Breakpoint accounting", 120 120 .func = test__bp_accounting, 121 + .is_supported = test__bp_signal_is_supported, 121 122 }, 122 123 { 123 124 .desc = "Number of exit events of a simple workload",
+5
tools/perf/ui/browsers/annotate.c
··· 692 692 "J Toggle showing number of jump sources on targets\n" 693 693 "n Search next string\n" 694 694 "o Toggle disassembler output/simplified view\n" 695 + "O Bump offset level (jump targets -> +call -> all -> cycle thru)\n" 695 696 "s Toggle source code view\n" 696 697 "t Circulate percent, total period, samples view\n" 697 698 "/ Search string\n" ··· 719 718 case 'o': 720 719 notes->options->use_offset = !notes->options->use_offset; 721 720 annotation__update_column_widths(notes); 721 + continue; 722 + case 'O': 723 + if (++notes->options->offset_level > ANNOTATION__MAX_OFFSET_LEVEL) 724 + notes->options->offset_level = ANNOTATION__MIN_OFFSET_LEVEL; 722 725 continue; 723 726 case 'j': 724 727 notes->options->jump_arrows = !notes->options->jump_arrows;
+21 -5
tools/perf/util/annotate.c
··· 46 46 struct annotation_options annotation__default_options = { 47 47 .use_offset = true, 48 48 .jump_arrows = true, 49 + .offset_level = ANNOTATION__OFFSET_JUMP_TARGETS, 49 50 }; 50 51 51 52 const char *disassembler_style; ··· 2513 2512 if (!notes->options->use_offset) { 2514 2513 printed = scnprintf(bf, sizeof(bf), "%" PRIx64 ": ", addr); 2515 2514 } else { 2516 - if (al->jump_sources) { 2515 + if (al->jump_sources && 2516 + notes->options->offset_level >= ANNOTATION__OFFSET_JUMP_TARGETS) { 2517 2517 if (notes->options->show_nr_jumps) { 2518 2518 int prev; 2519 2519 printed = scnprintf(bf, sizeof(bf), "%*d ", ··· 2525 2523 obj__printf(obj, bf); 2526 2524 obj__set_color(obj, prev); 2527 2525 } 2528 - 2526 + print_addr: 2529 2527 printed = scnprintf(bf, sizeof(bf), "%*" PRIx64 ": ", 2530 2528 notes->widths.target, addr); 2529 + } else if (ins__is_call(&disasm_line(al)->ins) && 2530 + notes->options->offset_level >= ANNOTATION__OFFSET_CALL) { 2531 + goto print_addr; 2532 + } else if (notes->options->offset_level == ANNOTATION__MAX_OFFSET_LEVEL) { 2533 + goto print_addr; 2531 2534 } else { 2532 2535 printed = scnprintf(bf, sizeof(bf), "%-*s ", 2533 2536 notes->widths.addr, " "); ··· 2649 2642 */ 2650 2643 static struct annotation_config { 2651 2644 const char *name; 2652 - bool *value; 2645 + void *value; 2653 2646 } annotation__configs[] = { 2654 2647 ANNOTATION__CFG(hide_src_code), 2655 2648 ANNOTATION__CFG(jump_arrows), 2649 + ANNOTATION__CFG(offset_level), 2656 2650 ANNOTATION__CFG(show_linenr), 2657 2651 ANNOTATION__CFG(show_nr_jumps), 2658 2652 ANNOTATION__CFG(show_nr_samples), ··· 2685 2677 2686 2678 if (cfg == NULL) 2687 2679 pr_debug("%s variable unknown, ignoring...", var); 2688 - else 2689 - *cfg->value = perf_config_bool(name, value); 2680 + else if (strcmp(var, "annotate.offset_level") == 0) { 2681 + perf_config_int(cfg->value, name, value); 2682 + 2683 + if (*(int *)cfg->value > ANNOTATION__MAX_OFFSET_LEVEL) 2684 + *(int *)cfg->value = ANNOTATION__MAX_OFFSET_LEVEL; 2685 + else if (*(int *)cfg->value < ANNOTATION__MIN_OFFSET_LEVEL) 2686 + *(int *)cfg->value = ANNOTATION__MIN_OFFSET_LEVEL; 2687 + } else { 2688 + *(bool *)cfg->value = perf_config_bool(name, value); 2689 + } 2690 2690 return 0; 2691 2691 } 2692 2692
+9
tools/perf/util/annotate.h
··· 70 70 show_nr_jumps, 71 71 show_nr_samples, 72 72 show_total_period; 73 + u8 offset_level; 73 74 }; 75 + 76 + enum { 77 + ANNOTATION__OFFSET_JUMP_TARGETS = 1, 78 + ANNOTATION__OFFSET_CALL, 79 + ANNOTATION__MAX_OFFSET_LEVEL, 80 + }; 81 + 82 + #define ANNOTATION__MIN_OFFSET_LEVEL ANNOTATION__OFFSET_JUMP_TARGETS 74 83 75 84 extern struct annotation_options annotation__default_options; 76 85
+1 -1
tools/perf/util/generate-cmdlist.sh
··· 38 38 done 39 39 echo "#endif /* HAVE_LIBELF_SUPPORT */" 40 40 41 - echo "#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE)" 41 + echo "#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT)" 42 42 sed -n -e 's/^perf-\([^ ]*\)[ ].* audit*/\1/p' command-list.txt | 43 43 sort | 44 44 while read cmd
+2 -1
tools/perf/util/header.c
··· 1320 1320 1321 1321 dir = opendir(path); 1322 1322 if (!dir) { 1323 - pr_warning("failed: can't open node sysfs data\n"); 1323 + pr_debug2("%s: could't read %s, does this arch have topology information?\n", 1324 + __func__, path); 1324 1325 return -1; 1325 1326 } 1326 1327
+3 -5
tools/perf/util/symbol.c
··· 2091 2091 2092 2092 int symbol__annotation_init(void) 2093 2093 { 2094 + if (symbol_conf.init_annotation) 2095 + return 0; 2096 + 2094 2097 if (symbol_conf.initialized) { 2095 2098 pr_err("Annotation needs to be init before symbol__init()\n"); 2096 2099 return -1; 2097 - } 2098 - 2099 - if (symbol_conf.init_annotation) { 2100 - pr_warning("Annotation being initialized multiple times\n"); 2101 - return 0; 2102 2100 } 2103 2101 2104 2102 symbol_conf.priv_size += sizeof(struct annotation);
+3 -3
tools/perf/util/syscalltbl.c
··· 17 17 #include <stdlib.h> 18 18 #include <linux/compiler.h> 19 19 20 - #ifdef HAVE_SYSCALL_TABLE 20 + #ifdef HAVE_SYSCALL_TABLE_SUPPORT 21 21 #include <string.h> 22 22 #include "string2.h" 23 23 #include "util.h" ··· 139 139 return syscalltbl__strglobmatch_next(tbl, syscall_glob, idx); 140 140 } 141 141 142 - #else /* HAVE_SYSCALL_TABLE */ 142 + #else /* HAVE_SYSCALL_TABLE_SUPPORT */ 143 143 144 144 #include <libaudit.h> 145 145 ··· 176 176 { 177 177 return syscalltbl__strglobmatch_next(tbl, syscall_glob, idx); 178 178 } 179 - #endif /* HAVE_SYSCALL_TABLE */ 179 + #endif /* HAVE_SYSCALL_TABLE_SUPPORT */
+2 -2
tools/perf/util/trace-event-scripting.c
··· 98 98 } 99 99 } 100 100 101 - #ifdef NO_LIBPYTHON 101 + #ifndef HAVE_LIBPYTHON_SUPPORT 102 102 void setup_python_scripting(void) 103 103 { 104 104 register_python_scripting(&python_scripting_unsupported_ops); ··· 161 161 } 162 162 } 163 163 164 - #ifdef NO_LIBPERL 164 + #ifndef HAVE_LIBPERL_SUPPORT 165 165 void setup_perl_scripting(void) 166 166 { 167 167 register_perl_scripting(&perl_scripting_unsupported_ops);