Skip to content

Commit c8fa7a8

Browse files
Solomon Tanacmel
authored andcommitted
perf cs-etm: Add missing case value
The following error was thrown when compiling `tools/perf` using OpenCSD v0.11.1. This patch fixes said error. CC util/intel-pt-decoder/intel-pt-log.o CC util/cs-etm-decoder/cs-etm-decoder.o util/cs-etm-decoder/cs-etm-decoder.c: In function ‘cs_etm_decoder__buffer_range’: util/cs-etm-decoder/cs-etm-decoder.c:370:2: error: enumeration value ‘OCSD_INSTR_WFI_WFE’ not handled in switch [-Werror=switch-enum] switch (elem->last_i_type) { ^~~~~~ CC util/intel-pt-decoder/intel-pt-decoder.o cc1: all warnings being treated as errors Because `OCSD_INSTR_WFI_WFE` case was added only in v0.11.0, the minimum required OpenCSD library version for this patch is no longer v0.10.0. Signed-off-by: Solomon Tan <solomonbobstoner@gmail.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Walker <robert.walker@arm.com> Cc: Suzuki K Poulouse <suzuki.poulose@arm.com> Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190322052255.GA4809@w-OptiPlex-7050 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 8c7ae38 commit c8fa7a8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎tools/build/feature/test-libopencsd.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
/*
55
* Check OpenCSD library version is sufficient to provide required features
66
*/
7-
#define OCSD_MIN_VER ((0 << 16) | (10 << 8) | (0))
7+
#define OCSD_MIN_VER ((0 << 16) | (11 << 8) | (0))
88
#if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER)
9-
#error "OpenCSD >= 0.10.0 is required"
9+
#error "OpenCSD >= 0.11.0 is required"
1010
#endif
1111

1212
int main(void)

‎tools/perf/util/cs-etm-decoder/cs-etm-decoder.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ cs_etm_decoder__buffer_range(struct cs_etm_decoder *decoder,
387387
break;
388388
case OCSD_INSTR_ISB:
389389
case OCSD_INSTR_DSB_DMB:
390+
case OCSD_INSTR_WFI_WFE:
390391
case OCSD_INSTR_OTHER:
391392
default:
392393
packet->last_instr_taken_branch = false;

0 commit comments

Comments
 (0)