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

Commit b9df84fd 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/urgent

Pull perf/core fixes from Arnaldo Carvalho de Melo:

Build fixes:

  - Create config.detected into OUTPUT directory, fixing parallel
    builds sharing the same source directory (Aaro Kiskinen)

  - Allow to specify custom linker command, fixing some MIPS64
    builds. (Aaro Kiskinen)

Infrastructure fixes:

  - Add missing break for PERF_RECORD_ITRACE_START, which caused those events
    samples to be parsed as well as PERF_RECORD_LOST_SAMPLES. ITRACE_START only
    appears when Intel PT or BTS are present, so  (Jiri Olsa)

  - Call the perf_session destructor when bailing out in the inject, kmem, report,
    kvm and mem tools (Taeung Song)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 93472aff 5ef7bbb0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ build-dir := $(srctree)/tools/build
include $(build-dir)/Build.include

# do not force detected configuration
-include .config-detected
-include $(OUTPUT).config-detected

# Init all relevant variables used in build files so
# 1) they have correct type
+2 −2
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
	$(Q)touch $(OUTPUT)PERF-VERSION-FILE

CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
LD ?= $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar
PKG_CONFIG = $(CROSS_COMPILE)pkg-config

@@ -545,7 +545,7 @@ config-clean:
clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean config-clean
	$(call QUIET_CLEAN, core-objs)  $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
	$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
	$(Q)$(RM) .config-detected
	$(Q)$(RM) $(OUTPUT).config-detected
	$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32
	$(call QUIET_CLEAN, core-gen)   $(RM)  *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex*
	$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
+4 −3
Original line number Diff line number Diff line
@@ -630,12 +630,13 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
	if (inject.session == NULL)
		return -1;

	if (symbol__init(&inject.session->header.env) < 0)
		return -1;
	ret = symbol__init(&inject.session->header.env);
	if (ret < 0)
		goto out_delete;

	ret = __cmd_inject(&inject);

out_delete:
	perf_session__delete(inject.session);

	return ret;
}
+2 −2
Original line number Diff line number Diff line
@@ -1916,7 +1916,7 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
		if (!perf_evlist__find_tracepoint_by_name(session->evlist,
							  "kmem:kmalloc")) {
			pr_err(errmsg, "slab", "slab");
			return -1;
			goto out_delete;
		}
	}

@@ -1927,7 +1927,7 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
							     "kmem:mm_page_alloc");
		if (evsel == NULL) {
			pr_err(errmsg, "page", "page");
			return -1;
			goto out_delete;
		}

		kmem_page_size = pevent_get_page_size(evsel->tp_format->pevent);
+10 −4
Original line number Diff line number Diff line
@@ -1061,8 +1061,10 @@ static int read_events(struct perf_kvm_stat *kvm)

	symbol__init(&kvm->session->header.env);

	if (!perf_session__has_traces(kvm->session, "kvm record"))
		return -EINVAL;
	if (!perf_session__has_traces(kvm->session, "kvm record")) {
		ret = -EINVAL;
		goto out_delete;
	}

	/*
	 * Do not use 'isa' recorded in kvm_exit tracepoint since it is not
@@ -1070,9 +1072,13 @@ static int read_events(struct perf_kvm_stat *kvm)
	 */
	ret = cpu_isa_config(kvm);
	if (ret < 0)
		return ret;
		goto out_delete;

	return perf_session__process_events(kvm->session);
	ret = perf_session__process_events(kvm->session);

out_delete:
	perf_session__delete(kvm->session);
	return ret;
}

static int parse_target_str(struct perf_kvm_stat *kvm)
Loading