Profile Container Targets from the Host
host> docker run --cap-add=SYS_PTRACE -td myimage
host> docker run --privileged -td myimage
Configure and Run an Analysis for a Container Target
- From theWHEREpane of theConfigure Analysiswindow, select theLocal Hostsystem to start analysis from your host Linux system orRemote Linux (SSH)to start analysis from a remote Linux system connected to your host system via SSH. For the remote Linux targets, make sure to configure SSH connection.
- From theWHATsection, specify your analysis target. For container target analysis, the following target types are supported:Attach to ProcessandProfile System.Configure your process or system target as usual using available configuration options.In theProfile Systemmode,VTuneprofilesProfilerallapplications running in the same container or in different containers simultaneously. So, the standard limitation for the system-wide profiling of the managed code is not applicable to Java applications running in the containers.You can attach theVTunerunning under the superuser account to a Java process or a C/C++ application with embedded JVM instance running under a low-privileged user account. For example, you may attach theProfilerVTuneto Java based daemons or services.ProfilerThe dynamic attach mechanism is supported only with the Java Development Kit (JDK).
- From theHOWsection, select an analysis and customize the analysis options, if required.
- ClickStartto launch the analysis.
host> vtune -collect hs -knob sampling-mode=hw -analyze-system -d 60
host> vtune -target-system=ssh:email@example.com -collect hs -knob sampling-mode=hw -target-process=java -d 60