lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 27 Apr 2016 08:34:00 -0700
From:	tip-bot for Kan Liang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	mingo@...nel.org, linux-kernel@...r.kernel.org, hpa@...or.com,
	ak@...ux.intel.com, acme@...hat.com, tglx@...utronix.de,
	namhyung@...nel.org, kan.liang@...el.com, jolsa@...nel.org
Subject: [tip:perf/core] perf hists: Clear dummy entry accumulated period

Commit-ID:  09623d79466e996f5dc2753e16f04fda6f078041
Gitweb:     http://git.kernel.org/tip/09623d79466e996f5dc2753e16f04fda6f078041
Author:     Kan Liang <kan.liang@...el.com>
AuthorDate: Sun, 24 Apr 2016 23:28:09 -0700
Committer:  Arnaldo Carvalho de Melo <acme@...hat.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@...el.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Namhyung Kim <namhyung@...nel.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@...hat.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ