Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDEV CPU profiler to profile an app running in a Docker container

User749809-OracleFeb 4 2020 — edited Feb 4 2020

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?

Comments
Post Details
Added on Feb 4 2020
1 comment
185 views