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

Commit f21d1815 authored by Namhyung Kim's avatar Namhyung Kim Committed by Jiri Olsa
Browse files

perf tests: Add a testcase for histogram output sorting



With new output fields option, its internal implementation was changed
so add a new testcase to verify whether it breaks things.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1400480762-22852-21-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent 4e754e1c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -399,6 +399,7 @@ LIB_OBJS += $(OUTPUT)tests/pmu.o
LIB_OBJS += $(OUTPUT)tests/hists_common.o
LIB_OBJS += $(OUTPUT)tests/hists_link.o
LIB_OBJS += $(OUTPUT)tests/hists_filter.o
LIB_OBJS += $(OUTPUT)tests/hists_output.o
LIB_OBJS += $(OUTPUT)tests/python-use.o
LIB_OBJS += $(OUTPUT)tests/bp_signal.o
LIB_OBJS += $(OUTPUT)tests/bp_signal_overflow.o
+4 −0
Original line number Diff line number Diff line
@@ -135,6 +135,10 @@ static struct test {
		.desc = "Test thread mg sharing",
		.func = test__thread_mg_share,
	},
	{
		.desc = "Test output sorting of hist entries",
		.func = test__hists_output,
	},
	{
		.func = NULL,
	},
+2 −2
Original line number Diff line number Diff line
@@ -193,8 +193,8 @@ void print_hists_out(struct hists *hists)
		he = rb_entry(node, struct hist_entry, rb_node);

		if (!he->filtered) {
			pr_info("%2d: entry: %-8s [%-8s] %20s: period = %"PRIu64"\n",
				i, thread__comm_str(he->thread),
			pr_info("%2d: entry: %8s:%5d [%-8s] %20s: period = %"PRIu64"\n",
				i, thread__comm_str(he->thread), he->thread->tid,
				he->ms.map->dso->short_name,
				he->ms.sym->name, he->stat.period);
		}
+1 −0
Original line number Diff line number Diff line
@@ -283,6 +283,7 @@ int test__hists_filter(void)
out:
	/* tear down everything */
	perf_evlist__delete(evlist);
	reset_output_field();
	machines__exit(&machines);

	return err;
+1 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ int test__hists_link(void)
out:
	/* tear down everything */
	perf_evlist__delete(evlist);
	reset_output_field();
	machines__exit(&machines);

	return err;
Loading