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

Commit 4330b439 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

New features:

 - Add --dry-run option to 'perf record' to check if command line options can be
   parsed, but not doing any recording (Wang Nan)

 - Allow dumping the object files generated by llvm when processing eBPF
   scriptlet events (Wang Nan)

 - Add stackcollapse.py script to help generating flame graphs (Paolo Bonzini)

Documentation changes:

 - Fix 'perf script'  documentation of '-f' when it should be '-F' (Adrian Hunter)

Infrastructure changes:

 - Fix write_backwards fallback when using a new tool on older kernels
   without support for this feature (Arnaldo Carvalho de Melo)

 - Remove some leftovers from the initial codebase copying from git
   (Arnaldo Carvalho de Melo)

 - List libelf-devel as an alternative, as this is how the libelf
   development package is called on OpenSuSE (Jean Delvare)

 - Rename __hists__add_entry to hists__add_entry (Jiri Olsa)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 02469a95 6745d8ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1038,7 +1038,7 @@ ifdef CONFIG_STACK_VALIDATION
  ifeq ($(has_libelf),1)
    objtool_target := tools/objtool FORCE
  else
    $(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev or elfutils-libelf-devel")
    $(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
    SKIP_STACK_VALIDATION := 1
    export SKIP_STACK_VALIDATION
  endif
+7 −0
Original line number Diff line number Diff line
@@ -360,6 +360,13 @@ particular perf.data snapshot should be kept or not.

Implies --timestamp-filename, --no-buildid and --no-buildid-cache.

--dry-run::
Parse options then exit. --dry-run can be used to detect errors in cmdline
options.

'perf record --dry-run -e' can act as a BPF script compiler if llvm.dump-obj
in config file is set to true.

SEE ALSO
--------
linkperf:perf-stat[1], linkperf:perf-list[1]
+10 −10
Original line number Diff line number Diff line
@@ -119,13 +119,13 @@ OPTIONS
	srcline, period, iregs, brstack, brstacksym, flags.
        Field list can be prepended with the type, trace, sw or hw,
        to indicate to which event type the field list applies.
        e.g., -f sw:comm,tid,time,ip,sym  and -f trace:time,cpu,trace
        e.g., -F sw:comm,tid,time,ip,sym  and -F trace:time,cpu,trace

		perf script -f <fields>
		perf script -F <fields>

	is equivalent to:

		perf script -f trace:<fields> -f sw:<fields> -f hw:<fields>
		perf script -F trace:<fields> -F sw:<fields> -F hw:<fields>

	i.e., the specified fields apply to all event types if the type string
	is not given.
@@ -133,9 +133,9 @@ OPTIONS
	The arguments are processed in the order received. A later usage can
	reset a prior request. e.g.:

		-f trace: -f comm,tid,time,ip,sym
		-F trace: -F comm,tid,time,ip,sym

	The first -f suppresses trace events (field list is ""), but then the
	The first -F suppresses trace events (field list is ""), but then the
	second invocation sets the fields to comm,tid,time,ip,sym. In this case a
	warning is given to the user:

@@ -143,9 +143,9 @@ OPTIONS

	Alternatively, consider the order:

		-f comm,tid,time,ip,sym -f trace:
		-F comm,tid,time,ip,sym -F trace:

	The first -f sets the fields for all events and the second -f
	The first -F sets the fields for all events and the second -F
	suppresses trace events. The user is given a warning message about
	the override, and the result of the above is that only S/W and H/W
	events are displayed with the given fields.
@@ -154,14 +154,14 @@ OPTIONS
	event type, a message is displayed to the user that the option is
	ignored for that type. For example:

		$ perf script -f comm,tid,trace
		$ perf script -F comm,tid,trace
		'trace' not valid for hardware events. Ignoring.
		'trace' not valid for software events. Ignoring.

	Alternatively, if the type is given an invalid field is specified it
	is an error. For example:

        perf script -v -f sw:comm,tid,trace
        perf script -v -F sw:comm,tid,trace
        'trace' not valid for software events.

	At this point usage is displayed, and perf-script exits.
@@ -173,7 +173,7 @@ OPTIONS
	respectively.

	Finally, a user may not set fields to none for all event types.
	i.e., -f "" is not allowed.
	i.e., -F "" is not allowed.

	The brstack output includes branch related information with raw addresses using the
	/v/v/v/v/ syntax in the following order:
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
	sample->period = 1;
	sample->weight = 1;

	he = __hists__add_entry(hists, al, NULL, NULL, NULL, sample, true);
	he = hists__add_entry(hists, al, NULL, NULL, NULL, sample, true);
	if (he == NULL)
		return -ENOMEM;

+1 −11
Original line number Diff line number Diff line
@@ -310,16 +310,6 @@ static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair,
	return -1;
}

static int hists__add_entry(struct hists *hists,
			    struct addr_location *al,
			    struct perf_sample *sample)
{
	if (__hists__add_entry(hists, al, NULL, NULL, NULL,
			       sample, true) != NULL)
		return 0;
	return -ENOMEM;
}

static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
				      union perf_event *event,
				      struct perf_sample *sample,
@@ -336,7 +326,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
		return -1;
	}

	if (hists__add_entry(hists, &al, sample)) {
	if (!hists__add_entry(hists, &al, NULL, NULL, NULL, sample, true)) {
		pr_warning("problem incrementing symbol period, skipping event\n");
		goto out_put;
	}
Loading