mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wang Wensheng <wangwensheng4@huawei.com>
To: <linux-kernel@vger.kernel.org>, <rostedt@goodmis.org>,
	<mhiramat@kernel.org>, <mark.rutland@arm.com>
Cc: <xuqiang36@huawei.com>, <weiyongjun1@huawei.com>,
	<wangwensheng4@huawei.com>
Subject: [PATCH -next 3/3] ftrace: Delete unused variable ftrace_update_time
Date: Wed, 9 Nov 2022 09:44:34 +0000	[thread overview]
Message-ID: <20221109094434.84046-4-wangwensheng4@huawei.com> (raw)
In-Reply-To: <20221109094434.84046-1-wangwensheng4@huawei.com>

ftrace_update_time is not used anywhere else after initialization. So
delete it together with its initial code.

Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 kernel/trace/ftrace.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 43a958b28022..3e102c44b117 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3110,7 +3110,6 @@ int ftrace_shutdown(struct ftrace_ops *ops, int command)
 	return 0;
 }
 
-static u64		ftrace_update_time;
 unsigned long		ftrace_update_tot_cnt;
 unsigned long		ftrace_number_of_pages;
 unsigned long		ftrace_number_of_groups;
@@ -3130,13 +3129,10 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
 	bool init_nop = ftrace_need_init_nop();
 	struct ftrace_page *pg;
 	struct dyn_ftrace *p;
-	u64 start, stop;
 	unsigned long update_cnt = 0;
 	unsigned long rec_flags = 0;
 	int i;
 
-	start = ftrace_now(raw_smp_processor_id());
-
 	/*
 	 * When a module is loaded, this function is called to convert
 	 * the calls to mcount in its text to nops, and also to create
@@ -3173,8 +3169,6 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs)
 		}
 	}
 
-	stop = ftrace_now(raw_smp_processor_id());
-	ftrace_update_time = stop - start;
 	ftrace_update_tot_cnt += update_cnt;
 
 	return 0;
-- 
2.17.1


  parent reply	other threads:[~2022-11-09  9:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  9:44 [PATCH -next 0/3] Optimize code for ftrace Wang Wensheng
2022-11-09  9:44 ` [PATCH -next 1/3] ftrace: Fix the possible incorrect kernel message Wang Wensheng
2022-11-09  9:44 ` [PATCH -next 2/3] ftrace: Optimize the allocation for mcount entries Wang Wensheng
2022-11-09  9:44 ` Wang Wensheng [this message]
2022-11-17 20:36   ` [PATCH -next 3/3] ftrace: Delete unused variable ftrace_update_time 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=20221109094434.84046-4-wangwensheng4@huawei.com \
    --to=wangwensheng4@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=weiyongjun1@huawei.com \
    --cc=xuqiang36@huawei.com \
    /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

all inboxes | Powered by JetHome®