-
Notifications
You must be signed in to change notification settings - Fork 812
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
Application Startup Profiling #726
Comments
One idea would be to run It should alternatively be possible to use the stack walking mechanisms of async-profiler to create a small tool that offers similarity functionality to |
Yep, my point is that AP knows when the JVM is available and running so can classify samples with more accuracy then what I would do myself using 2 separate tools. |
Yes, but I think implementing it directly in the Agent is impossible. I rather envision something like ap-record java -agentlib:libasyncprofiler.so=... Where ap-record is able to set environment variables, so that the agent knows where to look for the recording of the initial few seconds. |
I have made a PoC recently of starting async-profiler as LD_PRELOAD'ed library (spoiler: for profiling native apps), so it's definitely possible to use it for JVM startup, too. |
I'm happy to help in the effort. |
And can schedule some free cycles to help as well, in case (although I know that @apangin is a fast train when he decides to do it :D )
considering how many different tools are required to do the same in the native world, async profiler looks way more appealing to me |
Any progress? I'm happy to work on your PoC. |
Profiling of non-Java processes has been added in #751.
The downside of such a profile is that it does not name any Java frames. Java frame information becomes available after JVM bootstrap has completed, i.e. after JVM TI VMStart even has been sent. Merging two above profiles is possible, but adds redundant complexity/ugliness to the code. I don't think it's worth productizing the feature right now, assuming the existing capabilities are enough to troubleshoot startup issues. |
While profiling an application startup by using async-profiling as an agent there's still the missing bit of info re measuring the runtime bootstrap till agent loading complete; I see this one as an interesting feature to be implemented together with the "classify" one i.e. marking as "bootstraps" the native-only stack-traces of the JVM before "jattach" is available.
I have no idea if it's possible to implement something like that given the current architecture of the profiler, but it would be of great help for applications that need to be restarted/scale-up frequently, providing additional useful informations re hidden and still important costs (compiler threads startup cost, GC threads startup cost, initialization of GC data-structures and/or pre-touch costs, etc etc).
Obviously this means that it cannot be used as an agent anymore :)
The text was updated successfully, but these errors were encountered: