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.

Dependency Surface

Detected Declarations

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

Implementation Notes