Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1678355 > unrolled thread
| Started by | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| First post | 2017-06-30 02:50 +0200 |
| Last post | 2017-06-30 02:50 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[for-next][PATCH 00/12] tracing: More updates for 4.13 Steven Rostedt <rostedt@goodmis.org> - 2017-06-30 02:50 +0200
[for-next][PATCH 07/12] sh/ftrace: Remove only user of ftrace_arch_read_dyn_info() Steven Rostedt <rostedt@goodmis.org> - 2017-06-30 02:50 +0200
[for-next][PATCH 09/12] ftrace: Decrement count for dyn_ftrace_total_info file Steven Rostedt <rostedt@goodmis.org> - 2017-06-30 02:50 +0200
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2017-06-30 02:50 +0200 |
| Subject | [for-next][PATCH 00/12] tracing: More updates for 4.13 |
| Message-ID | <tXSid-6BV-3@gated-at.bofh.it> |
Added some more features. One from Joel that lets events display tgid.
The other allows for functions in modules to be traced when the module
is loaded. It uses the :mod: function command that already exists in
set_ftrace_filter, but instead of giving you an error if the module does
not exist, it will be stored, and when the module is loaded the command
will be executed at that moment.
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: 3b58a3c72f484393c65995a551902945f5a18c70
Joel Fernandes (2):
tracing: Add support for recording tgid of tasks
tracing: Add support for display of tgid in trace output
Steven Rostedt (1):
sh/ftrace: Remove only user of ftrace_arch_read_dyn_info()
Steven Rostedt (VMware) (9):
ftrace: Add missing comment for FTRACE_OPS_FL_RCU
tracing: Show address when function names are not found
ftrace: Add :mod: caching infrastructure to trace_array
ftrace: Have the cached module list show in set_ftrace_filter
ftrace: Implement cached modules tracing on module load
ftrace: Have cached module filters be an active filter
ftrace: Remove unused function ftrace_arch_read_dyn_info()
ftrace: Decrement count for dyn_ftrace_total_info file
ftrace: Unlock hash mutex on failed allocation in process_mod_list()
----
arch/sh/kernel/ftrace.c | 18 --
include/linux/ftrace.h | 6 +-
include/linux/trace_events.h | 13 +-
kernel/trace/ftrace.c | 365 +++++++++++++++++++++++++++++++++++---
kernel/trace/trace.c | 162 ++++++++++++-----
kernel/trace/trace.h | 26 ++-
kernel/trace/trace_events.c | 42 ++++-
kernel/trace/trace_output.c | 27 ++-
kernel/trace/trace_sched_switch.c | 72 ++++++--
9 files changed, 628 insertions(+), 103 deletions(-)
[toc] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2017-06-30 02:50 +0200 |
| Subject | [for-next][PATCH 07/12] sh/ftrace: Remove only user of ftrace_arch_read_dyn_info() |
| Message-ID | <tXSie-6BV-39@gated-at.bofh.it> |
| In reply to | #1678355 |
From: Steven Rostedt <rostedt@goodmis.org>
I noticed that there's only one user of ftrace_arch_read_dyn_info().
That was used a while ago during the NMI updating in x86, and superh
copied it to implement its version of handling NMIs during
stop_machine().
But that is a debug feature, and this code hasn't been touched since
2009. Also, x86 no longer does the ftrace updates with stop_machine()
and instead uses breakpoints. If superh needs to modify its code, it
should implement the breakpoint conversion, and remove stop_machine().
Which also gets rid of the NMI issue.
Anyway, I want to nuke ftrace_arch_read_dyn_info() and this gets rid of
the one user, which is for an arch that shouldn't need it anymore.
Link: http://lkml.kernel.org/r/20170626181749.2ce954d1@gandalf.local.home
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
arch/sh/kernel/ftrace.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 53783978162e..d18724d186f3 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -96,19 +96,6 @@ static int mod_code_status; /* holds return value of text write */
static void *mod_code_ip; /* holds the IP to write to */
static void *mod_code_newcode; /* holds the text to write to the IP */
-static unsigned nmi_wait_count;
-static atomic_t nmi_update_count = ATOMIC_INIT(0);
-
-int ftrace_arch_read_dyn_info(char *buf, int size)
-{
- int r;
-
- r = snprintf(buf, size, "%u %u",
- nmi_wait_count,
- atomic_read(&nmi_update_count));
- return r;
-}
-
static void clear_mod_flag(void)
{
int old = atomic_read(&nmi_running);
@@ -144,7 +131,6 @@ void arch_ftrace_nmi_enter(void)
if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
smp_rmb();
ftrace_mod_code();
- atomic_inc(&nmi_update_count);
}
/* Must have previous changes seen before executions */
smp_mb();
@@ -165,8 +151,6 @@ static void wait_for_nmi_and_set_mod_flag(void)
do {
cpu_relax();
} while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG));
-
- nmi_wait_count++;
}
static void wait_for_nmi(void)
@@ -177,8 +161,6 @@ static void wait_for_nmi(void)
do {
cpu_relax();
} while (atomic_read(&nmi_running));
-
- nmi_wait_count++;
}
static int
--
2.10.2
[toc] | [prev] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2017-06-30 02:50 +0200 |
| Subject | [for-next][PATCH 09/12] ftrace: Decrement count for dyn_ftrace_total_info file |
| Message-ID | <tXSif-6BV-43@gated-at.bofh.it> |
| In reply to | #1678355 |
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org> The dyn_ftrace_total_info file is used to show how many functions have been converted into nops and can be used by ftrace. The problem is that it does not get decremented when functions are removed (init boot code being freed, and modules being freed). That means the number is very inaccurate everytime functions are removed from the ftrace tables. Decrement it when functions are removed. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> --- kernel/trace/ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 914539e3e301..7509ef9810bf 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -5705,6 +5705,7 @@ void ftrace_release_mod(struct module *mod) if (pg == ftrace_pages) ftrace_pages = next_to_ftrace_page(last_pg); + ftrace_update_tot_cnt -= pg->index; *last_pg = pg->next; order = get_count_order(pg->size / ENTRIES_PER_PAGE); free_pages((unsigned long)pg->records, order); -- 2.10.2
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web