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

Commit bb236de5 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 tooling fixes and updates from Arnaldo Carvalho de Melo:

 * Fix JIT symbol resolution on heap (Namhyung Kim)

 * Fix wrong SVG height in 'timechart' (Stanislav Fomichev)

 * Free temp cpu_map in perf_session__cpu_bitmap (Stanislav Fomichev)

 * Fix NULL pointer reference bug with event unit in 'stat' (Stephane Eranian)

 * Fix memory corruption of xyarray when cpumask is used (Stephane Eranian)

 * Ensure sscanf does not overrun the "mem" field (Alan Cox)

 * Add support for the xtensa architecture (Baruch Siach)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 15c81026 578c03c8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1045,6 +1045,9 @@ static void write_svg_file(struct timechart *tchart, const char *filename)
		thresh /= 10;
	} while (!process_filter && thresh && count < tchart->proc_num);

	if (!tchart->proc_num)
		count = 0;

	open_svg(filename, tchart->numcpus, count, tchart->first_time, tchart->last_time);

	svg_time_grid();
+7 −0
Original line number Diff line number Diff line
@@ -132,6 +132,13 @@
#define CPUINFO_PROC	"CPU"
#endif

#ifdef __xtensa__
#define mb()		asm volatile("memw" ::: "memory")
#define wmb()		asm volatile("memw" ::: "memory")
#define rmb()		asm volatile("" ::: "memory")
#define CPUINFO_PROC	"core ID"
#endif

#define barrier() asm volatile ("" ::: "memory")

#ifndef cpu_relax
+5 −2
Original line number Diff line number Diff line
@@ -1003,9 +1003,12 @@ void perf_evlist__close(struct perf_evlist *evlist)
	struct perf_evsel *evsel;
	int ncpus = cpu_map__nr(evlist->cpus);
	int nthreads = thread_map__nr(evlist->threads);
	int n;

	evlist__for_each_reverse(evlist, evsel)
		perf_evsel__close(evsel, ncpus, nthreads);
	evlist__for_each_reverse(evlist, evsel) {
		n = evsel->cpus ? evsel->cpus->nr : ncpus;
		perf_evsel__close(evsel, n, nthreads);
	}
}

int perf_evlist__open(struct perf_evlist *evlist)
+0 −1
Original line number Diff line number Diff line
@@ -1081,7 +1081,6 @@ void perf_evsel__close(struct perf_evsel *evsel, int ncpus, int nthreads)

	perf_evsel__close_fd(evsel, ncpus, nthreads);
	perf_evsel__free_fd(evsel);
	evsel->fd = NULL;
}

static struct {
+1 −1
Original line number Diff line number Diff line
@@ -930,7 +930,7 @@ static int write_topo_node(int fd, int node)
		/* skip over invalid lines */
		if (!strchr(buf, ':'))
			continue;
		if (sscanf(buf, "%*s %*d %s %"PRIu64, field, &mem) != 2)
		if (sscanf(buf, "%*s %*d %31s %"PRIu64, field, &mem) != 2)
			goto done;
		if (!strcmp(field, "MemTotal:"))
			mem_total = mem;
Loading