aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.include
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2016-06-27 15:02:05 -0400
committerRichard Henderson <rth@twiddle.net>2016-10-26 08:29:01 -0700
commit070e3edceaa023109bfa7a1c5c259342e0b6b625 (patch)
treebecaf5021a41e049e4d992bd062cc0e6c0db6001 /tests/Makefile.include
parent37b995f6e7a1cb6fa378c5cd4217b9dd9e1fc98b (diff)
tests: add atomic_add-bench
With this microbenchmark we can measure the overhead of emulating atomic instructions with a configurable degree of contention. The benchmark spawns $n threads, each performing $o atomic ops (additions) in a loop. Each atomic operation is performed on a different cache line (assuming lines are 64b long) that is randomly selected from a range [0, $r). [ Note: each $foo corresponds to a -foo flag ] Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-Id: <1467054136-10430-20-git-send-email-cota@braap.org>
Diffstat (limited to 'tests/Makefile.include')
-rw-r--r--tests/Makefile.include4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index cd058efc14..22656eaf26 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -460,7 +460,8 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
tests/test-opts-visitor.o tests/test-qmp-event.o \
tests/rcutorture.o tests/test-rcu-list.o \
tests/test-qdist.o \
- tests/test-qht.o tests/qht-bench.o tests/test-qht-par.o
+ tests/test-qht.o tests/qht-bench.o tests/test-qht-par.o \
+ tests/atomic_add-bench.o
$(test-obj-y): QEMU_INCLUDES += -Itests
QEMU_CFLAGS += -I$(SRC_PATH)/tests
@@ -507,6 +508,7 @@ tests/test-qht$(EXESUF): tests/test-qht.o $(test-util-obj-y)
tests/test-qht-par$(EXESUF): tests/test-qht-par.o tests/qht-bench$(EXESUF) $(test-util-obj-y)
tests/qht-bench$(EXESUF): tests/qht-bench.o $(test-util-obj-y)
tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y)
+tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y)
tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\