criu dump: don't require -t

and warn if it is used.

v2: fix help text as well

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
timer: use a correct value for dumping usecs

Signed-off-by: Pavel Tikhomirov <snorcht@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
crtools: Sanitize "action" (argv[1]) parsing

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Documentation/Makefile: fix clean target

...after commit 1e1bf24

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
README: crtools to criu rename

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cr-restore.c: fix a typo in a comment

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Change crtools to criu in criu messages

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Change crtools to criu in comments

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
util: Move user-per-sec constant into util.h header

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
stats: Protobuf file introduction introduction

We'll have one more "image" file generated by dump and (surprisingly)
restore commands -- the stats one. It will contain in a single pb
object all the statistics collected by dump/restore.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
stats: Write dump stats after dump is finished

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pb: Allow for nested messages pretty specification

It's not perfect, only the depth is taken into account,
not the field number, but this is OK for now.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
stats: Dump-time statistics

Basic timings for dump (freeze, frozen, mem dump).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
cr: Remove opts argument from cr_dump_tasks

Options are collected in global variable, no need to have them on stack.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Cleanup dump_pages_seized arguments and declaration

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
pages: Rename parasite args->nr to args->nr_segs

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mem: Place mprotect and dump_pages args in one parasite args area

This is required for (soon to be) pre-dump command -- this command
will have to keep parasite args with pagemap (iovecs) some time after
parasite is executed. Since we call mprotect cmd _after_ pages dump
we can thus spoil these iovecs. To address this vmas to mprotect and
iovecs to dump are located in one parasite args area one after another
without intersections.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mem-snap: Redefine CLI options for mem snapshot

They are not documented, thus OK for now. Two options --
* one to specify where the parent images are
* one to reset dirty memory tracking

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
dump: Collect pstree IDs separately from pstree items

For pre-dump we won't need IDs, but will need items only,
thus make these two calls separate.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
test: Rename mem-snap/run.sh into run-snap.sh

There will be more tests on memory snapshot.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>