GeezerVison is showing github.com — Binary launcher · Issue #724 · async-profiler/async-profiler
Description
Background
async-profiler currently includes the following components:
libasyncProfiler.so - profiler engine that works in the context of Java process;
jattach - utility to inject the profiler engine into the target JVM;
fdtransfer - helper for profiling containerized applications;
profiler.sh - profiler command-line interface written in shell script.
The package has non-standard structure: with binaries in the build folder and CLI together with the documentation in the root folder.
Proposal
- Reshape the package to a more conventional structure:
/bin directory with the profiler launcher;
/lib with libasyncProfiler.so.
- Make the launcher a binary executable
asprof instead of profiler.sh.
- Incorporate the functionality of
jattach and fdtransfer in the launcher, so the package contains no other executables besides asprof.
Motivation
- Intuitive usage.
- Simpler deployment / integration.
- Less typing.
- Preparation for building packages in commonly used formats: RPM, DEB, etc.
- More flexibility, e.g., the binary launcher may in future switch between host and container namespaces to provide seamless user experience: automatically copy the profiler library into the container and get the output from the container.
- The same statically linked executable may work both with glibc and musl.
Non-goals
- There is no intention to change existing command line syntax, except for minor nuances.
Target release
async-profiler 3.x
Reacted by Yonatan Goldschmidt, Drew Hammond, Denis M. Gabaydulin and Ismael Juma
Reacted by Kemal Akkoyun and Ismael Juma
Activity
v-thakkar commented on Mar 27, 2023
Hi @apangin ! This seems like a nice initiative. I am wondering if you plan to have any changes in the libasyncprofiler.so as part of this issue? Asking because we're currently in the process of embedding async-profiler in parca-agent and our plan is to have our own profiler launcher (replacement for profiler.sh) that hooks into arguments.h via shared object. We don't plan to use fdtransfer but we do plan to use jattach. So, I just wanted to have more details about this work than the one that has been already merged, just so we can plan our architecture accordingly. Thanks for your work on async-profiler. We're very excited to use it. 🎉
apangin commented on Mar 28, 2023
CollaboratorAuthor
More actions
@v-thakkar The proposed change does not affect the API of the agent library. libasyncProfiler.so should remain intact.
jattach will not be bundled with async-profiler anymore, however, it will be still possible to load libasyncProfiler.so using a separate jattach binary.
Reacted by Vaishali Thakkar and Kemal Akkoyun
Reacted by Brice Dutheil
apangin commented on Mar 30, 2023
CollaboratorAuthor
More actions
Binary launcher has been integrated; directory structure has been changed; profiler.sh, jattach and fdtransfer are no longer bundled with async-profiler.
Futher work (e.g. packaging and better container support) will be done in separate issues.
Reacted by Vaishali Thakkar
Metadata
Metadata
Development
No branches or pull requestsIssue actions