How do we use JDEV CPU profiler to profile an app running in a Docker container?
I am using Jdev Studio Edition 12.2.1.0.0. I see that under Run, there is an option to attach to external process.
As part of Attach Settings, if I select Manually Started remote Java Process it gives the following steps -
Step 1: Make sure the target application is configured to run using Java 6+. Click to update steps for profiling JDK 5 applications.
Step 2: If you have not done it before create a Remote profiling pack for the selected OS & JVM and upload it to the remote system. Remote profiling pack root directory will be referred to as <remote>.
Step 3: If you have not run profiling on the remote system yet, run the <remote>/bin/calibrate-16.sh script first to calibrate the profiler.
Step 4: Add the following parameter(s) to the application startup script (copy to clipboard):
-XX:+UseLinuxPosixThreadCPUClocks -agentpath:<remote>/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so=<remote>/lib,5140
Step 5: Start the target application. The process will wait for the profiler to connect.
Step 6: Submit this dialog and click the Attach button to connect to the target application and resume its execution.
Are these applicable for profiling an app in Docker container?