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

Commit 5b5e7621 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-urgent-for-mingo' of...

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

  User visible fixes:

  - Show progress bar in more places while doing histogram processing
    in the hists browser (Namhyung Kim)

  - Print backtrace symbols when segfault occurs in 'report' (Namhyung Kim)

  Infrastructure fixes:

  - Append callchains only when requested (Namhyung Kim)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 5e0f872c 82aa019e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
		if (nr_samples > 0) {
			total_nr_samples += nr_samples;
			hists__collapse_resort(hists, NULL);
			hists__output_resort(hists);
			hists__output_resort(hists, NULL);

			if (symbol_conf.event_group &&
			    !perf_evsel__is_group_leader(pos))
+1 −1
Original line number Diff line number Diff line
@@ -605,7 +605,7 @@ static void hists__process(struct hists *hists)
		hists__precompute(hists);
		hists__compute_resort(hists);
	} else {
		hists__output_resort(hists);
		hists__output_resort(hists, NULL);
	}

	hists__fprintf(hists, true, 0, 0, 0, stdout);
+22 −2
Original line number Diff line number Diff line
@@ -457,6 +457,19 @@ static void report__collapse_hists(struct report *rep)
	ui_progress__finish();
}

static void report__output_resort(struct report *rep)
{
	struct ui_progress prog;
	struct perf_evsel *pos;

	ui_progress__init(&prog, rep->nr_entries, "Sorting events for output...");

	evlist__for_each(rep->session->evlist, pos)
		hists__output_resort(evsel__hists(pos), &prog);

	ui_progress__finish();
}

static int __cmd_report(struct report *rep)
{
	int ret;
@@ -505,13 +518,20 @@ static int __cmd_report(struct report *rep)
	if (session_done())
		return 0;

	/*
	 * recalculate number of entries after collapsing since it
	 * might be changed during the collapse phase.
	 */
	rep->nr_entries = 0;
	evlist__for_each(session->evlist, pos)
		rep->nr_entries += evsel__hists(pos)->nr_entries;

	if (rep->nr_entries == 0) {
		ui__error("The %s file has no samples!\n", file->path);
		return 0;
	}

	evlist__for_each(session->evlist, pos)
		hists__output_resort(evsel__hists(pos));
	report__output_resort(rep);

	return report__browse_hists(rep);
}
+2 −2
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
	}

	hists__collapse_resort(hists, NULL);
	hists__output_resort(hists);
	hists__output_resort(hists, NULL);

	hists__output_recalc_col_len(hists, top->print_entries - printed);
	putchar('\n');
@@ -554,7 +554,7 @@ static void perf_top__sort_new_samples(void *arg)
	}

	hists__collapse_resort(hists, NULL);
	hists__output_resort(hists);
	hists__output_resort(hists, NULL);
}

static void *display_thread_tui(void *arg)
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ static int do_test(struct hists *hists, struct result *expected, size_t nr_expec
	 * function since TEST_ASSERT_VAL() returns in case of failure.
	 */
	hists__collapse_resort(hists, NULL);
	hists__output_resort(hists);
	hists__output_resort(hists, NULL);

	if (verbose > 2) {
		pr_info("use callchain: %d, cumulate callchain: %d\n",
Loading