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 framework and database for VM introspection data from debug data #191

Open
fabled opened this issue Oct 14, 2024 · 0 comments
Open

Add framework and database for VM introspection data from debug data #191

fabled opened this issue Oct 14, 2024 · 0 comments

Comments

@fabled
Copy link
Contributor

fabled commented Oct 14, 2024

Problem Statement

In general, if the VM contains introspection data, we extract it from the VM ELF directly. This is the case for e.g. HotSpot, V8 and to some pieces of Python.

However, several interpreters (Perl, PHP, Ruby, pieces of Python) need to track the introspection data (structure member offsets, sizes etc.) to be able to extract the symbolization information. This information is recorded in the HA code and looked up based on the VM version.

Tracking this information is currently manual work to some extent. Some gdb scripting that can automate extracting this from the debug data is done already for PHP and Ruby.

Success Criteria

Ideally we construct a consistent framework so that this information can be automatically extracted and stored in a database (e.g. JSON encoded file, some local database, or even some network accessible database).

The HA interpreter plugin code should be updated to use the framework to get the introspection data from this database.

If a new interpreter version comes and there is no breaking changing on the internals, adding support for it should be as easy as running the scripting to builds new introspection data entry and committing it. Code changes should not be required.

Some interpreters like perl may have build-time options that affect the layout of the structures. This should be accommodated in the design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant