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

perf tests: Add a test case for cumulating callchains



Now it adds a new testcase to verify --children option working
correctly.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Arun Sharma <asharma@fb.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1401335910-16832-28-git-send-email-namhyung@kernel.org


Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent a1891aa4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -400,6 +400,7 @@ 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/hists_cumulate.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
@@ -139,6 +139,10 @@ static struct test {
		.desc = "Test output sorting of hist entries",
		.func = test__hists_output,
	},
	{
		.desc = "Test cumulation of child hist entries",
		.func = test__hists_cumulate,
	},
	{
		.func = NULL,
	},
+3 −2
Original line number Diff line number Diff line
@@ -196,10 +196,11 @@ void print_hists_out(struct hists *hists)
		he = rb_entry(node, struct hist_entry, rb_node);

		if (!he->filtered) {
			pr_info("%2d: entry: %8s:%5d [%-8s] %20s: period = %"PRIu64"\n",
			pr_info("%2d: entry: %8s:%5d [%-8s] %20s: period = %"PRIu64"/%"PRIu64"\n",
				i, thread__comm_str(he->thread), he->thread->tid,
				he->ms.map->dso->short_name,
				he->ms.sym->name, he->stat.period);
				he->ms.sym->name, he->stat.period,
				he->stat_acc ? he->stat_acc->period : 0);
		}

		i++;
+726 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ int test__hists_filter(void);
int test__mmap_thread_lookup(void);
int test__thread_mg_share(void);
int test__hists_output(void);
int test__hists_cumulate(void);

#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
#ifdef HAVE_DWARF_UNWIND_SUPPORT