tools/perf/util/tool_pmu.h
Source file repositories/reference/linux-study-clean/tools/perf/util/tool_pmu.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/tool_pmu.h- Extension
.h- Size
- 1787 bytes
- Lines
- 64
- 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
pmu.h
Detected Declarations
struct evselstruct perf_thread_mapstruct print_callbacksenum tool_pmu_event
Annotated Snippet
#ifndef __TOOL_PMU_H
#define __TOOL_PMU_H
#include "pmu.h"
struct evsel;
struct perf_thread_map;
struct print_callbacks;
enum tool_pmu_event {
TOOL_PMU__EVENT_NONE = 0,
TOOL_PMU__EVENT_DURATION_TIME,
TOOL_PMU__EVENT_USER_TIME,
TOOL_PMU__EVENT_SYSTEM_TIME,
TOOL_PMU__EVENT_HAS_PMEM,
TOOL_PMU__EVENT_NUM_CORES,
TOOL_PMU__EVENT_NUM_CPUS,
TOOL_PMU__EVENT_NUM_CPUS_ONLINE,
TOOL_PMU__EVENT_NUM_DIES,
TOOL_PMU__EVENT_NUM_PACKAGES,
TOOL_PMU__EVENT_SLOTS,
TOOL_PMU__EVENT_SMT_ON,
TOOL_PMU__EVENT_SYSTEM_TSC_FREQ,
TOOL_PMU__EVENT_CORE_WIDE,
TOOL_PMU__EVENT_TARGET_CPU,
TOOL_PMU__EVENT_MAX,
};
#define tool_pmu__for_each_event(ev) \
for ((ev) = TOOL_PMU__EVENT_DURATION_TIME; (ev) < TOOL_PMU__EVENT_MAX; ev++)
const char *tool_pmu__event_to_str(enum tool_pmu_event ev);
enum tool_pmu_event tool_pmu__str_to_event(const char *str);
bool tool_pmu__skip_event(const char *name);
int tool_pmu__num_skip_events(void);
bool tool_pmu__read_event(enum tool_pmu_event ev,
struct evsel *evsel,
bool system_wide,
const char *user_requested_cpu_list,
u64 *result);
u64 tool_pmu__cpu_slots_per_cycle(void);
bool perf_pmu__is_tool(const struct perf_pmu *pmu);
bool evsel__is_tool(const struct evsel *evsel);
enum tool_pmu_event evsel__tool_event(const struct evsel *evsel);
const char *evsel__tool_pmu_event_name(const struct evsel *evsel);
int evsel__tool_pmu_prepare_open(struct evsel *evsel,
struct perf_cpu_map *cpus,
int nthreads);
int evsel__tool_pmu_open(struct evsel *evsel,
struct perf_thread_map *threads,
int start_cpu_map_idx, int end_cpu_map_idx);
int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread);
struct perf_pmu *tool_pmu__new(void);
#endif /* __TOOL_PMU_H */
Annotation
- Immediate include surface: `pmu.h`.
- Detected declarations: `struct evsel`, `struct perf_thread_map`, `struct print_callbacks`, `enum tool_pmu_event`.
- 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.