summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-08 20:38:46 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-08 20:38:46 +0000
commite99e03d48b28d4475de50ef61b4ddd1fb424f0b4 (patch)
treecbe537329c11657a8374b22d72feb38931528c3e
parentfde998b16d0c5c5b9d8442a4f68b534035db4359 (diff)
downloadATCD-e99e03d48b28d4475de50ef61b4ddd1fb424f0b4.tar.gz
ChangeLogTag:Mon Dec 8 13:20:39 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
-rw-r--r--TAO/local/ChangeLog21
-rw-r--r--TAO/local/bin/Event_Service/Dispatching_Modules.cpp3
-rw-r--r--TAO/local/bin/Event_Service/Dispatching_Modules.h2
-rw-r--r--TAO/local/bin/Event_Service/Event_Channel.cpp10
-rw-r--r--TAO/local/bin/Event_Service/Event_Channel.h2
-rw-r--r--TAO/local/bin/Event_Service/Makefile10
-rw-r--r--TAO/local/bin/Event_Service/RT_Task.cpp2
-rw-r--r--TAO/local/bin/Event_Service/ReactorTask.cpp3
-rw-r--r--TAO/local/bin/Event_Service/ReactorTask.h1
-rw-r--r--TAO/local/bin/Scheduling_Service/Config_Scheduler.cpp5
-rw-r--r--TAO/local/bin/Scheduling_Service/Scheduler_Internal.cpp15
-rw-r--r--TAO/local/tests/Latency.cpp53
12 files changed, 78 insertions, 49 deletions
diff --git a/TAO/local/ChangeLog b/TAO/local/ChangeLog
index a8524d3cf7f..1c923178730 100644
--- a/TAO/local/ChangeLog
+++ b/TAO/local/ChangeLog
@@ -1,3 +1,24 @@
+Mon Dec 8 13:20:39 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
+
+ * bin/Event_Service/Makefile:
+ * bin/Event_Service/Dispatching_Modules.cpp:
+ * bin/Event_Service/Dispatching_Modules.h:
+ * bin/Event_Service/Event_Channel.cpp:
+ * bin/Event_Service/Event_Channel.h:
+ * bin/Event_Service/RT_Task.cpp:
+ * bin/Event_Service/ReactorTask.cpp:
+ * bin/Event_Service/ReactorTask.h:
+ * bin/Scheduling_Service/Config_Scheduler.cpp:
+ * bin/Scheduling_Service/Scheduler_Internal.cpp:
+ More fine tuning of TIMEPROBES, trying to track the wasted time.
+
+ * tests/Latency.cpp:
+ Use ACE_ERROR and ACE_DEBUG instead of iostreams.
+
+ * bin/Scheduling_Service/Scheduler_Internal.cpp:
+ Fixed problem on scheduling computation, I guess I left some
+ code commented out and never actually fixed it.
+
Wed Dec 3 16:11:39 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
* tests/Latency.h:
diff --git a/TAO/local/bin/Event_Service/Dispatching_Modules.cpp b/TAO/local/bin/Event_Service/Dispatching_Modules.cpp
index 380c214d6a6..d6527ad78d0 100644
--- a/TAO/local/bin/Event_Service/Dispatching_Modules.cpp
+++ b/TAO/local/bin/Event_Service/Dispatching_Modules.cpp
@@ -225,12 +225,15 @@ ACE_ES_Priority_Dispatching::push (ACE_ES_Dispatch_Request *request,
if (request->rt_info () != 0)
{
+ // @@ TODO use ACE_TRY&friends
+ ACE_TIMEPROBE (" Priority_Dispatching::push - priority requested");
ACE_Scheduler_Factory::server ()->priority
(request->rt_info (),
thread_priority,
subpriority,
preemption_priority,
_env);
+ ACE_TIMEPROBE (" Priority_Dispatching::push - priority obtained");
if (_env.exception ())
{
return;
diff --git a/TAO/local/bin/Event_Service/Dispatching_Modules.h b/TAO/local/bin/Event_Service/Dispatching_Modules.h
index 974f83a5495..c82f3889ff7 100644
--- a/TAO/local/bin/Event_Service/Dispatching_Modules.h
+++ b/TAO/local/bin/Event_Service/Dispatching_Modules.h
@@ -23,7 +23,7 @@
#ifndef ACE_DISPATCHING_MODULES_H
#define ACE_DISPATCHING_MODULES_H
-#include "Timeprobe.h"
+#include "tao/Timeprobe.h"
#include "ReactorTask.h"
#include "Event_Channel.h"
diff --git a/TAO/local/bin/Event_Service/Event_Channel.cpp b/TAO/local/bin/Event_Service/Event_Channel.cpp
index ba6f29b4f72..3cbe523cf0c 100644
--- a/TAO/local/bin/Event_Service/Event_Channel.cpp
+++ b/TAO/local/bin/Event_Service/Event_Channel.cpp
@@ -28,6 +28,7 @@ Preemption_Priority (RtecScheduler::handle_t rtinfo)
ACE_TRY
{
+ ACE_TIMEPROBE (" Preemption_Priority - priority requested");
ACE_Scheduler_Factory::server ()->priority
(rtinfo,
thread_priority,
@@ -35,6 +36,7 @@ Preemption_Priority (RtecScheduler::handle_t rtinfo)
preemption_priority,
ACE_TRY_ENV);
ACE_CHECK_ENV
+ ACE_TIMEPROBE (" connected - priority obtained");
}
ACE_CATCH (RtecScheduler::UNKNOWN_TASK, ex_ut)
{
@@ -2142,7 +2144,7 @@ ACE_ES_Subscription_Module::subscribe_type (ACE_ES_Consumer_Rep *consumer,
dependency_info->rt_info,
dependency_info->number_of_calls,
ACE_TRY_ENV);
- ACE_DEBUG ((LM_ERROR, "%p - add_dependency (%d,%d,%d)\n",
+ ACE_DEBUG ((LM_ERROR, "%s - add_dependency (%d,%d,%d)\n",
"ACE_ES_Priority_Timer::schedule_timer - ",
consumer->dependency ()->rt_info,
dependency_info->rt_info,
@@ -2208,7 +2210,7 @@ ACE_ES_Subscription_Module::subscribe_source_type (ACE_ES_Consumer_Rep *consumer
dependency_info->rt_info,
dependency_info->number_of_calls,
ACE_TRY_ENV);
- ACE_DEBUG ((LM_ERROR, "%p - add_dependency (%d,%d,%d)\n",
+ ACE_DEBUG ((LM_ERROR, "%s - add_dependency (%d,%d,%d)\n",
"ACE_Subscription_Module::subscribe_source_type - ",
consumer->dependency ()->rt_info,
dependency_info->rt_info,
@@ -2680,10 +2682,12 @@ ACE_ES_Priority_Timer::connected (RtecScheduler::handle_t rt_info)
ACE_TRY
{
+ ACE_TIMEPROBE (" connected - priority requested");
ACE_Scheduler_Factory::server ()->priority
(rt_info, thread_priority,
subpriority, preemption_priority, ACE_TRY_ENV);
ACE_CHECK_ENV;
+ ACE_TIMEPROBE (" connected - priority obtained");
#if 0
ACE_ERROR_RETURN ((LM_ERROR, "%p RtecScheduler::Scheduler::priority failed.\n",
"ACE_ES_Priority_Timer::connected"), -1);
@@ -2733,9 +2737,11 @@ ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos)
ACE_TRY
{
+ ACE_TIMEPROBE (" Consumer_Name - priority requested");
RtecScheduler::RT_Info* rt_info = ACE_Scheduler_Factory::server ()->get
(qos.dependencies[1].rt_info, ACE_TRY_ENV);
ACE_CHECK_ENV;
+ ACE_TIMEPROBE (" Consumer_Name - priority obtained");
return rt_info->entry_point;
}
diff --git a/TAO/local/bin/Event_Service/Event_Channel.h b/TAO/local/bin/Event_Service/Event_Channel.h
index 9d092cc3349..da26e4cf0e6 100644
--- a/TAO/local/bin/Event_Service/Event_Channel.h
+++ b/TAO/local/bin/Event_Service/Event_Channel.h
@@ -33,7 +33,7 @@
#include "ace/Containers.h"
#include "ace/Map_Manager.h"
-#include "Timeprobe.h"
+#include "tao/Timeprobe.h"
#include "Local_ESTypes.h"
#include "CORBA_Utils_T.h"
#include "Task_Manager.h"
diff --git a/TAO/local/bin/Event_Service/Makefile b/TAO/local/bin/Event_Service/Makefile
index c824a6b903e..443ce8d62ef 100644
--- a/TAO/local/bin/Event_Service/Makefile
+++ b/TAO/local/bin/Event_Service/Makefile
@@ -226,8 +226,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerC.i \
$(TAO_ROOT)/orbsvcs/lib/Scheduler_Factory.i \
Event_Channel.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.i \
Local_ESTypes.h \
$(TAO_ROOT)/orbsvcs/lib/Event_Service_Constants.h \
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerS.h \
@@ -466,8 +464,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(ACE_ROOT)/ace/Containers.i \
$(ACE_ROOT)/ace/Map_Manager.h \
$(ACE_ROOT)/ace/Map_Manager.i \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.i \
Local_ESTypes.h \
$(TAO_ROOT)/orbsvcs/lib/Event_Service_Constants.h \
$(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \
@@ -552,8 +548,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(ACE_ROOT)/ace/Reactor_Impl.h \
$(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
Dispatching_Modules.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.i \
ReactorTask.h Fast_Reactor.h \
$(ACE_ROOT)/ace/Select_Reactor.h \
$(ACE_ROOT)/ace/Token.h \
@@ -665,8 +659,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(ACE_ROOT)/ace/Containers.i \
$(ACE_ROOT)/ace/Map_Manager.h \
$(ACE_ROOT)/ace/Map_Manager.i \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.i \
Local_ESTypes.h \
$(TAO_ROOT)/orbsvcs/lib/Event_Service_Constants.h \
$(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \
@@ -863,8 +855,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/singletons.h \
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerC.i \
RT_Task.i Debug_Macros.h Event_Channel.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.h \
- $(TAO_ROOT)/orbsvcs/lib/Timeprobe.i \
Local_ESTypes.h \
$(TAO_ROOT)/orbsvcs/lib/Event_Service_Constants.h \
$(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \
diff --git a/TAO/local/bin/Event_Service/RT_Task.cpp b/TAO/local/bin/Event_Service/RT_Task.cpp
index 6c3c0dacbf6..29add869322 100644
--- a/TAO/local/bin/Event_Service/RT_Task.cpp
+++ b/TAO/local/bin/Event_Service/RT_Task.cpp
@@ -212,12 +212,14 @@ ACE_RT_Task::synch_threads (size_t threads)
ACE_TRY
{
// @@ TODO handle exceptions
+ ACE_TIMEPROBE (" synch_threads - priority requested");
ACE_Scheduler_Factory::server ()->priority
(rt_info_,
thread_priority,
subpriority,
preemption_priority, ACE_TRY_ENV);
ACE_CHECK_ENV;
+ ACE_TIMEPROBE (" synch_threads - priority obtained");
ACE_DEBUG ((LM_DEBUG, "(%t) spawning %d threads at os thread"
" priority %d.\n",
diff --git a/TAO/local/bin/Event_Service/ReactorTask.cpp b/TAO/local/bin/Event_Service/ReactorTask.cpp
index 4200eeaa933..11cb8751a8a 100644
--- a/TAO/local/bin/Event_Service/ReactorTask.cpp
+++ b/TAO/local/bin/Event_Service/ReactorTask.cpp
@@ -2,6 +2,7 @@
// $Id$
//
#include "ace/High_Res_Timer.h"
+#include "tao/Timeprobe.h"
#include "Scheduler_Factory.h"
#include "ReactorTask.h"
@@ -80,8 +81,10 @@ ACE_ES_Reactor_Task::open_reactor (RtecScheduler::Period &period)
int ACE_ES_Reactor_Task::svc_one()
{
+ ACE_TIMEPROBE (" Reactor_Task - waiting for events");
if (reactor_.handle_events() == -1)
ACE_ERROR ((LM_ERROR, "(%t) %p.\n", "ACE_ES_Reactor_Task::svc"));
+ ACE_TIMEPROBE (" Reactor_Task - events handled");
if (done_)
ACE_DEBUG ((LM_DEBUG, "(%t) Timer Task is done.\n"));
diff --git a/TAO/local/bin/Event_Service/ReactorTask.h b/TAO/local/bin/Event_Service/ReactorTask.h
index 61a5a93c6ae..973d6f82f97 100644
--- a/TAO/local/bin/Event_Service/ReactorTask.h
+++ b/TAO/local/bin/Event_Service/ReactorTask.h
@@ -42,7 +42,6 @@ public:
virtual int svc_hook(RtecScheduler::OS_Priority);
// Assume ownership of the reactor_.
- // Brian, this is new.
int open_reactor (RtecScheduler::Period &period);
// This is a hack for now.
diff --git a/TAO/local/bin/Scheduling_Service/Config_Scheduler.cpp b/TAO/local/bin/Scheduling_Service/Config_Scheduler.cpp
index d9862e1138c..fa07ecc113f 100644
--- a/TAO/local/bin/Scheduling_Service/Config_Scheduler.cpp
+++ b/TAO/local/bin/Scheduling_Service/Config_Scheduler.cpp
@@ -4,6 +4,7 @@
//
// ============================================================================
+#include "Scheduler_Factory.h"
#include "Scheduler_Internal.h"
#include "Config_Scheduler.h"
@@ -252,4 +253,8 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority,
}
}
ACE_DEBUG ((LM_DEBUG, "schedule prepared\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "dumping to stdout\n"));
+ ACE_Scheduler_Factory::dump_schedule (*infos, 0);
+ ACE_DEBUG ((LM_DEBUG, "dump done\n"));
}
diff --git a/TAO/local/bin/Scheduling_Service/Scheduler_Internal.cpp b/TAO/local/bin/Scheduling_Service/Scheduler_Internal.cpp
index e112ab50c9f..aafb7773da2 100644
--- a/TAO/local/bin/Scheduling_Service/Scheduler_Internal.cpp
+++ b/TAO/local/bin/Scheduling_Service/Scheduler_Internal.cpp
@@ -1551,30 +1551,27 @@ Scheduler_Internal::calculate_thread_properties (RT_Info &thread_info,
return rt_info;
}
-#if 0
for (i = 0; i < number_of_dependencies (rt_info); ++i )
{
// TODO:
- if (rt_info.dependencies[i].rt_info.value() != 0)
+ if (rt_info.dependencies[i].rt_info != 0)
{
- RT_Info info;
- rt_info.dependencies[i].rt_info >>= &info;
+ RT_Info* info;
+ this->lookup_rt_info (rt_info.dependencies[i].rt_info, info);
if (output_level () >= 4)
{
ACE_OS::printf ("calculate_thread_properties (): recurse on "
"dependency %s\n",
- (const char*)info.entry_point);
+ (const char*)info->entry_point);
}
RT_Info& ret =
calculate_thread_properties (thread_info,
- info,
- rt_info.dependencies[i].
- number_of_calls);
+ *info,
+ rt_info.dependencies[i].number_of_calls);
return ret;
}
}
-#endif /* 0 */
ACE_ASSERT (! "should never reach this!"); // should never get here!
return rt_info; // to avoid compilation warning
diff --git a/TAO/local/tests/Latency.cpp b/TAO/local/tests/Latency.cpp
index b10bf75206e..d4cb5e7e496 100644
--- a/TAO/local/tests/Latency.cpp
+++ b/TAO/local/tests/Latency.cpp
@@ -9,7 +9,7 @@
#include "ace/Sched_Params.h"
#include "ace/Profile_Timer.h"
-#include "Timeprobe.h"
+#include "tao/Timeprobe.h"
#include "Event_Utilities.h"
#include "Event_Service_Constants.h"
#include "Scheduler_Factory.h"
@@ -669,8 +669,9 @@ get_options (int argc, char *argv [])
}
else
{
- cerr << argv [0] << ": number of consumers must be > 0" << endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: number of consumers must be > 0",
+ argv[0]), 1);
}
break;
case 'd':
@@ -686,8 +687,9 @@ get_options (int argc, char *argv [])
}
else
{
- cerr << argv [0] << ": count must be > 0" << endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: count must be > 0",
+ argv[0]), 1);
}
break;
case 's':
@@ -697,8 +699,9 @@ get_options (int argc, char *argv [])
}
else
{
- cerr << argv [0] << ": number of suppliers must be > 0" << endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: number of suppliers must be > 0",
+ argv[0]), 1);
}
break;
case 't':
@@ -708,33 +711,33 @@ get_options (int argc, char *argv [])
}
else
{
- cerr << argv [0] << ": count must be >= 0" << endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: timeout must be >= 0",
+ argv[0]), 1);
}
break;
- case 'O':
- // Ignore -O options those are used by the ORB....
- break;
case '?':
- cout << "usage: " << argv [0] << " " << usage << endl;
+ ACE_DEBUG ((LM_DEBUG,
+ "Usage: %s %s\n",
+ argv[0], usage));
ACE_OS::exit (0);
break;
default:
- cerr << argv [0] << ": unknown arg, " << (char) opt << endl;
- cerr << "usage: " << argv [0] << " " << usage << endl;
- return 1;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: unknown arg, -%c\n"
+ "Usage: %s %s\n",
+ argv[0], char(opt),
+ argv[0], usage), 1);
}
}
- switch (argc - get_opt.optind) {
- case 0:
- // OK
- break;
- default:
- cerr << argv [0] << ": too many arguments" << endl;
- cerr << "usage: " << argv [0] << " " << usage << endl;
- return 1;
- }
+ if (argc != get_opt.optind)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: too many arguments\n"
+ "Usage: %s %s\n",
+ argv[0], argv[0], usage), 1);
+ }
return 0;
}