DEFINE_STATIC_DEBUG_INFO(9)
π DEFINE_STATIC_DEBUG_INFO β bestie, it's literally s390 kernel macro hours
okay so this page is DEFINE_STATIC_DEBUG_INFO(9) from the Kernel API Manual, and the way it lives at ./arch/s390/include/asm β yeah, it's giving architecture-specific icon behavior πΈ let's get into it π«Ά
β¨ NAME β¨
DEFINE_STATIC_DEBUG_INFO β basically the macro that defines a static debug_info_t. no cap, that's the whole job π
π SYNOPSIS π
DEFINE_STATIC_DEBUG_INFO (var , name , pages , nr_areas , buf_size , view );
yeah bestie, six arguments, all of them mandatory, all of them slaying in their own lane β
π¦ ARGUMENTS π¦
varβ the name of yourdebug_info_tvariable. like, the actual identifier, main character energy only πnameβ the name of the debug log. this is the one used for the entry indebugfs, so pick something cute and legible, iykyk β¨pagesβ number of pages per area. literally the page count, nothing spookier than that πnr_areasβ number of debug areas. plural, iconic, we love a quantity πbuf_sizeβ size of the data area in each debug entry. every entry gets this much room to exist πviewβ a pointer to the debug viewstruct. pointer energy, we respect it π
πΈ DESCRIPTION πΈ
so what this macro actually does is define a static debug_info_t so you can do early tracing π like, tracing before the rest of the world has woken up. highkey useful.
and bestie, the associated debugfs log gets automatically registered with the debug view you passed in. no manual registration arc, it just happens π
β¨
IMPORTANT, and I mean this with my whole chest: if you use this macro, you must not call any of thedebug_register/_unregisterfunctions for thisdebug_info_t! like, not any of them. periodt. π
π₯ NOTE π₯
tracing kicks off with a fixed number of initial pages and areas β so at first it's running on the starter pack π then, during arch_initcall, the debug area gets changed over to use the numbers you actually specified. so it catches up to your specs later, no cap π
π SEE ALSO π
go look at the kernel file ./arch/s390/include/asm/debug.h β that's the source of truth, bestie π§
and the whole friend group of functions, all of them listed, all of them linked:
debug_level_enabled(9)debug_event(9)debug_int_event(9)debug_long_event(9)debug_text_event(9)debug_sprintf_event(9)debug_exception(9)debug_int_exception(9)debug_long_exception(9)debug_text_exception(9)debug_sprintf_exception(9)
like, that's the whole squad right there, go say hi π«Ά
anyway that's the page!! sourced from ./arch/s390/include/asm, dated October 2026, and yes it's still out here being the DEFINE_STATIC_DEBUG_INFO(9) manual page it was always meant to be π bye bestie, go trace something early β¨
π¦ 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