Add mapping mode to serializer #1139
Labels
Enhancement
in progress
Major Feature
A new feature that has broad impact on codebase and requires a minimum two week discussion period
Please describe the new features with any relevant use cases.
Plan to add a mode to the simulator that will create a memory map of the objects and variables serialized instead of writing the actual data to a buffer. This map can then be used for interactive introspection and editing of variable values. This is a base functionality for supported interactive debug of components in SST simulations.
Describe the proposed solution you plan to implement
A new MAP mode will be added to the Serializer. The new mode will also require a new function in the serialize and serialize_impl templates to add the variable name to the parameters.
The function:
void operator()(T& t, serializer& ser, const char* name)
Will be added to all the serialize and serialize_impl classes. This function in serialize will check the mode and the version of the function with the name in serialize_impl will only be called if the serializer is in MAP mode. This is mostly so the serialization time critical path used by Events during serialization don't have to pass the extra argument.
There will also be a new API defined in the ObjectMap class that will be the interface for interacting with the variables. The ObjectMap API will include get and set functions based on strings since they are intended to be used interactively through a console. It may make sense later to add a templated type interface for scripting, but this will not be in the first implementation.
Testing plan
Will add mapping tests to the set of core tests. It will use an interactive shell to send the console commands and check the output against a golden file.
The text was updated successfully, but these errors were encountered: