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

Commit 80fcd45e 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:

User visible changes:

  - The default for callchains is back to 'callee' when --children is not used.
    (Namhyung Kim)

  - Move the 'use_offset' option to the right place where the annotate code
    expects it to be to be able to properly handle it. (Namhyung Kim)

  - Don't die when an unknown 'annotate' option is found in the perf config
    file (usually ~/.perfconfig), just warn the user. (Arnaldo Carvalho de Melo)

Infrastructure changes:

  - Support %ps/%pS in libtraceevent. (Scott Wood)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 4ba792e3 f06cff7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4905,8 +4905,8 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
				else
					ls = 2;

				if (*(ptr+1) == 'F' ||
				    *(ptr+1) == 'f') {
				if (*(ptr+1) == 'F' || *(ptr+1) == 'f' ||
				    *(ptr+1) == 'S' || *(ptr+1) == 's') {
					ptr++;
					show_func = *ptr;
				} else if (*(ptr+1) == 'M' || *(ptr+1) == 'm') {
+7 −2
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ OPTIONS

--call-graph::
	Setup and enable call-graph (stack chain/backtrace) recording,
	implies -g.
	implies -g.  Default is "fp".

	Allows specifying "fp" (frame pointer) or "dwarf"
	(DWARF's CFI - Call Frame Information) or "lbr"
@@ -154,13 +154,18 @@ OPTIONS
	In some systems, where binaries are build with gcc
	--fomit-frame-pointer, using the "fp" method will produce bogus
	call graphs, using "dwarf", if available (perf tools linked to
	the libunwind library) should be used instead.
	the libunwind or libdw library) should be used instead.
	Using the "lbr" method doesn't require any compiler options. It
	will produce call graphs from the hardware LBR registers. The
	main limition is that it is only available on new Intel
	platforms, such as Haswell. It can only get user call chain. It
	doesn't work with branch stack sampling at the same time.

	When "dwarf" recording is used, perf also records (user) stack dump
	when sampled.  Default size of the stack dump is 8192 (bytes).
	User can change the size by passing the size after comma like
	"--call-graph dwarf,4096".

-q::
--quiet::
	Don't print any message, useful for scripting.
+24 −14
Original line number Diff line number Diff line
@@ -169,30 +169,40 @@ OPTIONS
--dump-raw-trace::
        Dump raw trace in ASCII.

-g [type,min[,limit],order[,key][,branch]]::
--call-graph::
        Display call chains using type, min percent threshold, optional print
	limit and order.
	type can be either:
-g::
--call-graph=<print_type,threshold[,print_limit],order,sort_key,branch>::
        Display call chains using type, min percent threshold, print limit,
	call order, sort key and branch.  Note that ordering of parameters is not
	fixed so any parement can be given in an arbitraty order.  One exception
	is the print_limit which should be preceded by threshold.

	print_type can be either:
	- flat: single column, linear exposure of call chains.
	- graph: use a graph tree, displaying absolute overhead rates.
	- graph: use a graph tree, displaying absolute overhead rates. (default)
	- fractal: like graph, but displays relative rates. Each branch of
		 the tree is considered as a new profiled object. +
		 the tree is considered as a new profiled object.
	- none: disable call chain display.

	threshold is a percentage value which specifies a minimum percent to be
	included in the output call graph.  Default is 0.5 (%).

	print_limit is only applied when stdio interface is used.  It's to limit
	number of call graph entries in a single hist entry.  Note that it needs
	to be given after threshold (but not necessarily consecutive).
	Default is 0 (unlimited).

	order can be either:
	- callee: callee based call graph.
	- caller: inverted caller based call graph.
	Default is 'caller' when --children is used, otherwise 'callee'.

	key can be:
	- function: compare on functions
	sort_key can be:
	- function: compare on functions (default)
	- address: compare on individual code addresses

	branch can be:
	- branch: include last branch information in callgraph
	when available. Usually more convenient to use --branch-history
	for this.

	Default: graph,0.5,caller
	- branch: include last branch information in callgraph when available.
	          Usually more convenient to use --branch-history for this.

--children::
	Accumulate callchain of children to parent entry so that then can
+3 −2
Original line number Diff line number Diff line
@@ -160,9 +160,10 @@ Default is to monitor all CPUS.
-g::
	Enables call-graph (stack chain/backtrace) recording.

--call-graph::
--call-graph [mode,type,min[,limit],order[,key][,branch]]::
	Setup and enable call-graph (stack chain/backtrace) recording,
	implies -g.
	implies -g.  See `--call-graph` section in perf-record and
	perf-report man pages for details.

--children::
	Accumulate callchain of children to parent entry so that then can
+3 −8
Original line number Diff line number Diff line
@@ -1010,13 +1010,8 @@ static struct record record = {
	},
};

#define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace) recording: "

#ifdef HAVE_DWARF_UNWIND_SUPPORT
const char record_callchain_help[] = CALLCHAIN_HELP "fp dwarf lbr";
#else
const char record_callchain_help[] = CALLCHAIN_HELP "fp lbr";
#endif
const char record_callchain_help[] = CALLCHAIN_RECORD_HELP
	"\n\t\t\t\tDefault: fp";

/*
 * XXX Will stay a global variable till we fix builtin-script.c to stop messing
@@ -1064,7 +1059,7 @@ struct option __record_options[] = {
			   NULL, "enables call-graph recording" ,
			   &record_callchain_opt),
	OPT_CALLBACK(0, "call-graph", &record.opts,
		     "mode[,dump_size]", record_callchain_help,
		     "record_mode[,record_size]", record_callchain_help,
		     &record_parse_callchain_opt),
	OPT_INCR('v', "verbose", &verbose,
		    "be more verbose (show counter open errors, etc)"),
Loading