Commit 49c46457 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

perf c2c:

  Ravi Bangoria:

  - Fix report with offline CPUs.

libperf:

  Gerald BAEZA:

  - Fix alignment trap with xyarray contents in 'perf stat', noticed on ARMv7.

  Jiri Olsa:

  - Move some more cpu_map and thread_map methods from tools/perf/util/ to libperf.

headers:

  Arnaldo Carvalho de Melo:

  - Do some house cleaning on the headers, removing needless includes in some places,
    providing forward declarations when those are the only thing needed, and fixing
    up the fallout from that for cases where we were using stuff and not adding the
    necessary headers. Should speed up the build and avoid needless rebuilds when
    something unrelated gets touched.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 4e92b18e d9c5c083
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,7 @@
#define _TOOLS_LINUX_RING_BUFFER_H_
#define _TOOLS_LINUX_RING_BUFFER_H_


#include <asm/barrier.h>
#include <asm/barrier.h>
#include <linux/perf_event.h>


/*
/*
 * Contract with kernel for walking the perf ring buffer from
 * Contract with kernel for walking the perf ring buffer from
+6 −6
Original line number Original line Diff line number Diff line
@@ -396,7 +396,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
	 * AUX event.  We also need the contextID in order to be notified
	 * AUX event.  We also need the contextID in order to be notified
	 * when a context switch happened.
	 * when a context switch happened.
	 */
	 */
	if (!cpu_map__empty(cpus)) {
	if (!perf_cpu_map__empty(cpus)) {
		perf_evsel__set_sample_bit(cs_etm_evsel, CPU);
		perf_evsel__set_sample_bit(cs_etm_evsel, CPU);


		err = cs_etm_set_option(itr, cs_etm_evsel,
		err = cs_etm_set_option(itr, cs_etm_evsel,
@@ -420,7 +420,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
		tracking_evsel->core.attr.sample_period = 1;
		tracking_evsel->core.attr.sample_period = 1;


		/* In per-cpu case, always need the time of mmap events etc */
		/* In per-cpu case, always need the time of mmap events etc */
		if (!cpu_map__empty(cpus))
		if (!perf_cpu_map__empty(cpus))
			perf_evsel__set_sample_bit(tracking_evsel, TIME);
			perf_evsel__set_sample_bit(tracking_evsel, TIME);
	}
	}


@@ -493,7 +493,7 @@ cs_etm_info_priv_size(struct auxtrace_record *itr __maybe_unused,
	struct perf_cpu_map *online_cpus = perf_cpu_map__new(NULL);
	struct perf_cpu_map *online_cpus = perf_cpu_map__new(NULL);


	/* cpu map is not empty, we have specific CPUs to work with */
	/* cpu map is not empty, we have specific CPUs to work with */
	if (!cpu_map__empty(event_cpus)) {
	if (!perf_cpu_map__empty(event_cpus)) {
		for (i = 0; i < cpu__max_cpu(); i++) {
		for (i = 0; i < cpu__max_cpu(); i++) {
			if (!cpu_map__has(event_cpus, i) ||
			if (!cpu_map__has(event_cpus, i) ||
			    !cpu_map__has(online_cpus, i))
			    !cpu_map__has(online_cpus, i))
@@ -649,11 +649,11 @@ static int cs_etm_info_fill(struct auxtrace_record *itr,
		return -EINVAL;
		return -EINVAL;


	/* If the cpu_map is empty all online CPUs are involved */
	/* If the cpu_map is empty all online CPUs are involved */
	if (cpu_map__empty(event_cpus)) {
	if (perf_cpu_map__empty(event_cpus)) {
		cpu_map = online_cpus;
		cpu_map = online_cpus;
	} else {
	} else {
		/* Make sure all specified CPUs are online */
		/* Make sure all specified CPUs are online */
		for (i = 0; i < cpu_map__nr(event_cpus); i++) {
		for (i = 0; i < perf_cpu_map__nr(event_cpus); i++) {
			if (cpu_map__has(event_cpus, i) &&
			if (cpu_map__has(event_cpus, i) &&
			    !cpu_map__has(online_cpus, i))
			    !cpu_map__has(online_cpus, i))
				return -EINVAL;
				return -EINVAL;
@@ -662,7 +662,7 @@ static int cs_etm_info_fill(struct auxtrace_record *itr,
		cpu_map = event_cpus;
		cpu_map = event_cpus;
	}
	}


	nr_cpu = cpu_map__nr(cpu_map);
	nr_cpu = perf_cpu_map__nr(cpu_map);
	/* Get PMU type as dynamically assigned by the core */
	/* Get PMU type as dynamically assigned by the core */
	type = cs_etm_pmu->type;
	type = cs_etm_pmu->type;


+1 −0
Original line number Original line Diff line number Diff line
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <api/fs/fs.h>
#include <api/fs/fs.h>
#include "debug.h"
#include "header.h"
#include "header.h"


#define MIDR "/regs/identification/midr_el1"
#define MIDR "/regs/identification/midr_el1"
+1 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@
 */
 */


#include <errno.h>
#include <errno.h>
#include <string.h>
#include "../../util/kvm-stat.h"
#include "../../util/kvm-stat.h"
#include "../../util/evsel.h"
#include "../../util/evsel.h"
#include <asm/sie.h>
#include <asm/sie.h>
+1 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,7 @@
#include <string.h>
#include <string.h>
#include <regex.h>
#include <regex.h>


#include "../../util/debug.h"
#include "../../util/header.h"
#include "../../util/header.h"


static inline void
static inline void
Loading