fgraph_retrieve_parent_data(9)
π fgraph_retrieve_parent_data(9) β bestie's guide to grabbing parent data
okay so this is a page straight out of the Kernel API Manual, and honestly? it's a little icon. it's the function that lets you peek at data that belongs to the caller above you instead of the function you're standing in. the way that's so useful for tracing ππ
β¨ NAME β¨
fgraph_retrieve_parent_data β get data from a parent function π«Ά
so like, the whole vibe of this function is "hey what's going on one (or more) frames up?"
πΈ SYNOPSIS πΈ
void * fgraph_retrieve_parent_data (int idx , int *size_bytes , int depth );
no cap, that's the whole signature. returns a void *, takes three args. slay.
π ARGUMENTS π
idxβ the index into thefgraph_array(that'sfgraph_ops::idxbtw, exact field name, iykyk). it's how you tell the kernel which fgraph_ops entry you're talking about πsize_bytesβ a pointer to the retrieved data size. so you pass in anint *and it gets filled with how many bytes you scored β¨depthβ the depth to find the parent, and bestie listen:0is the current function. so depth 1 is your caller, depth 2 is their caller, and so on up the chain π¦
π DESCRIPTION π
this one is literally the sibling of fgraph_retrieve_data β same energy, different address. it's similar to fgraph_retrieve_data, except instead of grabbing your own data, it can be used to retrieve data from a parent caller function. so you're reaching up the call stack like "excuse me, can I borrow that?" πβ¨
lowkey important:depthof0means the current function, not the parent. so if you want an actual parent you gotta go1or higher π
β RETURN β
it returns a pointer to the specified parent data π« β or NULL if it's not found. that's it. that's the deal. no data, no pointer, NULL, bye π
π SEE ALSO π
- Kernel file
./kernel/trace/fgraph.c fgraph_reserve_data(9)fgraph_retrieve_data(9)fgraph_get_task_var(9)ftrace_graph_stop(9)ftrace_graph_get_ret_stack(9)ftrace_graph_top_ret_addr(9)ftrace_graph_ret_addr(9)
go read those next, they're all part of the same friend group fr fr π«Ά
and that's the whole page gorgeous π β brought to you by the ./kernel/trace crew, dated October 2026, filed under fgraph_retrieve_parent_data(9). go get that parent data, main character β¨ππ
π¦ 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