perf hists: clear dummy entry accumulated period
PATCH v3 1/1 perf hists: clear dummy entry accumulated period
From: Kan Liang <[email protected]>
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
---
Changes since V2:
- Use symbol_conf.cumulate_callchain check for existance of he->stat_acc
Changes since V1:
- check he->stat_acc. Because it only be available when option children is set
tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/hist.c +2 -0
@@ -2062,6 +2062,8 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,if (he) {memset (&he->stat,0 ,sizeof (he->stat)); he->hists = hists; +if (symbol_conf.cumulate_callchain) +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);
Signature · 1 line
2.5.0
Quoted 32 lines · On Sun, Apr 24, 2016 at 11:28:09PM -0700, [email protected] wrote:
From: Kan Liang <[email protected]>
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
Quoted 7 lines
Signed-off-by Kan Liang <[email protected]>---
Changes since V2:
- Use symbol_conf.cumulate_callchain check for existance ofhe->stat_acc
Changes since V1:
- checkhe->stat_acc. Because it only be available when option children is set
thanks,
jirka
Quoted 20 lines
tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+)tools/perf/util/hist.c +2
-0@@ -2062,6 +2062,8 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,if (he) {memset (&he->stat,0 ,sizeof (he->stat)); he->hists = hists; +if (symbol_conf.cumulate_callchain) +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);Signature · 1 line
2.5.0
Em Mon, Apr 25, 2016 at 08:15:00PM +0200, Jiri Olsa escreveu:
Quoted 36 lines · On Sun, Apr 24, 2016 at 11:28:09PM -0700, [email protected] wrote:
Quoted 35 lines
From: Kan Liang <[email protected]>
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_gpSigned-off-by Kan Liang <[email protected]>---
Quoted 6 lines
Quoted 4 lines
Changes since V2:
- Use symbol_conf.cumulate_callchain check for existance ofhe->stat_acc
Changes since V1:
- checkhe->stat_acc. Because it only be available when option children is setAcked-by Jiri Olsa <[email protected]>
Thanks, applied.
- Arnaldo
tip-bot for Kan Liang
merge bot[tip:perf/core] perf hists: Clear dummy entry accumulated period
In reply to [email protected]perf hists: Clear dummy entry accumulated period
Commit-ID: 09623d79466e996f5dc2753e16f04fda6f078041 Gitweb: http://git.kernel.org/tip/09623d79466e996f5dc2753e16f04fda6f078041 Author: Kan Liang <[email protected]> AuthorDate: Sun, 24 Apr 2016 23:28:09 -0700 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 25 Apr 2016 20:35:59 -0300
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--- tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+)
tools/perf/util/hist.c +2 -0
@@ -2062,6 +2062,8 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,if (he) {memset (&he->stat,0 ,sizeof (he->stat)); he->hists = hists; +if (symbol_conf.cumulate_callchain) +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);