STRUCT GCOV_INFO(9)
okay so welcome to the struct gcov_info(9) page from the Kernel API Manual π bestie, we are getting into the profiling-data-per-object-file of it all, and yes it's giving kernel internals but make it cute β¨
πΈ NAME πΈ
struct gcov_info β profiling data per object file, periodt π
β¨ SYNOPSIS β¨
no cap, here's the struct exactly as it is:
struct gcov_info {
unsigned int version;
struct gcov_info *next;
unsigned int stamp;
#if (__GNUC__ >= 12);
unsigned int checksum;
#endif;
const char *filename;
void (*merge[GCOV_COUNTERS])(gcov_type *, unsigned int);
unsigned int n_functions;
struct gcov_fn_info **functions;
};
π Members π
versionβ the gcov version magic that says which gcc version was used for compilation πnextβ the list head for a singly-linked list, walk walk walk πΆββοΈstampβ a time stamp whose whole job is uniquifying, and honestly iconic for thatchecksumβ a unique object checksum, tucked inside the#if (__GNUC__ >= 12);momentfilenameβ the name of the associated gcov data file ποΈmergeβ merge functions; it's null for an unused counter type, noted π«Άn_functionsβ the number of instrumented functions, literally the countfunctionsβ a pointer to pointers to function information, pointer-to-pointer realness π
π Description π
so the way that this works: this data is generated by gcc during compilation, and it doesn't change at run-time β with the one exception of the next pointer. that's the vibe, that's the rule, no extra lore π₯
π¦ SEE ALSO π¦
go peek at the Kernel file ./kernel/gcov/gcc_4_7.c and also these absolute icons: struct gcov_ctr_info(9), struct gcov_fn_info(9), gcov_info_filename(9), gcov_info_version(9), gcov_info_next(9), gcov_info_link(9), gcov_info_unlink(9), gcov_info_within_module(9), gcov_info_reset(9), gcov_info_is_compatible(9), gcov_info_add(9), gcov_info_dup(9), gcov_info_free(9), convert_to_gcda(9) π
π cute little sign-off: this page comes from the./kernel/gcovsource/version situation, datedOctober 2026, and it is still proudlystruct gcov_info(9)π mwah π
π¦ 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