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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 2 Aug 2018 01:14:08 -0700
From:   tip-bot for Leo Yan <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     namhyung@...nel.org, jolsa@...hat.com, mike.leach@...aro.org,
        hpa@...or.com, leo.yan@...aro.org, peterz@...radead.org,
        acme@...hat.com, linux-kernel@...r.kernel.org,
        alexander.shishkin@...ux.intel.com, mathieu.poirier@...aro.org,
        kim.phillips@....com, mingo@...nel.org, robert.walker@....com,
        tglx@...utronix.de
Subject: [tip:perf/core] perf cs-etm: Generate branch sample when receiving
 a CS_ETM_TRACE_ON packet

Commit-ID:  d603b4e9f9c3181f2dacb989bba60081b99befe4
Gitweb:     https://git.kernel.org/tip/d603b4e9f9c3181f2dacb989bba60081b99befe4
Author:     Leo Yan <leo.yan@...aro.org>
AuthorDate: Wed, 11 Jul 2018 15:45:44 +0800
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 31 Jul 2018 11:22:11 -0300

perf cs-etm: Generate branch sample when receiving a CS_ETM_TRACE_ON packet

If one CS_ETM_TRACE_ON packet is inserted, we miss to generate branch
sample for the previous CS_ETM_RANGE packet.

This patch is to generate branch sample when receiving a CS_ETM_TRACE_ON
packet, so this can save complete info for the previous CS_ETM_RANGE
packet just before CS_ETM_TRACE_ON packet.

Signed-off-by: Leo Yan <leo.yan@...aro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Kim Phillips <kim.phillips@....com>
Cc: Mike Leach <mike.leach@...aro.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Robert Walker <robert.walker@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Link: http://lkml.kernel.org/r/1531295145-596-6-git-send-email-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/cs-etm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 976db8483478..d3b794286bca 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -935,6 +935,7 @@ static int cs_etm__sample(struct cs_etm_queue *etmq)
 static int cs_etm__flush(struct cs_etm_queue *etmq)
 {
 	int err = 0;
+	struct cs_etm_auxtrace *etm = etmq->etm;
 	struct cs_etm_packet *tmp;
 
 	if (!etmq->prev_packet)
@@ -965,6 +966,13 @@ static int cs_etm__flush(struct cs_etm_queue *etmq)
 
 	}
 
+	if (etm->sample_branches &&
+	    etmq->prev_packet->sample_type == CS_ETM_RANGE) {
+		err = cs_etm__synth_branch_sample(etmq);
+		if (err)
+			return err;
+	}
+
 swap_packet:
 	if (etmq->etm->synth_opts.last_branch) {
 		/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ