KVM test: Add perfmon into the guest tests
PATCH 1/1 KVM test: Add perfmon into the guest tests
perfmon2 API provides access to the hardware performance counters of modern processors.
Dependency,
To compile the source code of the test, the following packages should be installed,
glibc-static-2.11.1-6.x86_64
glibc-headers-2.11.1-6.x86_64
glibc-common-2.11.1-6.x86_64
glibc-devel-2.11.1-6.x86_64
glibc-2.11.1-6.x86_64Note,
1. libpfm uses the Performance Monitor Unit (PMU) on the processors, but this unit is not provided by kvm currently, i.e. the test should fail in kvm guests.
2. According to the README file of perfmon-tests-0.3, 2.6.24 or higer Linux kernel (with perfmon v2.8 or higher) is needed to run the tests.
--- client/tests/kvm/autotest_control/perfmon.control | 16 ++++++++++++++++ client/tests/kvm/tests_base.cfg.sample | 2 ++ 2 files changed, 18 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/autotest_control/perfmon.control
client/tests/kvm/autotest_control/perfmon.control new file +16 -0
@@ -0,0 +1,16 @@ +TIME="SHORT" +AUTHOR = "Stephane Eranian <[email protected]>" +DOC = """ +This is a simple series of test for the perfmon2 API which +provides access to the hardware performance counters of modern +processors. + +Information about perfmon2 at: +http://perfmon2.sf.net +""" +NAME = 'perfmon' +TEST_CLASS = 'kernel' +TEST_CATEGORY = 'Functional' +TEST_TYPE = 'client' + +job.run_test('perfmon')
client/tests/kvm/tests_base.cfg.sample +2 -0
@@ -151,6 +151,8 @@ variants: test_control_file = scrashme.control - hwclock: test_control_file = hwclock.control + - perfmon: + test_control_file = perfmon.control - linux_s3: install setup unattended_install type = linux_s3
Quoted 12 lines · Chen Cao
perfmon2 API provides access to the hardware performance counters of modern processors.
Dependency,
To compile the source code of the test, the following packages should be installed,glibc-static-2.11.1-6.x86_64 glibc-headers-2.11.1-6.x86_64 glibc-common-2.11.1-6.x86_64 glibc-devel-2.11.1-6.x86_64 glibc-2.11.1-6.x86_64
Quoted 6 lines
Note,
1. libpfm uses the Performance Monitor Unit (PMU) on the processors, but this unit is not provided by kvm currently, i.e. the test should fail in kvm guests.
2. According to the README file of perfmon-tests-0.3, 2.6.24 or higer Linux kernel (with perfmon v2.8 or higher) is needed to run the tests.
I thought perfmon2 was deprecated in favor of perf_event.c ? The only reference left for perfmon2 in the kernel is in the ia64 tree, and KVM/ia64 seems to be pretty dead these days.
Cheers,
Jes
Quoted 20 lines · Jes Sorensen
Quoted 12 lines · Chen Cao
perfmon2 API provides access to the hardware performance counters of modern processors.
Dependency,
To compile the source code of the test, the following packages should be installed,glibc-static-2.11.1-6.x86_64 glibc-headers-2.11.1-6.x86_64 glibc-common-2.11.1-6.x86_64 glibc-devel-2.11.1-6.x86_64 glibc-2.11.1-6.x86_64Quoted 6 lines
Note,
1. libpfm uses the Performance Monitor Unit (PMU) on the processors, but this unit is not provided by kvm currently, i.e. the test should fail in kvm guests.
2. According to the README file of perfmon-tests-0.3, 2.6.24 or higer Linux kernel (with perfmon v2.8 or higher) is needed to run the tests.
Quoted 4 lines
I thought perfmon2 was deprecated in favor of
perf_event.c? The only reference left for perfmon2 in the kernel is in the ia64 tree, and KVM/ia64 seems to be pretty dead these days.
Jes,
Thank you for reminding.
I have not noticed your mail this afternoon and resent the patches for the perfmon test, it seems that i may have made a mistake.
by the way, could you tell me how to verify that "perfmon2 was deprecated in favor of perf_event.c", except looking into the kernel code?
Regards,
Cao, Chen
2010/05/27
Quoted 9 lines · Chen Cao
Jes,
Thank you for reminding.
I have not noticed your mail this afternoon and resent the patches for the perfmon test, it seems that i may have made a mistake.by the way, could you tell me how to verify that "perfmon2 was deprecated in favor of
perf_event.c", except looking into the kernel code?
Hi Chen,
I went and checked with people in the community, and I can confirm that perfmon2 is deprecated for everything but ia64. Since KVM/ia64 is pretty stale and I doubt it even works, I would not recommend for pushing perfmon2 tests into autotest at this point.
As for how to see it, then I don't think there really is a way except for looking at the code.
Cheers,
Jes
PS: Please don't CC closed mailing lists when posting to public lists like the KVM list.