tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
Source file repositories/reference/linux-study-clean/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c- Extension
.c- Size
- 16810 bytes
- Lines
- 561
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdio.hstring.hendian.hbyteswap.hlinux/bitops.hstdarg.hlinux/kernel.hlinux/unaligned.harm-spe-pkt-decoder.h
Detected Declarations
function arm_spe_payload_lenfunction arm_spe_get_payloadfunction arm_spe_get_padfunction arm_spe_get_alignmentfunction arm_spe_get_endfunction arm_spe_get_timestampfunction arm_spe_get_eventsfunction arm_spe_get_data_sourcefunction arm_spe_get_contextfunction arm_spe_get_op_typefunction arm_spe_get_counterfunction arm_spe_get_addrfunction arm_spe_do_get_packetfunction arm_spe_get_packetfunction arm_spe_pkt_out_stringfunction arm_spe_pkt_desc_eventfunction arm_spe_pkt_desc_op_typefunction arm_spe_pkt_desc_addrfunction arm_spe_pkt_desc_counterfunction arm_spe_pkt_desc
Annotated Snippet
if (SPE_OP_PKT_OTHER_SUBCLASS_SVE(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, "SVE-OTHER");
/* SVE effective vector length */
arm_spe_pkt_out_string(&err, &buf, &buf_len, " EVLEN %d",
SPE_OP_PKG_SVE_EVL(payload));
if (payload & SPE_OP_PKT_SVE_FP)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " FP");
if (payload & SPE_OP_PKT_SVE_PRED)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " PRED");
} else if (SPE_OP_PKT_OTHER_SUBCLASS_SME(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, "SME-OTHER");
/* SME effective vector length or tile size */
arm_spe_pkt_out_string(&err, &buf, &buf_len, " ETS %d",
SPE_OP_PKG_SME_ETS(payload));
if (payload & SPE_OP_PKT_OTHER_FP)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " FP");
} else if (SPE_OP_PKT_OTHER_SUBCLASS_OTHER(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, "OTHER");
if (payload & SPE_OP_PKT_OTHER_ASE)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " ASE");
if (payload & SPE_OP_PKT_OTHER_FP)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " FP");
arm_spe_pkt_out_string(&err, &buf, &buf_len, " %s",
payload & SPE_OP_PKT_COND ?
"COND-SELECT" : "INSN-OTHER");
}
break;
case SPE_OP_PKT_HDR_CLASS_LD_ST_ATOMIC:
arm_spe_pkt_out_string(&err, &buf, &buf_len,
payload & 0x1 ? "ST" : "LD");
if (SPE_OP_PKT_LDST_SUBCLASS_EXTENDED(payload)) {
if (payload & SPE_OP_PKT_AT)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " AT");
if (payload & SPE_OP_PKT_EXCL)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " EXCL");
if (payload & SPE_OP_PKT_AR)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " AR");
} else if (SPE_OP_PKT_LDST_SUBCLASS_SIMD_FP(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " SIMD-FP");
} else if (SPE_OP_PKT_LDST_SUBCLASS_GP_REG(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " GP-REG");
} else if (SPE_OP_PKT_LDST_SUBCLASS_UNSPEC_REG(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " UNSPEC-REG");
} else if (SPE_OP_PKT_LDST_SUBCLASS_NV_SYSREG(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " NV-SYSREG");
} else if (SPE_OP_PKT_LDST_SUBCLASS_MTE_TAG(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " MTE-TAG");
} else if (SPE_OP_PKT_LDST_SUBCLASS_MEMCPY(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " MEMCPY");
} else if (SPE_OP_PKT_LDST_SUBCLASS_MEMSET(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " MEMSET");
} else if (SPE_OP_PKT_LDST_SUBCLASS_SVE_SME_REG(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " SVE-SME-REG");
/* SVE effective vector length */
arm_spe_pkt_out_string(&err, &buf, &buf_len, " EVLEN %d",
SPE_OP_PKG_SVE_EVL(payload));
if (payload & SPE_OP_PKT_SVE_PRED)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " PRED");
if (payload & SPE_OP_PKT_SVE_SG)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " SG");
} else if (SPE_OP_PKT_LDST_SUBCLASS_GCS(payload)) {
arm_spe_pkt_out_string(&err, &buf, &buf_len, " GCS");
if (payload & SPE_OP_PKT_GCS_COMM)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " COMM");
}
break;
case SPE_OP_PKT_HDR_CLASS_BR_ERET:
arm_spe_pkt_out_string(&err, &buf, &buf_len, "B");
if (payload & SPE_OP_PKT_COND)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " COND");
if (payload & SPE_OP_PKT_INDIRECT_BRANCH)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " IND");
if (payload & SPE_OP_PKT_GCS)
arm_spe_pkt_out_string(&err, &buf, &buf_len, " GCS");
if (SPE_OP_PKT_CR_BL(payload))
arm_spe_pkt_out_string(&err, &buf, &buf_len, " CR-BL");
if (SPE_OP_PKT_CR_RET(payload))
arm_spe_pkt_out_string(&err, &buf, &buf_len, " CR-RET");
if (SPE_OP_PKT_CR_NON_BL_RET(payload))
arm_spe_pkt_out_string(&err, &buf, &buf_len, " CR-NON-BL-RET");
break;
default:
Annotation
- Immediate include surface: `stdio.h`, `string.h`, `endian.h`, `byteswap.h`, `linux/bitops.h`, `stdarg.h`, `linux/kernel.h`, `linux/unaligned.h`.
- Detected declarations: `function arm_spe_payload_len`, `function arm_spe_get_payload`, `function arm_spe_get_pad`, `function arm_spe_get_alignment`, `function arm_spe_get_end`, `function arm_spe_get_timestamp`, `function arm_spe_get_events`, `function arm_spe_get_data_source`, `function arm_spe_get_context`, `function arm_spe_get_op_type`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.