STRUCT GCOV_FN_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct gcov_fn_info(9) β€” Kernel API Manual πŸ’…

okay bestie, welcome to the Kernel API Manual page for struct gcov_fn_info(9) β€” this is the profiling meta data per function situation, and it's lowkey iconic. 🫢

✨ NAME ✨

struct gcov_fn_info β€” profiling meta data per function. periodt. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

       struct gcov_fn_info {
           const struct gcov_info *key;
           unsigned int ident;
           unsigned int lineno_checksum;
           unsigned int cfg_checksum;
           struct gcov_ctr_info ctrs[];
        };

πŸ’– Members πŸ’–

  • key β€” comdat key. it's the vibe check for comdat selection.
  • ident β€” unique ident of function. main character ID, fr fr. πŸ‘‘
  • lineno_checksum β€” function lineo_checksum. yes, lineo_checksum β€” that's what the page says, bestie; keep it cute and keep it exact. πŸŽ€
  • cfg_checksum β€” function cfg checksum.
  • ctrs β€” instrumented counters. the trailing-array era has entered the chat. ✨

🌸 DESCRIPTION 🌸

okay so this data is generated by gcc during compilation and doesn't change at run-time. no cap β€” compile-time only, bestie. 😌

This is information about a single function. It uses the trailing array idiom β€” yes, the ctrs[] situation at the end. The number of counters is determined from the merge pointer array in gcov_info. πŸ’…

The key is used to detect which of a set of comdat functions was selected β€” it points to the gcov_info object of the object file containing the selected comdat function. iykyk. πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

mwah πŸ’‹ β€” this gem came from source/version ./kernel/gcov, date October 2026, and the whole thing is giving kernel-doc royalty. πŸ‘‘

πŸ“¦ where this page comes from