tools/lib/perf/include/internal/mmap.h
Source file repositories/reference/linux-study-clean/tools/lib/perf/include/internal/mmap.h
File Facts
- System
- Linux kernel
- Corpus path
tools/lib/perf/include/internal/mmap.h- Extension
.h- Size
- 1491 bytes
- Lines
- 61
- 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
linux/compiler.hlinux/refcount.hlinux/types.hstdbool.hinternal/cpumap.h
Detected Declarations
struct perf_mmapstruct perf_counts_valuesstruct perf_mmapstruct perf_mmap_param
Annotated Snippet
struct perf_mmap {
void *base;
int mask;
int fd;
struct perf_cpu cpu;
refcount_t refcnt;
u64 prev;
u64 start;
u64 end;
bool overwrite;
u64 flush;
libperf_unmap_cb_t unmap_cb;
void *event_copy;
size_t event_copy_sz;
struct perf_mmap *next;
};
struct perf_mmap_param {
int prot;
int mask;
};
size_t perf_mmap__mmap_len(struct perf_mmap *map);
void perf_mmap__init(struct perf_mmap *map, struct perf_mmap *prev,
bool overwrite, libperf_unmap_cb_t unmap_cb);
int perf_mmap__mmap(struct perf_mmap *map, struct perf_mmap_param *mp,
int fd, struct perf_cpu cpu);
void perf_mmap__munmap(struct perf_mmap *map);
void perf_mmap__get(struct perf_mmap *map);
void perf_mmap__put(struct perf_mmap *map);
u64 perf_mmap__read_head(struct perf_mmap *map);
int perf_mmap__read_self(struct perf_mmap *map, struct perf_counts_values *count);
#endif /* __LIBPERF_INTERNAL_MMAP_H */
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/refcount.h`, `linux/types.h`, `stdbool.h`, `internal/cpumap.h`.
- Detected declarations: `struct perf_mmap`, `struct perf_counts_values`, `struct perf_mmap`, `struct perf_mmap_param`.
- 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.