1 include $(srctree)/tools/scripts/Makefile.incl 1 include $(srctree)/tools/scripts/Makefile.include 2 include $(srctree)/tools/scripts/utilities.mak 2 include $(srctree)/tools/scripts/utilities.mak 3 3 4 perf-util-y += arm64-frame-pointer-unwind-supp 4 perf-util-y += arm64-frame-pointer-unwind-support.o 5 perf-util-y += addr_location.o 5 perf-util-y += addr_location.o 6 perf-util-y += annotate.o 6 perf-util-y += annotate.o 7 perf-util-y += block-info.o 7 perf-util-y += block-info.o 8 perf-util-y += block-range.o 8 perf-util-y += block-range.o 9 perf-util-y += build-id.o 9 perf-util-y += build-id.o 10 perf-util-y += cacheline.o 10 perf-util-y += cacheline.o 11 perf-util-y += config.o 11 perf-util-y += config.o 12 perf-util-y += copyfile.o 12 perf-util-y += copyfile.o 13 perf-util-y += ctype.o 13 perf-util-y += ctype.o 14 perf-util-y += db-export.o 14 perf-util-y += db-export.o 15 perf-util-y += disasm.o 15 perf-util-y += disasm.o 16 perf-util-y += disasm_bpf.o 16 perf-util-y += disasm_bpf.o 17 perf-util-y += env.o 17 perf-util-y += env.o 18 perf-util-y += event.o 18 perf-util-y += event.o 19 perf-util-y += evlist.o 19 perf-util-y += evlist.o 20 perf-util-y += sideband_evlist.o 20 perf-util-y += sideband_evlist.o 21 perf-util-y += evsel.o 21 perf-util-y += evsel.o 22 perf-util-y += evsel_fprintf.o 22 perf-util-y += evsel_fprintf.o 23 perf-util-y += perf_event_attr_fprintf.o 23 perf-util-y += perf_event_attr_fprintf.o 24 perf-util-y += evswitch.o 24 perf-util-y += evswitch.o 25 perf-util-y += find_bit.o 25 perf-util-y += find_bit.o 26 perf-util-y += get_current_dir_name.o 26 perf-util-y += get_current_dir_name.o 27 perf-util-y += levenshtein.o 27 perf-util-y += levenshtein.o 28 perf-util-y += mmap.o 28 perf-util-y += mmap.o 29 perf-util-y += memswap.o 29 perf-util-y += memswap.o 30 perf-util-y += parse-events.o 30 perf-util-y += parse-events.o 31 perf-util-y += print-events.o 31 perf-util-y += print-events.o 32 perf-util-y += tracepoint.o 32 perf-util-y += tracepoint.o 33 perf-util-y += perf_regs.o 33 perf-util-y += perf_regs.o 34 perf-util-y += perf-regs-arch/ 34 perf-util-y += perf-regs-arch/ 35 perf-util-y += path.o 35 perf-util-y += path.o 36 perf-util-y += print_binary.o 36 perf-util-y += print_binary.o 37 perf-util-y += print_insn.o 37 perf-util-y += print_insn.o 38 perf-util-y += rlimit.o 38 perf-util-y += rlimit.o 39 perf-util-y += argv_split.o 39 perf-util-y += argv_split.o 40 perf-util-y += rbtree.o 40 perf-util-y += rbtree.o 41 perf-util-y += libstring.o 41 perf-util-y += libstring.o 42 perf-util-y += bitmap.o 42 perf-util-y += bitmap.o 43 perf-util-y += hweight.o 43 perf-util-y += hweight.o 44 perf-util-y += smt.o 44 perf-util-y += smt.o 45 perf-util-y += strbuf.o 45 perf-util-y += strbuf.o 46 perf-util-y += string.o 46 perf-util-y += string.o 47 perf-util-y += strlist.o 47 perf-util-y += strlist.o 48 perf-util-y += strfilter.o 48 perf-util-y += strfilter.o 49 perf-util-y += top.o 49 perf-util-y += top.o 50 perf-util-y += usage.o 50 perf-util-y += usage.o 51 perf-util-y += dso.o 51 perf-util-y += dso.o 52 perf-util-y += dsos.o 52 perf-util-y += dsos.o 53 perf-util-y += symbol.o 53 perf-util-y += symbol.o 54 perf-util-y += symbol_fprintf.o 54 perf-util-y += symbol_fprintf.o 55 perf-util-y += map_symbol.o 55 perf-util-y += map_symbol.o 56 perf-util-y += color.o 56 perf-util-y += color.o 57 perf-util-y += color_config.o 57 perf-util-y += color_config.o 58 perf-util-y += metricgroup.o 58 perf-util-y += metricgroup.o 59 perf-util-y += header.o 59 perf-util-y += header.o 60 perf-util-y += callchain.o 60 perf-util-y += callchain.o 61 perf-util-y += values.o 61 perf-util-y += values.o 62 perf-util-y += debug.o 62 perf-util-y += debug.o 63 perf-util-y += fncache.o 63 perf-util-y += fncache.o 64 perf-util-y += machine.o 64 perf-util-y += machine.o 65 perf-util-y += map.o 65 perf-util-y += map.o 66 perf-util-y += maps.o 66 perf-util-y += maps.o 67 perf-util-y += pstack.o 67 perf-util-y += pstack.o 68 perf-util-y += session.o 68 perf-util-y += session.o 69 perf-util-y += tool.o << 70 perf-util-y += sample-raw.o 69 perf-util-y += sample-raw.o 71 perf-util-y += s390-sample-raw.o 70 perf-util-y += s390-sample-raw.o 72 perf-util-y += amd-sample-raw.o 71 perf-util-y += amd-sample-raw.o 73 perf-util-$(CONFIG_TRACE) += syscalltbl.o 72 perf-util-$(CONFIG_TRACE) += syscalltbl.o 74 perf-util-y += ordered-events.o 73 perf-util-y += ordered-events.o 75 perf-util-y += namespaces.o 74 perf-util-y += namespaces.o 76 perf-util-y += comm.o 75 perf-util-y += comm.o 77 perf-util-y += thread.o 76 perf-util-y += thread.o 78 perf-util-y += threads.o 77 perf-util-y += threads.o 79 perf-util-y += thread_map.o 78 perf-util-y += thread_map.o 80 perf-util-y += parse-events-flex.o 79 perf-util-y += parse-events-flex.o 81 perf-util-y += parse-events-bison.o 80 perf-util-y += parse-events-bison.o 82 perf-util-y += pmu.o 81 perf-util-y += pmu.o 83 perf-util-y += pmus.o 82 perf-util-y += pmus.o 84 perf-util-y += pmu-flex.o 83 perf-util-y += pmu-flex.o 85 perf-util-y += pmu-bison.o 84 perf-util-y += pmu-bison.o 86 perf-util-y += svghelper.o 85 perf-util-y += svghelper.o 87 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-eve 86 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-event-info.o 88 perf-util-y += trace-event-scripting.o 87 perf-util-y += trace-event-scripting.o 89 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-eve 88 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-event.o 90 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-eve 89 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-event-parse.o 91 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-eve 90 perf-util-$(CONFIG_LIBTRACEEVENT) += trace-event-read.o 92 perf-util-y += sort.o 91 perf-util-y += sort.o 93 perf-util-y += hist.o 92 perf-util-y += hist.o 94 perf-util-y += util.o 93 perf-util-y += util.o 95 perf-util-y += cpumap.o 94 perf-util-y += cpumap.o 96 perf-util-y += affinity.o 95 perf-util-y += affinity.o 97 perf-util-y += cputopo.o 96 perf-util-y += cputopo.o 98 perf-util-y += cgroup.o 97 perf-util-y += cgroup.o 99 perf-util-y += target.o 98 perf-util-y += target.o 100 perf-util-y += rblist.o 99 perf-util-y += rblist.o 101 perf-util-y += intlist.o 100 perf-util-y += intlist.o 102 perf-util-y += vdso.o 101 perf-util-y += vdso.o 103 perf-util-y += counts.o 102 perf-util-y += counts.o 104 perf-util-y += stat.o 103 perf-util-y += stat.o 105 perf-util-y += stat-shadow.o 104 perf-util-y += stat-shadow.o 106 perf-util-y += stat-display.o 105 perf-util-y += stat-display.o 107 perf-util-y += perf_api_probe.o 106 perf-util-y += perf_api_probe.o 108 perf-util-y += record.o 107 perf-util-y += record.o 109 perf-util-y += srcline.o 108 perf-util-y += srcline.o 110 perf-util-y += srccode.o 109 perf-util-y += srccode.o 111 perf-util-y += synthetic-events.o 110 perf-util-y += synthetic-events.o 112 perf-util-y += data.o 111 perf-util-y += data.o 113 perf-util-y += tsc.o 112 perf-util-y += tsc.o 114 perf-util-y += cloexec.o 113 perf-util-y += cloexec.o 115 perf-util-y += call-path.o 114 perf-util-y += call-path.o 116 perf-util-y += rwsem.o 115 perf-util-y += rwsem.o 117 perf-util-y += thread-stack.o 116 perf-util-y += thread-stack.o 118 perf-util-y += spark.o 117 perf-util-y += spark.o 119 perf-util-y += topdown.o 118 perf-util-y += topdown.o 120 perf-util-y += iostat.o 119 perf-util-y += iostat.o 121 perf-util-y += stream.o 120 perf-util-y += stream.o 122 perf-util-$(CONFIG_AUXTRACE) += auxtrace.o 121 perf-util-$(CONFIG_AUXTRACE) += auxtrace.o 123 perf-util-$(CONFIG_AUXTRACE) += intel-pt-decod 122 perf-util-$(CONFIG_AUXTRACE) += intel-pt-decoder/ 124 perf-util-$(CONFIG_AUXTRACE) += intel-pt.o 123 perf-util-$(CONFIG_AUXTRACE) += intel-pt.o 125 perf-util-$(CONFIG_AUXTRACE) += intel-bts.o 124 perf-util-$(CONFIG_AUXTRACE) += intel-bts.o 126 perf-util-$(CONFIG_AUXTRACE) += arm-spe.o 125 perf-util-$(CONFIG_AUXTRACE) += arm-spe.o 127 perf-util-$(CONFIG_AUXTRACE) += arm-spe-decode 126 perf-util-$(CONFIG_AUXTRACE) += arm-spe-decoder/ 128 perf-util-$(CONFIG_AUXTRACE) += hisi-ptt.o 127 perf-util-$(CONFIG_AUXTRACE) += hisi-ptt.o 129 perf-util-$(CONFIG_AUXTRACE) += hisi-ptt-decod 128 perf-util-$(CONFIG_AUXTRACE) += hisi-ptt-decoder/ 130 perf-util-$(CONFIG_AUXTRACE) += s390-cpumsf.o 129 perf-util-$(CONFIG_AUXTRACE) += s390-cpumsf.o 131 130 132 ifdef CONFIG_LIBOPENCSD 131 ifdef CONFIG_LIBOPENCSD 133 perf-util-$(CONFIG_AUXTRACE) += cs-etm.o 132 perf-util-$(CONFIG_AUXTRACE) += cs-etm.o 134 perf-util-$(CONFIG_AUXTRACE) += cs-etm-decoder 133 perf-util-$(CONFIG_AUXTRACE) += cs-etm-decoder/ 135 endif 134 endif 136 perf-util-$(CONFIG_AUXTRACE) += cs-etm-base.o 135 perf-util-$(CONFIG_AUXTRACE) += cs-etm-base.o 137 136 138 perf-util-y += parse-branch-options.o 137 perf-util-y += parse-branch-options.o 139 perf-util-y += dump-insn.o 138 perf-util-y += dump-insn.o 140 perf-util-y += parse-regs-options.o 139 perf-util-y += parse-regs-options.o 141 perf-util-y += parse-sublevel-options.o 140 perf-util-y += parse-sublevel-options.o 142 perf-util-y += term.o 141 perf-util-y += term.o 143 perf-util-y += help-unknown-cmd.o 142 perf-util-y += help-unknown-cmd.o 144 perf-util-y += dlfilter.o 143 perf-util-y += dlfilter.o 145 perf-util-y += mem-events.o 144 perf-util-y += mem-events.o 146 perf-util-y += mem-info.o 145 perf-util-y += mem-info.o 147 perf-util-y += vsprintf.o 146 perf-util-y += vsprintf.o 148 perf-util-y += units.o 147 perf-util-y += units.o 149 perf-util-y += time-utils.o 148 perf-util-y += time-utils.o 150 perf-util-y += expr-flex.o 149 perf-util-y += expr-flex.o 151 perf-util-y += expr-bison.o 150 perf-util-y += expr-bison.o 152 perf-util-y += expr.o 151 perf-util-y += expr.o 153 perf-util-y += branch.o 152 perf-util-y += branch.o 154 perf-util-y += mem2node.o 153 perf-util-y += mem2node.o 155 perf-util-y += clockid.o 154 perf-util-y += clockid.o 156 perf-util-y += list_sort.o 155 perf-util-y += list_sort.o 157 perf-util-y += mutex.o 156 perf-util-y += mutex.o 158 perf-util-y += sharded_mutex.o 157 perf-util-y += sharded_mutex.o 159 perf-util-$(CONFIG_X86_64) += intel-tpebs.o << 160 158 161 perf-util-$(CONFIG_LIBBPF) += bpf_map.o 159 perf-util-$(CONFIG_LIBBPF) += bpf_map.o 162 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_count 160 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o 163 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_count 161 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o 164 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_ftrac 162 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_ftrace.o 165 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_off_c 163 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_off_cpu.o 166 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filte 164 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filter.o 167 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filte 165 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filter-flex.o 168 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filte 166 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf-filter-bison.o 169 167 170 ifeq ($(CONFIG_LIBTRACEEVENT),y) 168 ifeq ($(CONFIG_LIBTRACEEVENT),y) 171 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_loc 169 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_lock_contention.o 172 endif 170 endif 173 171 174 ifeq ($(CONFIG_LIBTRACEEVENT),y) 172 ifeq ($(CONFIG_LIBTRACEEVENT),y) 175 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_kwo 173 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_kwork.o 176 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_kwo 174 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_kwork_top.o 177 endif 175 endif 178 176 179 perf-util-$(CONFIG_LIBELF) += symbol-elf.o 177 perf-util-$(CONFIG_LIBELF) += symbol-elf.o 180 perf-util-$(CONFIG_LIBELF) += probe-file.o 178 perf-util-$(CONFIG_LIBELF) += probe-file.o 181 perf-util-$(CONFIG_LIBELF) += probe-event.o 179 perf-util-$(CONFIG_LIBELF) += probe-event.o 182 180 183 ifdef CONFIG_LIBBPF_DYNAMIC 181 ifdef CONFIG_LIBBPF_DYNAMIC 184 hashmap := 1 182 hashmap := 1 185 endif 183 endif 186 ifndef CONFIG_LIBBPF 184 ifndef CONFIG_LIBBPF 187 hashmap := 1 185 hashmap := 1 188 endif 186 endif 189 187 190 ifdef hashmap 188 ifdef hashmap 191 perf-util-y += hashmap.o 189 perf-util-y += hashmap.o 192 endif 190 endif 193 191 194 ifndef CONFIG_LIBELF 192 ifndef CONFIG_LIBELF 195 perf-util-y += symbol-minimal.o 193 perf-util-y += symbol-minimal.o 196 endif 194 endif 197 195 198 ifndef CONFIG_SETNS 196 ifndef CONFIG_SETNS 199 perf-util-y += setns.o 197 perf-util-y += setns.o 200 endif 198 endif 201 199 202 perf-util-$(CONFIG_DWARF) += probe-finder.o 200 perf-util-$(CONFIG_DWARF) += probe-finder.o 203 perf-util-$(CONFIG_DWARF) += dwarf-aux.o 201 perf-util-$(CONFIG_DWARF) += dwarf-aux.o 204 perf-util-$(CONFIG_DWARF) += dwarf-regs.o 202 perf-util-$(CONFIG_DWARF) += dwarf-regs.o 205 perf-util-$(CONFIG_DWARF) += debuginfo.o 203 perf-util-$(CONFIG_DWARF) += debuginfo.o 206 perf-util-$(CONFIG_DWARF) += annotate-data.o 204 perf-util-$(CONFIG_DWARF) += annotate-data.o 207 205 208 perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwi 206 perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o 209 perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwi 207 perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind-local.o 210 perf-util-$(CONFIG_LIBUNWIND) += unwi 208 perf-util-$(CONFIG_LIBUNWIND) += unwind-libunwind.o 211 perf-util-$(CONFIG_LIBUNWIND_X86) += libu 209 perf-util-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o 212 perf-util-$(CONFIG_LIBUNWIND_AARCH64) += libu 210 perf-util-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o 213 211 214 ifeq ($(CONFIG_LIBTRACEEVENT),y) 212 ifeq ($(CONFIG_LIBTRACEEVENT),y) 215 perf-util-$(CONFIG_LIBBABELTRACE) += data-co 213 perf-util-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o 216 endif 214 endif 217 215 218 perf-util-y += data-convert-json.o 216 perf-util-y += data-convert-json.o 219 217 220 perf-util-y += scripting-engines/ 218 perf-util-y += scripting-engines/ 221 219 222 perf-util-$(CONFIG_ZLIB) += zlib.o 220 perf-util-$(CONFIG_ZLIB) += zlib.o 223 perf-util-$(CONFIG_LZMA) += lzma.o 221 perf-util-$(CONFIG_LZMA) += lzma.o 224 perf-util-$(CONFIG_ZSTD) += zstd.o 222 perf-util-$(CONFIG_ZSTD) += zstd.o 225 223 226 perf-util-y += cap.o !! 224 perf-util-$(CONFIG_LIBCAP) += cap.o 227 225 228 perf-util-$(CONFIG_CXX_DEMANGLE) += demangle-c 226 perf-util-$(CONFIG_CXX_DEMANGLE) += demangle-cxx.o 229 perf-util-y += demangle-ocaml.o 227 perf-util-y += demangle-ocaml.o 230 perf-util-y += demangle-java.o 228 perf-util-y += demangle-java.o 231 perf-util-y += demangle-rust.o 229 perf-util-y += demangle-rust.o 232 perf-util-$(CONFIG_LIBLLVM) += llvm-c-helpers. << 233 230 234 ifdef CONFIG_JITDUMP 231 ifdef CONFIG_JITDUMP 235 perf-util-$(CONFIG_LIBELF) += jitdump.o 232 perf-util-$(CONFIG_LIBELF) += jitdump.o 236 perf-util-$(CONFIG_LIBELF) += genelf.o 233 perf-util-$(CONFIG_LIBELF) += genelf.o 237 perf-util-$(CONFIG_DWARF) += genelf_debug.o 234 perf-util-$(CONFIG_DWARF) += genelf_debug.o 238 endif 235 endif 239 236 240 perf-util-y += perf-hooks.o 237 perf-util-y += perf-hooks.o 241 238 242 perf-util-$(CONFIG_LIBBPF) += bpf-event.o 239 perf-util-$(CONFIG_LIBBPF) += bpf-event.o 243 perf-util-$(CONFIG_LIBBPF) += bpf-utils.o 240 perf-util-$(CONFIG_LIBBPF) += bpf-utils.o 244 241 245 perf-util-$(CONFIG_LIBPFM4) += pfm.o 242 perf-util-$(CONFIG_LIBPFM4) += pfm.o 246 243 247 CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_S 244 CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 248 245 249 # avoid compiler warnings in 32-bit mode 246 # avoid compiler warnings in 32-bit mode 250 CFLAGS_genelf_debug.o += -Wno-packed 247 CFLAGS_genelf_debug.o += -Wno-packed 251 248 252 $(OUTPUT)util/parse-events-flex.c $(OUTPUT)uti 249 $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-events.l $(OUTPUT)util/parse-events-bison.c 253 $(call rule_mkdir) 250 $(call rule_mkdir) 254 $(Q)$(call echo-cmd,flex)$(FLEX) -o $( 251 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/parse-events-flex.c \ 255 --header-file=$(OUTPUT)util/pa 252 --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) $< 256 253 257 $(OUTPUT)util/parse-events-bison.c $(OUTPUT)ut 254 $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y 258 $(call rule_mkdir) 255 $(call rule_mkdir) 259 $(Q)$(call echo-cmd,bison)$(BISON) -v 256 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) $(BISON_FALLBACK_FLAGS) \ 260 -o $(OUTPUT)util/parse-events- 257 -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ 261 258 262 $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-f 259 $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c 263 $(call rule_mkdir) 260 $(call rule_mkdir) 264 $(Q)$(call echo-cmd,flex)$(FLEX) -o $( 261 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/expr-flex.c \ 265 --header-file=$(OUTPUT)util/ex 262 --header-file=$(OUTPUT)util/expr-flex.h $(PARSER_DEBUG_FLEX) $< 266 263 267 $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr- 264 $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y 268 $(call rule_mkdir) 265 $(call rule_mkdir) 269 $(Q)$(call echo-cmd,bison)$(BISON) -v 266 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 270 -o $(OUTPUT)util/expr-bison.c 267 -o $(OUTPUT)util/expr-bison.c -p expr_ 271 268 272 $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-fle 269 $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c 273 $(call rule_mkdir) 270 $(call rule_mkdir) 274 $(Q)$(call echo-cmd,flex)$(FLEX) -o $( 271 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/pmu-flex.c \ 275 --header-file=$(OUTPUT)util/pm 272 --header-file=$(OUTPUT)util/pmu-flex.h $(PARSER_DEBUG_FLEX) $< 276 273 277 $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bi 274 $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y 278 $(call rule_mkdir) 275 $(call rule_mkdir) 279 $(Q)$(call echo-cmd,bison)$(BISON) -v 276 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 280 -o $(OUTPUT)util/pmu-bison.c - 277 -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ 281 278 282 $(OUTPUT)util/bpf-filter-flex.c $(OUTPUT)util/ !! 279 $(OUTPUT)util/bpf-filter-flex.c $(OUTPUT)util/bpf-filter-flex.h: util/bpf-filter.l $(OUTPUT)util/bpf-filter-bison.c 283 $(call rule_mkdir) 280 $(call rule_mkdir) 284 $(Q)$(call echo-cmd,flex)$(FLEX) -o $( 281 $(Q)$(call echo-cmd,flex)$(FLEX) -o $(OUTPUT)util/bpf-filter-flex.c \ 285 --header-file=$(OUTPUT)util/bp 282 --header-file=$(OUTPUT)util/bpf-filter-flex.h $(PARSER_DEBUG_FLEX) $< 286 283 287 $(OUTPUT)util/bpf-filter-bison.c $(OUTPUT)util !! 284 $(OUTPUT)util/bpf-filter-bison.c $(OUTPUT)util/bpf-filter-bison.h: util/bpf-filter.y 288 $(call rule_mkdir) 285 $(call rule_mkdir) 289 $(Q)$(call echo-cmd,bison)$(BISON) -v 286 $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \ 290 -o $(OUTPUT)util/bpf-filter-bi 287 -o $(OUTPUT)util/bpf-filter-bison.c -p perf_bpf_filter_ 291 288 292 FLEX_VERSION := $(shell $(FLEX) --version | cu 289 FLEX_VERSION := $(shell $(FLEX) --version | cut -d' ' -f2) 293 290 294 FLEX_GE_260 := $(call version-ge3,$(FLEX_VERSI 291 FLEX_GE_260 := $(call version-ge3,$(FLEX_VERSION),2.6.0) 295 ifeq ($(FLEX_GE_260),1) 292 ifeq ($(FLEX_GE_260),1) 296 flex_flags := -Wno-redundant-decls -Wno-swit 293 flex_flags := -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-misleading-indentation 297 294 298 # Some newer clang and gcc version complain 295 # Some newer clang and gcc version complain about this 299 # util/parse-events-bison.c:1317:9: error: v 296 # util/parse-events-bison.c:1317:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable] 300 # int yynerrs = 0; 297 # int yynerrs = 0; 301 298 302 flex_flags += -Wno-unused-but-set-variable 299 flex_flags += -Wno-unused-but-set-variable 303 300 304 FLEX_LT_262 := $(call version-lt3,$(FLEX_VER 301 FLEX_LT_262 := $(call version-lt3,$(FLEX_VERSION),2.6.2) 305 ifeq ($(FLEX_LT_262),1) 302 ifeq ($(FLEX_LT_262),1) 306 flex_flags += -Wno-sign-compare 303 flex_flags += -Wno-sign-compare 307 endif 304 endif 308 else 305 else 309 flex_flags := -w 306 flex_flags := -w 310 endif 307 endif 311 308 312 # Some newer clang and gcc version complain ab 309 # Some newer clang and gcc version complain about this 313 # util/parse-events-bison.c:1317:9: error: var 310 # util/parse-events-bison.c:1317:9: error: variable 'parse_events_nerrs' set but not used [-Werror,-Wunused-but-set-variable] 314 # int yynerrs = 0; 311 # int yynerrs = 0; 315 312 316 bison_flags := -DYYENABLE_NLS=0 -Wno-unused-bu 313 bison_flags := -DYYENABLE_NLS=0 -Wno-unused-but-set-variable 317 314 318 # Old clangs don't grok -Wno-unused-but-set-va 315 # Old clangs don't grok -Wno-unused-but-set-variable, remove it 319 ifeq ($(CC_NO_CLANG), 0) 316 ifeq ($(CC_NO_CLANG), 0) 320 CLANG_VERSION := $(shell $(CLANG) --version 317 CLANG_VERSION := $(shell $(CLANG) --version | head -1 | sed 's/.*clang version \([[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+\).*/\1/g') 321 ifeq ($(call version-lt3,$(CLANG_VERSION),13 318 ifeq ($(call version-lt3,$(CLANG_VERSION),13.0.0),1) 322 bison_flags := $(subst -Wno-unused-but-set 319 bison_flags := $(subst -Wno-unused-but-set-variable,,$(bison_flags)) 323 flex_flags := $(subst -Wno-unused-but-set- 320 flex_flags := $(subst -Wno-unused-but-set-variable,,$(flex_flags)) 324 endif 321 endif 325 endif 322 endif 326 323 327 BISON_GE_382 := $(shell expr $(shell $(BISON) 324 BISON_GE_382 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 382) 328 ifeq ($(BISON_GE_382),1) 325 ifeq ($(BISON_GE_382),1) 329 bison_flags += -Wno-switch-enum 326 bison_flags += -Wno-switch-enum 330 else 327 else 331 bison_flags += -w 328 bison_flags += -w 332 endif 329 endif 333 330 334 BISON_LT_381 := $(shell expr $(shell $(BISON) 331 BISON_LT_381 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \< 381) 335 ifeq ($(BISON_LT_381),1) 332 ifeq ($(BISON_LT_381),1) 336 bison_flags += -DYYNOMEM=YYABORT 333 bison_flags += -DYYNOMEM=YYABORT 337 endif 334 endif 338 335 339 CFLAGS_parse-events-flex.o += $(flex_flags) - 336 CFLAGS_parse-events-flex.o += $(flex_flags) -Wno-unused-label 340 CFLAGS_pmu-flex.o += $(flex_flags) 337 CFLAGS_pmu-flex.o += $(flex_flags) 341 CFLAGS_expr-flex.o += $(flex_flags) 338 CFLAGS_expr-flex.o += $(flex_flags) 342 CFLAGS_bpf-filter-flex.o += $(flex_flags) 339 CFLAGS_bpf-filter-flex.o += $(flex_flags) 343 340 344 CFLAGS_parse-events-bison.o += $(bison_flags) 341 CFLAGS_parse-events-bison.o += $(bison_flags) 345 CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TR 342 CFLAGS_pmu-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 346 CFLAGS_expr-bison.o += -DYYLTYPE_IS_TR 343 CFLAGS_expr-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 347 CFLAGS_bpf-filter-bison.o += -DYYLTYPE_IS_TR 344 CFLAGS_bpf-filter-bison.o += -DYYLTYPE_IS_TRIVIAL=0 $(bison_flags) 348 345 349 $(OUTPUT)util/parse-events.o: $(OUTPUT)util/pa 346 $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c 350 $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c 347 $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c 351 $(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex. 348 $(OUTPUT)util/expr.o: $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-bison.c 352 $(OUTPUT)util/bpf-filter.o: $(OUTPUT)util/bpf- 349 $(OUTPUT)util/bpf-filter.o: $(OUTPUT)util/bpf-filter-flex.c $(OUTPUT)util/bpf-filter-bison.c 353 350 354 CFLAGS_bitmap.o += -Wno-unused-paramete 351 CFLAGS_bitmap.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 355 CFLAGS_find_bit.o += -Wno-unused-paramete 352 CFLAGS_find_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 356 CFLAGS_rbtree.o += -Wno-unused-paramete 353 CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 357 CFLAGS_libstring.o += -Wno-unused-paramete 354 CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 358 CFLAGS_hweight.o += -Wno-unused-paramete 355 CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" 359 CFLAGS_header.o += -include $(OUTPUT)PE 356 CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE 360 CFLAGS_arm-spe.o += -I$(srctree)/tools/a 357 CFLAGS_arm-spe.o += -I$(srctree)/tools/arch/arm64/include/ -I$(OUTPUT)arch/arm64/include/generated/ 361 358 362 $(OUTPUT)util/argv_split.o: ../lib/argv_split. 359 $(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE 363 $(call rule_mkdir) 360 $(call rule_mkdir) 364 $(call if_changed_dep,cc_o_c) 361 $(call if_changed_dep,cc_o_c) 365 362 366 $(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE 363 $(OUTPUT)util/bitmap.o: ../lib/bitmap.c FORCE 367 $(call rule_mkdir) 364 $(call rule_mkdir) 368 $(call if_changed_dep,cc_o_c) 365 $(call if_changed_dep,cc_o_c) 369 366 370 $(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE 367 $(OUTPUT)util/ctype.o: ../lib/ctype.c FORCE 371 $(call rule_mkdir) 368 $(call rule_mkdir) 372 $(call if_changed_dep,cc_o_c) 369 $(call if_changed_dep,cc_o_c) 373 370 374 $(OUTPUT)util/find_bit.o: ../lib/find_bit.c FO 371 $(OUTPUT)util/find_bit.o: ../lib/find_bit.c FORCE 375 $(call rule_mkdir) 372 $(call rule_mkdir) 376 $(call if_changed_dep,cc_o_c) 373 $(call if_changed_dep,cc_o_c) 377 374 378 $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE 375 $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE 379 $(call rule_mkdir) 376 $(call rule_mkdir) 380 $(call if_changed_dep,cc_o_c) 377 $(call if_changed_dep,cc_o_c) 381 378 382 $(OUTPUT)util/libstring.o: ../lib/string.c FOR 379 $(OUTPUT)util/libstring.o: ../lib/string.c FORCE 383 $(call rule_mkdir) 380 $(call rule_mkdir) 384 $(call if_changed_dep,cc_o_c) 381 $(call if_changed_dep,cc_o_c) 385 382 386 $(OUTPUT)util/hweight.o: ../lib/hweight.c FORC 383 $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE 387 $(call rule_mkdir) 384 $(call rule_mkdir) 388 $(call if_changed_dep,cc_o_c) 385 $(call if_changed_dep,cc_o_c) 389 386 390 $(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FO 387 $(OUTPUT)util/vsprintf.o: ../lib/vsprintf.c FORCE 391 $(call rule_mkdir) 388 $(call rule_mkdir) 392 $(call if_changed_dep,cc_o_c) 389 $(call if_changed_dep,cc_o_c) 393 390 394 $(OUTPUT)util/list_sort.o: ../lib/list_sort.c 391 $(OUTPUT)util/list_sort.o: ../lib/list_sort.c FORCE 395 $(call rule_mkdir) 392 $(call rule_mkdir) 396 $(call if_changed_dep,cc_o_c) 393 $(call if_changed_dep,cc_o_c) 397 394 398 ifdef SHELLCHECK 395 ifdef SHELLCHECK 399 SHELL_TESTS := generate-cmdlist.sh 396 SHELL_TESTS := generate-cmdlist.sh 400 TEST_LOGS := $(SHELL_TESTS:%=%.shellcheck_lo 397 TEST_LOGS := $(SHELL_TESTS:%=%.shellcheck_log) 401 else 398 else 402 SHELL_TESTS := 399 SHELL_TESTS := 403 TEST_LOGS := 400 TEST_LOGS := 404 endif 401 endif 405 402 406 $(OUTPUT)%.shellcheck_log: % 403 $(OUTPUT)%.shellcheck_log: % 407 $(call rule_mkdir) 404 $(call rule_mkdir) 408 $(Q)$(call echo-cmd,test)shellcheck -a 405 $(Q)$(call echo-cmd,test)shellcheck -a -S warning "$<" > $@ || (cat $@ && rm $@ && false) 409 406 410 perf-util-y += $(TEST_LOGS) 407 perf-util-y += $(TEST_LOGS)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.