Linux Perf
|
#include <stdio.h>
#include <string.h>
#include <endian.h>
#include <byteswap.h>
#include "arm-spe-pkt-decoder.h"
Go to the source code of this file.
Macros | |
#define | BIT(n) (1ULL << (n)) |
#define | NS_FLAG BIT(63) |
#define | EL_FLAG (BIT(62) | BIT(61)) |
#define | SPE_HEADER0_PAD 0x0 |
#define | SPE_HEADER0_END 0x1 |
#define | SPE_HEADER0_ADDRESS 0x30 /* address packet (short) */ |
#define | SPE_HEADER0_ADDRESS_MASK 0x38 |
#define | SPE_HEADER0_COUNTER 0x18 /* counter packet (short) */ |
#define | SPE_HEADER0_COUNTER_MASK 0x38 |
#define | SPE_HEADER0_TIMESTAMP 0x71 |
#define | SPE_HEADER0_TIMESTAMP 0x71 |
#define | SPE_HEADER0_EVENTS 0x2 |
#define | SPE_HEADER0_EVENTS_MASK 0xf |
#define | SPE_HEADER0_SOURCE 0x3 |
#define | SPE_HEADER0_SOURCE_MASK 0xf |
#define | SPE_HEADER0_CONTEXT 0x24 |
#define | SPE_HEADER0_CONTEXT_MASK 0x3c |
#define | SPE_HEADER0_OP_TYPE 0x8 |
#define | SPE_HEADER0_OP_TYPE_MASK 0x3c |
#define | SPE_HEADER1_ALIGNMENT 0x0 |
#define | SPE_HEADER1_ADDRESS 0xb0 /* address packet (extended) */ |
#define | SPE_HEADER1_ADDRESS_MASK 0xf8 |
#define | SPE_HEADER1_COUNTER 0x98 /* counter packet (extended) */ |
#define | SPE_HEADER1_COUNTER_MASK 0xf8 |
#define | le16_to_cpu bswap_16 |
#define | le32_to_cpu bswap_32 |
#define | le64_to_cpu bswap_64 |
#define | memcpy_le64(d, s, n) |
Functions | |
const char * | arm_spe_pkt_name (enum arm_spe_pkt_type type) |
static int | payloadlen (unsigned char byte) |
static int | arm_spe_get_payload (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_pad (struct arm_spe_pkt *packet) |
static int | arm_spe_get_alignment (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_end (struct arm_spe_pkt *packet) |
static int | arm_spe_get_timestamp (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_events (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_data_source (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_context (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_op_type (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
static int | arm_spe_get_counter (const unsigned char *buf, size_t len, const unsigned char ext_hdr, struct arm_spe_pkt *packet) |
static int | arm_spe_get_addr (const unsigned char *buf, size_t len, const unsigned char ext_hdr, struct arm_spe_pkt *packet) |
static int | arm_spe_do_get_packet (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
int | arm_spe_get_packet (const unsigned char *buf, size_t len, struct arm_spe_pkt *packet) |
int | arm_spe_pkt_desc (const struct arm_spe_pkt *packet, char *buf, size_t buf_len) |
Variables | |
static const char *const | arm_spe_packet_name [] |
#define BIT | ( | n | ) | (1ULL << (n)) |
Definition at line 14 of file arm-spe-pkt-decoder.c.
Definition at line 17 of file arm-spe-pkt-decoder.c.
#define le16_to_cpu bswap_16 |
Definition at line 42 of file arm-spe-pkt-decoder.c.
#define le32_to_cpu bswap_32 |
Definition at line 43 of file arm-spe-pkt-decoder.c.
#define le64_to_cpu bswap_64 |
Definition at line 44 of file arm-spe-pkt-decoder.c.
#define memcpy_le64 | ( | d, | |
s, | |||
n | |||
) |
Definition at line 45 of file arm-spe-pkt-decoder.c.
#define NS_FLAG BIT(63) |
Definition at line 16 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_ADDRESS 0x30 /* address packet (short) */ |
Definition at line 21 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_ADDRESS_MASK 0x38 |
Definition at line 22 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_CONTEXT 0x24 |
Definition at line 31 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_CONTEXT_MASK 0x3c |
Definition at line 32 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_COUNTER 0x18 /* counter packet (short) */ |
Definition at line 23 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_COUNTER_MASK 0x38 |
Definition at line 24 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_END 0x1 |
Definition at line 20 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_EVENTS 0x2 |
Definition at line 27 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_EVENTS_MASK 0xf |
Definition at line 28 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_OP_TYPE 0x8 |
Definition at line 33 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_OP_TYPE_MASK 0x3c |
Definition at line 34 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_PAD 0x0 |
Definition at line 19 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_SOURCE 0x3 |
Definition at line 29 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_SOURCE_MASK 0xf |
Definition at line 30 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_TIMESTAMP 0x71 |
Definition at line 26 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER0_TIMESTAMP 0x71 |
Definition at line 26 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER1_ADDRESS 0xb0 /* address packet (extended) */ |
Definition at line 36 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER1_ADDRESS_MASK 0xf8 |
Definition at line 37 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER1_ALIGNMENT 0x0 |
Definition at line 35 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER1_COUNTER 0x98 /* counter packet (extended) */ |
Definition at line 38 of file arm-spe-pkt-decoder.c.
#define SPE_HEADER1_COUNTER_MASK 0xf8 |
Definition at line 39 of file arm-spe-pkt-decoder.c.
|
static |
|
static |
Definition at line 195 of file arm-spe-pkt-decoder.c.
|
static |
Definition at line 112 of file arm-spe-pkt-decoder.c.
|
static |
|
static |
Definition at line 178 of file arm-spe-pkt-decoder.c.
|
static |
|
static |
Definition at line 124 of file arm-spe-pkt-decoder.c.
|
static |
|
static |
int arm_spe_get_packet | ( | const unsigned char * | buf, |
size_t | len, | ||
struct arm_spe_pkt * | packet | ||
) |
|
static |
Definition at line 106 of file arm-spe-pkt-decoder.c.
|
static |
|
static |
int arm_spe_pkt_desc | ( | const struct arm_spe_pkt * | packet, |
char * | buf, | ||
size_t | buf_len | ||
) |
const char* arm_spe_pkt_name | ( | enum arm_spe_pkt_type | type | ) |
Definition at line 68 of file arm-spe-pkt-decoder.c.
|
static |
Definition at line 80 of file arm-spe-pkt-decoder.c.
|
static |
Definition at line 56 of file arm-spe-pkt-decoder.c.