File perf-cs-etm-move-definition-of-traceid_list-global-variable-from-header-file.patch of Package perf
xxxxxxxxxx
1
From: Leo Yan <leo.yan@linaro.org>
2
Date: Tue, 5 May 2020 21:36:42 +0800
3
Subject: perf cs-etm: Move definition of 'traceid_list' global variable from
4
header file
5
Git-commit: 168200b6d6ea0cb5765943ec5da5b8149701f36a
6
References: git-fixes
7
8
The variable 'traceid_list' is defined in the header file cs-etm.h,
9
if multiple C files include cs-etm.h the compiler might complaint for
10
multiple definition of 'traceid_list'.
11
12
To fix multiple definition error, move the definition of 'traceid_list'
13
into cs-etm.c.
14
15
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
16
Reported-by: Thomas Backlund <tmb@mageia.org>
17
Signed-off-by: Leo Yan <leo.yan@linaro.org>
18
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
19
Reviewed-by: Mike Leach <mike.leach@linaro.org>
20
Tested-by: Mike Leach <mike.leach@linaro.org>
21
Tested-by: Thomas Backlund <tmb@mageia.org>
22
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
23
Cc: Jiri Olsa <jolsa@redhat.com>
24
Cc: Mark Rutland <mark.rutland@arm.com>
25
Cc: Namhyung Kim <namhyung@kernel.org>
26
Cc: Peter Zijlstra <peterz@infradead.org>
27
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
28
Cc: Tor Jeremiassen <tor@ti.com>
29
Cc: linux-arm-kernel@lists.infradead.org
30
Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
31
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
32
Acked-by: Tony Jones <tonyj@suse.de>
33
---
34
tools/perf/util/cs-etm.c | 3 +++
35
tools/perf/util/cs-etm.h | 3 ---
36
2 files changed, 3 insertions(+), 3 deletions(-)
37
38
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
39
index 3c802fde4954..c283223fb31f 100644
40
--- a/tools/perf/util/cs-etm.c
41
+++ b/tools/perf/util/cs-etm.c
42
43
struct cs_etm_traceid_queue **traceid_queues;
44
};
45
46
+/* RB tree for quick conversion between traceID and metadata pointers */
47
+static struct intlist *traceid_list;
48
+
49
static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
50
static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
51
static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
52
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
53
index 650ecc2a6349..4ad925d6d799 100644
54
--- a/tools/perf/util/cs-etm.h
55
+++ b/tools/perf/util/cs-etm.h
56
57
CS_ETM_ISA_T32,
58
};
59
60
-/* RB tree for quick conversion between traceID and metadata pointers */
61
-struct intlist *traceid_list;
62
-
63
struct cs_etm_queue;
64
65
struct cs_etm_packet {
66
67