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

Commit 0a3d23a2 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:

 * Do annotation using /proc/kcore and /proc/kallsyms, removing the
   need for a vmlinux file kernel assembly annotation. This also improves
   this use case because vmlinux has just the initial kernel image, not
   what is actually in use after various code patchings by things like
   alternatives, etc. From Adrian Hunter.

 * Add various improvements and fixes to the "vmlinux matches kallsyms"
   'perf test' entry, related to the /proc/kcore annotation feature.

 * Add --initial-delay option to 'perf stat' to skip measuring for
   the startup phase, from Andi Kleen.

 * Add perf kvm stat live mode that combines aspects of 'perf kvm stat' record
   and report, from David Ahern.

 * Add option to analyze specific VM in perf kvm stat report, from David Ahern.

 * Do not require /lib/modules/* on a guest, fix from Jason Wessel.

 * Group leader sampling, that allows just one event in a group to sample while
   the other events have just its values read, from Jiri Olsa.

 * Add support for a new modifier "D", which requests that the event, or group
   of events, be pinned to the PMU, from Michael Ellerman.

 * Fix segmentation fault on the gtk browser, from Namhyung Kim.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 93786a5f cecb977e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ struct perf_event_attr {
#define PERF_EVENT_IOC_PERIOD		_IOW('$', 4, __u64)
#define PERF_EVENT_IOC_SET_OUTPUT	_IO ('$', 5)
#define PERF_EVENT_IOC_SET_FILTER	_IOW('$', 6, char *)
#define PERF_EVENT_IOC_ID		_IOR('$', 7, u64 *)

enum perf_event_ioc_flags {
	PERF_IOC_FLAG_GROUP		= 1U << 0,
+11 −1
Original line number Diff line number Diff line
@@ -3568,6 +3568,15 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	case PERF_EVENT_IOC_PERIOD:
		return perf_event_period(event, (u64 __user *)arg);

	case PERF_EVENT_IOC_ID:
	{
		u64 id = primary_event_id(event);

		if (copy_to_user((void __user *)arg, &id, sizeof(id)))
			return -EFAULT;
		return 0;
	}

	case PERF_EVENT_IOC_SET_OUTPUT:
	{
		int ret;
@@ -4379,7 +4388,8 @@ static void perf_output_read_group(struct perf_output_handle *handle,
	list_for_each_entry(sub, &leader->sibling_list, group_entry) {
		n = 0;

		if (sub != event)
		if ((sub != event) &&
		    (sub->state == PERF_EVENT_STATE_ACTIVE))
			sub->pmu->read(sub);

		values[n++] = perf_event_count(sub);
+0 −15
Original line number Diff line number Diff line
@@ -3,21 +3,6 @@ include ../../scripts/Makefile.include
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar

# Makefiles suck: This macro sets a default value of $(2) for the
# variable named by $(1), unless the variable has been set by
# environment or command line. This is necessary for CC and AR
# because make sets default values, so the simpler ?= approach
# won't work as expected.
define allow-override
  $(if $(or $(findstring environment,$(origin $(1))),\
            $(findstring command line,$(origin $(1)))),,\
    $(eval $(1) = $(2)))
endef

# Allow setting CC and AR, or setting CROSS_COMPILE as a prefix.
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
$(call allow-override,AR,$(CROSS_COMPILE)ar)

# guard against environment variables
LIB_H=
LIB_OBJS=
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ counted. The following modifiers exist:
 G - guest counting (in KVM guests)
 H - host counting (not in KVM guests)
 p - precise level
 S - read sample value (PERF_SAMPLE_READ)
 D - pin the event to the PMU

The 'p' modifier can be used for specifying how precise the instruction
address should be. The 'p' modifier can be specified multiple times:
+5 −0
Original line number Diff line number Diff line
@@ -132,6 +132,11 @@ is a useful mode to detect imbalance between physical cores. To enable this mod
use --per-core in addition to -a. (system-wide).  The output includes the
core number and the number of online logical processors on that physical processor.

-D msecs::
--initial-delay msecs::
After starting the program, wait msecs before measuring. This is useful to
filter out the startup phase of the program, which is often very different.

EXAMPLES
--------

Loading