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

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.orgSigned-off-by: default avatarJiri Olsa <jolsa@kernel.org>
parent a1891aa4
...@@ -400,6 +400,7 @@ LIB_OBJS += $(OUTPUT)tests/hists_common.o ...@@ -400,6 +400,7 @@ LIB_OBJS += $(OUTPUT)tests/hists_common.o
LIB_OBJS += $(OUTPUT)tests/hists_link.o LIB_OBJS += $(OUTPUT)tests/hists_link.o
LIB_OBJS += $(OUTPUT)tests/hists_filter.o LIB_OBJS += $(OUTPUT)tests/hists_filter.o
LIB_OBJS += $(OUTPUT)tests/hists_output.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/python-use.o
LIB_OBJS += $(OUTPUT)tests/bp_signal.o LIB_OBJS += $(OUTPUT)tests/bp_signal.o
LIB_OBJS += $(OUTPUT)tests/bp_signal_overflow.o LIB_OBJS += $(OUTPUT)tests/bp_signal_overflow.o
......
...@@ -139,6 +139,10 @@ static struct test { ...@@ -139,6 +139,10 @@ static struct test {
.desc = "Test output sorting of hist entries", .desc = "Test output sorting of hist entries",
.func = test__hists_output, .func = test__hists_output,
}, },
{
.desc = "Test cumulation of child hist entries",
.func = test__hists_cumulate,
},
{ {
.func = NULL, .func = NULL,
}, },
......
...@@ -196,10 +196,11 @@ void print_hists_out(struct hists *hists) ...@@ -196,10 +196,11 @@ void print_hists_out(struct hists *hists)
he = rb_entry(node, struct hist_entry, rb_node); he = rb_entry(node, struct hist_entry, rb_node);
if (!he->filtered) { 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, i, thread__comm_str(he->thread), he->thread->tid,
he->ms.map->dso->short_name, 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++; i++;
......
This diff is collapsed.
...@@ -45,6 +45,7 @@ int test__hists_filter(void); ...@@ -45,6 +45,7 @@ int test__hists_filter(void);
int test__mmap_thread_lookup(void); int test__mmap_thread_lookup(void);
int test__thread_mg_share(void); int test__thread_mg_share(void);
int test__hists_output(void); int test__hists_output(void);
int test__hists_cumulate(void);
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) #if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
#ifdef HAVE_DWARF_UNWIND_SUPPORT #ifdef HAVE_DWARF_UNWIND_SUPPORT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment