Commit 9c7d619b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v5.9-2020-09-01' of...

Merge tag 'perf-tools-fixes-for-v5.9-2020-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix infinite loop in the TUI for grouped events in 'perf top/record',
   eg when using "perf top -e '{cycles,instructions,cache-misses}'".

 - Fix segfault by skipping side-band event setup if HAVE_LIBBPF_SUPPORT
   is not set.

 - Fix synthesized branch stacks generated from CoreSight ETM trace and
   Intel PT hardware traces.

 - Fix error when synthesizing events from ARM SPE hardware trace.

 - The SNOOPX and REMOTE offsets in the data_src bitmask in perf records
   were were both 37, SNOOPX is 38, fix it.

 - Fix use of CPU list with summary option in 'perf sched timehist'.

 - Avoid an uninitialized read when using fake PMUs.

 - Set perf_event_attr.exclude_guest=1 for user-space counting.

 - Don't order events when doing a 'perf report -D' raw dump of
   perf.data records.

 - Set NULL sentinel in pmu_events table in "Parse and process metrics"
   'perf test'

 - Fix basic bpf filtering 'perf test' on s390x.

 - Fix out of bounds array access in the 'perf stat' print_counters()
   evlist method.

 - Add mwait_idle_with_hints.constprop.0 to the list of idle symbols.

 - Use %zd for size_t printf formats on 32-bit.

 - Correct the help info of "perf record --no-bpf-event" option.

 - Add entries for CoreSight and Arm SPE tooling to MAINTAINERS.

* tag 'perf-tools-fixes-for-v5.9-2020-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf report: Disable ordered_events for raw dump
  perf tools: Correct SNOOPX field offset
  perf intel-pt: Fix corrupt data after perf inject from
  perf cs-etm: Fix corrupt data after perf inject from
  perf top/report: Fix infinite loop in the TUI for grouped events
  perf parse-events: Avoid an uninitialized read when using fake PMUs
  perf stat: Fix out of bounds array access in the print_counters() evlist method
  perf test: Set NULL sentinel in pmu_events table in "Parse and process metrics" test
  perf parse-events: Set exclude_guest=1 for user-space counting
  perf record: Correct the help info of option "--no-bpf-event"
  perf tools: Use %zd for size_t printf formats on 32-bit
  MAINTAINERS: Add entries for CoreSight and Arm SPE tooling
  perf: arm-spe: Fix check error when synthesizing events
  perf symbols: Add mwait_idle_with_hints.constprop.0 to the list of idle symbols
  perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set
  perf sched timehist: Fix use of CPU list with summary option
  perf test: Fix basic bpf filtering test
parents dcdfd9cc 977f739b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -13571,12 +13571,18 @@ F: kernel/events/*
F:	tools/lib/perf/
F:	tools/perf/
PERFORMANCE EVENTS SUBSYSTEM ARM64 PMU EVENTS
PERFORMANCE EVENTS TOOLING ARM64
R:	John Garry <john.garry@huawei.com>
R:	Will Deacon <will@kernel.org>
R:	Mathieu Poirier <mathieu.poirier@linaro.org>
R:	Leo Yan <leo.yan@linaro.org>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Supported
F:	tools/build/feature/test-libopencsd.c
F:	tools/perf/arch/arm*/
F:	tools/perf/pmu-events/arch/arm64/
F:	tools/perf/util/arm-spe*
F:	tools/perf/util/cs-etm*
PERSONALITY HANDLING
M:	Christoph Hellwig <hch@infradead.org>
+1 −1
Original line number Diff line number Diff line
@@ -1196,7 +1196,7 @@ union perf_mem_data_src {

#define PERF_MEM_SNOOPX_FWD	0x01 /* forward */
/* 1 free */
#define PERF_MEM_SNOOPX_SHIFT	37
#define PERF_MEM_SNOOPX_SHIFT	38

/* locked instruction */
#define PERF_MEM_LOCK_NA	0x01 /* not available */
+1 −1
Original line number Diff line number Diff line
@@ -2452,7 +2452,7 @@ static struct option __record_options[] = {
	OPT_BOOLEAN(0, "tail-synthesize", &record.opts.tail_synthesize,
		    "synthesize non-sample events at the end of output"),
	OPT_BOOLEAN(0, "overwrite", &record.opts.overwrite, "use overwrite mode"),
	OPT_BOOLEAN(0, "no-bpf-event", &record.opts.no_bpf_event, "record bpf events"),
	OPT_BOOLEAN(0, "no-bpf-event", &record.opts.no_bpf_event, "do not record bpf events"),
	OPT_BOOLEAN(0, "strict-freq", &record.opts.strict_freq,
		    "Fail if the specified frequency can't be used"),
	OPT_CALLBACK('F', "freq", &record.opts, "freq or 'max'",
+3 −0
Original line number Diff line number Diff line
@@ -1332,6 +1332,9 @@ int cmd_report(int argc, const char **argv)
	if (report.mmaps_mode)
		report.tasks_mode = true;

	if (dump_trace)
		report.tool.ordered_events = false;

	if (quiet)
		perf_quiet_option();

+5 −1
Original line number Diff line number Diff line
@@ -2584,6 +2584,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
	}

	if (!sched->idle_hist || thread->tid == 0) {
		if (!cpu_list || test_bit(sample->cpu, cpu_bitmap))
			timehist_update_runtime_stats(tr, t, tprev);

		if (sched->idle_hist) {
@@ -2857,6 +2858,9 @@ static void timehist_print_summary(struct perf_sched *sched,

	printf("\nIdle stats:\n");
	for (i = 0; i < idle_max_cpu; ++i) {
		if (cpu_list && !test_bit(i, cpu_bitmap))
			continue;

		t = idle_threads[i];
		if (!t)
			continue;
Loading