Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1385272 > unrolled thread
| Started by | kan.liang@intel.com |
|---|---|
| First post | 2016-04-22 17:30 +0200 |
| Last post | 2016-04-25 10:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH V2 1/1] perf hists: clear dummy entry accumulated period kan.liang@intel.com - 2016-04-22 17:30 +0200
Re: [PATCH V2 1/1] perf hists: clear dummy entry accumulated period Jiri Olsa <jolsa@redhat.com> - 2016-04-25 10:30 +0200
| From | kan.liang@intel.com |
|---|---|
| Date | 2016-04-22 17:30 +0200 |
| Subject | [PATCH V2 1/1] perf hists: clear dummy entry accumulated period |
| Message-ID | <rqLbQ-419-7@gated-at.bofh.it> |
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>
---
Sorry for the noise which is brought by V1.
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..acba139 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 (he->stat_acc)
+ 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
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-04-25 10:30 +0200 |
| Message-ID | <rrK42-2xY-17@gated-at.bofh.it> |
| In reply to | #1385272 |
On Fri, Apr 22, 2016 at 12:58:58AM -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>
> ---
>
> Sorry for the noise which is brought by V1.
> 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..acba139 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 (he->stat_acc)
> + memset(he->stat_acc, 0, sizeof(he->stat));
we use symbol_conf.cumulate_callchain check for existance of he->stat_acc
I think we should keep it here as well
thanks,
jirka
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web