perf cs-etm: Bail out immediately for instruction sample failure
authorLeo Yan <leo.yan@linaro.org>
Mon, 18 Jun 2018 05:09:55 +0000 (13:09 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Jul 2018 17:48:32 +0000 (14:48 -0300)
commit6cd4ac6a02c9bc6560faf567ac013902ab9cd039
tree64fd7d4f91a18232f88f5a3fe9aa264652a18492
parent6abf0f451087176caf0f9ad0cc2a79bcc5ebb443
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@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Walker <robert.walker@arm.com>
Cc: linux-arm-kernel@lists.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@redhat.com>
tools/perf/util/cs-etm.c