STRUCT GCOV_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay bestie, this is struct gcov_node(9) in the Kernel API Manual, and the NAME tea is literally: struct gcov_node β€” represents a debugfs entry. It's giving main character energy in the kernel's gcov/ corner, and we're obsessed. πŸ’…

🌸 SYNOPSIS 🌸

Here's the struct exactly as it is β€” do not come for the braces, they're iconic:

       struct gcov_node {
           struct list_head list;
           struct list_head children;
           struct list_head all;
           struct gcov_node *parent;
           struct gcov_info **loaded_info;
           struct gcov_info *unloaded_info;
           struct dentry *dentry;
           struct dentry **links;
           int num_loaded;
           char name[];
        };

πŸ‘‘ Members πŸ‘‘

  • list β€” list head for child node list.
  • children β€” child nodes. yes, it has children, mother is mothering. 🫢
  • all β€” list head for list of all nodes.
  • parent β€” parent node. every icon needs their ancestry, periodt.
  • loaded_info β€” array of pointers to profiling data sets for loaded object files.
  • unloaded_info β€” accumulated copy of profiling data sets for unloaded object files. Used only when gcov_persist=1. (so if that's not set, this one's lowkey just vibing.)
  • dentry β€” main debugfs entry, either a directory or data file.
  • links β€” associated symbolic links.
  • num_loaded β€” number of profiling data sets for loaded object files.
  • name β€” data file basename.

πŸ¦‹ Description πŸ¦‹

So struct gcov_node represents an entity within the gcov/ subdirectory of debugfs. There are directory nodes and data file nodes, both living their truth. The data file nodes are the ones that represent the actual synthesized data file plus any associated symbolic links, and those links are needed by the gcov tool to work correctly. That's the whole vibe check β€” no cap. ✨

🌈 SEE ALSO 🌈

Kernel file ./kernel/gcov/fs.c, plus the whole iterator crew:


Signed off from ./kernel/gcov, October 2026 β€” struct gcov_node(9) πŸ’–

πŸ“¦ where this page comes from