summaryrefslogtreecommitdiff
path: root/performance-tests/Synch-Benchmarks
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-17 07:23:54 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-17 07:23:54 +0000
commit19e917be4ec7bef552676248f04db826b1aab1f9 (patch)
treed6bdf8f338debd78dc1b21d81b5395fcd6d2618c /performance-tests/Synch-Benchmarks
parent8e2768124bc959f0d1160bb83e64bafef70d39a5 (diff)
downloadATCD-19e917be4ec7bef552676248f04db826b1aab1f9.tar.gz
More new stuff
Diffstat (limited to 'performance-tests/Synch-Benchmarks')
-rw-r--r--performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.cpp49
-rw-r--r--performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.h24
-rw-r--r--performance-tests/Synch-Benchmarks/Makefile245
-rw-r--r--performance-tests/Synch-Benchmarks/adaptive_lock_test.cpp92
-rw-r--r--performance-tests/Synch-Benchmarks/adaptive_mutex_test.cpp36
-rw-r--r--performance-tests/Synch-Benchmarks/adaptive_recursive_lock_test.cpp36
-rw-r--r--performance-tests/Synch-Benchmarks/adaptive_sema_test.cpp41
-rw-r--r--performance-tests/Synch-Benchmarks/svc.conf7
8 files changed, 432 insertions, 98 deletions
diff --git a/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.cpp b/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.cpp
new file mode 100644
index 00000000000..0c8871a96dd
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.cpp
@@ -0,0 +1,49 @@
+// $Id$
+
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
+#include "Performance_Test_Options.h"
+#include "Adaptive_Lock_Performance_Test_Base.h"
+
+ACE_RCSID(Synch_Benchmarks, Adaptive_Lock_Performance_Test_Base_, "$Id$")
+
+#if defined (ACE_HAS_THREADS)
+
+ACE_Lock *Adaptive_Lock_Performance_Test_Base::lock_ = 0;
+
+int
+Adaptive_Lock_Performance_Test_Base::fini (void)
+{
+ delete Adaptive_Lock_Performance_Test_Base::lock_;
+ Adaptive_Lock_Performance_Test_Base::lock_ = 0;
+ return 0;
+}
+
+int
+Adaptive_Lock_Performance_Test_Base::svc (void)
+{
+ // Extract out the unique thread-specific value to be used as an
+ // index...
+ int ni = this->thr_id ();
+ synch_count = 2;
+
+ while (!this->done ())
+ {
+ Adaptive_Lock_Performance_Test_Base::lock_->acquire ();
+ options.thr_work_count[ni]++;
+ buffer++;
+ Adaptive_Lock_Performance_Test_Base::lock_->release ();
+ }
+ /* NOTREACHED */
+ return 0;
+}
+
+int
+Adaptive_Lock_Performance_Test_Base::set_lock (ACE_Lock *lock)
+{
+ delete Adaptive_Lock_Performance_Test_Base::lock_;
+ Adaptive_Lock_Performance_Test_Base::lock_ = lock;
+ return (Adaptive_Lock_Performance_Test_Base::lock_ != 0 ? 0 : -1);
+}
+
+#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.h b/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.h
new file mode 100644
index 00000000000..1845c06d023
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/Adaptive_Lock_Performance_Test_Base.h
@@ -0,0 +1,24 @@
+// $Id$
+
+#if !defined (ACE_ADAPTIVE_LOCK_PERFORMANCE_TEST_BASE_H)
+#define ACE_ADAPTIVE_LOCK_PERFORMANCE_TEST_BASE_H
+#include "Benchmark_Performance.h"
+
+ACE_RCSID(Synch_Benchmarks, Adaptive_Lock_Performance_Test_Base, "$Id$")
+
+#if defined (ACE_HAS_THREADS)
+
+class ACE_Svc_Export Adaptive_Lock_Performance_Test_Base : public Benchmark_Performance
+{
+public:
+ virtual int init (int, char *[]) = 0;
+ virtual int fini (void);
+ virtual int svc (void);
+
+ int set_lock (ACE_Lock *lock);
+
+private:
+ static ACE_Lock *lock_;
+};
+#endif /* ACE_HAS_THREADS */
+#endif /* ACE_ADAPTIVE_LOCK_PERFORMANCE_TEST_BASE_H */
diff --git a/performance-tests/Synch-Benchmarks/Makefile b/performance-tests/Synch-Benchmarks/Makefile
index a82d346d6b4..e19281f8a84 100644
--- a/performance-tests/Synch-Benchmarks/Makefile
+++ b/performance-tests/Synch-Benchmarks/Makefile
@@ -28,7 +28,10 @@ FILES = Benchmark_Base \
memory_test \
pipe_thr_test \
pipe_proc_test \
- adaptive_lock_test
+ Adaptive_Lock_Performance_Test_Base \
+ adaptive_mutex_test \
+ adaptive_recursive_lock_test \
+ adaptive_sema_test
LSRC = $(addsuffix .cpp,$(FILES))
LOBJ = $(LSRC:%.cpp=$(VDIR)%.o)
@@ -1424,7 +1427,8 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
$(ACE_ROOT)/ace/Service_Types.h \
$(ACE_ROOT)/ace/Service_Types.i \
$(ACE_ROOT)/ace/Service_Repository.i
-.obj/adaptive_lock_test.o .obj/adaptive_lock_test.so .shobj/adaptive_lock_test.o .shobj/adaptive_lock_test.so: adaptive_lock_test.cpp \
+.obj/Adaptive_Lock_Performance_Test_Base.o .obj/Adaptive_Lock_Performance_Test_Base.so .shobj/Adaptive_Lock_Performance_Test_Base.o .shobj/Adaptive_Lock_Performance_Test_Base.so: \
+ Adaptive_Lock_Performance_Test_Base.cpp \
$(ACE_ROOT)/ace/Synch.h \
$(ACE_ROOT)/ace/ACE.h \
$(ACE_ROOT)/ace/OS.h \
@@ -1489,12 +1493,247 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
Performance_Test_Options.i \
$(ACE_ROOT)/ace/Get_Opt.h \
$(ACE_ROOT)/ace/Get_Opt.i \
- Benchmark_Performance.h Benchmark_Base.h \
+ Adaptive_Lock_Performance_Test_Base.h Benchmark_Performance.h \
+ Benchmark_Base.h \
+ $(ACE_ROOT)/ace/Service_Config.h \
+ $(ACE_ROOT)/ace/Service_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.i \
+ $(ACE_ROOT)/ace/Service_Object.i \
+ $(ACE_ROOT)/ace/SString.h \
+ $(ACE_ROOT)/ace/SString.i \
+ $(ACE_ROOT)/ace/Service_Config.i \
+ $(ACE_ROOT)/ace/Reactor.h \
+ $(ACE_ROOT)/ace/Handle_Set.h \
+ $(ACE_ROOT)/ace/Handle_Set.i \
+ $(ACE_ROOT)/ace/Timer_Queue.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.i \
+ $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
+ $(ACE_ROOT)/ace/Reactor.i \
+ $(ACE_ROOT)/ace/Reactor_Impl.h \
+ $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
+ $(ACE_ROOT)/ace/Service_Repository.h \
+ $(ACE_ROOT)/ace/Service_Types.h \
+ $(ACE_ROOT)/ace/Service_Types.i \
+ $(ACE_ROOT)/ace/Service_Repository.i
+.obj/adaptive_mutex_test.o .obj/adaptive_mutex_test.so .shobj/adaptive_mutex_test.o .shobj/adaptive_mutex_test.so: adaptive_mutex_test.cpp \
+ $(ACE_ROOT)/ace/Synch.h \
+ $(ACE_ROOT)/ace/ACE.h \
+ $(ACE_ROOT)/ace/OS.h \
+ $(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-linux-common.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
+ $(ACE_ROOT)/ace/streams.h \
+ $(ACE_ROOT)/ace/Basic_Types.h \
+ $(ACE_ROOT)/ace/Basic_Types.i \
+ $(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
+ $(ACE_ROOT)/ace/Log_Msg.h \
+ $(ACE_ROOT)/ace/Log_Record.h \
+ $(ACE_ROOT)/ace/ACE.i \
+ $(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
+ $(ACE_ROOT)/ace/Synch.i \
+ $(ACE_ROOT)/ace/Synch_T.h \
+ $(ACE_ROOT)/ace/Event_Handler.h \
+ $(ACE_ROOT)/ace/Event_Handler.i \
+ $(ACE_ROOT)/ace/Synch_T.i \
+ $(ACE_ROOT)/ace/Thread.h \
+ $(ACE_ROOT)/ace/Thread.i \
+ $(ACE_ROOT)/ace/Atomic_Op.i \
+ $(ACE_ROOT)/ace/Synch_T.cpp \
+ Adaptive_Lock_Performance_Test_Base.h Benchmark_Performance.h \
+ Benchmark_Base.h \
+ $(ACE_ROOT)/ace/Service_Config.h \
+ $(ACE_ROOT)/ace/Service_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.i \
+ $(ACE_ROOT)/ace/Service_Object.i \
+ $(ACE_ROOT)/ace/Signal.h \
+ $(ACE_ROOT)/ace/Containers.h \
+ $(ACE_ROOT)/ace/Containers.i \
+ $(ACE_ROOT)/ace/Containers.cpp \
+ $(ACE_ROOT)/ace/Malloc.h \
+ $(ACE_ROOT)/ace/Malloc_Base.h \
+ $(ACE_ROOT)/ace/Malloc.i \
+ $(ACE_ROOT)/ace/Malloc_T.h \
+ $(ACE_ROOT)/ace/Free_List.h \
+ $(ACE_ROOT)/ace/Free_List.i \
+ $(ACE_ROOT)/ace/Free_List.cpp \
+ $(ACE_ROOT)/ace/Malloc_T.i \
+ $(ACE_ROOT)/ace/Malloc_T.cpp \
+ $(ACE_ROOT)/ace/Memory_Pool.h \
+ $(ACE_ROOT)/ace/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Signal.i \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Object_Manager.i \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/SString.h \
+ $(ACE_ROOT)/ace/SString.i \
+ $(ACE_ROOT)/ace/Service_Config.i \
+ $(ACE_ROOT)/ace/Reactor.h \
+ $(ACE_ROOT)/ace/Handle_Set.h \
+ $(ACE_ROOT)/ace/Handle_Set.i \
+ $(ACE_ROOT)/ace/Timer_Queue.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.i \
+ $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
+ $(ACE_ROOT)/ace/Reactor.i \
+ $(ACE_ROOT)/ace/Reactor_Impl.h \
+ $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
+ $(ACE_ROOT)/ace/Service_Repository.h \
+ $(ACE_ROOT)/ace/Service_Types.h \
+ $(ACE_ROOT)/ace/Service_Types.i \
+ $(ACE_ROOT)/ace/Service_Repository.i
+.obj/adaptive_recursive_lock_test.o .obj/adaptive_recursive_lock_test.so .shobj/adaptive_recursive_lock_test.o .shobj/adaptive_recursive_lock_test.so: adaptive_recursive_lock_test.cpp \
+ $(ACE_ROOT)/ace/Synch.h \
+ $(ACE_ROOT)/ace/ACE.h \
+ $(ACE_ROOT)/ace/OS.h \
+ $(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-linux-common.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
+ $(ACE_ROOT)/ace/streams.h \
+ $(ACE_ROOT)/ace/Basic_Types.h \
+ $(ACE_ROOT)/ace/Basic_Types.i \
+ $(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
+ $(ACE_ROOT)/ace/Log_Msg.h \
+ $(ACE_ROOT)/ace/Log_Record.h \
+ $(ACE_ROOT)/ace/ACE.i \
+ $(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
+ $(ACE_ROOT)/ace/Synch.i \
+ $(ACE_ROOT)/ace/Synch_T.h \
+ $(ACE_ROOT)/ace/Event_Handler.h \
+ $(ACE_ROOT)/ace/Event_Handler.i \
+ $(ACE_ROOT)/ace/Synch_T.i \
+ $(ACE_ROOT)/ace/Thread.h \
+ $(ACE_ROOT)/ace/Thread.i \
+ $(ACE_ROOT)/ace/Atomic_Op.i \
+ $(ACE_ROOT)/ace/Synch_T.cpp \
+ Adaptive_Lock_Performance_Test_Base.h Benchmark_Performance.h \
+ Benchmark_Base.h \
$(ACE_ROOT)/ace/Service_Config.h \
$(ACE_ROOT)/ace/Service_Object.h \
$(ACE_ROOT)/ace/Shared_Object.h \
$(ACE_ROOT)/ace/Shared_Object.i \
$(ACE_ROOT)/ace/Service_Object.i \
+ $(ACE_ROOT)/ace/Signal.h \
+ $(ACE_ROOT)/ace/Containers.h \
+ $(ACE_ROOT)/ace/Containers.i \
+ $(ACE_ROOT)/ace/Containers.cpp \
+ $(ACE_ROOT)/ace/Malloc.h \
+ $(ACE_ROOT)/ace/Malloc_Base.h \
+ $(ACE_ROOT)/ace/Malloc.i \
+ $(ACE_ROOT)/ace/Malloc_T.h \
+ $(ACE_ROOT)/ace/Free_List.h \
+ $(ACE_ROOT)/ace/Free_List.i \
+ $(ACE_ROOT)/ace/Free_List.cpp \
+ $(ACE_ROOT)/ace/Malloc_T.i \
+ $(ACE_ROOT)/ace/Malloc_T.cpp \
+ $(ACE_ROOT)/ace/Memory_Pool.h \
+ $(ACE_ROOT)/ace/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Signal.i \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Object_Manager.i \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/SString.h \
+ $(ACE_ROOT)/ace/SString.i \
+ $(ACE_ROOT)/ace/Service_Config.i \
+ $(ACE_ROOT)/ace/Reactor.h \
+ $(ACE_ROOT)/ace/Handle_Set.h \
+ $(ACE_ROOT)/ace/Handle_Set.i \
+ $(ACE_ROOT)/ace/Timer_Queue.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.h \
+ $(ACE_ROOT)/ace/Timer_Queue_T.i \
+ $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
+ $(ACE_ROOT)/ace/Reactor.i \
+ $(ACE_ROOT)/ace/Reactor_Impl.h \
+ $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
+ $(ACE_ROOT)/ace/Service_Repository.h \
+ $(ACE_ROOT)/ace/Service_Types.h \
+ $(ACE_ROOT)/ace/Service_Types.i \
+ $(ACE_ROOT)/ace/Service_Repository.i
+.obj/adaptive_sema_test.o .obj/adaptive_sema_test.so .shobj/adaptive_sema_test.o .shobj/adaptive_sema_test.so: adaptive_sema_test.cpp \
+ $(ACE_ROOT)/ace/Synch.h \
+ $(ACE_ROOT)/ace/ACE.h \
+ $(ACE_ROOT)/ace/OS.h \
+ $(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-linux-common.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
+ $(ACE_ROOT)/ace/streams.h \
+ $(ACE_ROOT)/ace/Basic_Types.h \
+ $(ACE_ROOT)/ace/Basic_Types.i \
+ $(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
+ $(ACE_ROOT)/ace/Log_Msg.h \
+ $(ACE_ROOT)/ace/Log_Record.h \
+ $(ACE_ROOT)/ace/ACE.i \
+ $(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
+ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
+ $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
+ $(ACE_ROOT)/ace/Synch.i \
+ $(ACE_ROOT)/ace/Synch_T.h \
+ $(ACE_ROOT)/ace/Event_Handler.h \
+ $(ACE_ROOT)/ace/Event_Handler.i \
+ $(ACE_ROOT)/ace/Synch_T.i \
+ $(ACE_ROOT)/ace/Thread.h \
+ $(ACE_ROOT)/ace/Thread.i \
+ $(ACE_ROOT)/ace/Atomic_Op.i \
+ $(ACE_ROOT)/ace/Synch_T.cpp \
+ Adaptive_Lock_Performance_Test_Base.h Benchmark_Performance.h \
+ Benchmark_Base.h \
+ $(ACE_ROOT)/ace/Service_Config.h \
+ $(ACE_ROOT)/ace/Service_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.h \
+ $(ACE_ROOT)/ace/Shared_Object.i \
+ $(ACE_ROOT)/ace/Service_Object.i \
+ $(ACE_ROOT)/ace/Signal.h \
+ $(ACE_ROOT)/ace/Containers.h \
+ $(ACE_ROOT)/ace/Containers.i \
+ $(ACE_ROOT)/ace/Containers.cpp \
+ $(ACE_ROOT)/ace/Malloc.h \
+ $(ACE_ROOT)/ace/Malloc_Base.h \
+ $(ACE_ROOT)/ace/Malloc.i \
+ $(ACE_ROOT)/ace/Malloc_T.h \
+ $(ACE_ROOT)/ace/Free_List.h \
+ $(ACE_ROOT)/ace/Free_List.i \
+ $(ACE_ROOT)/ace/Free_List.cpp \
+ $(ACE_ROOT)/ace/Malloc_T.i \
+ $(ACE_ROOT)/ace/Malloc_T.cpp \
+ $(ACE_ROOT)/ace/Memory_Pool.h \
+ $(ACE_ROOT)/ace/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Signal.i \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Object_Manager.i \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
$(ACE_ROOT)/ace/SString.h \
$(ACE_ROOT)/ace/SString.i \
$(ACE_ROOT)/ace/Service_Config.i \
diff --git a/performance-tests/Synch-Benchmarks/adaptive_lock_test.cpp b/performance-tests/Synch-Benchmarks/adaptive_lock_test.cpp
deleted file mode 100644
index b1268a6eb39..00000000000
--- a/performance-tests/Synch-Benchmarks/adaptive_lock_test.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-
-#define ACE_BUILD_SVC_DLL
-#include "ace/Synch.h"
-#include "Performance_Test_Options.h"
-#include "Benchmark_Performance.h"
-
-ACE_RCSID(Synch_Benchmarks, adaptive_lock_test, "$Id$")
-
-#if defined (ACE_HAS_THREADS)
-
-class ACE_Svc_Export Adaptive_Lock_Test : public Benchmark_Performance
-{
-public:
- virtual int init (int, char *[]);
- virtual int fini (void);
- virtual int svc (void);
-
-private:
- static ACE_Lock *lock_;
-};
-
-ACE_Lock *Adaptive_Lock_Test::lock_ = 0;
-
-int
-Adaptive_Lock_Test::init (int argc, char *argv[])
-{
- ACE_Get_Opt getopt (argc, argv, "mr", 0);
- int opt;
-
- while ((opt = getopt ()) != -1)
- {
- switch (opt)
- {
- case 'm':
- delete Adaptive_Lock_Test::lock_;
- ACE_NEW_RETURN (Adaptive_Lock_Test::lock_,
- ACE_Lock_Adapter<ACE_Thread_Mutex> (),
- -1);
- break;
- case 'r':
- delete Adaptive_Lock_Test::lock_;
- ACE_NEW_RETURN (Adaptive_Lock_Test::lock_,
- ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex> (),
- -1);
- break;
- default:
- break;
- }
- }
- return (Adaptive_Lock_Test::lock_ != 0 ? 0 : -1);
-}
-
-int
-Adaptive_Lock_Test::fini (void)
-{
- delete Adaptive_Lock_Test::lock_;
- Adaptive_Lock_Test::lock_ = 0;
- return 0;
-}
-
-int
-Adaptive_Lock_Test::svc (void)
-{
- // Extract out the unique thread-specific value to be used as an
- // index...
- int ni = this->thr_id ();
- synch_count = 2;
-
- while (!this->done ())
- {
- Adaptive_Lock_Test::lock_->acquire ();
- options.thr_work_count[ni]++;
- buffer++;
- Adaptive_Lock_Test::lock_->release ();
- }
- /* NOTREACHED */
- return 0;
-}
-
-ACE_SVC_FACTORY_DECLARE (Adaptive_Lock_Test)
-ACE_SVC_FACTORY_DEFINE (Adaptive_Lock_Test)
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Lock_Adapter<ACE_Thread_Mutex>;
-template class ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Lock_Adapter<ACE_Thread_Mutex>
-#pragma instantiate ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-// ACE_Service_Object_Type mut (&adaptive_lock_test, "Adaptive_Lock_Test");
-#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/adaptive_mutex_test.cpp b/performance-tests/Synch-Benchmarks/adaptive_mutex_test.cpp
new file mode 100644
index 00000000000..fcbb0078c1f
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/adaptive_mutex_test.cpp
@@ -0,0 +1,36 @@
+// $Id$
+
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
+#include "Adaptive_Lock_Performance_Test_Base.h"
+
+ACE_RCSID(Synch_Benchmarks, adaptive_mutex_test, "$Id$")
+
+#if defined (ACE_HAS_THREADS)
+
+class ACE_Svc_Export Adaptive_Mutex_Test : public Adaptive_Lock_Performance_Test_Base
+{
+public:
+ virtual int init (int, char *[]);
+};
+
+int
+Adaptive_Mutex_Test::init (int, char *[])
+{
+ ACE_Lock *lock;
+ ACE_NEW_RETURN (lock,
+ ACE_Lock_Adapter<ACE_Thread_Mutex> (),
+ -1);
+
+ return this->set_lock (lock);
+}
+
+ACE_SVC_FACTORY_DECLARE (Adaptive_Mutex_Test)
+ACE_SVC_FACTORY_DEFINE (Adaptive_Mutex_Test)
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Lock_Adapter<ACE_Thread_Mutex>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Lock_Adapter<ACE_Thread_Mutex>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/adaptive_recursive_lock_test.cpp b/performance-tests/Synch-Benchmarks/adaptive_recursive_lock_test.cpp
new file mode 100644
index 00000000000..4eaf4a46af0
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/adaptive_recursive_lock_test.cpp
@@ -0,0 +1,36 @@
+// $Id$
+
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
+#include "Adaptive_Lock_Performance_Test_Base.h"
+
+ACE_RCSID(Synch_Benchmarks, adaptive_recursive_lock_test, "$Id$")
+
+#if defined (ACE_HAS_THREADS)
+
+class ACE_Svc_Export Adaptive_Recursive_Lock_Test : public Adaptive_Lock_Performance_Test_Base
+{
+public:
+ virtual int init (int, char *[]);
+};
+
+int
+Adaptive_Recursive_Lock_Test::init (int, char *[])
+{
+ ACE_Lock *lock;
+ ACE_NEW_RETURN (lock,
+ ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex> (),
+ -1);
+
+ return this->set_lock (lock);
+}
+
+ACE_SVC_FACTORY_DECLARE (Adaptive_Recursive_Lock_Test)
+ACE_SVC_FACTORY_DEFINE (Adaptive_Recursive_Lock_Test)
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/adaptive_sema_test.cpp b/performance-tests/Synch-Benchmarks/adaptive_sema_test.cpp
new file mode 100644
index 00000000000..7f9c9f5886b
--- /dev/null
+++ b/performance-tests/Synch-Benchmarks/adaptive_sema_test.cpp
@@ -0,0 +1,41 @@
+// $Id$
+
+#define ACE_BUILD_SVC_DLL
+#include "ace/Synch.h"
+#include "Adaptive_Lock_Performance_Test_Base.h"
+
+ACE_RCSID(Synch_Benchmarks, adaptive_sema_test, "$Id$")
+
+#if defined (ACE_HAS_THREADS)
+
+class ACE_Svc_Export Adaptive_Sema_Test : public Adaptive_Lock_Performance_Test_Base
+{
+public:
+ virtual int init (int, char *[]);
+
+private:
+ static ACE_Semaphore sema;
+};
+
+ACE_Semaphore Adaptive_Sema_Test::sema (1);
+
+int
+Adaptive_Sema_Test::init (int, char *[])
+{
+ ACE_Lock *lock;
+ ACE_NEW_RETURN (lock,
+ ACE_Lock_Adapter<ACE_Semaphore> (Adaptive_Sema_Test::sema),
+ -1);
+
+ return this->set_lock (lock);
+}
+
+ACE_SVC_FACTORY_DECLARE (Adaptive_Sema_Test)
+ACE_SVC_FACTORY_DEFINE (Adaptive_Sema_Test)
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Lock_Adapter<ACE_Semaphore>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Lock_Adapter<ACE_Semaphore>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#endif /* ACE_HAS_THREADS */
diff --git a/performance-tests/Synch-Benchmarks/svc.conf b/performance-tests/Synch-Benchmarks/svc.conf
index d3afe265a9b..692370afbf3 100644
--- a/performance-tests/Synch-Benchmarks/svc.conf
+++ b/performance-tests/Synch-Benchmarks/svc.conf
@@ -1,10 +1,11 @@
# Dynamically configure all the tests
dynamic Performance_Test Service_Object * ./Synch_Tests:_make_Performance_Test() "-v -s 3"
#dynamic Mutex_Test Service_Object * ./Synch_Tests:_make_Mutex_Test()
-dynamic Adaptive_Lock_Test Service_Object * ./Synch_Tests:_make_Adaptive_Lock_Test() "-r"
-#dynamic Mutex_Test Service_Object * ./Synch_Tests:_make_Mutex_Test()
-#dynamic Semaphore_Test Service_Object * ./Synch_Tests:_make_Sema_Test()
+#dynamic Adaptive_Mutex_Test Service_Object * ./Synch_Tests:_make_Adaptive_Mutex_Test()
#dynamic Recursive_Lock_Test Service_Object * ./Synch_Tests:_make_Recursive_Lock_Test()
+#dynamic Adaptive_Recursive_Lock_Test Service_Object * ./Synch_Tests:_make_Adaptive_Recursive_Lock_Test()
+dynamic Semaphore_Test Service_Object * ./Synch_Tests:_make_Sema_Test()
+dynamic Adaptive_Semaphore_Test Service_Object * ./Synch_Tests:_make_Adaptive_Sema_Test()
#dynamic RWRD_Mutex_Test Service_Object * ./Synch_Tests:_make_RWRD_Test()
#dynamic RWWR_Mutex_Test Service_Object * ./Synch_Tests:_make_RWWR_Test()
#dynamic SYSVSema_Test Service_Object * ./Synch_Tests:_make_SYSVSema_Test()