ftrace_func_mapper_find_ip(9)
π ftrace_func_mapper_find_ip β from the Kernel API Manual, bestie π
okay so listen. we're in the Kernel API Manual today, and the star of the show is ftrace_func_mapper_find_ip(9). yes it's a long name. no we're not shortening it. it's iconic, it ate, periodt. β¨
πΈ NAME πΈ
ftrace_func_mapper_find_ip β literally "find some data mapped to an ip". that's the whole vibe. you got an ip, you want the data, this function is your girl. π
β¨ SYNOPSIS β¨
void ** ftrace_func_mapper_find_ip (struct ftrace_func_mapper *mapper ,
unsigned long ip );
look at her. two args, one return, zero drama. π¦
π ARGUMENTS π
mapperβ the mapper that has the ip maps. she's the one holding all the receipts, okay? the whole map lives with her. πipβ the instruction pointer to find the data for. like, the actual key you're looking up. give her the ip and she'll go find her matching data. π
π RETURN π
so here's the tea β β if it finds the data, you get the data mapped to ip. if not? NULL. that's it, that's the mood. π
but wait, there's a plot twist that's lowkey the best part: the return is actually the address of the mapper data pointer. not the data itself, the address of the pointer. and there's a reason for this:
The address is returned for use cases where the data is no bigger than a long, and the user can use the data pointer as its data instead of having to allocate more memory for the reference.
so if your data fits in a long, you don't gotta go allocate a whole extra chunk of memory just to hold a reference. use the pointer itself as the data. efficiency slay. π
π¦ SEE ALSO π¦
all her friends, fr fr. the Kernel file ./kernel/trace/ftrace.c and honestly the entire extended universe:
ftrace_lookup_ip(9)ftrace_free_filter(9)ftrace_hash_move(9)ftrace_location_range(9)ftrace_location(9)ftrace_text_reserved(9)ftrace_bug(9)ftrace_update_record(9)ftrace_test_record(9)ftrace_get_addr_new(9)ftrace_get_addr_curr(9)ftrace_rec_iter_start(9)ftrace_rec_iter_next(9)ftrace_rec_iter_record(9)ftrace_run_stop_machine(9)arch_ftrace_update_code(9)ftrace_startup_subops(9)ftrace_shutdown_subops(9)ftrace_regex_open(9)allocate_ftrace_func_mapper(9)ftrace_func_mapper_add_ip(9)ftrace_func_mapper_remove_ip(9)free_ftrace_func_mapper(9)register_ftrace_direct(9)unregister_ftrace_direct(9)modify_ftrace_direct_nolock(9)modify_ftrace_direct(9)hash_add(9)update_ftrace_direct_add(9)hash_sub(9)update_ftrace_direct_del(9)update_ftrace_direct_mod(9)ftrace_set_filter_ip(9)ftrace_set_filter_ips(9)ftrace_ops_set_global_filter(9)ftrace_set_filter(9)ftrace_set_notrace(9)ftrace_set_global_filter(9)ftrace_set_global_notrace(9)ftrace_ops_get_func(9)ftrace_kill(9)ftrace_is_dead(9)register_ftrace_function(9)unregister_ftrace_function(9)ftrace_lookup_symbols(9)
like, the whole group chat got tagged. π«Ά
and that's the page, bestie!! π this one comes from ./kernel/trace, dated October 2026, and it's filed under ftrace_func_mapper_find_ip(9) β go off, kernel docs, you ate that. ππ mwah! ππ§
π¦ 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