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

Commit 41aad2a6 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-20160929' of...

Merge tag 'perf-core-for-mingo-20160929' 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:

User visible changes:
---------------------

New features:

- Add support for using symbols in address filters with Intel PT and ARM
  CoreSight (hardware assisted tracing facilities) (Adrian Hunter, Mathieu Poirier)

Fixes:

- Fix MMAP event synthesis for pre-existing threads when no hugetlbfs
  mount is in place (Adrian Hunter)

- Don't ignore kernel idle symbols in 'perf script' (Adrian Hunter)

- Assorted Intel PT fixes (Adrian Hunter)

Improvements:

- Fix handling of C++ symbols in 'perf probe' (Masami Hiramatsu)

- Beautify sched_[gs]et_attr return value in 'perf trace' (Arnaldo Carvalho de Melo)

Infrastructure changes:
-----------------------

New features:

- Add dwarf unwind 'perf test' for powerpc (Ravi Bangoria)

Fixes:

- Fix error paths in 'perf record' (Adrian Hunter)

Documentation:

- Update documentation info about quipper, a C++ parser for converting
  to/from perf.data/chromium profiling format (Simon Que)

Build Fixes:

  Fix building in 32 bit platform with libbabeltrace (Wang Nan)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 6b652de2 d18019a5
Loading
Loading
Loading
Loading
+57 −4
Original line number Original line Diff line number Diff line
@@ -35,15 +35,15 @@ OPTIONS


	- a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where
	- a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where
	  'param1', 'param2', etc are defined as formats for the PMU in
	  'param1', 'param2', etc are defined as formats for the PMU in
	  /sys/bus/event_sources/devices/<pmu>/format/*.
	  /sys/bus/event_source/devices/<pmu>/format/*.


	- a symbolically formed event like 'pmu/config=M,config1=N,config3=K/'
	- a symbolically formed event like 'pmu/config=M,config1=N,config3=K/'


          where M, N, K are numbers (in decimal, hex, octal format). Acceptable
          where M, N, K are numbers (in decimal, hex, octal format). Acceptable
          values for each of 'config', 'config1' and 'config2' are defined by
          values for each of 'config', 'config1' and 'config2' are defined by
          corresponding entries in /sys/bus/event_sources/devices/<pmu>/format/*
          corresponding entries in /sys/bus/event_source/devices/<pmu>/format/*
          param1 and param2 are defined as formats for the PMU in:
          param1 and param2 are defined as formats for the PMU in:
          /sys/bus/event_sources/devices/<pmu>/format/*
          /sys/bus/event_source/devices/<pmu>/format/*


	  There are also some params which are not defined in .../<pmu>/format/*.
	  There are also some params which are not defined in .../<pmu>/format/*.
	  These params can be used to overload default config values per event.
	  These params can be used to overload default config values per event.
@@ -89,9 +89,62 @@ OPTIONS


--filter=<filter>::
--filter=<filter>::
        Event filter. This option should follow a event selector (-e) which
        Event filter. This option should follow a event selector (-e) which
	selects tracepoint event(s). Multiple '--filter' options are combined
	selects either tracepoint event(s) or a hardware trace PMU
	(e.g. Intel PT or CoreSight).

	- tracepoint filters

	In the case of tracepoints, multiple '--filter' options are combined
	using '&&'.
	using '&&'.


	- address filters

	A hardware trace PMU advertises its ability to accept a number of
	address filters	by specifying a non-zero value in
	/sys/bus/event_source/devices/<pmu>/nr_addr_filters.

	Address filters have the format:

	filter|start|stop|tracestop <start> [/ <size>] [@<file name>]

	Where:
	- 'filter': defines a region that will be traced.
	- 'start': defines an address at which tracing will begin.
	- 'stop': defines an address at which tracing will stop.
	- 'tracestop': defines a region in which tracing will stop.

	<file name> is the name of the object file, <start> is the offset to the
	code to trace in that file, and <size> is the size of the region to
	trace. 'start' and 'stop' filters need not specify a <size>.

	If no object file is specified then the kernel is assumed, in which case
	the start address must be a current kernel memory address.

	<start> can also be specified by providing the name of a symbol. If the
	symbol name is not unique, it can be disambiguated by inserting #n where
	'n' selects the n'th symbol in address order. Alternately #0, #g or #G
	select only a global symbol. <size> can also be specified by providing
	the name of a symbol, in which case the size is calculated to the end
	of that symbol. For 'filter' and 'tracestop' filters, if <size> is
	omitted and <start> is a symbol, then the size is calculated to the end
	of that symbol.

	If <size> is omitted and <start> is '*', then the start and size will
	be calculated from the first and last symbols, i.e. to trace the whole
	file.

	If symbol names (or '*') are provided, they must be surrounded by white
	space.

	The filter passed to the kernel is not necessarily the same as entered.
	To see the filter that is passed, use the -v option.

	The kernel may not be able to configure a trace region if it is not
	within a single mapping.  MMAP events (or /proc/<pid>/maps) can be
	examined to determine if that is a possibility.

	Multiple filters can be separated with space or comma.

--exclude-perf::
--exclude-perf::
	Don't record events issued by perf itself. This option should follow
	Don't record events issued by perf itself. This option should follow
	a event selector (-e) which selects tracepoint event(s). It adds a
	a event selector (-e) which selects tracepoint event(s). It adds a
+5 −1
Original line number Original line Diff line number Diff line
@@ -437,6 +437,10 @@ in pmu-tools parser. This allows to read perf.data from python and dump it.
quipper
quipper


The quipper C++ parser is available at
The quipper C++ parser is available at
https://chromium.googlesource.com/chromiumos/platform/chromiumos-wide-profiling/
https://chromium.googlesource.com/chromiumos/platform2

It is under the chromiumos-wide-profiling/ subdirectory. This library can
convert a perf data file to a protobuf and vice versa.

Unfortunately this parser tends to be many versions behind and may not be able
Unfortunately this parser tends to be many versions behind and may not be able
to parse data files generated by recent perf.
to parse data files generated by recent perf.
+1 −0
Original line number Original line Diff line number Diff line
libperf-y += util/
libperf-y += util/
libperf-y += tests/
+13 −0
Original line number Original line Diff line number Diff line
#ifndef ARCH_TESTS_H
#define ARCH_TESTS_H

#ifdef HAVE_DWARF_UNWIND_SUPPORT
struct thread;
struct perf_sample;
int test__arch_unwind_sample(struct perf_sample *sample,
			     struct thread *thread);
#endif

extern struct test arch_tests[];

#endif
+2 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,8 @@
#include <linux/types.h>
#include <linux/types.h>
#include <asm/perf_regs.h>
#include <asm/perf_regs.h>


void perf_regs_load(u64 *regs);

#define PERF_REGS_MASK  ((1ULL << PERF_REG_POWERPC_MAX) - 1)
#define PERF_REGS_MASK  ((1ULL << PERF_REG_POWERPC_MAX) - 1)
#define PERF_REGS_MAX   PERF_REG_POWERPC_MAX
#define PERF_REGS_MAX   PERF_REG_POWERPC_MAX
#ifdef __powerpc64__
#ifdef __powerpc64__
Loading