Linux 5.1.15
[linux/fpc-iii.git] / tools / perf / util / arm-spe-pkt-decoder.h
blobd786ef65113faeadce2984bf95f08cfb417621e8
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__ARM_SPE_PKT_DECODER_H__
8 #define INCLUDE__ARM_SPE_PKT_DECODER_H__
10 #include <stddef.h>
11 #include <stdint.h>
13 #define ARM_SPE_PKT_DESC_MAX 256
15 #define ARM_SPE_NEED_MORE_BYTES -1
16 #define ARM_SPE_BAD_PACKET -2
18 enum arm_spe_pkt_type {
19 ARM_SPE_BAD,
20 ARM_SPE_PAD,
21 ARM_SPE_END,
22 ARM_SPE_TIMESTAMP,
23 ARM_SPE_ADDRESS,
24 ARM_SPE_COUNTER,
25 ARM_SPE_CONTEXT,
26 ARM_SPE_OP_TYPE,
27 ARM_SPE_EVENTS,
28 ARM_SPE_DATA_SOURCE,
31 struct arm_spe_pkt {
32 enum arm_spe_pkt_type type;
33 unsigned char index;
34 uint64_t payload;
37 const char *arm_spe_pkt_name(enum arm_spe_pkt_type);
39 int arm_spe_get_packet(const unsigned char *buf, size_t len,
40 struct arm_spe_pkt *packet);
42 int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, size_t len);
43 #endif