forked from Minki/linux
772c1d06bd
Pull perf updates from Ingo Molnar: "Kernel side changes: - Improved kbprobes robustness - Intel PEBS support for PT hardware tracing - Other Intel PT improvements: high order pages memory footprint reduction and various related cleanups - Misc cleanups The perf tooling side has been very busy in this cycle, with over 300 commits. This is an incomplete high-level summary of the many improvements done by over 30 developers: - Lots of updates to the following tools: 'perf c2c' 'perf config' 'perf record' 'perf report' 'perf script' 'perf test' 'perf top' 'perf trace' - Updates to libperf and libtraceevent, and a consolidation of the proliferation of x86 instruction decoder libraries. - Vendor event updates for Intel and PowerPC CPUs, - Updates to hardware tracing tooling for ARM and Intel CPUs, - ... and lots of other changes and cleanups - see the shortlog and Git log for details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (322 commits) kprobes: Prohibit probing on BUG() and WARN() address perf/x86: Make more stuff static x86, perf: Fix the dependency of the x86 insn decoder selftest objtool: Ignore intentional differences for the x86 insn decoder objtool: Update sync-check.sh from perf's check-headers.sh perf build: Ignore intentional differences for the x86 insn decoder perf intel-pt: Use shared x86 insn decoder perf intel-pt: Remove inat.c from build dependency list perf: Update .gitignore file objtool: Move x86 insn decoder to a common location perf metricgroup: Support multiple events for metricgroup perf metricgroup: Scale the metric result perf pmu: Change convert_scale from static to global perf symbols: Move mem_info and branch_info out of symbol.h perf auxtrace: Uninline functions that touch perf_session perf tools: Remove needless evlist.h include directives perf tools: Remove needless evlist.h include directives perf tools: Remove needless thread_map.h include directives perf tools: Remove needless thread.h include directives perf tools: Remove needless map.h include directives ...
68 lines
1.9 KiB
Makefile
68 lines
1.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
include ../scripts/Makefile.include
|
|
include ../scripts/Makefile.arch
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
ARCH := x86
|
|
endif
|
|
|
|
# always use the host compiler
|
|
HOSTAR ?= ar
|
|
HOSTCC ?= gcc
|
|
HOSTLD ?= ld
|
|
AR = $(HOSTAR)
|
|
CC = $(HOSTCC)
|
|
LD = $(HOSTLD)
|
|
|
|
ifeq ($(srctree),)
|
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
endif
|
|
|
|
SUBCMD_SRCDIR = $(srctree)/tools/lib/subcmd/
|
|
LIBSUBCMD_OUTPUT = $(if $(OUTPUT),$(OUTPUT),$(CURDIR)/)
|
|
LIBSUBCMD = $(LIBSUBCMD_OUTPUT)libsubcmd.a
|
|
|
|
OBJTOOL := $(OUTPUT)objtool
|
|
OBJTOOL_IN := $(OBJTOOL)-in.o
|
|
|
|
LIBELF_FLAGS := $(shell pkg-config libelf --cflags 2>/dev/null)
|
|
LIBELF_LIBS := $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
|
|
|
|
all: $(OBJTOOL)
|
|
|
|
INCLUDES := -I$(srctree)/tools/include \
|
|
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
|
-I$(srctree)/tools/arch/$(ARCH)/include
|
|
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
|
CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
|
|
LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
|
|
|
|
# Allow old libelf to be used:
|
|
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
|
|
CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
|
|
|
|
AWK = awk
|
|
export srctree OUTPUT CFLAGS SRCARCH AWK
|
|
include $(srctree)/tools/build/Makefile.include
|
|
|
|
$(OBJTOOL_IN): fixdep FORCE
|
|
@$(MAKE) $(build)=objtool
|
|
|
|
$(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
|
|
@$(CONFIG_SHELL) ./sync-check.sh
|
|
$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
|
|
|
|
|
|
$(LIBSUBCMD): fixdep FORCE
|
|
$(Q)$(MAKE) -C $(SUBCMD_SRCDIR) OUTPUT=$(LIBSUBCMD_OUTPUT)
|
|
|
|
clean:
|
|
$(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
|
|
$(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
|
$(Q)$(RM) $(OUTPUT)arch/x86/inat-tables.c $(OUTPUT)fixdep
|
|
|
|
FORCE:
|
|
|
|
.PHONY: clean FORCE
|