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

Commit 5f1230c9 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:

  - Introduce 'srcfile' sort key: (Andi Kleen)

    # perf record -F 10000 usleep 1
    # perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
    <SNIP>
    # Overhead  Source File
        26.49%  copy_page_64.S
         5.49%  signal.c
         0.51%  msr.h
    #

    It can be combined with other fields, for instance, experiment with
    '-s srcfile,symbol'.

    There are some oddities in some distros and with some specific DSOs, being
    investigated, so your mileage may vary.

  - Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)

  - Support per-event 'freq' term: (Namhyung Kim)

    $ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
    $ perf evlist -F
    cpu/instructions,freq=1234/: sample_freq=1234
    cycles: sample_period=1000
    $

Infrastructure changes:

  - Move perf_counts struct and functions into separate object (Jiri Olsa)

  - Unset perf_event_attr::freq when period term is set (Jiri Olsa)

  - Move callchain option parsing code to util.c (Kan Liang)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 709bc871 4605bb55
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ OPTIONS
	  These params can be used to overload default config values per event.
	  Here is a list of the params.
	  - 'period': Set event sampling period
	  - 'freq': Set event sampling frequency
	  - 'time': Disable/enable time stamping. Acceptable values are 1 for
		    enabling time stamping. 0 for disabling time stamping.
		    The default is 1.
+4 −0
Original line number Diff line number Diff line
@@ -81,6 +81,8 @@ OPTIONS
	- cpu: cpu number the task ran at the time of sample
	- srcline: filename and line number executed at the time of sample.  The
	DWARF debugging info must be provided.
	- srcfile: file name of the source file of the same. Requires dwarf
	information.
	- weight: Event specific weight, e.g. memory latency or transaction
	abort cost. This is the global weight.
	- local_weight: Local weight version of the weight above.
@@ -354,6 +356,8 @@ OPTIONS

	To disable decoding entirely, use --no-itrace.

--full-source-path::
	Show the full path for source files for srcline output.

include::callchain-overhead-calculation.txt[]

+3 −0
Original line number Diff line number Diff line
@@ -260,6 +260,9 @@ OPTIONS

	To disable decoding entirely, use --no-itrace.

--full-source-path::
	Show the full path for source files for srcline output.

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-script-perl[1],
+2 −0
Original line number Diff line number Diff line
@@ -738,6 +738,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
	OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
			    "Instruction Tracing options",
			    itrace_parse_synth_opts),
	OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
			"Show full source file name path for source lines"),
	OPT_END()
	};
	struct perf_data_file file = {
+2 −0
Original line number Diff line number Diff line
@@ -1653,6 +1653,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
	OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
			    "Instruction Tracing options",
			    itrace_parse_synth_opts),
	OPT_BOOLEAN(0, "full-source-path", &srcline_full_filename,
			"Show full source file name path for source lines"),
	OPT_END()
	};
	const char * const script_subcommands[] = { "record", "report", NULL };
Loading