tools/perf/util/map_symbol.c
Source file repositories/reference/linux-study-clean/tools/perf/util/map_symbol.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/map_symbol.c- Extension
.c- Size
- 767 bytes
- Lines
- 35
- 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
map_symbol.hmaps.hmap.hthread.h
Detected Declarations
function map_symbol__exitfunction addr_map_symbol__exitfunction map_symbol__copyfunction addr_map_symbol__copy
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include "map_symbol.h"
#include "maps.h"
#include "map.h"
#include "thread.h"
void map_symbol__exit(struct map_symbol *ms)
{
thread__zput(ms->thread);
map__zput(ms->map);
}
void addr_map_symbol__exit(struct addr_map_symbol *ams)
{
map_symbol__exit(&ams->ms);
}
void map_symbol__copy(struct map_symbol *dst, struct map_symbol *src)
{
dst->thread = thread__get(src->thread);
dst->map = map__get(src->map);
dst->sym = src->sym;
}
void addr_map_symbol__copy(struct addr_map_symbol *dst, struct addr_map_symbol *src)
{
map_symbol__copy(&dst->ms, &src->ms);
dst->addr = src->addr;
dst->al_addr = src->al_addr;
dst->al_level = src->al_level;
dst->phys_addr = src->phys_addr;
dst->data_page_size = src->data_page_size;
}
Annotation
- Immediate include surface: `map_symbol.h`, `maps.h`, `map.h`, `thread.h`.
- Detected declarations: `function map_symbol__exit`, `function addr_map_symbol__exit`, `function map_symbol__copy`, `function addr_map_symbol__copy`.
- 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.