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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
ae4d9f5236
commit
2507a3d982
@@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user