DescriptionCheckpointing in virtual platforms support many use cases, including saving booted systems for instant access, quick back-up for iterative debug, tracing for architecture, and fuzzing software stacks. For a virtual platform to be checkpointable, all models in the platform must be checkpointable which has proven to be non-trivial. However, it can be simplified by good modeling tool support. The open-source Device Modeling Language (DML) was designed to make checkpointing automatic or at least easy. Over time, models have become more complex, requiring updates to the language and compiler to support the needs of modelers while retaining checkpointing. This presentation describes how DML automatic checkpointing has been extended to internal model variables and events posted with arguments.
With the new extensions, the DML compiler automatically generates the state export and import code necessary for checkpointing, converting internal data types to structured data. The net result is a significant reduction in model source code size and complexity, removing dozens of lines of manually-written code with generation. As a side benefit, it also provides the device internal state as an inspectable object property in the virtual platform.