* [PATCH V3 1/1] perf hists: clear dummy entry accumulated period
@ 2016-04-25 6:28 kan.liang
2016-04-25 18:15 ` Jiri Olsa
2016-04-27 15:34 ` [tip:perf/core] perf hists: Clear " tip-bot for Kan Liang
0 siblings, 2 replies; 4+ messages in thread
From: kan.liang @ 2016-04-25 6:28 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>
---
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(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 991a351..0f33d7e 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,
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);
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V3 1/1] perf hists: clear dummy entry accumulated period
2016-04-25 6:28 [PATCH V3 1/1] perf hists: clear dummy entry accumulated period kan.liang
@ 2016-04-25 18:15 ` Jiri Olsa
2016-04-25 23:26 ` Arnaldo Carvalho de Melo
2016-04-27 15:34 ` [tip:perf/core] perf hists: Clear " tip-bot for Kan Liang
1 sibling, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2016-04-25 18:15 UTC (permalink / raw)
To: kan.liang; +Cc: acme, namhyung, jolsa, ak, linux-kernel
On Sun, Apr 24, 2016 at 11:28:09PM -0700, kan.liang@intel.com wrote:
> 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>
> ---
>
> 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
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
>
> tools/perf/util/hist.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index 991a351..0f33d7e 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,
> 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);
> --
> 2.5.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3 1/1] perf hists: clear dummy entry accumulated period
2016-04-25 18:15 ` Jiri Olsa
@ 2016-04-25 23:26 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-04-25 23:26 UTC (permalink / raw)
To: Jiri Olsa; +Cc: kan.liang, namhyung, jolsa, ak, linux-kernel
Em Mon, Apr 25, 2016 at 08:15:00PM +0200, Jiri Olsa escreveu:
> On Sun, Apr 24, 2016 at 11:28:09PM -0700, kan.liang@intel.com wrote:
> > 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>
> > ---
> >
> > 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
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf hists: Clear dummy entry accumulated period
2016-04-25 6:28 [PATCH V3 1/1] perf hists: clear dummy entry accumulated period kan.liang
2016-04-25 18:15 ` Jiri Olsa
@ 2016-04-27 15:34 ` tip-bot for Kan Liang
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Kan Liang @ 2016-04-27 15:34 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, hpa, ak, acme, tglx, namhyung, kan.liang, jolsa
Commit-ID: 09623d79466e996f5dc2753e16f04fda6f078041
Gitweb: http://git.kernel.org/tip/09623d79466e996f5dc2753e16f04fda6f078041
Author: Kan Liang <kan.liang@intel.com>
AuthorDate: Sun, 24 Apr 2016 23:28:09 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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
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>
---
tools/perf/util/hist.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 991a351..0f33d7e 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,
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-27 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 6:28 [PATCH V3 1/1] perf hists: clear dummy entry accumulated period kan.liang
2016-04-25 18:15 ` Jiri Olsa
2016-04-25 23:26 ` Arnaldo Carvalho de Melo
2016-04-27 15:34 ` [tip:perf/core] perf hists: Clear " tip-bot for Kan Liang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.