summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2001-11-21 11:52:21 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2001-11-21 11:52:21 +0000
commit016c0ffdad8ad674beb8757be9de9f4609bb90ea (patch)
treeb35b963c084e1f23a7892abe7d069222c06045b8
parentf5efe0cbe25e4174935ebb49098f7a2be8259bd2 (diff)
downloadATCD-016c0ffdad8ad674beb8757be9de9f4609bb90ea.tar.gz
ChangeLogTag: Wed Nov 21 12:48:08 2001 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLogs/ChangeLog-02a10
-rw-r--r--ChangeLogs/ChangeLog-03a10
-rw-r--r--performance-tests/Misc/basic_perf.cpp6
-rw-r--r--performance-tests/Misc/childbirth_time.cpp4
-rw-r--r--performance-tests/Misc/context_switch_time.cpp24
-rw-r--r--performance-tests/Misc/preempt.cpp10
-rw-r--r--performance-tests/Misc/test_mutex.cpp26
-rw-r--r--performance-tests/Misc/test_singleton.cpp4
9 files changed, 67 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 1207092bb25..df13c8b1ffe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Nov 21 12:49:08 2001 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Misc/basic_perf.cpp
+ * performance-tests/Misc/childbirth_time.cpp
+ * performance-tests/Misc/context_switch_time.cpp
+ * performance-tests/Misc/preempt.cpp
+ * performance-tests/Misc/test_mutex.cpp
+ * performance-tests/Misc/test_singleton.cpp
+ Made these tests compiling when ACE_USES_WCHAR is set
+
Wed Nov 21 08:49:12 2001 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/OS.h
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 1207092bb25..df13c8b1ffe 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,13 @@
+Wed Nov 21 12:49:08 2001 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Misc/basic_perf.cpp
+ * performance-tests/Misc/childbirth_time.cpp
+ * performance-tests/Misc/context_switch_time.cpp
+ * performance-tests/Misc/preempt.cpp
+ * performance-tests/Misc/test_mutex.cpp
+ * performance-tests/Misc/test_singleton.cpp
+ Made these tests compiling when ACE_USES_WCHAR is set
+
Wed Nov 21 08:49:12 2001 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/OS.h
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 1207092bb25..df13c8b1ffe 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,13 @@
+Wed Nov 21 12:49:08 2001 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * performance-tests/Misc/basic_perf.cpp
+ * performance-tests/Misc/childbirth_time.cpp
+ * performance-tests/Misc/context_switch_time.cpp
+ * performance-tests/Misc/preempt.cpp
+ * performance-tests/Misc/test_mutex.cpp
+ * performance-tests/Misc/test_singleton.cpp
+ Made these tests compiling when ACE_USES_WCHAR is set
+
Wed Nov 21 08:49:12 2001 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/OS.h
diff --git a/performance-tests/Misc/basic_perf.cpp b/performance-tests/Misc/basic_perf.cpp
index bfad156747b..7bfaa43e7f6 100644
--- a/performance-tests/Misc/basic_perf.cpp
+++ b/performance-tests/Misc/basic_perf.cpp
@@ -494,9 +494,9 @@ Virtual_Member_Call_Test::run (void)
///////////////////////////////////////////////////////////////////////////////
static
unsigned int
-get_options (int argc, char *argv [])
+get_options (int argc, ACE_TCHAR *argv [])
{
- ACE_Get_Opt get_opt (argc, argv, "i:?");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("i:?"));
int opt;
while ((opt = get_opt ()) != EOF)
@@ -550,7 +550,7 @@ get_options (int argc, char *argv [])
///////////////////////////////////////////////////////////////////////////////
int
-main (int argc, char *argv[])
+main (int argc, ACE_TCHAR *argv[])
{
if (get_options (argc, argv))
ACE_OS::exit (-1);
diff --git a/performance-tests/Misc/childbirth_time.cpp b/performance-tests/Misc/childbirth_time.cpp
index f02682559a0..f4030d60cf7 100644
--- a/performance-tests/Misc/childbirth_time.cpp
+++ b/performance-tests/Misc/childbirth_time.cpp
@@ -333,9 +333,9 @@ prof_mutex_base (size_t iteration)
}
int
-main (int argc, char* argv[])
+main (int argc, ACE_TCHAR* argv[])
{
- ACE_Get_Opt get_opt (argc, argv, "n:l:pftahmxe");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("n:l:pftahmxe"));
int c;
size_t iteration = 10;
Profiler profiler = 0;
diff --git a/performance-tests/Misc/context_switch_time.cpp b/performance-tests/Misc/context_switch_time.cpp
index 611fc67ab6f..b6a793ddd15 100644
--- a/performance-tests/Misc/context_switch_time.cpp
+++ b/performance-tests/Misc/context_switch_time.cpp
@@ -116,7 +116,7 @@ Low_Priority_Null_Task::Low_Priority_Null_Task() :
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, LOW_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
#if DEBUG > 0
ACE_DEBUG ((LM_DEBUG, "Low_Priority_Null_Task ctor, activated\n"));
@@ -201,7 +201,7 @@ Suspend_Resume_Test::Suspend_Resume_Test (const ACE_UINT32 iterations) :
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, HIGH_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
}
Suspend_Resume_Test::~Suspend_Resume_Test()
@@ -311,7 +311,7 @@ High_Priority_Simple_Task::High_Priority_Simple_Task() :
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, HIGH_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
#if DEBUG > 0
ACE_DEBUG ((LM_DEBUG, "High_Priority_Simple_Task ctor, activated\n"));
@@ -416,7 +416,7 @@ Ping_Suspend_Resume_Test::Ping_Suspend_Resume_Test (
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, LOW_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
}
Ping_Suspend_Resume_Test::~Ping_Suspend_Resume_Test()
@@ -558,7 +558,7 @@ Yield_Test::Yield_Test (const ACE_UINT32 iterations) :
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
2, 0, LOW_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
#if !defined (VXWORKS)
timer_barrier_.wait ();
@@ -798,7 +798,7 @@ High_Priority_Synchronized_Task::High_Priority_Synchronized_Task (
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, HIGH_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
#if DEBUG > 0
ACE_DEBUG ((LM_DEBUG, "High_Priority_Synchronized_Task ctor, activated\n"));
@@ -961,7 +961,7 @@ Synchronized_Suspend_Resume_Test::Synchronized_Suspend_Resume_Test (
if (this->activate (THR_BOUND | THR_DETACHED | THR_SCHED_FIFO | new_lwp,
1, 0, LOW_PRIORITY))
- ACE_OS::perror ("activate");
+ ACE_OS::perror (ACE_TEXT("activate"));
}
Synchronized_Suspend_Resume_Test::~Synchronized_Suspend_Resume_Test()
@@ -1081,9 +1081,9 @@ Synchronized_Suspend_Resume_Test::average_context_switch_time ()
static
u_int
-get_options (int argc, char *argv[])
+get_options (int argc, ACE_TCHAR *argv[])
{
- ACE_Get_Opt get_opt (argc, argv, "c:n?");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("c:n?"));
int opt;
while ((opt = get_opt ()) != EOF) {
switch (opt) {
@@ -1145,9 +1145,9 @@ get_options (int argc, char *argv[])
///////////////////////////////////////////////////////////////////////////////
int
-main (int argc, char *argv [])
+main (int argc, ACE_TCHAR *argv [])
{
- ACE_LOG_MSG->open (argv[0] > 0 ? argv[0] : "context_switch_time");
+ ACE_LOG_MSG->open (argv[0] > 0 ? argv[0] : ACE_TEXT("context_switch_time"));
if (get_options (argc, argv))
ACE_OS::exit (-1);
@@ -1177,7 +1177,7 @@ main (int argc, char *argv [])
}
else
{
- ACE_OS::perror ("context_switch_time");
+ ACE_OS::perror (ACE_TEXT("context_switch_time"));
ACE_OS::exit (-1);
}
}
diff --git a/performance-tests/Misc/preempt.cpp b/performance-tests/Misc/preempt.cpp
index 843e5572ba4..9b5f618eb18 100644
--- a/performance-tests/Misc/preempt.cpp
+++ b/performance-tests/Misc/preempt.cpp
@@ -285,9 +285,9 @@ Low_Priority_Task::svc (void)
///////////////////////////////////////////////////////////////////////////////
static int
-get_options (int argc, char *argv[])
+get_options (int argc, ACE_TCHAR *argv[])
{
- ACE_Get_Opt get_opt (argc, argv, "fh:l:n:p:y?");
+ ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("fh:l:n:p:y?"));
int opt;
while ((opt = get_opt ()) != EOF) {
switch (opt) {
@@ -356,9 +356,9 @@ get_options (int argc, char *argv[])
///////////////////////////////////////////////////////////////////////////////
int
-main (int argc, char *argv[])
+main (int argc, ACE_TCHAR *argv[])
{
- ACE_LOG_MSG->open (argv[0] ? argv[0] : "preempt");
+ ACE_LOG_MSG->open (argv[0] ? argv[0] : ACE_TEXT("preempt"));
#if defined (ACE_HAS_THREADS) || !defined (ACE_LACKS_FORK)
@@ -401,7 +401,7 @@ main (int argc, char *argv[])
pid_t child = 0;
if (use_fork == 1)
{
- switch ((child = ACE_OS::fork ("preempt-low_priority_process")))
+ switch ((child = ACE_OS::fork (ACE_TEXT("preempt-low_priority_process"))))
{
case -1:
ACE_ERROR ((LM_ERROR, "%p\n%a", "fork failed"));
diff --git a/performance-tests/Misc/test_mutex.cpp b/performance-tests/Misc/test_mutex.cpp
index e854af98755..7428ae48346 100644
--- a/performance-tests/Misc/test_mutex.cpp
+++ b/performance-tests/Misc/test_mutex.cpp
@@ -3,19 +3,19 @@
// This test program illustrates the performance difference between
// three versions of wrappers for thread mutexes. These three
// versions exercise various combinations of the following classes:
-//
+//
// Thread_Mutex --
// This version is just like ACE_Thread_Mutex, which doesn't use
// inheritance and dynamic binding.
-//
+//
// Mutex_Base --
// This is an abstract base class that defines the
// acquire()/release() interface.
-//
+//
// Thread_Mutex_Derived --
// This derived from Mutex_Base and uses inheritance and
// dynamic binding.
-//
+//
// The following are the results I got when running this on our
// SPARCstation 20 model 712:
//
@@ -32,12 +32,12 @@
// time per call = 2.112831 usecs
//
// My conclusions are as follows:
-//
+//
// 1. If your C++ compiler optimizes calls to virtual functions that
// are made through instances of derived classes, then the
// performance of the Thread_Mutex and Thread_Mutex_Derived are
// essentially identical.
-//
+//
// 2. The overhead from using virtual functions is approximately
// 20%. Naturally, as the amount of contention goes up, the
// relative overhead of the virtual function calls will decrease.
@@ -139,8 +139,8 @@ static Thread_Mutex thread_mutex;
static Thread_Mutex_Derived thread_mutex_derived;
static Mutex_Base *mutex_base = &thread_mutex_derived;
-int
-main (int argc, char *argv[])
+int
+main (int argc, ACE_TCHAR *argv[])
{
ACE_Profile_Timer timer;
int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_ITERATIONS;
@@ -169,7 +169,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "real time = %f secs, user time = %f secs, system time = %f secs\n",
et.real_time, et.user_time, et.system_time));
- ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
+ ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
(et.real_time / double (iterations)) * 1000000));
// Test the thread mutex derived (which does use inheritance or
@@ -193,7 +193,7 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "real time = %f secs, user time = %f secs, system time = %f secs\n",
et.real_time, et.user_time, et.system_time));
- ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
+ ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
(et.real_time / double (iterations)) * 1000000));
// Test the thread mutex derived (which does use inheritance or
@@ -218,13 +218,13 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "real time = %f secs, user time = %f secs, system time = %f secs\n",
et.real_time, et.user_time, et.system_time));
- ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
+ ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n",
(et.real_time / double (iterations)) * 1000000));
return 0;
}
#else
-int
-main (int, char *[])
+int
+main (int, ACE_TCHAR *[])
{
ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
return 0;
diff --git a/performance-tests/Misc/test_singleton.cpp b/performance-tests/Misc/test_singleton.cpp
index 5b59bc55686..61cb38ff13d 100644
--- a/performance-tests/Misc/test_singleton.cpp
+++ b/performance-tests/Misc/test_singleton.cpp
@@ -91,7 +91,7 @@ DC_Singleton::instance (void)
typedef ACE_Singleton <DC_Singleton, ACE_SYNCH_MUTEX> My_Singleton;
int
-main (int argc, char *argv[])
+main (int argc, ACE_TCHAR *argv[])
{
ACE_Profile_Timer timer;
int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_ITERATIONS;
@@ -170,7 +170,7 @@ template class ACE_Singleton<DC_Singleton, ACE_SYNCH_MUTEX>;
#else
int
-main (int, char *[])
+main (int, ACE_TCHAR *[])
{
ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n"));
return 0;