Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf cs-etm: Move definition of 'traceid_list' global variable from header file

The variable 'traceid_list' is defined in the header file cs-etm.h,
if multiple C files include cs-etm.h the compiler might complaint for
multiple definition of 'traceid_list'.

To fix multiple definition error, move the definition of 'traceid_list'
into cs-etm.c.

Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
Reported-by: Thomas Backlund <tmb@mageia.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Mike Leach <mike.leach@linaro.org>
Tested-by: Thomas Backlund <tmb@mageia.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Tor Jeremiassen <tor@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Leo Yan and committed by
Arnaldo Carvalho de Melo
168200b6 32add10f

+3 -3
+3
tools/perf/util/cs-etm.c
··· 94 94 struct cs_etm_traceid_queue **traceid_queues; 95 95 }; 96 96 97 + /* RB tree for quick conversion between traceID and metadata pointers */ 98 + static struct intlist *traceid_list; 99 + 97 100 static int cs_etm__update_queues(struct cs_etm_auxtrace *etm); 98 101 static int cs_etm__process_queues(struct cs_etm_auxtrace *etm); 99 102 static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
-3
tools/perf/util/cs-etm.h
··· 114 114 CS_ETM_ISA_T32, 115 115 }; 116 116 117 - /* RB tree for quick conversion between traceID and metadata pointers */ 118 - struct intlist *traceid_list; 119 - 120 117 struct cs_etm_queue; 121 118 122 119 struct cs_etm_packet {