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

Commit 068f1d3f 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/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

Infrastructure changes:

 o More prep work to support Intel PT: (Adrian Hunter)
   - Polishing 'script' BTS output
   - 'inject' can specify --kallsym
   - VDSO is per machine, not a global var
   - Expose data addr lookup functions previously private to 'script'
   - Large mmap fixes in events processing

 o Fix build on gcc 4.4.7 (Arnaldo Carvalho de Melo)

 o Event ordering fixes (Jiri Olsa)

 o Include standard stringify macros in power pc code (Sukadev Bhattiprolu)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents f4be073d dcabb507
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ OPTIONS
	tasks slept. sched_switch contains a callchain where a task slept and
	sched_stat contains a timeslice how long a task slept.

--kallsyms=<file>::
	kallsyms pathname

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1]
+1 −3
Original line number Diff line number Diff line
@@ -5,9 +5,7 @@
#include <string.h>

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

#define __stringify_1(x)        #x
#define __stringify(x)          __stringify_1(x)
#include "../../util/util.h"

#define mfspr(rn)       ({unsigned long rval; \
			 asm volatile("mfspr %0," __stringify(rn) \
+9 −0
Original line number Diff line number Diff line
@@ -37,3 +37,12 @@ int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,

	return 0;
}

u64 rdtsc(void)
{
	unsigned int low, high;

	asm volatile("rdtsc" : "=a" (low), "=d" (high));

	return low | ((u64)high) << 32;
}
+2 −0
Original line number Diff line number Diff line
@@ -439,6 +439,8 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
			    "where and how long tasks slept"),
		OPT_INCR('v', "verbose", &verbose,
			 "be more verbose (show build ids, etc)"),
		OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, "file",
			   "kallsyms pathname"),
		OPT_END()
	};
	const char * const inject_usage[] = {
+6 −1
Original line number Diff line number Diff line
@@ -238,6 +238,7 @@ static struct perf_event_header finished_round_event = {

static int record__mmap_read_all(struct record *rec)
{
	u64 bytes_written = rec->bytes_written;
	int i;
	int rc = 0;

@@ -250,7 +251,11 @@ static int record__mmap_read_all(struct record *rec)
		}
	}

	if (perf_header__has_feat(&rec->session->header, HEADER_TRACING_DATA))
	/*
	 * Mark the round finished in case we wrote
	 * at least one event.
	 */
	if (bytes_written != rec->bytes_written)
		rc = record__write(rec, &finished_round_event, sizeof(finished_round_event));

out:
Loading