include/linux/perf_regs.h
Source file repositories/reference/linux-study-clean/include/linux/perf_regs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/perf_regs.h- Extension
.h- Size
- 1076 bytes
- Lines
- 51
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched/task_stack.hasm/perf_regs.h
Detected Declarations
struct perf_regsfunction perf_reg_valuefunction perf_reg_validatefunction perf_reg_abifunction perf_get_regs_user
Annotated Snippet
struct perf_regs {
__u64 abi;
struct pt_regs *regs;
};
#ifdef CONFIG_HAVE_PERF_REGS
#include <asm/perf_regs.h>
#ifndef PERF_REG_EXTENDED_MASK
#define PERF_REG_EXTENDED_MASK 0
#endif
u64 perf_reg_value(struct pt_regs *regs, int idx);
int perf_reg_validate(u64 mask);
u64 perf_reg_abi(struct task_struct *task);
void perf_get_regs_user(struct perf_regs *regs_user,
struct pt_regs *regs);
#else
#define PERF_REG_EXTENDED_MASK 0
static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
{
return 0;
}
static inline int perf_reg_validate(u64 mask)
{
return mask ? -ENOSYS : 0;
}
static inline u64 perf_reg_abi(struct task_struct *task)
{
return PERF_SAMPLE_REGS_ABI_NONE;
}
static inline void perf_get_regs_user(struct perf_regs *regs_user,
struct pt_regs *regs)
{
regs_user->regs = task_pt_regs(current);
regs_user->abi = perf_reg_abi(current);
}
#endif /* CONFIG_HAVE_PERF_REGS */
#endif /* _LINUX_PERF_REGS_H */
Annotation
- Immediate include surface: `linux/sched/task_stack.h`, `asm/perf_regs.h`.
- Detected declarations: `struct perf_regs`, `function perf_reg_value`, `function perf_reg_validate`, `function perf_reg_abi`, `function perf_get_regs_user`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.