Re: [PATCH 0/3] Add perf event support for guest VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Series applied, thanks.

Huacai

On Mon, Feb 24, 2025 at 5:56 PM Bibo Mao <maobibo@xxxxxxxxxxx> wrote:
>
> From perf pmu interrupt is normal IRQ rather than NMI, so code cannot be
> profiled if interrupt is disabled. However it is possible to profile
> guest kernel in this situation from host side, profile result is more
> accurate from host than that from guest.
>
> Perf event support for guest VM is added here, and the below is the
> example:
> perf kvm --host --guest --guestkallsyms=guest-kallsyms
>      --guestmodules=guest-modules  top
>
> Overhead  Shared Object               Symbol
>   20.02%  [guest.kernel]              [g] __arch_cpu_idle
>   16.74%  [guest.kernel]              [g] queued_spin_lock_slowpath
>   10.05%  [kernel]                    [k] __arch_cpu_idle
>    2.00%  [guest.kernel]              [g] clear_page
>    1.62%  [guest.kernel]              [g] copy_page
>    1.50%  [guest.kernel]              [g] next_uptodate_folio
>    1.41%  [guest.kernel]              [g] queued_write_lock_slowpath
>    1.41%  [guest.kernel]              [g] unmap_page_range
>    1.36%  [guest.kernel]              [g] mod_objcg_state
>    1.30%  [guest.kernel]              [g] osq_lock
>    1.28%  [guest.kernel]              [g] __slab_free
>    0.98%  [guest.kernel]              [g] copy_page_range
>
> Bibo Mao (3):
>   LoongArch: KVM: Add stub for kvm_arch_vcpu_preempted_in_kernel
>   LoongArch: KVM: Implement arch specified functions for guest perf
>   LoongArch: KVM: Register perf callback for guest
>
>  arch/loongarch/include/asm/kvm_host.h |  2 ++
>  arch/loongarch/kvm/Kconfig            |  1 +
>  arch/loongarch/kvm/main.c             |  2 ++
>  arch/loongarch/kvm/vcpu.c             | 31 +++++++++++++++++++++++++++
>  4 files changed, 36 insertions(+)
>
>
> base-commit: 2408a807bfc3f738850ef5ad5e3fd59d66168996
> --
> 2.39.3
>
>





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux