Commit 18a5c90c authored by Pavel Emelyanov's avatar Pavel Emelyanov

collect: Add comment describing collect order

With packed reg-files we have a complex fd - file - vma - remap interaction. I
think this should be reflected in the code comment.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 490efb46
...@@ -119,6 +119,15 @@ static int crtools_prepare_shared(void) ...@@ -119,6 +119,15 @@ static int crtools_prepare_shared(void)
return 0; return 0;
} }
/*
* Collect order information:
* - reg_file should be before remap, as the latter needs
* to find file_desc objects
* - per-pid collects (mm and fd) should be after remap and
* reg_file since both per-pid ones need to get fdesc-s
* and bump counters on remaps if they exist
*/
static struct collect_image_info *cinfos[] = { static struct collect_image_info *cinfos[] = {
&reg_file_cinfo, &reg_file_cinfo,
&remap_cinfo, &remap_cinfo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment