Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 968d712a authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo' of...

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

 into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Fix a segfault in 'perf probe' when removing uprobe events. (Masami Hiramatsu)

  - Synthesize COMM event for workloads started from the command line in 'perf
    record' so that we can have the pid->comm mapping before we get the real
    PERF_RECORD_COMM switching from perf to the workload. (Namhyung Kim)

  - Fix build tools/vm/ due to removal of tools/lib/api/fs/debugfs.h.
    (Arnaldo Carvalho de Melo)

Infrastructure changes:

  - Fix the make tarball targets by including the recently added err.h header in
    the perf MANIFEST file. (Jiri Olsa)

  - Don't assume that the event parser returns a non empty evlist. (Wang Nan)

  - Add way to disambiguate feature detection state files, needed to use
    tools/build feature detection for multiple components in a single O= output
    dir, which will be the case with tools/perf/ and tools/lib/bpf/.
    (Arnaldo Carvalho de Melo)

  - Fixup FEATURE_{TESTS,DISPLAY} inversion in tools/lib/bpf/. (Arnaldo Carvalho de Melo)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents b5727270 e803cf97
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -121,8 +121,9 @@ define feature_print_text_code
    MSG = $(shell printf '...%30s: %s' $(1) $(2))
endef

FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER)
FEATURE_DUMP := $(foreach feat,$(FEATURE_DISPLAY),feature-$(feat)($(feature-$(feat))))
FEATURE_DUMP_FILE := $(shell touch $(OUTPUT)FEATURE-DUMP; cat $(OUTPUT)FEATURE-DUMP)
FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat $(FEATURE_DUMP_FILENAME))

ifeq ($(dwarf-post-unwind),1)
  FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text))
@@ -131,16 +132,16 @@ endif
# The $(feature_display) controls the default detection message
# output. It's set if:
# - detected features differes from stored features from
#   last build (in FEATURE-DUMP file)
#   last build (in $(FEATURE_DUMP_FILENAME) file)
# - one of the $(FEATURE_DISPLAY) is not detected
# - VF is enabled

ifneq ("$(FEATURE_DUMP)","$(FEATURE_DUMP_FILE)")
  $(shell echo "$(FEATURE_DUMP)" > $(OUTPUT)FEATURE-DUMP)
  $(shell echo "$(FEATURE_DUMP)" > $(FEATURE_DUMP_FILENAME))
  feature_display := 1
endif

feature_display_check = $(eval $(feature_check_code))
feature_display_check = $(eval $(feature_check_display_code))
define feature_display_check_code
  ifneq ($(feature-$(1)), 1)
    feature_display := 1
+3 −2
Original line number Diff line number Diff line
@@ -64,8 +64,9 @@ srctree := $(patsubst %/,%,$(dir $(srctree)))
#$(info Determined 'srctree' to be $(srctree))
endif

FEATURE_DISPLAY = libelf libelf-getphdrnum libelf-mmap bpf
FEATURE_TESTS = libelf bpf
FEATURE_USER = .libbpf
FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf
FEATURE_DISPLAY = libelf bpf

INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ tools/include/linux/poison.h
tools/include/linux/rbtree.h
tools/include/linux/rbtree_augmented.h
tools/include/linux/types.h
tools/include/linux/err.h
include/asm-generic/bitops/arch_hweight.h
include/asm-generic/bitops/const_hweight.h
include/asm-generic/bitops/fls64.h
+5 −2
Original line number Diff line number Diff line
@@ -380,8 +380,11 @@ static int perf_del_probe_events(struct strfilter *filter)
		goto out;

	klist = strlist__new(NULL, NULL);
	if (!klist)
		return -ENOMEM;
	ulist = strlist__new(NULL, NULL);
	if (!klist || !ulist) {
		ret = -ENOMEM;
		goto out;
	}

	ret = probe_file__get_events(kfd, filter, klist);
	if (ret == 0) {
+14 −1
Original line number Diff line number Diff line
@@ -636,8 +636,21 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
	/*
	 * Let the child rip
	 */
	if (forks)
	if (forks) {
		union perf_event event;
		/*
		 * Some H/W events are generated before COMM event
		 * which is emitted during exec(), so perf script
		 * cannot see a correct process name for those events.
		 * Synthesize COMM event to prevent it.
		 */
		perf_event__synthesize_comm(tool, &event,
					    rec->evlist->workload.pid,
					    process_synthesized_event,
					    machine);

		perf_evlist__start_workload(rec->evlist);
	}

	if (opts->initial_delay) {
		usleep(opts->initial_delay * 1000);
Loading