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

Commit 6fc774ef 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:

  - Enable per-event perf_event_attr.inherit setting by config terms, i.e.
    this becomes possible:

        $ perf record -e cycles/inherit/ -e instructions/no-inherit/

    This affects the default, that can be changed globally using the --no-inherit
    option.

    This fine grained control appeared in the eBPF patchkit, but this added
    flexibility may end up being useful in other scenarios. (Wang Nan)

  - Setup pager when printing usage and help, we have long lists of options,
    better use the pager like we do with normal tooling output, i.e. when needed,
    and including any error messages in the paged output. (Namhyung Kim)

  - Search for more options when passing args to -h, e.g.: (Arnaldo Carvalho de Melo)

    $ perf report -h interface

     Usage: perf report [<options>]

      --gtk    Use the GTK2 interface
      --stdio  Use the stdio interface
      --tui    Use the TUI interface

  - Fix reading separate debuginfo files based on a build-id, problem
    found on a Debian system. (Dima Kogan)

  - Fix endless loop when splitting kallsyms symbols per section for
    handling kcore files, problem found on a s390x system. (Jiri Olsa)

Infrastructure changes:

  - Prep work for the 'perf stat record' work that will allow generating
    perf.data files with counting data in addition to the sampling mode
    we have now (Jiri Olsa)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 43418018 443f8c75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ OPTIONS
--show-nr-samples::
	Show the number of samples for each symbol

--showcpuutilization::
--show-cpu-utilization::
        Show sample percentage for different cpu modes.

-T::
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
		usage_with_options(evlist_usage, options);

	if (details.event_group && (details.verbose || details.freq)) {
		pr_err("--group option is not compatible with other options\n");
		usage_with_options(evlist_usage, options);
		usage_with_options_msg(evlist_usage, options,
			"--group option is not compatible with other options\n");
	}

	return __cmd_evlist(input_name, &details);
+12 −8
Original line number Diff line number Diff line
@@ -528,12 +528,12 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
			     PARSE_OPT_STOP_AT_NON_OPTION);
	if (argc > 0) {
		if (strcmp(argv[0], "-") == 0) {
			pr_warning("  Error: '-' is not supported.\n");
			usage_with_options(probe_usage, options);
			usage_with_options_msg(probe_usage, options,
				"'-' is not supported.\n");
		}
		if (params.command && params.command != 'a') {
			pr_warning("  Error: another command except --add is set.\n");
			usage_with_options(probe_usage, options);
			usage_with_options_msg(probe_usage, options,
				"another command except --add is set.\n");
		}
		ret = parse_probe_event_argv(argc, argv);
		if (ret < 0) {
@@ -562,8 +562,10 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
	switch (params.command) {
	case 'l':
		if (params.uprobes) {
			pr_warning("  Error: Don't use --list with --exec.\n");
			usage_with_options(probe_usage, options);
			pr_err("  Error: Don't use --list with --exec.\n");
			parse_options_usage(probe_usage, options, "l", true);
			parse_options_usage(NULL, options, "x", true);
			return -EINVAL;
		}
		ret = show_perf_probe_events(params.filter);
		if (ret < 0)
@@ -603,8 +605,10 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
	case 'a':
		/* Ensure the last given target is used */
		if (params.target && !params.target_used) {
			pr_warning("  Error: -x/-m must follow the probe definitions.\n");
			usage_with_options(probe_usage, options);
			pr_err("  Error: -x/-m must follow the probe definitions.\n");
			parse_options_usage(probe_usage, options, "m", true);
			parse_options_usage(NULL, options, "x", true);
			return -EINVAL;
		}

		ret = perf_add_probe_events(params.events, params.nevents);
+6 −5
Original line number Diff line number Diff line
@@ -1135,14 +1135,15 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
		usage_with_options(record_usage, record_options);

	if (nr_cgroups && !rec->opts.target.system_wide) {
		ui__error("cgroup monitoring only available in"
			  " system-wide mode\n");
		usage_with_options(record_usage, record_options);
		usage_with_options_msg(record_usage, record_options,
			"cgroup monitoring only available in system-wide mode");

	}
	if (rec->opts.record_switch_events &&
	    !perf_can_record_switch_events()) {
		ui__error("kernel does not support recording context switch events (--switch-events option)\n");
		usage_with_options(record_usage, record_options);
		ui__error("kernel does not support recording context switch events\n");
		parse_options_usage(record_usage, record_options, "switch-events", 0);
		return -EINVAL;
	}

	if (!rec->itr) {
+3 −1
Original line number Diff line number Diff line
@@ -699,8 +699,10 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
		   " Please refer the man page for the complete list."),
	OPT_STRING('F', "fields", &field_order, "key[,keys...]",
		   "output field(s): overhead, period, sample plus all of sort keys"),
	OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
	OPT_BOOLEAN(0, "show-cpu-utilization", &symbol_conf.show_cpu_utilization,
		    "Show sample percentage for different cpu modes"),
	OPT_BOOLEAN_FLAG(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
		    "Show sample percentage for different cpu modes", PARSE_OPT_HIDDEN),
	OPT_STRING('p', "parent", &parent_pattern, "regex",
		   "regex filter to identify parent, see: '--sort parent'"),
	OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
Loading