aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cs-etm.h
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2019-02-12 10:16:11 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-02-14 15:18:06 -0300
commit2507a3d982f2968168b53f4d1e67774d68f79b0c (patch)
tree63d3eb66ee94b99bf4895ec87c79a0ef724a9cd5 /tools/perf/util/cs-etm.h
parentperf cs-etm: Fix memory leak in error path (diff)
downloadlinux-dev-2507a3d982f2968168b53f4d1e67774d68f79b0c.tar.xz
linux-dev-2507a3d982f2968168b53f4d1e67774d68f79b0c.zip
perf cs-etm: Introducing function cs_etm__init_trace_params()
The trace parameter initialisation code is repeated in two different places, something that bloats the file and can lead to errors. This is fixed by introducing a helper function and calling the right protocol initialisation code when required. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Suzuki K Poulouse <suzuki.poulose@arm.com> Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190212171618.25355-7-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cs-etm.h')
-rw-r--r--tools/perf/util/cs-etm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
index d76126e0e3d0..0e97c196147a 100644
--- a/tools/perf/util/cs-etm.h
+++ b/tools/perf/util/cs-etm.h
@@ -105,8 +105,8 @@ struct intlist *traceid_list;
#define CS_ETM_HEADER_SIZE (CS_HEADER_VERSION_0_MAX * sizeof(u64))
-static const u64 __perf_cs_etmv3_magic = 0x3030303030303030ULL;
-static const u64 __perf_cs_etmv4_magic = 0x4040404040404040ULL;
+#define __perf_cs_etmv3_magic 0x3030303030303030ULL
+#define __perf_cs_etmv4_magic 0x4040404040404040ULL
#define CS_ETMV3_PRIV_SIZE (CS_ETM_PRIV_MAX * sizeof(u64))
#define CS_ETMV4_PRIV_SIZE (CS_ETMV4_PRIV_MAX * sizeof(u64))