Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / perf / util / arm-spe.h
blob390679a4af2fb61419bc881b5dc43c01f1dd77d7
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Arm Statistical Profiling Extensions (SPE) support
4 * Copyright (c) 2017-2018, Arm Ltd.
5 */
7 #ifndef INCLUDE__PERF_ARM_SPE_H__
8 #define INCLUDE__PERF_ARM_SPE_H__
10 #define ARM_SPE_PMU_NAME "arm_spe_"
12 enum {
13 ARM_SPE_PMU_TYPE,
14 ARM_SPE_PER_CPU_MMAPS,
15 ARM_SPE_AUXTRACE_V1_PRIV_MAX,
18 #define ARM_SPE_AUXTRACE_V1_PRIV_SIZE \
19 (ARM_SPE_AUXTRACE_V1_PRIV_MAX * sizeof(u64))
21 enum {
23 * The old metadata format (defined above) does not include a
24 * field for version number. Version 1 is reserved and starts
25 * from version 2.
27 ARM_SPE_HEADER_VERSION,
28 /* Number of sizeof(u64) */
29 ARM_SPE_HEADER_SIZE,
30 /* PMU type shared by CPUs */
31 ARM_SPE_PMU_TYPE_V2,
32 /* Number of CPUs */
33 ARM_SPE_CPUS_NUM,
34 ARM_SPE_AUXTRACE_PRIV_MAX,
37 enum {
38 /* Magic number */
39 ARM_SPE_MAGIC,
40 /* CPU logical number in system */
41 ARM_SPE_CPU,
42 /* Number of parameters */
43 ARM_SPE_CPU_NR_PARAMS,
44 /* CPU MIDR */
45 ARM_SPE_CPU_MIDR,
46 /* Associated PMU type */
47 ARM_SPE_CPU_PMU_TYPE,
48 /* Minimal interval */
49 ARM_SPE_CAP_MIN_IVAL,
50 ARM_SPE_CPU_PRIV_MAX,
53 #define ARM_SPE_HEADER_CURRENT_VERSION 2
56 union perf_event;
57 struct perf_session;
58 struct perf_pmu;
60 struct auxtrace_record *arm_spe_recording_init(int *err,
61 struct perf_pmu *arm_spe_pmu);
63 int arm_spe_process_auxtrace_info(union perf_event *event,
64 struct perf_session *session);
66 void arm_spe_pmu_default_config(const struct perf_pmu *arm_spe_pmu,
67 struct perf_event_attr *attr);
69 #endif