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

Commit c3a1b0cb authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-urgent-for-mingo' of...

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

 * Fix some freeing bugs on the parsing error paths, from Adrian Hunter.

 * Update symbol_conf.nr_events when processing attribute events, fix from Adrian Hunter.

 * Fix missing increment in sample parsing when PERF_SAMPLE_STACK_USER
   is present, from Adrian Hunt.

 * Fix count parameter to read call in event_format__new, from David Ahern.

 * Remove -A/--append option, not working for a long time, from Jiri Olsa.

 * Remove -f/--force option, was a no-op for quite some time, from Jiri Olsa.

 * Fix -x/--exclude-other option for report command, from Jiri Olsa.

 * Cross build fixes, at least one for Android, from Joonsoo Kim.

 * Fix memory allocation fail check in mem{set,cpy} 'perf bench' workloads,
   from Kirill A. Shutemov.

 * Revert regression in configuration of Python support, from Michael Witten.

 * Fix -ldw/-lelf link test when static linking, from Mike Frysinger.

 * Fix issues with multiple children processing in perf_evlist__start_workload(),
   from Namhyung Kim.

 * Fix broken include in Context.xs ('perf script'), from Ramkumar Ramachandra.

 * Fixes for build problems, from Robert Richter.

 * Fix a typo of a Power7 event name, from Runzhen Wang.

 * Avoid sending SIGTERM to random processes in 'perf stat', fix from Stephane Eranian.

 * Fix per-socket output bug for uncore events in 'perf stat', from Stephane Eranian.

 * Fix vdso list searching, from Waiman Long.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents e5302920 750ade7e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ Description: Generic performance monitoring events

What: 		/sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
		/sys/devices/cpu/events/PM_BRU_FIN
		/sys/devices/cpu/events/PM_BRU_MPRED
		/sys/devices/cpu/events/PM_BR_MPRED
		/sys/devices/cpu/events/PM_CMPLU_STALL
		/sys/devices/cpu/events/PM_CMPLU_STALL_BRU
		/sys/devices/cpu/events/PM_CMPLU_STALL_DCACHE_MISS
+6 −6
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@
#define	PME_PM_LD_REF_L1		0xc880
#define	PME_PM_LD_MISS_L1		0x400f0
#define	PME_PM_BRU_FIN			0x10068
#define	PME_PM_BRU_MPRED		0x400f6
#define	PME_PM_BR_MPRED			0x400f6

#define PME_PM_CMPLU_STALL_FXU			0x20014
#define PME_PM_CMPLU_STALL_DIV			0x40014
@@ -349,7 +349,7 @@ static int power7_generic_events[] = {
	[PERF_COUNT_HW_CACHE_REFERENCES] =		PME_PM_LD_REF_L1,
	[PERF_COUNT_HW_CACHE_MISSES] =			PME_PM_LD_MISS_L1,
	[PERF_COUNT_HW_BRANCH_INSTRUCTIONS] =		PME_PM_BRU_FIN,
	[PERF_COUNT_HW_BRANCH_MISSES] =			PME_PM_BRU_MPRED,
	[PERF_COUNT_HW_BRANCH_MISSES] =			PME_PM_BR_MPRED,
};

#define C(x)	PERF_COUNT_HW_CACHE_##x
@@ -405,7 +405,7 @@ GENERIC_EVENT_ATTR(instructions, INST_CMPL);
GENERIC_EVENT_ATTR(cache-references,		LD_REF_L1);
GENERIC_EVENT_ATTR(cache-misses,		LD_MISS_L1);
GENERIC_EVENT_ATTR(branch-instructions,		BRU_FIN);
GENERIC_EVENT_ATTR(branch-misses,		BRU_MPRED);
GENERIC_EVENT_ATTR(branch-misses,		BR_MPRED);

POWER_EVENT_ATTR(CYC,				CYC);
POWER_EVENT_ATTR(GCT_NOSLOT_CYC,		GCT_NOSLOT_CYC);
@@ -414,7 +414,7 @@ POWER_EVENT_ATTR(INST_CMPL, INST_CMPL);
POWER_EVENT_ATTR(LD_REF_L1,			LD_REF_L1);
POWER_EVENT_ATTR(LD_MISS_L1,			LD_MISS_L1);
POWER_EVENT_ATTR(BRU_FIN,			BRU_FIN)
POWER_EVENT_ATTR(BRU_MPRED,			BRU_MPRED);
POWER_EVENT_ATTR(BR_MPRED,			BR_MPRED);

POWER_EVENT_ATTR(CMPLU_STALL_FXU,		CMPLU_STALL_FXU);
POWER_EVENT_ATTR(CMPLU_STALL_DIV,		CMPLU_STALL_DIV);
@@ -449,7 +449,7 @@ static struct attribute *power7_events_attr[] = {
	GENERIC_EVENT_PTR(LD_REF_L1),
	GENERIC_EVENT_PTR(LD_MISS_L1),
	GENERIC_EVENT_PTR(BRU_FIN),
	GENERIC_EVENT_PTR(BRU_MPRED),
	GENERIC_EVENT_PTR(BR_MPRED),

	POWER_EVENT_PTR(CYC),
	POWER_EVENT_PTR(GCT_NOSLOT_CYC),
@@ -458,7 +458,7 @@ static struct attribute *power7_events_attr[] = {
	POWER_EVENT_PTR(LD_REF_L1),
	POWER_EVENT_PTR(LD_MISS_L1),
	POWER_EVENT_PTR(BRU_FIN),
	POWER_EVENT_PTR(BRU_MPRED),
	POWER_EVENT_PTR(BR_MPRED),

	POWER_EVENT_PTR(CMPLU_STALL_FXU),
	POWER_EVENT_PTR(CMPLU_STALL_DIV),
+16 −1
Original line number Diff line number Diff line
@@ -3,6 +3,21 @@ 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=
@@ -14,7 +29,7 @@ LIB_OBJS += $(OUTPUT)debugfs.o
LIBFILE = liblk.a

CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) -fPIC
EXTLIBS = -lpthread -lrt -lelf -lm
EXTLIBS = -lelf -lpthread -lrt -lm
ALL_CFLAGS = $(CFLAGS) $(BASIC_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
ALL_LDFLAGS = $(LDFLAGS)

+3 −9
Original line number Diff line number Diff line
include ../../scripts/Makefile.include
include ../config/utilities.mak

OUTPUT := ./
ifeq ("$(origin O)", "command line")
  ifneq ($(O),)
	OUTPUT := $(O)/
  endif
endif

MAN1_TXT= \
	$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
		$(wildcard perf-*.txt)) \
@@ -150,7 +144,7 @@ NO_SUBDIR = :
endif

ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
ifneq ($(V),1)
	QUIET_ASCIIDOC	= @echo '   ' ASCIIDOC $@;
	QUIET_XMLTO	= @echo '   ' XMLTO $@;
	QUIET_DB2TEXI	= @echo '   ' DB2TEXI $@;
@@ -277,7 +271,7 @@ $(MAN_HTML): $(OUTPUT)%.html : %.txt

$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
	$(QUIET_XMLTO)$(RM) $@ && \
	$(XMLTO) -o $(OUTPUT) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
	$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<

$(OUTPUT)%.xml : %.txt
	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ Furthermore, these tracepoints can be used to sample the workload as
well. For example the page allocations done by a 'git gc' can be
captured the following way:

 titan:~/git> perf record -f -e kmem:mm_page_alloc -c 1 ./git gc
 titan:~/git> perf record -e kmem:mm_page_alloc -c 1 ./git gc
 Counting objects: 1148, done.
 Delta compression using up to 2 threads.
 Compressing objects: 100% (450/450), done.
@@ -120,7 +120,7 @@ Furthermore, call-graph sampling can be done too, of page
allocations - to see precisely what kind of page allocations there
are:

 titan:~/git> perf record -f -g -e kmem:mm_page_alloc -c 1 ./git gc
 titan:~/git> perf record -g -e kmem:mm_page_alloc -c 1 ./git gc
 Counting objects: 1148, done.
 Delta compression using up to 2 threads.
 Compressing objects: 100% (450/450), done.
Loading