Lines Matching refs:function
1 function tracer guts
8 Here we will cover the architecture pieces that the common function tracing
41 Keep in mind that the ABI that is in effect inside of the mcount function is
46 mcount call (before/after function prologue). You might also want to look at
47 how glibc has implemented the mcount function for your architecture. It might
50 The mcount function should check the function pointer ftrace_trace_function
52 so return immediately. If it isn't, then call that function in the same way
53 the mcount function normally calls __mcount_internal -- the first argument is
55 size of the mcount call that is embedded in the function).
57 For example, if the function foo() calls bar(), when the bar() function calls
62 Also keep in mind that this mcount function will be called *a lot*, so
64 your system when tracing is disabled. So the start of the mcount function is
109 mcount function to check ftrace graph function pointers, as well as implement
112 The mcount function should check the function pointers ftrace_graph_return
115 function, call the arch-specific function ftrace_graph_caller which in turn
116 calls the arch-specific function prepare_ftrace_return. Neither of these
117 function names is strictly required, but you should use them anyway to stay
124 located on the stack. This allows the function to hijack the return address
125 temporarily to have it point to the arch-specific function return_to_handler.
126 That function will simply call the common ftrace_return_to_handler function and
148 Here is the pseudo code for the new ftrace_graph_caller assembly function:
169 Here is the pseudo code for the new return_to_handler assembly function. Note
171 code. Since you are returning from a function (after the epilogue), you might
194 exiting of a function. On exit, the value is compared and if it does not
201 Then in the C version of that function, do what the x86 port does and pass it
229 - If the symbol names of the system calls do not match the function names on
232 true if the function name corresponds with the symbol name.
270 Since no one else will have a decl for that function, you will need to:
273 You will also need the helper function ftrace_call_adjust(). Most people
289 did already create a mcount() function earlier, dynamic ftrace only wants a
290 stub function. This is because the mcount() will only be used during boot
293 function. Because the two are hard to merge, it will most likely be a lot
324 active at a time, we will patch the ftrace_caller() function itself to call the
331 Every arch has an init callback function. If you need to do something early on
333 function below should be sufficient for most people:
344 typically that is ftracer_caller()). See the general function definition in
351 The last function is used to do runtime patching of the active tracer. This
353 inside of the ftrace_caller() function. So you should have sufficient padding
354 at that location to support the new function calls you'll be inserting. Some
356 "branch" type instruction. Specifically, the function is:
363 The function grapher needs a few tweaks in order to work with dynamic ftrace.