ftrace_hash_move(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ftrace_hash_move(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ this one is all about moving a new hash into a filter and doing the little updates that go with it. stay with me, it's actually iconic πŸŽ€


🌸 NAME 🌸

ftrace_hash_move β€” move a new hash to a filter and do updates πŸ’…


✨ SYNOPSIS ✨

int ftrace_hash_move (struct ftrace_ops *ops , int enable , struct ftrace_hash **dst , struct ftrace_hash *src );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ops β€” the ops that owns the hash dst is pointing at 🫢
  • enable β€” true if we're talking about the filter hash, false if it's the notrace hash. very binary of it πŸ’€
  • dst β€” points to the ops hash that should get updated πŸ‘‘
  • src β€” the hash we're updating dst with, main character energy fr fr 🌟

🧚 DESCRIPTION 🧚

so this gets called when an ftrace_ops hash is being updated and the kernel needs to reflect that. tiny important note: it only updates the kernel function callbacks if the ops is enabled β€” and no, don't confuse that with the enable argument above, they're different things 😭 (iykyk). if the ops is enabled, its hash is what determines which callbacks get called. and this function is what runs when the ops hash gets updated and it needs new callbacks.

on success, the elements of src get moved to dst, and dst gets updated properly, and the functions determined by the ops hashes are now calling the ops callback function. slay. πŸŽ‰

regardless of return type, src should be freed with free_ftrace_hash β€” no cap, do not skip this one πŸ’€

🌈 SEE ALSO 🌈

kernel file ./kernel/trace/ftrace.c, plus literally this whole squad:


that's the whole page bestie, go forth and move those hashes 🫢

source: ./kernel/trace Β· version date: October 2026 Β· mwah, love u, bye πŸ’‹πŸ’–

πŸ“¦ where this page comes from