From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jessica Yu <jeyu@kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: [RFC][PATCH 0/5] tracing: Allow module init functions to be traced
Date: Tue, 19 Sep 2017 10:28:01 -0400 [thread overview]
Message-ID: <20170919142801.151866799@goodmis.org> (raw)
Last release, module functions can be enabled before they are loaded
by echoing in ":mod:module-name" into set_ftrace_filter before the
module is loaded. When the module is loaded, its functions will be
enabled for tracing. Now it makes sense to enable module init functions
as well (kernel init functions can already be traced).
The first patch adds a function ftrace_free_mem() to let module code
tell ftrace to free the init functions from its tables so that new
enabling or disabling of function tracing does not try to modify
text that no longer exists in memory.
The second patch enables tracing of init functions from within modules.
The third patch adds kallsyms of those init functions so they look
like funtion names and not function pointers within the trace.
The fourth patch frees the saved kallsym name maps of the function
names to the module init addresses.
The last patch has kallsyms display the module init functions.
Steven Rostedt (VMware) (5):
ftrace: Add a ftrace_free_mem() function for modules to use
ftrace: Allow module init functions to be traced
ftrace: Save module init functions kallsyms symbols for tracing
ftrace: Add freeing algorithm to free ftrace_mod_maps
ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions
----
include/linux/ftrace.h | 26 ++++++
include/linux/init.h | 4 +-
kernel/kallsyms.c | 38 +++++++--
kernel/module.c | 2 +
kernel/trace/ftrace.c | 226 ++++++++++++++++++++++++++++++++++++++++++++++++-
5 files changed, 284 insertions(+), 12 deletions(-)
next reply other threads:[~2017-09-19 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 14:28 Steven Rostedt [this message]
2017-09-19 14:28 ` [RFC][PATCH 1/5] ftrace: Add a ftrace_free_mem() function for modules to use Steven Rostedt
2017-09-19 14:28 ` [RFC][PATCH 2/5] ftrace: Allow module init functions to be traced Steven Rostedt
2017-09-19 14:28 ` [RFC][PATCH 3/5] ftrace: Save module init functions kallsyms symbols for tracing Steven Rostedt
2017-10-06 20:55 ` Jessica Yu
2017-10-09 19:51 ` Steven Rostedt
2017-10-10 15:45 ` Steven Rostedt
2017-10-11 11:19 ` Jessica Yu
2017-10-11 13:11 ` Steven Rostedt
2017-09-19 14:28 ` [RFC][PATCH 4/5] ftrace: Add freeing algorithm to free ftrace_mod_maps Steven Rostedt
2017-09-19 14:28 ` [RFC][PATCH 5/5] ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170919142801.151866799@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox