aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorKan Liang <kan.liang@intel.com>2016-04-25 02:28:09 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-25 19:35:59 -0400
commit09623d79466e996f5dc2753e16f04fda6f078041 (patch)
tree0e322e3672fb9e89220b5534b6a6afc09a2d682d /tools/perf
parentc0664893050cc6b2d8b02d3e035f82fbfd0cd4cf (diff)
perf hists: Clear dummy entry accumulated period
The accumulated period for dummy entry should also be 0. Otherwise, the total overhead could be overcounted. $ perf record -e '{LLC-load-misses,cpu/instructions/}' --call-graph=lbr ./tchain $ perf report --stdio # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 21K of event 'anon group { LLC-load-misses, cpu/instructions/ }' # Event count (approx.): 16313667937 # # Children Self Command Shared Object Symbol # ................ ................ ........... ................ ............................ # 4769.98% 0.01% 0.00% 0.01% tchain_edit [kernel.vmlinux] [k] update_fast_timekeeper 4356.18% 0.01% 0.00% 0.01% tchain_edit [kernel.vmlinux] [k] trigger_load_balance 3181.12% 0.01% 0.00% 0.01% tchain_edit [kernel.vmlinux] [k] irq_work_tick 1592.37% 0.00% 0.00% 0.00% tchain_edit [kernel.vmlinux] [k] cpu_needs_another_gp Signed-off-by: Kan Liang <kan.liang@intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/1461565689-5862-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/hist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 991a351a8a41..0f33d7e698c4 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -2062,6 +2062,8 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
2062 if (he) { 2062 if (he) {
2063 memset(&he->stat, 0, sizeof(he->stat)); 2063 memset(&he->stat, 0, sizeof(he->stat));
2064 he->hists = hists; 2064 he->hists = hists;
2065 if (symbol_conf.cumulate_callchain)
2066 memset(he->stat_acc, 0, sizeof(he->stat));
2065 rb_link_node(&he->rb_node_in, parent, p); 2067 rb_link_node(&he->rb_node_in, parent, p);
2066 rb_insert_color(&he->rb_node_in, root); 2068 rb_insert_color(&he->rb_node_in, root);
2067 hists__inc_stats(hists, he); 2069 hists__inc_stats(hists, he);