tools/perf/util/tsc.h
Source file repositories/reference/linux-study-clean/tools/perf/util/tsc.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/tsc.h- Extension
.h- Size
- 707 bytes
- Lines
- 33
- 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.hevent.h
Detected Declarations
struct perf_tsc_conversionstruct perf_event_mmap_page
Annotated Snippet
struct perf_tsc_conversion {
u16 time_shift;
u32 time_mult;
u64 time_zero;
u64 time_cycles;
u64 time_mask;
bool cap_user_time_zero;
bool cap_user_time_short;
};
struct perf_event_mmap_page;
int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,
struct perf_tsc_conversion *tc);
u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc);
u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc);
u64 rdtsc(void);
u64 arch_get_tsc_freq(void);
size_t perf_event__fprintf_time_conv(union perf_event *event, FILE *fp);
#endif // __PERF_TSC_H
Annotation
- Immediate include surface: `linux/types.h`, `event.h`.
- Detected declarations: `struct perf_tsc_conversion`, `struct perf_event_mmap_page`.
- 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.