Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mapping mode to serializer #1139

Open
feldergast opened this issue Sep 26, 2024 · 0 comments
Open

Add mapping mode to serializer #1139

feldergast opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels
Enhancement in progress Major Feature A new feature that has broad impact on codebase and requires a minimum two week discussion period

Comments

@feldergast
Copy link
Contributor

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.

@feldergast feldergast added Enhancement in progress Major Feature A new feature that has broad impact on codebase and requires a minimum two week discussion period labels Sep 26, 2024
@feldergast feldergast self-assigned this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement in progress Major Feature A new feature that has broad impact on codebase and requires a minimum two week discussion period
Projects
None yet
Development

No branches or pull requests

1 participant