[CRIU] [PATCH 0/4] criu2text

Christopher Covington cov at codeaurora.org
Wed Sep 17 11:28:34 PDT 2014


On 09/17/2014 12:12 PM, Cyrill Gorcunov wrote:
> On Wed, Sep 17, 2014 at 07:59:28PM +0400, Pavel Emelyanov wrote:
>> On 09/17/2014 07:56 PM, Cyrill Gorcunov wrote:
>>> On Fri, Sep 12, 2014 at 02:50:41AM +0300, Ruslan Kuprieiev wrote:
>>>> criu2text is a program written in python to convert criu images
>>>> to/from human readable format. From .img file it produces directory
>>>> with files: magic, 0, 1... File named magic has only criu image magic
>>>> in hex (0x1234) format. Files 0,1... are protobuf messages in protobuf
>>>> text format. Number of files N depends on number of pb entrys stored
>>>> in image file.
>>>
>>> Mind to point why we need this at all? I mean "criu show" already does
>>> almost the same. no?
>>
>> CRIU show doesn't allow to encode text back into pb file.
> 
> Why do we need to modify images at all, just because we can? Don't get
> me wrong I simply don't understand the usage scenario.

I haven't looked at the code closely yet to see if it would really support
these, but:

One usage scenario would be optimization. One could replace poor-performing
code with several different possible optimized versions. By restoring and
profiling modified versions one can measure which version is fastest.

Modifying source code or the ELF works for small programs on fast processors,
but for big programs on slow systems (in particular simulators and FPGAs),
being able to modify the CRIU image would be great.

Another use case might be testing, where you want to supply different inputs
to code at the middle or the end of a program without re-running the beginning
every time.

Christopher

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.


More information about the CRIU mailing list