[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-6cd4ac6a02c9bc6560faf567ac013902ab9cd039@git.kernel.org>
Date: Wed, 25 Jul 2018 13:41:29 -0700
From: tip-bot for Leo Yan <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, kim.phillips@....com, acme@...hat.com,
mingo@...nel.org, mike.leach@...aro.org,
mathieu.poirier@...aro.org, robert.walker@....com,
tglx@...utronix.de, jolsa@...hat.com, namhyung@...nel.org,
peterz@...radead.org, linux-kernel@...r.kernel.org,
alexander.shishkin@...ux.intel.com, leo.yan@...aro.org
Subject: [tip:perf/core] perf cs-etm: Bail out immediately for instruction
sample failure
Commit-ID: 6cd4ac6a02c9bc6560faf567ac013902ab9cd039
Gitweb: https://git.kernel.org/tip/6cd4ac6a02c9bc6560faf567ac013902ab9cd039
Author: Leo Yan <leo.yan@...aro.org>
AuthorDate: Mon, 18 Jun 2018 13:09:55 +0800
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 24 Jul 2018 14:48:32 -0300
perf cs-etm: Bail out immediately for instruction sample failure
If the instruction sample failure has happened, it isn't necessary to
execute to the end of the function cs_etm__flush(). This commit is to
bail out immediately and return the error code.
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/1529298599-3876-3-git-send-email-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/cs-etm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index 822ba915d144..8b2c099e750a 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -939,6 +939,9 @@ static int cs_etm__flush(struct cs_etm_queue *etmq)
err = cs_etm__synth_instruction_sample(
etmq, addr,
etmq->period_instructions);
+ if (err)
+ return err;
+
etmq->period_instructions = 0;
/*
Powered by blists - more mailing lists