about summary refs log tree commit diff
path: root/benchtests/Makefile
diff options
context:
space:
mode:
authorWangyang Guo <wangyang.guo@intel.com>2022-04-21 03:28:41 +0000
committerH.J. Lu <hjl.tools@gmail.com>2022-04-27 13:41:57 -0700
commit9e5daa1f6a709dd42420f10971889dc1e47b6e92 (patch)
tree0ce769cb83510afbdd62afce1a333f1b8cd0172b /benchtests/Makefile
parent834ddd0432f68d6dc85b6aac95065721af0d86e9 (diff)
downloadglibc-9e5daa1f6a709dd42420f10971889dc1e47b6e92.tar.gz
glibc-9e5daa1f6a709dd42420f10971889dc1e47b6e92.tar.xz
glibc-9e5daa1f6a709dd42420f10971889dc1e47b6e92.zip
benchtests: Add pthread-mutex-locks bench
Benchmark for testing pthread mutex locks performance with different
threads and critical sections.

The test configuration consists of 3 parts:
1. thread number
2. critical-section length
3. non-critical-section length

Thread number starts from 1 and increased by 2x until num of CPU cores
(nprocs). An additional over-saturation case (1.25 * nprocs) is also
included.
Critical-section is represented by a loop of shared do_filler(),
length can be determined by the loop iters.
Non-critical-section is similiar to the critical-section, except it's
based on non-shared do_filler().

Currently, adaptive pthread_mutex lock is tested.
Diffstat (limited to 'benchtests/Makefile')
-rw-r--r--benchtests/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 8dfca592fd..b477042e6c 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -102,6 +102,7 @@ endif
 
 bench-pthread := \
   pthread-locks \
+  pthread-mutex-locks \
   pthread_once \
   thread_create \
 # bench-pthread
@@ -281,6 +282,7 @@ $(addprefix $(objpfx)bench-,$(math-benchset)): $(libm-benchtests)
 $(addprefix $(objpfx)bench-,$(bench-pthread)): $(thread-library-benchtests)
 $(addprefix $(objpfx)bench-,$(bench-malloc)): $(thread-library-benchtests)
 $(addprefix $(objpfx)bench-,pthread-locks): $(libm-benchtests)
+$(addprefix $(objpfx)bench-,pthread-mutex-locks): $(libm-benchtests)