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

Dynamic loading of custom passes in wasm-opt #6548

Open
loganek opened this issue Apr 25, 2024 · 1 comment
Open

Dynamic loading of custom passes in wasm-opt #6548

loganek opened this issue Apr 25, 2024 · 1 comment

Comments

@loganek
Copy link

loganek commented Apr 25, 2024

Hi,
I created my own pass that instruments all the malloc/calloc/realloc/free calls in the WASM binary so I can very precisely track the heap memory usage. I don't think my usecase is generic enough to include the pass in the upstream wasm-opt (although I wouldn't mind doing that if maintainers are happy to accept it), so I thought I'll compile it as DSO library and load it dynamically.

I realized that wasm-opt doesn't have an option to dynamically load passes from DSOs; was that functionality ever considered and/or is there a plan to add such feature?

@tlively
Copy link
Member

tlively commented Apr 25, 2024

We've thought in the past that it would be neat to be able to have pass plugins, but we've never made plans to actually work on such a feature.

FWIW, I think we would be happy to take a pass for tracking memory usage upstream.

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

2 participants