diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-23 12:05:34 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-23 12:05:34 -1000 |
| commit | b8a7a86e48927472cc84463c1f038783bd52093f (patch) | |
| tree | 872c24e7377dd1e7edb93024a96f641670105f27 /kernel/trace/ring_buffer.c | |
| parent | 9ec665e5e7a955f0f5637e420ac5075bef475e33 (diff) | |
| parent | e1f339ff3b83857b93baf8b88186275a413d445e (diff) | |
Merge tag 'trace-ftrace-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull ftrace updates from Steven Rostedt:
- Have the stacktrace option work with func-args
The func_stack_trace option has it's own ftrace handler and so does
the func-args option. When they are both set, neither would run. The
function tracer itself would error out.
Allow the stacktrace and function args to work together.
- Avoid BTF lookup in atomic context
The ftrace_dump() can call function graph tracing output from an
atomic context (like an NMI watchdog going off). The BTF lookup is
not safe to call from atomic context. Have btf_find_func_proto()
return if in atomic context.
- Build trace_btf.c when CONFIG_DEBUG_INFO_BTF is enabled
New code is depending on trace_btf.c but that only gets built when
BPF_SYSCALL is also enabled. As the new code doesn't depend on that,
have trace_btf.c get built with just DEBUG_INFO_BTF set.
- Have function graph return values have BTF processing
Have the return values printed by the function graph tracer use BTF
to print the values in better format. For example, if it's a char,
short, signed or unsigned, print according to the value defined by
BTF.
- Add a "max" field to the function profiler stats
The function profiler shows all the functions run in the kernel, the
number of times they are called, and the total time they took up.
Also add a "max" field which holds the longest time a function ran
for.
- Fix memory leak in module with all skipped functions
On module load, the ftrace entries are recorded to keep track of what
functions can be traced or not. Some functions may be skipped for
various reasons (some defined by the architecture). If all functions
in the module are skipped, its data page is not freed and can leak.
Catch this case and free the empty page.
- Allow architectures to reject functions from being traced
Allow architectures to skip a function address by returning zero from
ftrace_call_adjust().
- Initialize modname and offset in print_rec()
The variables modname and offset are initialized by
kallsyms_lookup(). If that fails, the values are not set, but the
code continues to print other information. The modname and offset are
used later, but if the kallsyms_lookup() failed, they will not be
set.
If a module is being loaded and unloaded at the same time as reading
the available_filter_functions file, it can cause a fault due to the
lookup failing and modname and offset being used uninitialized.
* tag 'trace-ftrace-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
ftrace: Initialize modname and offset in print_rec()
ftrace: Let ftrace_call_adjust() reject a patch site
ftrace: Do not leak a module's empty page group
ftrace: Add max field to function profiler stats
tracing: Update funcgraph-retval documentation
fgraph: Enhance funcgraph-retval with BTF-based type-aware output
ftrace: Build trace_btf.c when CONFIG_DEBUG_INFO_BTF is enabled
tracing: Avoid BTF lookup in atomic context
ftrace: Have stacktrace option work with func-args
Diffstat (limited to 'kernel/trace/ring_buffer.c')
0 files changed, 0 insertions, 0 deletions
