From: Jiri Olsa <jolsa@redhat.com>
To: rostedt@goodmis.org, fweisbec@gmail.com, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 2/4] ftrace: Remove unused ftrace_update_time variable/code
Date: Wed, 25 Apr 2012 10:23:37 +0200 [thread overview]
Message-ID: <1335342219-2782-3-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1335342219-2782-1-git-send-email-jolsa@redhat.com>
The update time of the records update is meassured but never
used. It was probably dropped along the way, removing it.
Also changing ftrace_update_cnt static variable into automatic,
since it's used only in ftrace_update_code function.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
kernel/trace/ftrace.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 6e6c51a..b3ceecd 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1920,9 +1920,7 @@ static void ftrace_shutdown_sysctl(void)
ftrace_run_update_code(FTRACE_DISABLE_CALLS);
}
-static cycle_t ftrace_update_time;
-static unsigned long ftrace_update_cnt;
-unsigned long ftrace_update_tot_cnt;
+unsigned long ftrace_update_tot_cnt;
static int ops_traces_mod(struct ftrace_ops *ops)
{
@@ -1936,8 +1934,7 @@ static int ftrace_update_code(struct module *mod)
{
struct ftrace_page *pg;
struct dyn_ftrace *p;
- cycle_t start, stop;
- unsigned long ref = 0;
+ unsigned long ref = 0, cnt = 0;
int i;
/*
@@ -1957,9 +1954,6 @@ static int ftrace_update_code(struct module *mod)
}
}
- start = ftrace_now(raw_smp_processor_id());
- ftrace_update_cnt = 0;
-
for (pg = ftrace_new_pgs; pg; pg = pg->next) {
for (i = 0; i < pg->index; i++) {
@@ -1977,7 +1971,7 @@ static int ftrace_update_code(struct module *mod)
if (!ftrace_code_disable(mod, p))
break;
- ftrace_update_cnt++;
+ cnt++;
/*
* If the tracing is enabled, go ahead and enable the record.
@@ -1997,11 +1991,7 @@ static int ftrace_update_code(struct module *mod)
}
ftrace_new_pgs = NULL;
-
- stop = ftrace_now(raw_smp_processor_id());
- ftrace_update_time = stop - start;
- ftrace_update_tot_cnt += ftrace_update_cnt;
-
+ ftrace_update_tot_cnt += cnt;
return 0;
}
--
1.7.1
next prev parent reply other threads:[~2012-04-25 8:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 8:23 [PATCH 0/4] tracing: Various cleanups Jiri Olsa
2012-04-25 8:23 ` [PATCH 1/4] ftrace: Remove unused code ftrace related code Jiri Olsa
2012-04-25 11:21 ` Steven Rostedt
2012-04-25 11:34 ` Jiri Olsa
2012-04-25 8:23 ` Jiri Olsa [this message]
2012-04-25 11:26 ` [PATCH 2/4] ftrace: Remove unused ftrace_update_time variable/code Steven Rostedt
2012-04-25 8:23 ` [PATCH 3/4] ftrace: No return value for ftrace_process_locs Jiri Olsa
2012-04-25 11:29 ` Steven Rostedt
2012-05-08 14:19 ` Steven Rostedt
2012-05-12 15:01 ` Jiri Olsa
2012-04-25 8:23 ` [PATCH 4/4] tracing: Use seq_*_private interface for some seq files Jiri Olsa
2012-05-10 8:56 ` [tip:perf/core] " tip-bot for Jiri Olsa
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=1335342219-2782-3-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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;
as well as URLs for NNTP newsgroup(s).