[CRIU] [PATCH 3/3] x86: use breakpoints instead of tracing syscalls

Cyrill Gorcunov gorcunov at gmail.com
Wed Sep 17 01:24:08 PDT 2014


On Wed, Sep 17, 2014 at 12:10:16PM +0400, Andrey Vagin wrote:
> Currently CRIU traces syscalls to catch a moment, when sigreturn() is
> called. Now we trace recv(cmd), close(logfd), close(cmdfd), sigreturn().
> 
> We can reduce a number of steps by using hw breakpoints. A breakpoint is
> set before sigreturn, so we will need to trace only it.
> 
> v2: In the first version a breakpoint is set after sigreturn. In this
> case we have a problem with signals. If a process has pending signals,
> it will start to precess them after exiting from sigreturn(), but before
> returning to userspace. So the breakpoint will not be triggered.
> 
> And at the end Here are a few numbers how we catch sigreturn.
> Before this patch criu executes 57 syscalls and gets 12 signals.
> With this patch criu executes 18 syscalls and gets 5 signals.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>

Good job!


More information about the CRIU mailing list