PROBE::VM.KMALLOC(3stap)

πŸ’– probe::vm.kmalloc β€” the 3stap moment πŸ’–

okay bestie, so this is a page from the SystemTap Tapset Reference (that's the 3stap manual, iykyk), and we're talking about the vm.kmalloc probe. it's giving memory-allocated realness. let's go ✨


✨ NAME ✨

probe::vm.kmalloc β€” Fires when kmalloc is requested πŸŽ€

like. the second somebody asks the kernel for some kmemory, this probe is UP and it is READY. main character energy fr fr πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

probe vm.kmalloc {}

no args, no drama, just vibes. she takes nothing and she fires anyway. iconic 🫢


🌸 VALUES 🌸

these are the lil' goodies the probe hands you when it fires. every single one, no skips, no cap πŸ’–

  • ptr β€” a pointer to the kmemory that got allocated. that's your address bestie, hold onto it πŸŽ€
  • caller_function β€” the name of the caller function. as in, who ordered this allocation. we found them πŸ‘‘
  • gfp_flags β€” the type of kmemory to allocate. flags, but make it allocation-coded ✨
  • bytes_alloc β€” the allocated Bytes. what you actually got πŸ“
  • gfp_flag_name β€” the type of kmemory to allocate, but in String format. same energy as gfp_flags, just dressed up cute πŸ’…
  • name β€” the name of the probe point. hi, it's me, the probe point 🌈
  • bytes_req β€” the requested Bytes. what you asked for (not always what you get, and that's the tea 😭)
  • call_site β€” the address of the kmemory function. where the whole thing went down πŸ“
ngl, bytes_req and bytes_alloc being two separate values is the plot twist of this entire page. requested vs. allocated. they're not the same and we love that for them πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

  • tapset::memory(3stap) β€” go read this one too, bestie, it's the whole memory tapset and it ATE 🌸

and that's the page!! this was SystemTap Tapset Reference, version dated September 2026, and honestly? she served. thanks for coming to my ted talk, now go instrument some kmalloc calls πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from