store_gcov_u64(9)
β¨ store_gcov_u64(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's from the kernel gcov corner of the universe and it's lowkey iconic β it's all about writing a 64-bit number into a buffer in gcov format. let's get into it π«Ά
πΈ NAME πΈ
store_gcov_u64 β store a 64 bit number in gcov format into a buffer π
π¦ SYNOPSIS π¦
size_t store_gcov_u64 (void *buffer , size_t off , u64 v );
π ARGUMENTS π
bufferβ the target buffer, orNULL(yes,NULLis a whole valid vibe here π)offβ the offset into the buffer, like where in the lineup we're putting this thingvβ the value to be stored, the main character of this function ngl π
π DESCRIPTION π
so the number format here is defined by gcc, and it's giving very specific β¨ the numbers get recorded in the 32 bit unsigned binary form of the endianness of the machine that's generating the file. iykyk, endianness matters, no cap π
64 bit numbers are stored as two 32 bit numbers, with the low part first β low part walks in first, periodt π
it returns the number of bytes stored. and if buffer is NULL? it literally doesn't store anything. nothing. zero. it's a vibe check and the vibe is "no" π
π₯ SEE ALSO π₯
- Kernel file
./kernel/gcov/base.c gcov_enable_events(9)store_gcov_u32(9)β the 32-bit sibling, we stan a family π
that's the whole page bestie, go forth and store those u64s with main character energy ππ
β from ./kernel/gcov, dated October 2026, with love and also a little bit of endianness discourse πβπ¦
π¦ 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