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

Commit 54c9238c 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 refactorings and fixes from Arnaldo Carvalho de Melo:

Infrastructure changes:

  - Revert "perf tools: Improve setting of gcc debug option", -Og is broken,
    GCC PR created (Jiri Olsa)

  - More reference count fixes (Masami Hiramatsu)

  - Untangle browser setup (--stdio, --tui, etc) from argument checking,
    prep work to move the usage() code out of tools/perf for use by
    other tools/ living utilities (Namhyung Kim)

  - Delete half-processed hist entries when exiting 'perf top' (Namhyung Kim)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents d18929e9 e7a7865c
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -343,18 +343,19 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
		return ret;

	argc = parse_options(argc, argv, options, annotate_usage, 0);
	if (argc) {
		/*
		 * Special case: if there's an argument left then assume that
		 * it's a symbol filter:
		 */
		if (argc > 1)
			usage_with_options(annotate_usage, options);

	if (annotate.use_stdio)
		use_browser = 0;
	else if (annotate.use_tui)
		use_browser = 1;
	else if (annotate.use_gtk)
		use_browser = 2;
		annotate.sym_hist_filter = argv[0];
	}

	file.path  = input_name;

	setup_browser(true);

	annotate.session = perf_session__new(&file, false, &annotate.tool);
	if (annotate.session == NULL)
		return -1;
@@ -369,16 +370,14 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
	if (setup_sorting() < 0)
		usage_with_options(annotate_usage, options);

	if (argc) {
		/*
		 * Special case: if there's an argument left then assume that
		 * it's a symbol filter:
		 */
		if (argc > 1)
			usage_with_options(annotate_usage, options);
	if (annotate.use_stdio)
		use_browser = 0;
	else if (annotate.use_tui)
		use_browser = 1;
	else if (annotate.use_gtk)
		use_browser = 2;

		annotate.sym_hist_filter = argv[0];
	}
	setup_browser(true);

	ret = __cmd_annotate(&annotate);

+0 −3
Original line number Diff line number Diff line
@@ -1351,7 +1351,6 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
	disable_buildid_cache();

	use_browser = 0;
	setup_browser(false);

	if (argc) {
		argc = parse_options(argc, argv, live_options,
@@ -1409,8 +1408,6 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
	err = kvm_events_live_report(kvm);

out:
	exit_browser(0);

	if (kvm->session)
		perf_session__delete(kvm->session);
	kvm->session = NULL;
+10 −11
Original line number Diff line number Diff line
@@ -801,6 +801,16 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
	perf_config(report__config, &report);

	argc = parse_options(argc, argv, options, report_usage, 0);
	if (argc) {
		/*
		 * Special case: if there's an argument left then assume that
		 * it's a symbol filter:
		 */
		if (argc > 1)
			usage_with_options(report_usage, options);

		report.symbol_filter_str = argv[0];
	}

	if (symbol_conf.vmlinux_name &&
	    access(symbol_conf.vmlinux_name, R_OK)) {
@@ -946,17 +956,6 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
	if (symbol__init(&session->header.env) < 0)
		goto error;

	if (argc) {
		/*
		 * Special case: if there's an argument left then assume that
		 * it's a symbol filter:
		 */
		if (argc > 1)
			usage_with_options(report_usage, options);

		report.symbol_filter_str = argv[0];
	}

	sort__setup_elide(stdout);

	ret = __cmd_report(&report);
+6 −3
Original line number Diff line number Diff line
@@ -964,7 +964,7 @@ static int __cmd_top(struct perf_top *top)
	if (ret)
		goto out_delete;

	if (perf_session__register_idle_thread(top->session) == NULL)
	if (perf_session__register_idle_thread(top->session) < 0)
		goto out_delete;

	machine__synthesize_threads(&top->session->machines.host, &opts->target,
@@ -1279,8 +1279,11 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
	if (target__none(target))
		target->system_wide = true;

	if (perf_evlist__create_maps(top.evlist, target) < 0)
		usage_with_options(top_usage, options);
	if (perf_evlist__create_maps(top.evlist, target) < 0) {
		ui__error("Couldn't create thread/CPU maps: %s\n",
			  errno == ENOENT ? "No such process" : strerror_r(errno, errbuf, sizeof(errbuf)));
		goto out_delete_evlist;
	}

	if (!top.evlist->nr_entries &&
	    perf_evlist__add_default(top.evlist) < 0) {
+0 −2
Original line number Diff line number Diff line
@@ -135,8 +135,6 @@ endif

ifeq ($(DEBUG),0)
  CFLAGS += -O6
else
  CFLAGS += $(call cc-option,-Og,-O0)
endif

ifdef PARSER_DEBUG
Loading