* [PATCH 0/3] tracing: minor bugs
@ 2009-07-16 19:44 jolsa
2009-07-16 19:44 ` [PATCH 1/3] tracing: removing not used variables jolsa
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: jolsa @ 2009-07-16 19:44 UTC (permalink / raw)
To: mingo, rostedt; +Cc: linux-kernel, kernel-janitors
Hi,
1/3 - removing not used variables
2/3 - removing struct module* parameter from ftrace_init_module code path
3/3 - removing .globl in the scripts/recordmcount.pl doc
based on Linus tree commit 35b5c55fee08e6e4001ba98060a2d0b82f70b5f4
wbr,
jirka
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] tracing: removing not used variables
2009-07-16 19:44 [PATCH 0/3] tracing: minor bugs jolsa
@ 2009-07-16 19:44 ` jolsa
2009-07-18 10:24 ` [tip:tracing/core] tracing: Remove unused fields/variables tip-bot for jolsa@redhat.com
2009-07-16 19:44 ` [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path jolsa
2009-07-16 19:44 ` [PATCH 3/3] tracing: removing .globl in the scripts/recordmcount.pl doc jolsa
2 siblings, 1 reply; 8+ messages in thread
From: jolsa @ 2009-07-16 19:44 UTC (permalink / raw)
To: mingo, rostedt; +Cc: linux-kernel, kernel-janitors
Removing not used variables.
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
kernel/trace/ftrace.c | 3 ---
kernel/trace/trace.c | 3 +--
2 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4521c77..1dc08ab 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1375,7 +1375,6 @@ struct ftrace_iterator {
unsigned flags;
unsigned char buffer[FTRACE_BUFF_MAX+1];
unsigned buffer_idx;
- unsigned filtered;
};
static void *
@@ -2312,7 +2311,6 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
}
if (isspace(ch)) {
- iter->filtered++;
iter->buffer[iter->buffer_idx] = 0;
ret = ftrace_process_regex(iter->buffer,
iter->buffer_idx, enable);
@@ -2443,7 +2441,6 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable)
iter = file->private_data;
if (iter->buffer_idx) {
- iter->filtered++;
iter->buffer[iter->buffer_idx] = 0;
ftrace_match_records(iter->buffer, iter->buffer_idx, enable);
}
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8bc8d8a..d8bb7fd 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4268,7 +4268,6 @@ void ftrace_dump(void)
__init static int tracer_alloc_buffers(void)
{
- struct trace_array_cpu *data;
int ring_buf_size;
int i;
int ret = -ENOMEM;
@@ -4318,7 +4317,7 @@ __init static int tracer_alloc_buffers(void)
/* Allocate the first page for all buffers */
for_each_tracing_cpu(i) {
- data = global_trace.data[i] = &per_cpu(global_trace_cpu, i);
+ global_trace.data[i] = &per_cpu(global_trace_cpu, i);
max_tr.data[i] = &per_cpu(max_data, i);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path
2009-07-16 19:44 [PATCH 0/3] tracing: minor bugs jolsa
2009-07-16 19:44 ` [PATCH 1/3] tracing: removing not used variables jolsa
@ 2009-07-16 19:44 ` jolsa
2009-07-18 10:16 ` Ingo Molnar
2009-07-16 19:44 ` [PATCH 3/3] tracing: removing .globl in the scripts/recordmcount.pl doc jolsa
2 siblings, 1 reply; 8+ messages in thread
From: jolsa @ 2009-07-16 19:44 UTC (permalink / raw)
To: mingo, rostedt; +Cc: linux-kernel, kernel-janitors
The "struct module*" is not being used in the ftrace_init_module code path,
removing it.
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
arch/x86/kernel/ftrace.c | 3 +--
include/linux/ftrace.h | 4 +---
kernel/trace/ftrace.c | 25 +++++++++++--------------
3 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index d94e1ea..b5c22fb 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -255,8 +255,7 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code,
return 0;
}
-int ftrace_make_nop(struct module *mod,
- struct dyn_ftrace *rec, unsigned long addr)
+int ftrace_make_nop(struct dyn_ftrace *rec, unsigned long addr)
{
unsigned char *new, *old;
unsigned long ip = rec->ip;
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index dc3b132..efe0fb3 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -184,7 +184,6 @@ static inline int ftrace_disable_ftrace_graph_caller(void) { return 0; }
/**
* ftrace_make_nop - convert code into nop
- * @mod: module structure if called by module load initialization
* @rec: the mcount call site record
* @addr: the address that the call site should be calling
*
@@ -203,8 +202,7 @@ static inline int ftrace_disable_ftrace_graph_caller(void) { return 0; }
* -EPERM on error writing to the location
* Any other value will be considered a failure.
*/
-extern int ftrace_make_nop(struct module *mod,
- struct dyn_ftrace *rec, unsigned long addr);
+extern int ftrace_make_nop(struct dyn_ftrace *rec, unsigned long addr);
/**
* ftrace_make_call - convert a nop call site into a call to addr
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1dc08ab..c4dfcff 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1080,7 +1080,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
if (rec->flags & FTRACE_FL_ENABLED)
return ftrace_make_call(rec, ftrace_addr);
else
- return ftrace_make_nop(NULL, rec, ftrace_addr);
+ return ftrace_make_nop(rec, ftrace_addr);
}
static void ftrace_replace_code(int enable)
@@ -1123,14 +1123,14 @@ static void ftrace_replace_code(int enable)
}
static int
-ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
+ftrace_code_disable(struct dyn_ftrace *rec)
{
unsigned long ip;
int ret;
ip = rec->ip;
- ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
+ ret = ftrace_make_nop(rec, MCOUNT_ADDR);
if (ret) {
ftrace_bug(ret, ip);
rec->flags |= FTRACE_FL_FAILED;
@@ -1280,7 +1280,7 @@ static cycle_t ftrace_update_time;
static unsigned long ftrace_update_cnt;
unsigned long ftrace_update_tot_cnt;
-static int ftrace_update_code(struct module *mod)
+static int ftrace_update_code(void)
{
struct dyn_ftrace *p;
cycle_t start, stop;
@@ -1299,7 +1299,7 @@ static int ftrace_update_code(struct module *mod)
p->flags = 0L;
/* convert record (i.e, patch mcount-call with NOP) */
- if (ftrace_code_disable(mod, p)) {
+ if (ftrace_code_disable(p)) {
p->flags |= FTRACE_FL_CONVERTED;
ftrace_update_cnt++;
} else
@@ -2751,8 +2751,7 @@ static __init int ftrace_init_dyn_debugfs(struct dentry *d_tracer)
return 0;
}
-static int ftrace_convert_nops(struct module *mod,
- unsigned long *start,
+static int ftrace_convert_nops(unsigned long *start,
unsigned long *end)
{
unsigned long *p;
@@ -2776,7 +2775,7 @@ static int ftrace_convert_nops(struct module *mod,
/* disable interrupts to prevent kstop machine */
local_irq_save(flags);
- ftrace_update_code(mod);
+ ftrace_update_code();
local_irq_restore(flags);
mutex_unlock(&ftrace_lock);
@@ -2808,12 +2807,11 @@ void ftrace_release(void *start, void *end)
mutex_unlock(&ftrace_lock);
}
-static void ftrace_init_module(struct module *mod,
- unsigned long *start, unsigned long *end)
+static void ftrace_init_module(unsigned long *start, unsigned long *end)
{
if (ftrace_disabled || start == end)
return;
- ftrace_convert_nops(mod, start, end);
+ ftrace_convert_nops(start, end);
}
static int ftrace_module_notify(struct notifier_block *self,
@@ -2823,7 +2821,7 @@ static int ftrace_module_notify(struct notifier_block *self,
switch (val) {
case MODULE_STATE_COMING:
- ftrace_init_module(mod, mod->ftrace_callsites,
+ ftrace_init_module(mod->ftrace_callsites,
mod->ftrace_callsites +
mod->num_ftrace_callsites);
break;
@@ -2876,8 +2874,7 @@ void __init ftrace_init(void)
last_ftrace_enabled = ftrace_enabled = 1;
- ret = ftrace_convert_nops(NULL,
- __start_mcount_loc,
+ ret = ftrace_convert_nops(__start_mcount_loc,
__stop_mcount_loc);
ret = register_module_notifier(&ftrace_module_nb);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] tracing: removing .globl in the scripts/recordmcount.pl doc
2009-07-16 19:44 [PATCH 0/3] tracing: minor bugs jolsa
2009-07-16 19:44 ` [PATCH 1/3] tracing: removing not used variables jolsa
2009-07-16 19:44 ` [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path jolsa
@ 2009-07-16 19:44 ` jolsa
2009-07-18 10:24 ` [tip:tracing/core] tracing: Remove " tip-bot for jolsa@redhat.com
2 siblings, 1 reply; 8+ messages in thread
From: jolsa @ 2009-07-16 19:44 UTC (permalink / raw)
To: mingo, rostedt; +Cc: linux-kernel, kernel-janitors
I was reading throught the recordmcount.pl starting comment,
and spot a tiny discrepancy.
The second example is about my_func not being global, but the example code
has the ".globl my_func" statement just moved. IMO it should be erased,
if not I'm curious what I'm missing.. :)
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
scripts/recordmcount.pl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 7109e2b..db4ebe1 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -57,7 +57,6 @@
# call mcount (offset: 0x5)
# [...]
# ret
-# .globl my_func
# other_func:
# [...]
# call mcount (offset: 0x1b)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path
2009-07-16 19:44 ` [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path jolsa
@ 2009-07-18 10:16 ` Ingo Molnar
2009-07-19 18:47 ` Jiri Olsa
0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-07-18 10:16 UTC (permalink / raw)
To: jolsa; +Cc: rostedt, linux-kernel, kernel-janitors
* jolsa@redhat.com <jolsa@redhat.com> wrote:
> The "struct module*" is not being used in the ftrace_init_module
> code path, removing it.
>
> wbr,
> jirka
>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
>
> ---
> arch/x86/kernel/ftrace.c | 3 +--
> include/linux/ftrace.h | 4 +---
> kernel/trace/ftrace.c | 25 +++++++++++--------------
> 3 files changed, 13 insertions(+), 19 deletions(-)
patch didnt apply cleanly to the latest tracing tree:
http://people.redhat.com/mingo/tip.git/README
and the other bits had some fuzz as well. Mind merging + resending
this?
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [tip:tracing/core] tracing: Remove unused fields/variables
2009-07-16 19:44 ` [PATCH 1/3] tracing: removing not used variables jolsa
@ 2009-07-18 10:24 ` tip-bot for jolsa@redhat.com
0 siblings, 0 replies; 8+ messages in thread
From: tip-bot for jolsa@redhat.com @ 2009-07-18 10:24 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, mingo, jolsa
Commit-ID: 566b0aaf798a0dddfc455d1a5b05c424c6686c65
Gitweb: http://git.kernel.org/tip/566b0aaf798a0dddfc455d1a5b05c424c6686c65
Author: jolsa@redhat.com <jolsa@redhat.com>
AuthorDate: Thu, 16 Jul 2009 21:44:26 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 18 Jul 2009 12:21:16 +0200
tracing: Remove unused fields/variables
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1247773468-11594-2-git-send-email-jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/ftrace.c | 3 ---
kernel/trace/trace.c | 3 +--
2 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6227dc8..24e3ff5 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1339,7 +1339,6 @@ struct ftrace_iterator {
unsigned flags;
unsigned char buffer[FTRACE_BUFF_MAX+1];
unsigned buffer_idx;
- unsigned filtered;
};
static void *
@@ -2268,7 +2267,6 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
}
if (isspace(ch)) {
- iter->filtered++;
iter->buffer[iter->buffer_idx] = 0;
ret = ftrace_process_regex(iter->buffer,
iter->buffer_idx, enable);
@@ -2399,7 +2397,6 @@ ftrace_regex_release(struct inode *inode, struct file *file, int enable)
iter = file->private_data;
if (iter->buffer_idx) {
- iter->filtered++;
iter->buffer[iter->buffer_idx] = 0;
ftrace_match_records(iter->buffer, iter->buffer_idx, enable);
}
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 60a4948..e30e6b1 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4265,7 +4265,6 @@ void ftrace_dump(void)
__init static int tracer_alloc_buffers(void)
{
- struct trace_array_cpu *data;
int ring_buf_size;
int i;
int ret = -ENOMEM;
@@ -4315,7 +4314,7 @@ __init static int tracer_alloc_buffers(void)
/* Allocate the first page for all buffers */
for_each_tracing_cpu(i) {
- data = global_trace.data[i] = &per_cpu(global_trace_cpu, i);
+ global_trace.data[i] = &per_cpu(global_trace_cpu, i);
max_tr.data[i] = &per_cpu(max_data, i);
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tip:tracing/core] tracing: Remove .globl in the scripts/recordmcount.pl doc
2009-07-16 19:44 ` [PATCH 3/3] tracing: removing .globl in the scripts/recordmcount.pl doc jolsa
@ 2009-07-18 10:24 ` tip-bot for jolsa@redhat.com
0 siblings, 0 replies; 8+ messages in thread
From: tip-bot for jolsa@redhat.com @ 2009-07-18 10:24 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, mingo, jolsa
Commit-ID: d34a4debef933061924ee17c2ede33f5c44925fb
Gitweb: http://git.kernel.org/tip/d34a4debef933061924ee17c2ede33f5c44925fb
Author: jolsa@redhat.com <jolsa@redhat.com>
AuthorDate: Thu, 16 Jul 2009 21:44:28 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 18 Jul 2009 12:21:17 +0200
tracing: Remove .globl in the scripts/recordmcount.pl doc
I was reading throught the recordmcount.pl starting comment,
and spotted a tiny discrepancy.
The second example is about my_func not being global, but the
example code has the ".globl my_func" statement just moved.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1247773468-11594-4-git-send-email-jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
scripts/recordmcount.pl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 7109e2b..db4ebe1 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -57,7 +57,6 @@
# call mcount (offset: 0x5)
# [...]
# ret
-# .globl my_func
# other_func:
# [...]
# call mcount (offset: 0x1b)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path
2009-07-18 10:16 ` Ingo Molnar
@ 2009-07-19 18:47 ` Jiri Olsa
0 siblings, 0 replies; 8+ messages in thread
From: Jiri Olsa @ 2009-07-19 18:47 UTC (permalink / raw)
To: Ingo Molnar; +Cc: rostedt, linux-kernel, kernel-janitors
On Sat, Jul 18, 2009 at 12:16:53PM +0200, Ingo Molnar wrote:
>
> * jolsa@redhat.com <jolsa@redhat.com> wrote:
>
> > The "struct module*" is not being used in the ftrace_init_module
> > code path, removing it.
> >
> > wbr,
> > jirka
> >
> > Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> >
> > ---
> > arch/x86/kernel/ftrace.c | 3 +--
> > include/linux/ftrace.h | 4 +---
> > kernel/trace/ftrace.c | 25 +++++++++++--------------
> > 3 files changed, 13 insertions(+), 19 deletions(-)
>
> patch didnt apply cleanly to the latest tracing tree:
>
> http://people.redhat.com/mingo/tip.git/README
>
> and the other bits had some fuzz as well. Mind merging + resending
> this?
>
> Ingo
sure, np.. I made it against the linus' tree, I'll use the
tip tree next time
jira
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-19 18:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 19:44 [PATCH 0/3] tracing: minor bugs jolsa
2009-07-16 19:44 ` [PATCH 1/3] tracing: removing not used variables jolsa
2009-07-18 10:24 ` [tip:tracing/core] tracing: Remove unused fields/variables tip-bot for jolsa@redhat.com
2009-07-16 19:44 ` [PATCH 2/3] tracing: removing struct module* parameter from ftrace_init_module code path jolsa
2009-07-18 10:16 ` Ingo Molnar
2009-07-19 18:47 ` Jiri Olsa
2009-07-16 19:44 ` [PATCH 3/3] tracing: removing .globl in the scripts/recordmcount.pl doc jolsa
2009-07-18 10:24 ` [tip:tracing/core] tracing: Remove " tip-bot for jolsa@redhat.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox