arch/powerpc/perf/hv-common.h
Source file repositories/reference/linux-study-clean/arch/powerpc/perf/hv-common.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/perf/hv-common.h- Extension
.h- Size
- 1476 bytes
- Lines
- 48
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/perf_event.hlinux/types.h
Detected Declarations
struct hv_perf_caps
Annotated Snippet
struct hv_perf_caps {
u16 version;
u16 collect_privileged:1,
ga:1,
expanded:1,
lab:1,
unused:12;
};
unsigned long hv_perf_caps_get(struct hv_perf_caps *caps);
#define EVENT_DEFINE_RANGE_FORMAT(name, attr_var, bit_start, bit_end) \
PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); \
EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end)
/*
* The EVENT_DEFINE_RANGE_FORMAT() macro above includes helper functions
* for the fields (eg: event_get_starting_index()). For some fields we
* need the bit-range definition, but no the helper functions. Define a
* lite version of the above macro without the helpers and silence
* compiler warnings unused static functions.
*/
#define EVENT_DEFINE_RANGE_FORMAT_LITE(name, attr_var, bit_start, bit_end) \
PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end);
#define EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) \
static u64 event_get_##name##_max(void) \
{ \
BUILD_BUG_ON((bit_start > bit_end) \
|| (bit_end >= (sizeof(1ull) * 8))); \
return (((1ull << (bit_end - bit_start)) - 1) << 1) + 1; \
} \
static u64 event_get_##name(struct perf_event *event) \
{ \
return (event->attr.attr_var >> (bit_start)) & \
event_get_##name##_max(); \
}
#endif
Annotation
- Immediate include surface: `linux/perf_event.h`, `linux/types.h`.
- Detected declarations: `struct hv_perf_caps`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.