diff options
Diffstat (limited to 'ACE/performance-tests/Misc')
-rw-r--r-- | ACE/performance-tests/Misc/childbirth_time.cpp | 12 | ||||
-rw-r--r-- | ACE/performance-tests/Misc/context_switch_time.cpp | 18 | ||||
-rw-r--r-- | ACE/performance-tests/Misc/preempt.cpp | 18 |
3 files changed, 5 insertions, 43 deletions
diff --git a/ACE/performance-tests/Misc/childbirth_time.cpp b/ACE/performance-tests/Misc/childbirth_time.cpp index 09177e6cdf6..2cefc86ec35 100644 --- a/ACE/performance-tests/Misc/childbirth_time.cpp +++ b/ACE/performance-tests/Misc/childbirth_time.cpp @@ -27,7 +27,7 @@ * on UN*X platform. * * -t: Measure the performance of native thread creation - * mechanisms. On Solaris, this is thr_create (). + * mechanisms. * On NT, this is CreateThread (). Currently, only * these two platforms are implemented. * @@ -171,7 +171,7 @@ prof_fork (size_t iteration) static double prof_native_thread (size_t iteration) { -#if defined (ACE_HAS_THREADS) && (defined (ACE_HAS_WTHREADS) || defined (ACE_HAS_STHREADS)) +#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_WTHREADS) if (iteration != 0) { ACE_Profile_Timer ptimer; @@ -191,14 +191,6 @@ prof_native_thread (size_t iteration) 0, CREATE_SUSPENDED, 0) == 0) -#elif defined (ACE_HAS_STHREADS) - //FUZZ: disable check_for_lack_ACE_OS - if (::thr_create (0, - 0, - &ace_empty, - 0, - THR_SUSPENDED, - 0) != 0) #endif ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CreateThread"), -1); //FUZZ: enable check_for_lack_ACE_OS diff --git a/ACE/performance-tests/Misc/context_switch_time.cpp b/ACE/performance-tests/Misc/context_switch_time.cpp index 89dc0749080..a4315a1a155 100644 --- a/ACE/performance-tests/Misc/context_switch_time.cpp +++ b/ACE/performance-tests/Misc/context_switch_time.cpp @@ -24,12 +24,6 @@ * from the one described in 1) above, and the result is divided by * two to yield the context switch time. * - * Notes: - * On Solaris 2.5.1, it appears that the lowest context switching times, - * at least on a single-CPU machine, are obtained _without_ creating new - * LWPs for new threads (THR_NEW_LWP). The -n option enables the use of - * THR_NEW_LWP for testing. - * * = CREATION DATE * 17 January 1997 * @@ -218,10 +212,6 @@ Suspend_Resume_Test::svc () low_.ready (); - // For information: the cost of the just the loop itself below, - // without the suspend and resume calls, on a 166 MHz Ultrasparc - // is about 12.3 nanoseconds per iteration. - timer_.start (); for (ACE_UINT32 i = 0; i < iterations_; ++i) @@ -443,10 +433,6 @@ Ping_Suspend_Resume_Test::svc () priority, high_priority)); #endif /* ACE_DEBUG_CST */ - // For information: the cost of the just the loop itself below, - // without the suspend and resume calls, on a 166 MHz Ultrasparc - // is about 12.3 nanoseconds per iteration. - timer_.start (); ACE_UINT32 i; @@ -999,10 +985,6 @@ Synchronized_Suspend_Resume_Test::svc () priority, high_priority)); #endif /* ACE_DEBUG_CST */ - // For information: the cost of the just the loop itself below, - // without the suspend and resume calls, on a 166 MHz Ultrasparc - // is about 12.3 nanoseconds per iteration. - ACE_UINT32 i; for (i = 0; i < iterations_; ++i) diff --git a/ACE/performance-tests/Misc/preempt.cpp b/ACE/performance-tests/Misc/preempt.cpp index 22ba8d31661..20b70117e5a 100644 --- a/ACE/performance-tests/Misc/preempt.cpp +++ b/ACE/performance-tests/Misc/preempt.cpp @@ -37,10 +37,6 @@ #if defined (ACE_HAS_THREADS) || ! defined (ACE_LACKS_FORK) -#if defined (ACE_HAS_STHREADS) -# include <sys/lwp.h> /* for _lwp_self () */ -#endif /* ACE_HAS_STHREADS */ - static const char usage [] = "[-? |\n" #if defined (ACE_HAS_THREADS) " [-f use fork instead of spawn]\n" @@ -150,13 +146,9 @@ High_Priority_Task::svc () if (ACE_Thread::getprio (thr_handle, prio) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); -#if defined (ACE_HAS_STHREADS) - ACE_DEBUG ((LM_DEBUG, "(%P|%u|%t) High: prio = %d, priority_ = %d\n", - _lwp_self (), prio, this->priority_)); -#else /* ! ACE_HAS_STHREADS */ ACE_DEBUG ((LM_DEBUG, "(%P|%t) High: prio = %d, priority_ = %d\n", prio, this->priority_)); -#endif /* ! ACE_HAS_STHREADS */ + ACE_ASSERT (this->priority_ == prio); ACE_Time_Value pause (0, read_period); @@ -251,13 +243,9 @@ Low_Priority_Task::svc () if (ACE_Thread::getprio (thr_handle, prio) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "getprio failed"), -1); -#if defined (ACE_HAS_STHREADS) - ACE_DEBUG ((LM_DEBUG, "(%P|%u|%t) Low: prio = %d, priority_ = %d\n", - _lwp_self (), prio, this->priority_)); -#else /* ! ACE_HAS_STHREADS */ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Low: prio = %d, priority_ = %d\n", prio, this->priority_)); -#endif /* ! ACE_HAS_STHREADS */ + ACE_ASSERT (this->priority_ == prio); u_long iterations = 0; @@ -371,7 +359,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (get_options (argc, argv)) ACE_OS::exit (-1); - // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + // Enable FIFO scheduling if (ACE_OS::sched_params ( ACE_Sched_Params ( ACE_SCHED_FIFO, |