tools/perf/util/perf-regs-arch/perf_regs_aarch64.c
Source file repositories/reference/linux-study-clean/tools/perf/util/perf-regs-arch/perf_regs_aarch64.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/perf-regs-arch/perf_regs_aarch64.c- Extension
.c- Size
- 4832 bytes
- Lines
- 230
- 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
errno.hregex.hstring.hsys/auxv.hlinux/kernel.hlinux/zalloc.h../debug.h../event.h../perf_regs.h../../perf-sys.h../../arch/arm64/include/perf_regs.h
Detected Declarations
function sdt_init_op_regexfunction __perf_sdt_arg_parse_op_arm64function __perf_reg_mask_arm64function __perf_reg_ip_arm64function __perf_reg_sp_arm64
Annotated Snippet
if (fd != -1) {
close(fd);
return attr.sample_regs_user;
}
}
return PERF_REGS_MASK;
}
const char *__perf_reg_name_arm64(int id)
{
switch (id) {
case PERF_REG_ARM64_X0:
return "x0";
case PERF_REG_ARM64_X1:
return "x1";
case PERF_REG_ARM64_X2:
return "x2";
case PERF_REG_ARM64_X3:
return "x3";
case PERF_REG_ARM64_X4:
return "x4";
case PERF_REG_ARM64_X5:
return "x5";
case PERF_REG_ARM64_X6:
return "x6";
case PERF_REG_ARM64_X7:
return "x7";
case PERF_REG_ARM64_X8:
return "x8";
case PERF_REG_ARM64_X9:
return "x9";
case PERF_REG_ARM64_X10:
return "x10";
case PERF_REG_ARM64_X11:
return "x11";
case PERF_REG_ARM64_X12:
return "x12";
case PERF_REG_ARM64_X13:
return "x13";
case PERF_REG_ARM64_X14:
return "x14";
case PERF_REG_ARM64_X15:
return "x15";
case PERF_REG_ARM64_X16:
return "x16";
case PERF_REG_ARM64_X17:
return "x17";
case PERF_REG_ARM64_X18:
return "x18";
case PERF_REG_ARM64_X19:
return "x19";
case PERF_REG_ARM64_X20:
return "x20";
case PERF_REG_ARM64_X21:
return "x21";
case PERF_REG_ARM64_X22:
return "x22";
case PERF_REG_ARM64_X23:
return "x23";
case PERF_REG_ARM64_X24:
return "x24";
case PERF_REG_ARM64_X25:
return "x25";
case PERF_REG_ARM64_X26:
return "x26";
case PERF_REG_ARM64_X27:
return "x27";
case PERF_REG_ARM64_X28:
return "x28";
case PERF_REG_ARM64_X29:
return "x29";
case PERF_REG_ARM64_SP:
return "sp";
case PERF_REG_ARM64_LR:
return "lr";
case PERF_REG_ARM64_PC:
return "pc";
case PERF_REG_ARM64_VG:
return "vg";
default:
return NULL;
}
return NULL;
}
uint64_t __perf_reg_ip_arm64(void)
{
return PERF_REG_ARM64_PC;
}
Annotation
- Immediate include surface: `errno.h`, `regex.h`, `string.h`, `sys/auxv.h`, `linux/kernel.h`, `linux/zalloc.h`, `../debug.h`, `../event.h`.
- Detected declarations: `function sdt_init_op_regex`, `function __perf_sdt_arg_parse_op_arm64`, `function __perf_reg_mask_arm64`, `function __perf_reg_ip_arm64`, `function __perf_reg_sp_arm64`.
- 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.