tests: add atomic_add-bench
commit070e3edceaa023109bfa7a1c5c259342e0b6b625
authorEmilio G. Cota <cota@braap.org>
Mon, 27 Jun 2016 19:02:05 +0000 (27 15:02 -0400)
committerRichard Henderson <rth@twiddle.net>
Wed, 26 Oct 2016 15:29:01 +0000 (26 08:29 -0700)
treebecaf5021a41e049e4d992bd062cc0e6c0db6001
parent37b995f6e7a1cb6fa378c5cd4217b9dd9e1fc98b
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>
tests/.gitignore
tests/Makefile.include
tests/atomic_add-bench.c [new file with mode: 0644]