fgraph_retrieve_data(9)
π fgraph_retrieve_data β a kernel API manual (yes, the section 9 kind, we're fancy)
okay so bestie, welcome to the fgraph_retrieve_data(9) page β it lives in the Kernel API Manual, and it's genuinely one of the shorter reads in the ftrace cinematic universe, so you can absolutely finish this before your iced coffee melts π§β¨
πΈ NAME πΈ
fgraph_retrieve_data β the lil function that goes and gets your data back after you stashed it with fgraph_reserve_data(). it's giving "lost and found but for kernel trace data" π
β¨ SYNOPSIS β¨
void * fgraph_retrieve_data (int idx , int *size_bytes );
that's the whole signature, no cap π
π«Ά ARGUMENTS π«Ά
idxβ the index offgraph_array, akafgraph_ops::idx. it's literally just which slot in the array we're talking about, iykyk.size_bytesβ a pointer to the retrieved data size. so it hands you back how big the thing is, through a pointer, because of course it does π«
π¦ DESCRIPTION π¦
okay so this is the main character section, listen up π
you call this from a fgraph_ops retfunc, and its whole job is to retrieve the data that was stored by that same fgraph_ops entryfunc back when the function entered. like, entryfunc stashed it, retfunc comes back and picks it up β the full glow-up-to-glow-down pipeline π
in the manual's own exact words: this will retrieve the data that was reserved on the entry of the function that corresponds to the exit of the function that the fgraph_ops retfunc is called on. so entry of func β exit of that same func, and fgraph_retrieve_data is your bridge between the two π§
lowkey important: it's meant to be called by a fgraph_ops retfunc. that's the vibe it was designed for, bestie, don't come at it from random places π
π RETURN π
it returns the stored data from fgraph_reserve_data that was called by the matching entryfunc for the retfunc you're calling this from. β¨
or β and this is the part where you go π β it returns NULL if there was nothing stored. so like, always vibe check your return value, fr fr. NULL is a real possible outcome, not a personality flaw π
π SEE ALSO π
go read these next, they're all in the kernel file ./kernel/trace/fgraph.c and they're all part of the same friend group π«Ά:
fgraph_reserve_data(9)fgraph_get_task_var(9)fgraph_retrieve_parent_data(9)ftrace_graph_stop(9)ftrace_graph_get_ret_stack(9)ftrace_graph_top_ret_addr(9)ftrace_graph_ret_addr(9)
and that's the page, bestie! π this iconic lil number comes from ./kernel/trace and it's dated October 2026 β so yeah, mark your calendar, this manual page is booked and busy π
π₯ mwah, go trace some functions π
π¦ 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