summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-02 16:42:49 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-02 16:42:49 +0000
commitd09b0f3eb86ac2ed39a8094f59f009997862bff9 (patch)
treeaa5bd8ab86fafa892cac6a886341f64c71f54547
parent011459952a7a0036e52645f0dad408d301e00f5e (diff)
downloadATCD-d09b0f3eb86ac2ed39a8094f59f009997862bff9.tar.gz
ChangeLogTag:Tue Dec 2 10:32:01 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
-rw-r--r--TAO/local/ChangeLog22
-rw-r--r--TAO/local/bin/Event_Service/Dispatching_Modules.h1
-rw-r--r--TAO/local/bin/Event_Service/Event_Channel.cpp77
-rw-r--r--TAO/local/bin/Event_Service/Event_Channel.h56
-rw-r--r--TAO/local/bin/Event_Service/Event_Channel.i26
-rw-r--r--TAO/local/bin/Event_Service/Makefile34
-rw-r--r--TAO/local/bin/Event_Service/RT_Task.cpp4
-rw-r--r--TAO/local/bin/Event_Service/RT_Task.h2
-rw-r--r--TAO/local/tests/Latency.cpp36
9 files changed, 88 insertions, 170 deletions
diff --git a/TAO/local/ChangeLog b/TAO/local/ChangeLog
index f857c96414c..36cd5c5734a 100644
--- a/TAO/local/ChangeLog
+++ b/TAO/local/ChangeLog
@@ -1,3 +1,25 @@
+Tue Dec 2 10:32:01 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
+
+ * local/bin/Event_Service/Makefile:
+ * local/bin/Event_Service/Dispatching_Modules.h:
+ * local/bin/Event_Service/Event_Channel.cpp:
+ * local/bin/Event_Service/Event_Channel.h:
+ * local/bin/Event_Service/Event_Channel.i:
+ * local/bin/Event_Service/RT_Task.cpp:
+ * local/bin/Event_Service/RT_Task.h:
+ The ACE_TIMEPROBE implementation was moved into the orbsvcs
+ library.
+ Added some more ACE_TIMEPROBE to the point were all the lifetime
+ of an event seems to every message
+ seems
+ Removed some forwarding info leftovers on the Event Channel
+ implementation.
+
+ * local/tests/Latency.cpp:
+ Added some ACE_TIMEPROBE calls to measure delays.
+ Use the double field to timestamp the event, using a
+ highrestimer (TOTAL HACK).
+
Sun Nov 30 16:57:40 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
* bin/Event_Service/Makefile:
diff --git a/TAO/local/bin/Event_Service/Dispatching_Modules.h b/TAO/local/bin/Event_Service/Dispatching_Modules.h
index 31ce297788b..5fc18f41a4a 100644
--- a/TAO/local/bin/Event_Service/Dispatching_Modules.h
+++ b/TAO/local/bin/Event_Service/Dispatching_Modules.h
@@ -23,6 +23,7 @@
#ifndef ACE_DISPATCHING_MODULES_H
#define ACE_DISPATCHING_MODULES_H
+#include "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 027bd74dbd5..fe2ecac5fc6 100644
--- a/TAO/local/bin/Event_Service/Event_Channel.cpp
+++ b/TAO/local/bin/Event_Service/Event_Channel.cpp
@@ -628,6 +628,7 @@ ACE_EventChannel::shutdown (void)
// to call deactive_impl () on a CORBA::POA is that the portable
// way?
// With TAO we need access to the ORB (to call shutdown() on it).
+ TAO_ORB_Core_instance ()->orb ()->shutdown ();
}
void
@@ -1242,7 +1243,6 @@ ACE_ES_Consumer_Correlation::ACE_ES_Consumer_Correlation (void) :
correlation_module_ (0),
type_id_index_ (0),
channel_ (0),
- forwarding_rt_info_ (0),
qos_ (),
pending_events_ (0),
lock_ (),
@@ -1588,13 +1588,6 @@ ACE_ES_Consumer_Correlation::register_event (RtecEventChannelAdmin::Dependency &
ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
"ACE_ES_Consumer_Correlation::register_event"), -1);
- // If we're forwarding, then subscriptions should affect the
- // forwarding rt_info, not the consumer's rt_info. Ok, this might
- // be dangerous since the consumer rep can be shared between many
- // correlation groups.
- if (forwarding_rt_info_ != 0)
- consumer_rep->dependency ()->rt_info = forwarding_rt_info_;
-
switch (group_type)
{
case ACE_ES_CONJUNCTION_DESIGNATOR:
@@ -1658,10 +1651,10 @@ ACE_ES_Consumer_Correlation::push (ACE_ES_Consumer_Rep *cr,
// Calls reschedule on all disjunction groups it belongs to.
cr->reschedule_deadlines ();
- ACE_TIMEPROBE (" ACE_ES_Consumer_Correlation::push, determine NO CORRELATION");
+ ACE_TIMEPROBE (" Consumer_Correlation::push, determine NO CORR.");
ACE_ES_Dispatch_Request *request =
new ACE_ES_Dispatch_Request (consumer_, event, cr->dependency ()->rt_info);
- ACE_TIMEPROBE (" ACE_ES_Consumer_Correlation::push, NO_CORR: alloc");
+ ACE_TIMEPROBE (" Consumer_Correlation::push, NO_CORR: alloc");
if (request == 0)
ACE_ERROR_RETURN ((LM_ERROR, "%p.\n",
@@ -1774,7 +1767,7 @@ ACE_ES_Consumer_Rep::execute (void)
void
ACE_ES_Consumer_Rep_Timeout::execute (void)
{
- ACE_TIMEPROBE ("Timeout execute");
+ ACE_TIMEPROBE (" Consumer_Rep_Timeout::execute");
if (this->receiving_events ())
{
CORBA::Environment __env;
@@ -2426,10 +2419,12 @@ ACE_ES_Subscription_Module::push (ACE_Push_Supplier_Proxy *source,
if (this->push_source (source, event) == -1)
return;
- ACE_TIMEPROBE (" push_source_type");
+ ACE_TIMEPROBE (" begin push_source_type");
if (this->push_source_type (source, event) == -1)
return;
+
+ ACE_TIMEPROBE (" end push_source_type");
}
void
@@ -2706,63 +2701,13 @@ ACE_ES_Priority_Timer::handle_timeout (const ACE_Time_Value &,
ACE_ERROR_RETURN ((LM_ERROR, "ACE_ES_Priority_Timer::handle_timeout: "
"received act == 0!!!.\n"), 0);
- act->execute ();
-
- return 0;
-}
-
-ACE_Timeprobe *ACE_Timeprobe::instance_ = 0;
-
-ACE_Timeprobe &
-ACE_Timeprobe::instance ()
-{
- if (instance_ == 0)
- {
- // if this allocation fails, we're in big trouble . . .
- ACE_NEW_RETURN (instance_, ACE_Timeprobe (), *instance_);
- }
-
- return *instance_;
-}
-
-void
-ACE_Timeprobe::timeprobe (const char *id)
-{
- timeprobes [current_slot_].time_ = ACE_OS::gethrtime ();
- timeprobes [current_slot_].id_ = id;
-
- ++current_slot_;
+ ACE_TIMEPROBE ("ES_Priority_Queue - start execute");
- ACE_ASSERT (current_slot_ < SLOTS);
-}
-
-void
-ACE_Timeprobe::print_times () const
-{
- ACE_OS::printf ("\nACE_Timeprobe; %u timeprobes were recorded:\n",
- current_slot_ > 1 ? current_slot_ - 1
- : 0);
-
- if (current_slot_ > 0)
- {
- for (u_int i = 1; i < current_slot_; ++i)
- {
- ACE_hrtime_t elapsed = timeprobes [i].time_ - timeprobes [i-1].time_;
- ACE_OS::printf ("\"%-55s\"%10.3f usec\n",
- timeprobes [i].id_,
- (double) (elapsed / 1000) /* nanosec/microsec */);
- }
+ act->execute ();
- ACE_hrtime_t elapsed2 = timeprobes [current_slot_ - 1].time_ -
- timeprobes [0].time_;
+ ACE_TIMEPROBE ("ES_Priority_Queue - end execute");
- // print the total time
- ACE_OS::printf (
- " =========\n"
- " total"
- "%10.3f usec\n",
- (double) (elapsed2 / 1000) /* nanoseconds/microsecond */);
- }
+ return 0;
}
// ************************************************************
diff --git a/TAO/local/bin/Event_Service/Event_Channel.h b/TAO/local/bin/Event_Service/Event_Channel.h
index ba036ae93d3..9d092cc3349 100644
--- a/TAO/local/bin/Event_Service/Event_Channel.h
+++ b/TAO/local/bin/Event_Service/Event_Channel.h
@@ -13,8 +13,9 @@
// Tim Harrison (harrison@cs.wustl.edu)
//
// = DESCRIPTION
-// ACE implementation of COSS Event Services For more detailed
-// information, see http://www.cs.wustl.edu/~mda/event.html.
+// TAO implementation of the Real Time Event Services. For more
+// detailed information, see
+// http://www.cs.wustl.edu/~schmidt/oopsla.ps.gz
//
// = NAMING CONVENTIONS
// Some of the naming might be confusing. For instance
@@ -32,6 +33,7 @@
#include "ace/Containers.h"
#include "ace/Map_Manager.h"
+#include "Timeprobe.h"
#include "Local_ESTypes.h"
#include "CORBA_Utils_T.h"
#include "Task_Manager.h"
@@ -759,10 +761,6 @@ private:
RtecEventChannelAdmin::ProxyPushConsumer_ptr channel_;
// For event forwarding.
- RtecScheduler::handle_t forwarding_rt_info_;
- // Ties together the suppliers and the consumers of the forward
- // event.
-
RtecEventChannelAdmin::SupplierQOS qos_;
// Supplier QOS specifications.
@@ -1300,40 +1298,6 @@ private:
const char *
ACE_ES_Consumer_Name (const RtecEventChannelAdmin::ConsumerQOS &qos);
-class ACE_Timeprobe
-{
-public:
- static ACE_Timeprobe &instance ();
-
- void timeprobe (const char *id);
-
- void print_times () const;
-
- void reset();
-
- void destroy ();
-
-private:
- static ACE_Timeprobe *instance_;
-
- enum { SLOTS = 8192 };
-
- u_int current_slot_;
-
- typedef struct timeprobe_info {
- const char *id_;
- ACE_hrtime_t time_;
- } timeprobe_t;
- timeprobe_t timeprobes [SLOTS];
-
- ACE_Timeprobe ();
- ~ACE_Timeprobe ();
-
- friend class null_friend_to_avoid_compiler_warning_about_no_friends;
-
- ACE_Timeprobe (const ACE_Timeprobe &); // not implemented
-};
-
// ************************************************************
typedef ACE_ES_Simple_Array <ACE_ES_Consumer_Rep *,
@@ -1341,18 +1305,6 @@ typedef ACE_ES_Simple_Array <ACE_ES_Consumer_Rep *,
typedef ACE_ES_Array_Iterator <ACE_ES_Consumer_Rep *> ACE_ES_CRSet_Iterator;
-#if defined (ACE_ENABLE_TIMEPROBES)
-# define ACE_TIMEPROBE_RESET ACE_Timeprobe::instance ().reset ()
-# define ACE_TIMEPROBE(id) ACE_Timeprobe::instance ().timeprobe (id)
-# define ACE_TIMEPROBE_PRINT ACE_Timeprobe::instance ().print_times ()
-# define ACE_TIMEPROBE_FINI ACE_Timeprobe::instance ().destroy ()
-#else
-# define ACE_TIMEPROBE_RESET
-# define ACE_TIMEPROBE(id)
-# define ACE_TIMEPROBE_PRINT
-# define ACE_TIMEPROBE_FINI
-#endif /* ACE_ENABLE_TIMEPROBES */
-
#if defined (__ACE_INLINE__)
#include "Event_Channel.i"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/local/bin/Event_Service/Event_Channel.i b/TAO/local/bin/Event_Service/Event_Channel.i
index 7cfff7fb0a9..304a8e321d9 100644
--- a/TAO/local/bin/Event_Service/Event_Channel.i
+++ b/TAO/local/bin/Event_Service/Event_Channel.i
@@ -816,32 +816,6 @@ ACE_ES_Dependency_Iterator::first_rt_info (void)
// ************************************************************
ACE_INLINE
-ACE_Timeprobe::ACE_Timeprobe ()
- : current_slot_ (0)
-{
-}
-
-ACE_INLINE
-ACE_Timeprobe::~ACE_Timeprobe ()
-{
-}
-
-ACE_INLINE void
-ACE_Timeprobe::destroy ()
-{
- delete instance_;
- instance_ = 0;
-}
-
-ACE_INLINE void
-ACE_Timeprobe::reset()
-{
- current_slot_ = 0;
-}
-
-// ************************************************************
-
-ACE_INLINE
ACE_ES_Conjunction_Group::ACE_ES_Conjunction_Group (void) :
forward_value_ (0)
{
diff --git a/TAO/local/bin/Event_Service/Makefile b/TAO/local/bin/Event_Service/Makefile
index 5407e30037e..f73ab072e15 100644
--- a/TAO/local/bin/Event_Service/Makefile
+++ b/TAO/local/bin/Event_Service/Makefile
@@ -173,7 +173,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/varout.h \
$(TAO_ROOT)/tao/any.h \
$(TAO_ROOT)/tao/poa.h \
- $(TAO_ROOT)/tao/tao_internals.h \
$(TAO_ROOT)/tao/params.h \
$(TAO_ROOT)/tao/client_factory.h \
$(TAO_ROOT)/tao/server_factory.h \
@@ -204,11 +203,11 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/sequence.i \
$(TAO_ROOT)/tao/typecode.i \
$(TAO_ROOT)/tao/any.i \
- $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/stub.i \
$(TAO_ROOT)/tao/object.i \
$(TAO_ROOT)/tao/orbobj.i \
$(TAO_ROOT)/tao/marshal.i \
+ $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/poa.i \
$(TAO_ROOT)/tao/giop.i \
$(TAO_ROOT)/tao/iioporb.i \
@@ -226,7 +225,10 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerC.h \
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerC.i \
$(TAO_ROOT)/orbsvcs/lib/Scheduler_Factory.i \
- Event_Channel.h Local_ESTypes.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/RtecSchedulerS.h \
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerS.i \
@@ -383,7 +385,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/varout.h \
$(TAO_ROOT)/tao/any.h \
$(TAO_ROOT)/tao/poa.h \
- $(TAO_ROOT)/tao/tao_internals.h \
$(TAO_ROOT)/tao/params.h \
$(TAO_ROOT)/tao/client_factory.h \
$(TAO_ROOT)/tao/server_factory.h \
@@ -414,11 +415,11 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/sequence.i \
$(TAO_ROOT)/tao/typecode.i \
$(TAO_ROOT)/tao/any.i \
- $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/stub.i \
$(TAO_ROOT)/tao/object.i \
$(TAO_ROOT)/tao/orbobj.i \
$(TAO_ROOT)/tao/marshal.i \
+ $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/poa.i \
$(TAO_ROOT)/tao/giop.i \
$(TAO_ROOT)/tao/iioporb.i \
@@ -465,6 +466,8 @@ 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 \
@@ -548,7 +551,10 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(ACE_ROOT)/ace/Reactor.i \
$(ACE_ROOT)/ace/Reactor_Impl.h \
$(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- Dispatching_Modules.h ReactorTask.h Fast_Reactor.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 \
$(ACE_ROOT)/ace/Token.i \
@@ -659,6 +665,8 @@ 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 \
@@ -807,7 +815,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/varout.h \
$(TAO_ROOT)/tao/any.h \
$(TAO_ROOT)/tao/poa.h \
- $(TAO_ROOT)/tao/tao_internals.h \
$(TAO_ROOT)/tao/params.h \
$(TAO_ROOT)/tao/client_factory.h \
$(TAO_ROOT)/tao/server_factory.h \
@@ -838,11 +845,11 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/sequence.i \
$(TAO_ROOT)/tao/typecode.i \
$(TAO_ROOT)/tao/any.i \
- $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/stub.i \
$(TAO_ROOT)/tao/object.i \
$(TAO_ROOT)/tao/orbobj.i \
$(TAO_ROOT)/tao/marshal.i \
+ $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/poa.i \
$(TAO_ROOT)/tao/giop.i \
$(TAO_ROOT)/tao/iioporb.i \
@@ -855,7 +862,10 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/connect.i \
$(TAO_ROOT)/tao/singletons.h \
$(TAO_ROOT)/orbsvcs/lib/RtecSchedulerC.i \
- RT_Task.i Debug_Macros.h Event_Channel.h Local_ESTypes.h \
+ 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 \
$(TAO_ROOT)/orbsvcs/lib/CosNamingC.i \
@@ -1006,7 +1016,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/varout.h \
$(TAO_ROOT)/tao/any.h \
$(TAO_ROOT)/tao/poa.h \
- $(TAO_ROOT)/tao/tao_internals.h \
$(TAO_ROOT)/tao/params.h \
$(TAO_ROOT)/tao/client_factory.h \
$(TAO_ROOT)/tao/server_factory.h \
@@ -1037,11 +1046,11 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/sequence.i \
$(TAO_ROOT)/tao/typecode.i \
$(TAO_ROOT)/tao/any.i \
- $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/stub.i \
$(TAO_ROOT)/tao/object.i \
$(TAO_ROOT)/tao/orbobj.i \
$(TAO_ROOT)/tao/marshal.i \
+ $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/poa.i \
$(TAO_ROOT)/tao/giop.i \
$(TAO_ROOT)/tao/iioporb.i \
@@ -1154,7 +1163,6 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/varout.h \
$(TAO_ROOT)/tao/any.h \
$(TAO_ROOT)/tao/poa.h \
- $(TAO_ROOT)/tao/tao_internals.h \
$(TAO_ROOT)/tao/params.h \
$(TAO_ROOT)/tao/client_factory.h \
$(TAO_ROOT)/tao/server_factory.h \
@@ -1185,11 +1193,11 @@ Event_Service: $(addprefix $(VDIR),$(ES_OBJS))
$(TAO_ROOT)/tao/sequence.i \
$(TAO_ROOT)/tao/typecode.i \
$(TAO_ROOT)/tao/any.i \
- $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/stub.i \
$(TAO_ROOT)/tao/object.i \
$(TAO_ROOT)/tao/orbobj.i \
$(TAO_ROOT)/tao/marshal.i \
+ $(TAO_ROOT)/tao/cdr.i \
$(TAO_ROOT)/tao/poa.i \
$(TAO_ROOT)/tao/giop.i \
$(TAO_ROOT)/tao/iioporb.i \
diff --git a/TAO/local/bin/Event_Service/RT_Task.cpp b/TAO/local/bin/Event_Service/RT_Task.cpp
index 79a7adeb47d..6c3c0dacbf6 100644
--- a/TAO/local/bin/Event_Service/RT_Task.cpp
+++ b/TAO/local/bin/Event_Service/RT_Task.cpp
@@ -107,9 +107,13 @@ ACE_RT_Task::svc_one (void)
int result;
u_long command_action = ACE_RT_Task_Command::RELEASE;
+ ACE_TIMEPROBE (" RT_Task - start execute");
+
// @@ Put exception handling around this!
result = command->execute (command_action);
+ ACE_TIMEPROBE (" RT_Task - end execute");
+
switch (command_action)
{
case ACE_RT_Task_Command::RELEASE:
diff --git a/TAO/local/bin/Event_Service/RT_Task.h b/TAO/local/bin/Event_Service/RT_Task.h
index 5a8f8d2445e..c4b11907e5d 100644
--- a/TAO/local/bin/Event_Service/RT_Task.h
+++ b/TAO/local/bin/Event_Service/RT_Task.h
@@ -14,7 +14,7 @@
//
// = DESCRIPTION
// Wrapper on top of ACE Task that integrates an Active Object with
-// the COFP Scheduler and Event Service.
+// the Event Service.
//
// ============================================================================
diff --git a/TAO/local/tests/Latency.cpp b/TAO/local/tests/Latency.cpp
index be44645cf94..9a6fedbc1c0 100644
--- a/TAO/local/tests/Latency.cpp
+++ b/TAO/local/tests/Latency.cpp
@@ -9,6 +9,7 @@
#include "ace/Sched_Params.h"
#include "ace/Profile_Timer.h"
+#include "Timeprobe.h"
#include "Event_Utilities.h"
#include "Event_Service_Constants.h"
#include "Scheduler_Factory.h"
@@ -118,7 +119,7 @@ Latency_Consumer::push (const RtecEventComm::EventSet &events,
CORBA::Environment &)
{
// ACE_DEBUG ((LM_DEBUG, "Latency_Consumer:push - "));
- // @@ ACE_TIMEPROBE ("push event to consumer");
+ ACE_TIMEPROBE ("push event to consumer");
if (events.length () == 0)
{
@@ -146,7 +147,11 @@ Latency_Consumer::push (const RtecEventComm::EventSet &events,
{
if (measure_jitter_)
{
- const ACE_hrtime_t elapsed = ACE_OS::gethrtime () - event_push_time;
+ // @@ TOTAL HACK
+ ACE_hrtime_t t; // = event_push_time;
+ ACE_OS::memcpy (&t, &events[i].time_, sizeof (t));
+
+ const ACE_hrtime_t elapsed = ACE_OS::gethrtime () - t;
// Note: the division by 1 provides transparent support of
// ACE_U_LongLong.
ACE_Time_Value latency (elapsed / ACE_ONE_SECOND_IN_NSECS,
@@ -161,8 +166,7 @@ Latency_Consumer::push (const RtecEventComm::EventSet &events,
}
}
}
-
- // @@ ACE_TIMEPROBE_PRINT;
+
}
}
@@ -413,7 +417,11 @@ Latency_Supplier::push (const RtecEventComm::EventSet &events,
// const ACE_hrtime_t now = ACE_OS::gethrtime ();
// event.time_.set (now / ACE_ONE_SECOND_IN_NSECS,
// (now % ACE_ONE_SECOND_IN_NSECS) / 1000);
- event_push_time = ACE_OS::gethrtime ();
+
+ // @@ TOTAL HACK
+ // event_push_time = ACE_OS::gethrtime ();
+ ACE_hrtime_t t = ACE_OS::gethrtime ();
+ ACE_OS::memcpy (&event.time_, &t, sizeof (event.time_));
}
// @@ ACE_TIMEPROBE_RESET;
@@ -440,13 +448,14 @@ Latency_Supplier::push (const RtecEventComm::EventSet &events,
}
#endif /* quantify */
- // @@ ACE_TIMEPROBE ("time to read high-res clock and "
- // @@ "compare an int with 0");
+ ACE_TIMEPROBE (" supplier starts pushing event");
RtecEventComm::EventSet events (1);
events.length (1);
events[0] = event;
consumers_->push (events, ACE_TRY_ENV);
+
+ ACE_TIMEPROBE (" supplier ends pushing event");
}
ACE_CHECK_ENV;
}
@@ -464,7 +473,7 @@ Latency_Supplier::push (const RtecEventComm::EventSet &events,
// Check if we're done.
if (master_ && (total_sent_ >= total_messages_))
- this->shutdown ();
+ this->shutdown ();
}
else
{
@@ -531,9 +540,11 @@ Latency_Supplier::shutdown (void)
{
// @@ TODO: Do this portably (keeping the ORB_ptr returned from
// ORB_init)
+ channel_admin_->destroy (ACE_TRY_ENV);
+ ACE_CHECK_ENV;
+
TAO_ORB_Core_instance ()->orb ()->shutdown ();
}
- ACE_CHECK_ENV;
}
ACE_CATCHANY
{
@@ -711,8 +722,8 @@ main (int argc, char *argv [])
// Allocate the timeprobe instance now, so we don't measure
// the cost of doing it later.
- // @@ ACE_TIMEPROBE_RESET;
-
+ ACE_TIMEPROBE_RESET;
+
CosNaming::Name channel_name (1);
channel_name[0].id = CORBA::string_dup ("EventService");
channel_name.length (1);
@@ -792,7 +803,8 @@ main (int argc, char *argv [])
}
delete [] consumer;
- // @@ ACE_TIMEPROBE_FINI;
+ ACE_TIMEPROBE_PRINT;
+ ACE_TIMEPROBE_FINI;
}
ACE_CATCH (CORBA::SystemException, sys_ex)
{