Lines Matching +full:in +full:- +full:functions
2 Using ftrace to hook to functions
16 beginning of functions in order to record and trace the flow of the kernel.
33 There are helper functions to help against recursion, and making sure
48 .. code-block:: c
77 no longer being called by functions after the unregister_ftrace_function()
87 .. code-block:: c
106 flags are set in the ftrace_ops structure, then this will be pointing
114 As functions can be called from anywhere, and it is possible that a function
116 recursion protection must be used. There are two helper functions that
117 can help in this regard. If you start your code with:
119 .. code-block:: c
129 .. code-block:: c
133 The code in between will be safe to use, even if it ends up calling a
149 that data or critical section will not be protected as expected. In this
152 .. code-block:: c
167 The ftrace_ops flags are all defined and documented in include/linux/ftrace.h.
195 (but not guaranteed) that the callback will be called in
202 kernel patches uses. Without this flag the pt_regs->ip can not be
209 If this is set, then the callback will only be called by functions
228 Filtering which functions to trace
231 If a callback is only to be called from specific functions, a filter must be
234 .. code-block:: c
248 Non-zero to reset all filters before applying this filter.
250 Filters denote which functions should be enabled when tracing is enabled.
251 If @buf is NULL and reset is set, all functions will be enabled for tracing.
253 The @buf can also be a glob expression to enable all functions that
256 See Filter Commands in :file:`Documentation/trace/ftrace.rst`.
260 .. code-block:: c
264 To add more functions, call the ftrace_set_filter() more than once with the
266 with new functions defined by @buf, have @reset be non-zero.
268 To remove all the filtered functions and trace all functions:
270 .. code-block:: c
276 function in this case, ftrace_set_filter_ip() can be used.
278 .. code-block:: c
283 located in the function. This function is used by perf and kprobes that
286 If a glob is used to set the filter, functions can be added to a "notrace"
287 list that will prevent those functions from calling the callback.
289 two lists are non-empty and contain the same functions, the callback will not
292 An empty "notrace" list means to allow all functions defined by the filter
295 .. code-block:: c
301 functions it finds to not be traced. This is a separate list from the
304 A non-zero @reset will clear the "notrace" list before adding functions
309 .. code-block:: c
314 functions should call the callback, it is best to set the filters before
318 If a filter is in place, and the @reset is non-zero, and @buf contains a
319 matching glob to functions, the switch will happen during the time of
320 the ftrace_set_filter() call. At no time will all functions call the callback.
322 .. code-block:: c
334 .. code-block:: c
346 As the latter will have a short time where all functions will call