The AMD uProf CPU Performance Profiling follows a sampling-based approach to gather the profile data periodically. It uses a variety of software and hardware resources available in AMD x86 based processor families. CPU Profiling uses the OS timer, HW Performance Monitor Counters (PMC), and HW IBS feature.
The following section explains the various key concepts related to CPU Profiling.
AMD uProf supports profiling in the virtualized environments. Availability of the profiling features depends on the counters virtualized by the hypervisor manager. Currently, AMD uProf supports the following hypervisors (with Linux and Windows OS as guest on these virtualized environments):
VMWare ESXi
Microsoft Hyper-V
Linux KVM
Citrix Xen
CPU Profiling supports:
Profiling of guest VM from guest VM
Profiling of guest VM from host system (KVM hypervisor)
Microsoft Hyper-V |
Microsoft Hyper-V |
Microsoft Hyper-V |
KVM |
KVM |
VMware ESXi |
VMware ESXi |
Citrix Xen |
Citrix Xen |
|
|---|---|---|---|---|---|---|---|---|---|
Features |
Host Root Partition (system mode) |
Host Root Partition |
Guest VMs |
Host |
Guest VMs |
Host |
Guest VMs |
Host |
Guest VMs |
CPU Profiling |
|||||||||
Time Based Profiling (TBP) |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Micro- architecture Analysis (EBP) |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
No |
No |
Instruction Based Sampling (IBS) |
Yes |
No |
No |
No |
No |
No |
No |
No |
No |
Cache Analysis |
Yes |
No |
No |
No |
No |
No |
No |
No |
No |
HPC – MPI Code Profiling |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
HPC– OpenMP Tracing |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
HPC– MPI Tracing |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
OSTracing |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Power Profiling |
|||||||||
LivePower Profile |
Yes |
Yes |
No |
Yes |
No |
No |
No |
No |
No |
Power Application Analysis |
No |
No |
No |
No |
No |
No |
No |
No |
No |
User Interface |
|||||||||
Graphical Interface |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Command Line |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
API |
|||||||||
ProfileControl API |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
PowerProfiler API |
No |
No |
No |
No |
No |
No |
No |
No |
No |
Instrumental API |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
System Analysis |
|||||||||
AMDuProfPCM |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
No |
No |
AMDuProfSys |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
No |
No |
Scenario: To report any issues observed in the uProf, it might be helpful to generate the logs and pass the log files to uProf team to analyze the issue.
Suggestion/Solution: Follow the steps below to enable logging in uProf before running the use case.
uProfCLI Option |
Description |
|---|---|
|
Use this option to capture the timestamps of the log records. This is same as |
|
Specify the verbosity of log messages generated. Valid values are 1 to 5.
Note Levels are accumulated, for example selecting level 4 means enabling all the levels 1 to 4. |
|
This is a shorthand option for all relevant log settings.
|
|
Specify the path to where log file should be created. If this option is not provided, by default the log file will be created either in path set by Note
|
The default location of the generated log files:
Platform |
Interface |
Default Path |
|---|---|---|
FreeBSD |
CLI |
|
Linux |
GUI |
|
Windows |
GUI |
|
Windows |
CLI |
|
After enabling logging, run the use case to generate the log. The log file can be shared with the uProf team to analyze any issue observed.
AMDuProfPcm option --verbose prints logs to standard output stream. Only available for Perf mode.
To assist with troubleshooting installation issues, you can run the AMDuProf installer from the command line and enable detailed logging. This captures verbose output that may help diagnose problems.
Command Syntax:
AMDuProf-<version>.exe /debuglog"c:\temp\uProfInstallerLogfile.txt"
Where:
AMDuProf-<version>.exe
Replace <version> with the actual version number of the installer you are using.
/debuglog"c:\temp\uProfInstallerLogfile.txt"
This option tells the installer to write detailed log output to the specified file. You can change the path and filename as needed.
Example:
AMDuProf-<version>.exe /debuglog"c:\temp\uProfInstallerLogfile.txt"
Notes:
Ensure that the directory (C:\temp\) exists, or create it before proceeding.
The log file contains detailed information about the installation process. Share this file with support to assist in troubleshooting.
For the processor specific PMC events and their descriptions, refer the following AMD developer documents:
Processor Programming Reference (PPR) for AMD Processors (https://www.amd.com/en/search/documentation/hub.html#sortCriteria=%40amd_release_date%20descending&f-amd_archive_status=Active&f-amd_document_type=Programmer%20References&f-amd_document_location=AMD.com)
Software Optimization Guide for AMD Family 17h Processors (https://docs.amd.com/v/u/en-US/55723_3.01)
Software Optimization Guide for AMD Family 19h Processors (https://docs.amd.com/v/u/en-US/57228)
Software Optimization Guide for AMD Zen4 Processors (https://docs.amd.com/v/u/en-US/57647)
Software Optimization Guide for the AMD Zen5 Microarchitecture (https://docs.amd.com/v/u/en-US/58455_1.00)