Support micro operation measurement on arm64
v3 cover Support micro operation measurement on arm64
I dropped the version numbers, but this is v4 of Shih-Wei Li's series of the same name, last posted in January. I took the liberty of incorporating all the comments v3 had, plus making some other cleanup tweaks. These tests are too nice to let them slip away, let's get them reviewed and merged.
v3:
- add missing breaks in switch statement [Shih-Wei]
v2:
- add missing 'L' in 'UL' for PS_PER_SEC. There's a lot of picoseconds in a second!
Thanks,
drew
Shih-Wei Li (2):
arm/arm64: add GICD_IIDR definition
arm64: add micro-bench
arm/Makefile.arm64 | 1 + arm/micro-bench.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ arm/unittests.cfg | 8 ++ lib/arm/asm/gic.h | 1 + 4 files changed, 225 insertions(+) create mode 100644 arm/micro-bench.c
Signature · 1 line
2.17.1
PATCH v3 1/2 arm/arm64: add GICD_IIDR definition
From: Shih-Wei Li <[email protected]>
--- lib/arm/asm/gic.h | 1 + 1 file changed, 1 insertion(+)
lib/arm/asm/gic.h +1 -0
@@ -10,6 +10,7 @@/* Distributor registers */ #define GICD_CTLR 0x0000#define GICD_TYPER 0x0004 +#define GICD_IIDR 0x0008#define GICD_IGROUPR 0x0080#define GICD_ISENABLER 0x0100#define GICD_ISPENDR 0x0200
Signature · 1 line
2.17.1
PATCH v3 2/2 arm64: add micro-bench
In reply to Andrew JonesFrom: Shih-Wei Li <[email protected]>
Here we provide the support for measuring various micro level operations on arm64. Measurements are currently obtained using timer counters. Further modifications in KVM will be required to support timestamping using cycle counters, as KVM now disables accesses to the PMU counters from the VM.
--- arm/Makefile.arm64 | 1 + arm/micro-bench.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ arm/unittests.cfg | 8 ++ 3 files changed, 224 insertions(+) create mode 100644 arm/micro-bench.c
arm/Makefile.arm64 +1 -0
@@ -15,6 +15,7 @@ OBJDIRS += lib/arm64 # arm64 specific tests tests = $(TEST_DIR)/timer.flat +tests += $(TEST_DIR)/micro-bench.flat include $(SRCDIR)/$(TEST_DIR)/Makefile.common
arm/micro-bench.c new file +215 -0
215 lines not on this page · raw message
arm/unittests.cfg +8 -0
@@ -116,3 +116,11 @@ file = timer.flat groups = timer timeout = 2s arch = arm64 + +# Exit tests +[micro-bench] +file = micro-bench.flat +smp = 2 +groups = nodefault,micro-bench +accel = kvm +arch = arm64
Signature · 1 line
2.17.1