STRUCT PERF_DATA_FILE(9)
π struct perf_data_file(9) π
okay bestie, weβre in the Kernel API Manual and this one is lowkey iconic: struct perf_data_file is literally a wrapper around a file thatβs used for perf.data reading or writing, and itβs generally part of struct perf_data. no cap, itβs the file-handling sidekick π
β¨ NAME β¨
struct perf_data_file β a wrapper around a file used for perf.data reading or writing. Generally part of struct perf_data. π«Ά
πΈ SYNOPSIS πΈ
struct perf_data_file {
char *path;
union {
int fd;
FILE *fptr;
};
unsigned long size;
bool use_stdio;
};
π Members π
pathβ path of the file, fr fr. Itβs generally a copy ofperf_data.path, but if itβs a directory, itβs the file within that directory. ποΈ{unnamed_union}β anonymous. yep, thatβs the whole vibe. π«₯fdβ the file descriptor for reads/writes. valid ifuse_stdioisfalse. π₯fptrβ the stdioFILE. valid ifuse_stdioistrue, and currently itβs just pipes inperf inject. π§sizeβ size of the file when it was opened. πuse_stdioβ use buffered stdio operations. πΎ
π SEE ALSO π
- Kernel file
./tools/perf/util/data.h struct perf_data(9)
mwah π signing off from the ./tools/perf/util source/version, dated October 2026 β this was literally struct perf_data_file(9), and yes bestie, she ate πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms