* [PATCH 1/1] perf hists: clear dummy entry accumulated period
@ 2016-04-22 7:20 kan.liang
0 siblings, 0 replies; only message in thread
From: kan.liang @ 2016-04-22 7:20 UTC (permalink / raw)
To: acme; +Cc: namhyung, jolsa, ak, linux-kernel, Kan Liang
From: Kan Liang <kan.liang@intel.com>
The accumulated period for dummy entry should also be 0.
Otherwise, the total overhead could be overcounted.
[perf]$ perf record -e '{LLC-load-misses,cpu/instructions/}'
--call-graph=lbr ./tchain
[perf]$ 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>
---
tools/perf/util/hist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 991a351..657d1ca 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -2062,6 +2062,7 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
if (he) {
memset(&he->stat, 0, sizeof(he->stat));
he->hists = hists;
+ memset(he->stat_acc, 0, sizeof(he->stat));
rb_link_node(&he->rb_node_in, parent, p);
rb_insert_color(&he->rb_node_in, root);
hists__inc_stats(hists, he);
--
2.5.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-22 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-22 7:20 [PATCH 1/1] perf hists: clear dummy entry accumulated period kan.liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®