1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
No description
Find a file
Steven Rostedt 31f505dc70 ftrace: Implement :mod: cache filtering on kernel command line
Module functions can be set to set_ftrace_filter before the module is
loaded.

  # echo :mod:snd_hda_intel > set_ftrace_filter

This will enable all the functions for the module snd_hda_intel. If that
module is not loaded, it is "cached" in the trace array for when the
module is loaded, its functions will be traced.

But this is not implemented in the kernel command line. That's because the
kernel command line filtering is added very early in boot up as it is
needed to be done before boot time function tracing can start, which is
also available very early in boot up. The code used by the
"set_ftrace_filter" file can not be used that early as it depends on some
other initialization to occur first. But some of the functions can.

Implement the ":mod:" feature of "set_ftrace_filter" in the kernel command
line parsing. Now function tracing on just a single module that is loaded
at boot up can be done.

Adding:

 ftrace=function ftrace_filter=:mod:sna_hda_intel

To the kernel command line will only enable the sna_hda_intel module
functions when the module is loaded, and it will start tracing.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250116175832.34e39779@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2025-01-16 21:27:10 -05:00
arch ftrace: Add ftrace_get_symaddr to convert fentry_ip to symaddr 2024-12-26 10:50:07 -05:00
block block: avoid to reuse hctx not removed from cpuhp callback list 2024-12-18 07:25:37 -07:00
certs
crypto crypto: rsassa-pkcs1 - Copy source data for SG list 2024-12-10 13:34:05 +08:00
Documentation Documentation: probes: Update fprobe on function-graph tracer 2024-12-26 10:50:06 -05:00
drivers Devicetree fixes for 6.13, part 1: 2024-12-22 08:40:23 -08:00
fs 25 hotfixes. 16 are cc:stable. 19 are MM and 6 are non-MM. 2024-12-21 15:31:56 -08:00
include ftrace: Add ftrace_get_symaddr to convert fentry_ip to symaddr 2024-12-26 10:50:07 -05:00
init
io_uring io_uring: check if iowq is killed before queuing 2024-12-19 13:31:53 -07:00
ipc
kernel ftrace: Implement :mod: cache filtering on kernel command line 2025-01-16 21:27:10 -05:00
lib fprobe: Rewrite fprobe on function-graph tracer 2024-12-26 10:50:05 -05:00
LICENSES
mm mm: huge_memory: handle strsep not finding delimiter 2024-12-18 19:04:47 -08:00
net BPF fixes: 2024-12-21 11:07:19 -08:00
rust Including fixes from can and netfilter. 2024-12-19 09:19:11 -08:00
samples fprobe: Use ftrace_regs in fprobe exit handler 2024-12-26 10:50:03 -05:00
scripts Kbuild fixes for v6.13 (2nd) 2024-12-21 11:24:32 -08:00
security selinux/stable-6.13 PR 20241217 2024-12-18 12:10:15 -08:00
sound soc: fixes for 6.13 2024-12-16 10:10:53 -08:00
tools selftests/ftrace: Add a test case for repeating register/unregister fprobe 2024-12-26 10:50:06 -05:00
usr kbuild: Drop support for include/asm-<arch> in headers_check.pl 2024-12-21 11:43:17 +09:00
virt VFIO updates for v6.13 2024-11-27 12:57:03 -08:00
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
.mailmap mailmap: add entry for Ying Huang 2024-12-18 19:04:41 -08:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS drm fixes for 6.13-rc4 2024-12-20 10:17:53 -08:00
Makefile Linux 6.13-rc4 2024-12-22 13:22:21 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.