tools/perf/arch/arm64/util/pmu.c
Source file repositories/reference/linux-study-clean/tools/perf/arch/arm64/util/pmu.c
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/arch/arm64/util/pmu.c- Extension
.c- Size
- 629 bytes
- Lines
- 27
- 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
../../../util/pmu.h../../../util/pmus.h../../../util/tool_pmu.hapi/fs/fs.h
Detected Declarations
function tool_pmu__cpu_slots_per_cycle
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include "../../../util/pmu.h"
#include "../../../util/pmus.h"
#include "../../../util/tool_pmu.h"
#include <api/fs/fs.h>
u64 tool_pmu__cpu_slots_per_cycle(void)
{
char path[PATH_MAX];
unsigned long long slots = 0;
struct perf_pmu *pmu = perf_pmus__find_core_pmu();
if (pmu) {
perf_pmu__pathname_scnprintf(path, sizeof(path),
pmu->name, "caps/slots");
/*
* The value of slots is not greater than 32 bits, but
* filename__read_int can't read value with 0x prefix,
* so use filename__read_ull instead.
*/
filename__read_ull(path, &slots);
}
return slots;
}
Annotation
- Immediate include surface: `../../../util/pmu.h`, `../../../util/pmus.h`, `../../../util/tool_pmu.h`, `api/fs/fs.h`.
- Detected declarations: `function tool_pmu__cpu_slots_per_cycle`.
- 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.