AMD uProf CLI contains the following options to support the guest OS profiling from
the host
OS:
$ ./AMDuProfCLI collect [--kvm-guest <pid>] [--guest-kallsyms <path>] [--guest-modules <path>] [--guest-search-path
<path>] ....
The following table lists the Collect command options.
| Arguments | Options | Description |
|---|---|---|
--kvm-guest
|
PID of qemu-kvm process to be profiled. |
Collect guest-side performance profile. This option collects KVM guest symbols information. |
--guest-kallsyms
|
Pathof guest/proc/kallsyms copied on local
host. |
GuestOS/proc/kallsymsfile copy. AMD uProf reads it to get guest kernel symbols. You can copy it from the guest OS. |
--guest-modules
|
Path of guest/proc/modules copied on local
host. |
GuestOS/proc/modulesfile copy. AMD uProf reads it to get the guest kernel module information. You can copy it from the guest OS. |
--guest-search- path
|
Path of guest vmlinux and kernel sources copied on local host. | GuestOS vmlinux and search directory. AMD uProf reads it to resolve the guest kernel module information. You can copy it from the guest OS. |
Examples
Get the kvm guest OS
PID.
$ ps aux | grep kvm
Collecting pmcx76 event data for 10 secs (for guest kallsyms and guest kernel
modules).
$ ./AMDuProfCLI collect -e event=pmcx76,interval=250000 -o /tmp/cpuprof-76-guest-only -d 10 -
-kvm-guest 2444 --guest-kallsyms /home/amd/guest/guest-kallsyms --guest-modules /home/amd/ guest/guest-module
Generate report from the collected
data.
$ ./AMDuProfCLI report -i /tmp/cpuprof-76-guest-only/AMDuProf-SWP-EBP_Nov-08-2021_15-00-33
Collecting pmcx76 event data for 10 secs (for guest
kallsyms).
$ ./AMDuProfCLI collect -e event=pmcx76,interval=250000 -o /tmp/cpuprof-76-guest-only -d 10 -
-kvm-guest 2444 --guest-kallsyms /home/amd/guest/guest-kallsyms
Generate report from the collected
data.
$ ./AMDuProfCLI report -i /tmp/cpuprof-76-guest-only/AMDuProf-SWP-EBP_Nov-08-2021_15-00-33
Collecting system-wide samples for pmcx76 event data for 10 secs (for guest kallsyms
and guest kernel
modules).
$ ./AMDuProfCLI collect -e event=pmcx76,interval=250000 -o /tmp/cpuprof-76-guest-only -d 10 -
-kvm-guest 2444 --guest-kallsyms /home/amd/guest/guest-kallsyms --guest-modules /home/amd/ guest/guest-module -a
Generate report from the collected
data.
$ ./AMDuProfCLI report -i /tmp/cpuprof-76-guest-only/AMDuProf-SWP-EBP_Nov-08-2021_15-00-33
Collecting system-wide samples for pmcx76 event data for 10 secs (for guest
kallsyms).
$ ./AMDuProfCLI collect -e event=pmcx76,interval=250000 -o /tmp/cpuprof-76-guest-only -d 10 -
-kvm-guest 2444 --guest-kallsyms /home/amd/guest/guest-kallsyms -a
Generate report from the collected
data
$ ./AMDuProfCLI report -i /tmp/cpuprof-76-guest-only/AMDuProf-SWP-EBP_Nov-08-2021_15-00-33