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

Commit 9840b1ae authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

Merge tag 'perf-core-for-mingo-20160623' 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:

New features:

- Add 'callindent' option to 'perf script -F', to indent the Intel PT
  call stack, making this output more ftrace-like (Adrian Hunter, Andi Kleen)

User visible changes:

- Enlarge 'pid' column width, to cope with large pids (Jiri Olsa)

Infrastructure changes:

- Fix cross platform unwind (He Kuang)

- Make destructors accept NULL, behaving like free() (Arnaldo Carvalho de Melo)

- Remove reference to perl interpreted in the recently added 'perf script'
  stackcollapse python script (Arnaldo Carvalho de Melo)

- Rename CLASS__for_each() macros to CLASS__for_each_entry(), to use the
  list_for_each_entry() semantics, as most of these class specific loop helpers
  are list_for_each_entry*() wrappers  (Arnaldo Carvalho de Melo)

- Expose the hist_browser code, will be used with data structures other
  than perf_evsel (Jiri Olsa)

- Refactor 'perf config' (Taeung Song)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 4330b439 4a35b349
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -170,7 +170,16 @@ OPTIONS
	Trace decoding. The flags are "bcrosyiABEx" which stand for branch,
	Trace decoding. The flags are "bcrosyiABEx" which stand for branch,
	call, return, conditional, system, asynchronous, interrupt,
	call, return, conditional, system, asynchronous, interrupt,
	transaction abort, trace begin, trace end, and in transaction,
	transaction abort, trace begin, trace end, and in transaction,
	respectively.
	respectively. Known combinations of flags are printed more nicely e.g.
	"call" for "bc", "return" for "br", "jcc" for "bo", "jmp" for "b",
	"int" for "bci", "iret" for "bri", "syscall" for "bcs", "sysret" for "brs",
	"async" for "by", "hw int" for "bcyi", "tx abrt" for "bA", "tr strt" for "bB",
	"tr end" for "bE". However the "x" flag will be display separately in those
	cases e.g. "jcc     (x)" for a condition branch within a transaction.

	The callindent field is synthesized and may have a value when
	Instruction Trace decoding. For calls and returns, it will display the
	name of the symbol indented with spaces to reflect the stack depth.


	Finally, a user may not set fields to none for all event types.
	Finally, a user may not set fields to none for all event types.
	i.e., -F "" is not allowed.
	i.e., -F "" is not allowed.
+2 −1
Original line number Original line Diff line number Diff line
@@ -254,7 +254,8 @@ PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI)
PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI)


$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
	$(QUIET_GEN)CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
	$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
        CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
	  $(PYTHON_WORD) util/setup.py \
	  $(PYTHON_WORD) util/setup.py \
	  --quiet build_ext; \
	  --quiet build_ext; \
	mkdir -p $(OUTPUT)python && \
	mkdir -p $(OUTPUT)python && \
+1 −5
Original line number Original line Diff line number Diff line
@@ -154,10 +154,6 @@ int test__perf_time_to_tsc(int subtest __maybe_unused)
	err = 0;
	err = 0;


out_err:
out_err:
	if (evlist) {
		perf_evlist__disable(evlist);
	perf_evlist__delete(evlist);
	perf_evlist__delete(evlist);
	}

	return err;
	return err;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ struct auxtrace_record *auxtrace_record__init_intel(struct perf_evlist *evlist,
	intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);
	intel_bts_pmu = perf_pmu__find(INTEL_BTS_PMU_NAME);


	if (evlist) {
	if (evlist) {
		evlist__for_each(evlist, evsel) {
		evlist__for_each_entry(evlist, evsel) {
			if (intel_pt_pmu &&
			if (intel_pt_pmu &&
			    evsel->attr.type == intel_pt_pmu->type)
			    evsel->attr.type == intel_pt_pmu->type)
				found_pt = true;
				found_pt = true;
+4 −4
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
	btsr->evlist = evlist;
	btsr->evlist = evlist;
	btsr->snapshot_mode = opts->auxtrace_snapshot_mode;
	btsr->snapshot_mode = opts->auxtrace_snapshot_mode;


	evlist__for_each(evlist, evsel) {
	evlist__for_each_entry(evlist, evsel) {
		if (evsel->attr.type == intel_bts_pmu->type) {
		if (evsel->attr.type == intel_bts_pmu->type) {
			if (intel_bts_evsel) {
			if (intel_bts_evsel) {
				pr_err("There may be only one " INTEL_BTS_PMU_NAME " event\n");
				pr_err("There may be only one " INTEL_BTS_PMU_NAME " event\n");
@@ -327,7 +327,7 @@ static int intel_bts_snapshot_start(struct auxtrace_record *itr)
			container_of(itr, struct intel_bts_recording, itr);
			container_of(itr, struct intel_bts_recording, itr);
	struct perf_evsel *evsel;
	struct perf_evsel *evsel;


	evlist__for_each(btsr->evlist, evsel) {
	evlist__for_each_entry(btsr->evlist, evsel) {
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
			return perf_evsel__disable(evsel);
			return perf_evsel__disable(evsel);
	}
	}
@@ -340,7 +340,7 @@ static int intel_bts_snapshot_finish(struct auxtrace_record *itr)
			container_of(itr, struct intel_bts_recording, itr);
			container_of(itr, struct intel_bts_recording, itr);
	struct perf_evsel *evsel;
	struct perf_evsel *evsel;


	evlist__for_each(btsr->evlist, evsel) {
	evlist__for_each_entry(btsr->evlist, evsel) {
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
			return perf_evsel__enable(evsel);
			return perf_evsel__enable(evsel);
	}
	}
@@ -422,7 +422,7 @@ static int intel_bts_read_finish(struct auxtrace_record *itr, int idx)
			container_of(itr, struct intel_bts_recording, itr);
			container_of(itr, struct intel_bts_recording, itr);
	struct perf_evsel *evsel;
	struct perf_evsel *evsel;


	evlist__for_each(btsr->evlist, evsel) {
	evlist__for_each_entry(btsr->evlist, evsel) {
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
		if (evsel->attr.type == btsr->intel_bts_pmu->type)
			return perf_evlist__enable_event_idx(btsr->evlist,
			return perf_evlist__enable_event_idx(btsr->evlist,
							     evsel, idx);
							     evsel, idx);
Loading