Commit 351a1f5c authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-5.4-20190920-2' of...

Merge tag 'perf-core-for-mingo-5.4-20190920-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

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

perf stat:

  Srikar Dronamraju:

  - Fix a segmentation fault when using repeat forever.

  - Reset previous counts on repeat with interval.

aarch64:

  James Clark:

  - Add PMU event JSON files for Cortex-A76 and Neoverse N1.

PowerPC:

  Anju T Sudhakar:

  - Make 'trace_cycles' the default event for 'perf kvm record' in PowerPC.

S/390:

  - Link libjvmti to tools/lib/string.o to have a weak strlcpy()
    implementation, providing previously unresolved symbol on s/390.

perf test:

  Jiri Olsa:

  - Add libperf automated tests to 'make -C tools/perf build-test'.

  Colin Ian King:

  - Fix spelling mistake.

Tree wide:

  Arnaldo Carvalho de Melo:

  - Some more header file sanitization.

libperf:

  Jiri Olsa:

  - Add dependency on libperf for python.so binding.

libtraceevent:

  Sakari Ailus:

  - Convert remaining %p[fF] users to %p[sS].

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 7f2444d3 2bff2b82
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -59,12 +59,12 @@ parser context.


The _tep_register_function()_ function registers a function name mapped to an
The _tep_register_function()_ function registers a function name mapped to an
address and (optional) module. This mapping is used in case the function tracer
address and (optional) module. This mapping is used in case the function tracer
or events have "%pF" or "%pS" parameter in its format string. It is common to
or events have "%pS" parameter in its format string. It is common to pass in
pass in the kallsyms function names with their corresponding addresses with this
the kallsyms function names with their corresponding addresses with this
function. The _tep_ argument is the trace event parser context. The _name_ is
function. The _tep_ argument is the trace event parser context. The _name_ is
the name of the function, the string is copied internally. The _addr_ is
the name of the function, the string is copied internally. The _addr_ is the
the start address of the function. The _mod_ is the kernel module
start address of the function. The _mod_ is the kernel module the function may
the function may be in (NULL for none).
be in (NULL for none).


The _tep_register_print_string()_ function  registers a string by the address
The _tep_register_print_string()_ function  registers a string by the address
it was stored in the kernel. Some strings internal to the kernel with static
it was stored in the kernel. Some strings internal to the kernel with static
+14 −4
Original line number Original line Diff line number Diff line
@@ -4367,10 +4367,20 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
					switch (*ptr) {
					switch (*ptr) {
					case 's':
					case 's':
					case 'S':
					case 'S':
					case 'x':
						break;
					case 'f':
					case 'f':
					case 'F':
					case 'F':
					case 'x':
						/*
						 * Pre-5.5 kernels use %pf and
						 * %pF for printing symbols
						 * while kernels since 5.5 use
						 * %pfw for fwnodes. So check
						 * %p[fF] isn't followed by 'w'.
						 */
						if (ptr[1] != 'w')
							break;
							break;
						/* fall through */
					default:
					default:
						/*
						/*
						 * Older kernels do not process
						 * Older kernels do not process
@@ -4487,12 +4497,12 @@ get_bprint_format(void *data, int size __maybe_unused,


	printk = find_printk(tep, addr);
	printk = find_printk(tep, addr);
	if (!printk) {
	if (!printk) {
		if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0)
		if (asprintf(&format, "%%ps: (NO FORMAT FOUND at %llx)\n", addr) < 0)
			return NULL;
			return NULL;
		return format;
		return format;
	}
	}


	if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0)
	if (asprintf(&format, "%s: %s", "%ps", printk->printk) < 0)
		return NULL;
		return NULL;


	return format;
	return format;
+1 −1
Original line number Original line Diff line number Diff line
@@ -567,7 +567,7 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
# Create python binding output directory if not already present
# Create python binding output directory if not already present
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')


$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) $(LIBPERF)
	$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
	$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
        CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
        CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \
	  $(PYTHON_WORD) util/setup.py \
	  $(PYTHON_WORD) util/setup.py \
+1 −1
Original line number Original line Diff line number Diff line
@@ -25,7 +25,7 @@
#include "../../util/evsel.h"
#include "../../util/evsel.h"
#include "../../util/pmu.h"
#include "../../util/pmu.h"
#include "../../util/cs-etm.h"
#include "../../util/cs-etm.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/session.h"
#include "../../util/session.h"


#include <errno.h>
#include <errno.h>
+1 −1
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@
#include "../../util/evsel.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
#include "../../util/session.h"
#include "../../util/util.h"
#include "../../util/util.h" // page_size
#include "../../util/pmu.h"
#include "../../util/pmu.h"
#include "../../util/debug.h"
#include "../../util/debug.h"
#include "../../util/auxtrace.h"
#include "../../util/auxtrace.h"
Loading