tools/perf/util/mem-info.h
Source file repositories/reference/linux-study-clean/tools/perf/util/mem-info.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/mem-info.h- Extension
.h- Size
- 1323 bytes
- Lines
- 56
- 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/refcount.hlinux/perf_event.hinternal/rc_check.hmap_symbol.h
Detected Declarations
function __mem_info__zput
Annotated Snippet
#ifndef __PERF_MEM_INFO_H
#define __PERF_MEM_INFO_H
#include <linux/refcount.h>
#include <linux/perf_event.h>
#include <internal/rc_check.h>
#include "map_symbol.h"
DECLARE_RC_STRUCT(mem_info) {
struct addr_map_symbol iaddr;
struct addr_map_symbol daddr;
union perf_mem_data_src data_src;
refcount_t refcnt;
};
struct mem_info *mem_info__new(void);
struct mem_info *mem_info__clone(struct mem_info *mi);
struct mem_info *mem_info__get(struct mem_info *mi);
void mem_info__put(struct mem_info *mi);
static inline void __mem_info__zput(struct mem_info **mi)
{
mem_info__put(*mi);
*mi = NULL;
}
#define mem_info__zput(mi) __mem_info__zput(&mi)
static inline struct addr_map_symbol *mem_info__iaddr(struct mem_info *mi)
{
return &RC_CHK_ACCESS(mi)->iaddr;
}
static inline struct addr_map_symbol *mem_info__daddr(struct mem_info *mi)
{
return &RC_CHK_ACCESS(mi)->daddr;
}
static inline union perf_mem_data_src *mem_info__data_src(struct mem_info *mi)
{
return &RC_CHK_ACCESS(mi)->data_src;
}
static inline const union perf_mem_data_src *mem_info__const_data_src(const struct mem_info *mi)
{
return &RC_CHK_ACCESS(mi)->data_src;
}
static inline refcount_t *mem_info__refcnt(struct mem_info *mi)
{
return &RC_CHK_ACCESS(mi)->refcnt;
}
#endif /* __PERF_MEM_INFO_H */
Annotation
- Immediate include surface: `linux/refcount.h`, `linux/perf_event.h`, `internal/rc_check.h`, `map_symbol.h`.
- Detected declarations: `function __mem_info__zput`.
- 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.