tools/perf/util/env.h
Source file repositories/reference/linux-study-clean/tools/perf/util/env.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/env.h- Extension
.h- Size
- 5715 bytes
- Lines
- 229
- 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/types.hlinux/rbtree.hcpumap.hrwsem.h
Detected Declarations
struct perf_cpu_mapstruct cpu_topology_mapstruct cpu_cache_levelstruct numa_nodestruct memory_nodestruct hybrid_nodestruct pmu_capsstruct domain_infostruct cpu_domain_mapstruct perf_envstruct bpf_prog_info_nodestruct btf_nodeenum perf_compress_type
Annotated Snippet
struct cpu_topology_map {
int socket_id;
int die_id;
int cluster_id;
int core_id;
};
struct cpu_cache_level {
u32 level;
u32 line_size;
u32 sets;
u32 ways;
char *type;
char *size;
char *map;
};
struct numa_node {
u32 node;
u64 mem_total;
u64 mem_free;
struct perf_cpu_map *map;
};
struct memory_node {
u64 node;
u64 size;
unsigned long *set;
};
struct hybrid_node {
char *pmu_name;
char *cpus;
};
struct pmu_caps {
int nr_caps;
unsigned int max_branches;
unsigned int br_cntr_nr;
unsigned int br_cntr_width;
char **caps;
char *pmu_name;
};
struct domain_info {
u32 domain;
char *dname;
char *cpumask;
char *cpulist;
};
struct cpu_domain_map {
u32 cpu;
u32 nr_domains;
struct domain_info **domains;
};
typedef const char *(arch_syscalls__strerrno_t)(int err);
struct perf_env {
char *hostname;
char *os_release;
char *version;
char *arch;
/* e_machine expanded from 16 to 32-bits for alignment. */
u32 e_machine;
u32 e_flags;
int nr_cpus_online;
int nr_cpus_avail;
char *cpu_desc;
char *cpuid;
unsigned long long total_mem;
unsigned int msr_pmu_type;
unsigned int max_branches;
unsigned int br_cntr_nr;
unsigned int br_cntr_width;
unsigned int schedstat_version;
unsigned int max_sched_domains;
int kernel_is_64_bit;
int nr_cmdline;
int nr_sibling_cores;
int nr_sibling_dies;
int nr_sibling_threads;
int nr_numa_nodes;
int nr_memory_nodes;
int nr_pmu_mappings;
int nr_groups;
int nr_cpu_pmu_caps;
Annotation
- Immediate include surface: `linux/types.h`, `linux/rbtree.h`, `cpumap.h`, `rwsem.h`.
- Detected declarations: `struct perf_cpu_map`, `struct cpu_topology_map`, `struct cpu_cache_level`, `struct numa_node`, `struct memory_node`, `struct hybrid_node`, `struct pmu_caps`, `struct domain_info`, `struct cpu_domain_map`, `struct perf_env`.
- 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.