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 support for piggbacking on R-dyntrace #11

Open
aviralg opened this issue Jul 2, 2020 · 0 comments
Open

Add support for piggbacking on R-dyntrace #11

aviralg opened this issue Jul 2, 2020 · 0 comments
Assignees
Labels
enhancement:feature New feature or request

Comments

@aviralg
Copy link
Member

aviralg commented Jul 2, 2020

R-dyntrace provides fine-grained hooks and injectr provides coarse-grained hooks. instrumentr should be a common front-end to both backends.
R-dyntrace should export the hook symbols from libR.so. These should be scanned by instrumentr automatically on load. If no hook symbols are found, then instrumentr should fall back to injectr backend. Otherwise, it should attach callbacks to R-dyntrace hooks. However, the hook symbol exported by R-dyntrace cannot be modified by instrumentr. For this to work, the hook symbols exported by R-dyntrace should do indirection. Instead of directly pointing to the callback, a hook symbol should point to a memory address that will point to the callback. This memory location should be initialized to NULL. On loading, instrumentr should modify this location to point to the callbacks which it implements. This means that the interface for attaching callbacks to R-dyntrace hooks can be eliminated resulting in fewer changes to R.

@aviralg aviralg added the enhancement:feature New feature or request label Jul 2, 2020
@aviralg aviralg self-assigned this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant