[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1425306312-3437-35-git-send-email-wangnan0@huawei.com>
Date: Mon, 2 Mar 2015 22:25:12 +0800
From: Wang Nan <wangnan0@...wei.com>
To: <rostedt@...dmis.org>, <masami.hiramatsu.pt@...achi.com>,
<mingo@...e.hu>, <linux@....linux.org.uk>, <tixy@...aro.org>
CC: <lizefan@...wei.com>, <linux-kernel@...r.kernel.org>,
<x86@...nel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: [RFC PATCH v4 34/34] early kprobes: enable optimization of kprobes on ftrace before ftrace is ready.
Uses ftrace_process_loc_early() introduced by previous patch to
convert ftrace entries to nops before ftrace_init(). For x86, original
kprobe entries are 'call' and are optimizable only after this conversion.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
---
kernel/kprobes.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 56fb8c8..1ec8e6e 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1602,6 +1602,9 @@ int register_kprobe(struct kprobe *p)
goto out;
}
+ if (p->flags & KPROBE_FLAG_FTRACE_EARLY)
+ ftrace_process_loc_early((unsigned long)p->addr);
+
mutex_lock(&text_mutex); /* Avoiding text modification */
ret = prepare_kprobe(p);
mutex_unlock(&text_mutex);
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists