diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-02-11 10:41:53 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-02-11 10:41:53 +0100 |
commit | a3d4fd7a2d81604fedfa270d29c824b8d3380c2e (patch) | |
tree | 1bd1defbfe3f285dfa7c77f94bc5523ac4a82679 /arch | |
parent | 661e591525ffbb0439270bf2a4d165c04f87543d (diff) | |
parent | b2fe8ba674e8acbb9e8e63510b802c6d054d88a3 (diff) | |
download | lwn-a3d4fd7a2d81604fedfa270d29c824b8d3380c2e.tar.gz lwn-a3d4fd7a2d81604fedfa270d29c824b8d3380c2e.zip |
Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/core
Improve uprobes performance by adding 'pre-filtering' support,
by Oleg Nesterov:
# time perl -e 'syscall -1 for 1..100_000'
real 0m0.040s
user 0m0.027s
sys 0m0.010s
# perf probe -x /lib/libc.so.6 syscall
# perf record -e probe_libc:syscall sleep 100 &
Before this series:
# time perl -e 'syscall -1 for 1..100_000'
real 0m1.714s
user 0m0.103s
sys 0m1.607s
After:
# time perl -e 'syscall -1 for 1..100_000'
real 0m0.037s
user 0m0.013s
sys 0m0.023s
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/uprobes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index c71025b67462..0ba4cfb4f412 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c @@ -680,8 +680,10 @@ static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) if (auprobe->insn[i] == 0x66) continue; - if (auprobe->insn[i] == 0x90) + if (auprobe->insn[i] == 0x90) { + regs->ip += i + 1; return true; + } break; } |