2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

crit: Pretty print vma flags and status

To better understand the content of mm-<ID>.img and pagemap-<ID>.img
additional constant names have been added to better resolve the hex
value to symbolical names.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Adrian Reber 2015-12-08 16:10:00 +03:00 committed by Pavel Emelyanov
parent 93e996d8ed
commit ff3fb16f14
2 changed files with 24 additions and 1 deletions

View File

@ -7,7 +7,7 @@ message vma_entry {
required uint64 shmid = 4;
required uint32 prot = 5 [(criu).flags = "mmap.prot" ];
required uint32 flags = 6 [(criu).flags = "mmap.flags" ];
required uint32 status = 7;
required uint32 status = 7 [(criu).flags = "mmap.status" ];
/*
* This fd thing is unused in the image, it was lost
* while switching from execve restore model. It is

View File

@ -69,6 +69,28 @@ mmap_flags_map = [
('MAP_SHARED', 0x1),
('MAP_PRIVATE', 0x2),
('MAP_ANON', 0x20),
('MAP_GROWSDOWN', 0x0100),
];
mmap_status_map = [
('VMA_AREA_NONE', 0 << 0),
('VMA_AREA_REGULAR', 1 << 0),
('VMA_AREA_STACK', 1 << 1),
('VMA_AREA_VSYSCALL', 1 << 2),
('VMA_AREA_VDSO', 1 << 3),
('VMA_AREA_HEAP', 1 << 5),
('VMA_FILE_PRIVATE', 1 << 6),
('VMA_FILE_SHARED', 1 << 7),
('VMA_ANON_SHARED', 1 << 8),
('VMA_ANON_PRIVATE', 1 << 9),
('VMA_AREA_SYSVIPC', 1 << 10),
('VMA_AREA_SOCKET', 1 << 11),
('VMA_AREA_VVAR', 1 << 12),
('VMA_AREA_AIORING', 1 << 13),
('VMA_UNSUPP', 1 << 31),
];
rfile_flags_map = [
@ -82,6 +104,7 @@ rfile_flags_map = [
flags_maps = {
'mmap.prot' : mmap_prot_map,
'mmap.flags' : mmap_flags_map,
'mmap.status' : mmap_status_map,
'rfile.flags' : rfile_flags_map,
}