DEFINE_STATIC_DEBUG_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 your debug_info_t variable. like, the actual identifier, main character energy only πŸ‘‘
  • name β€” the name of the debug log. this is the one used for the entry in debugfs, 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 view struct. 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 the debug_register/_unregister functions for this debug_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:

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