diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-05-12 12:22:33 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-05-12 12:22:33 +0000 |
commit | 9a3482ae931229ec37b98f071dbd99e64f79b3ce (patch) | |
tree | a34aaa9e24f9fa03d06b29d9ea604c24ae3e2948 | |
parent | f4e386c2d0a454521746a126ae0752313a1eb8ff (diff) | |
download | ATCD-9a3482ae931229ec37b98f071dbd99e64f79b3ce.tar.gz |
ChangeLogTag: Mon May 12 12:19:15 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | ACE/ChangeLog | 19 | ||||
-rw-r--r-- | ACE/examples/Monitor/Bytes_Sent/bytes_sent.cpp | 9 | ||||
-rw-r--r-- | ACE/examples/Monitor/CPU_Load/cpu_load.cpp | 9 | ||||
-rw-r--r-- | ACE/examples/Monitor/Constraint/constraint.cpp | 9 | ||||
-rw-r--r-- | ACE/examples/Monitor/Group/group.cpp | 9 | ||||
-rw-r--r-- | ACE/examples/Monitor/MC_Test_Utilities.cpp | 4 | ||||
-rw-r--r-- | ACE/examples/Monitor/MC_Test_Utilities.h | 8 | ||||
-rw-r--r-- | ACE/examples/Monitor/Memory_Usage/memory_usage.cpp | 10 | ||||
-rw-r--r-- | ACE/examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc | 1 | ||||
-rw-r--r-- | ACE/examples/Monitor/Message_Queue_Size/message_queue_size.cpp | 10 |
10 files changed, 87 insertions, 1 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 2f82204e8d0..ebbca33ab5f 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,22 @@ +Mon May 12 12:19:15 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu> + + * examples/Monitor/MC_Test_Utilities.h: + * examples/Monitor/Bytes_Sent/bytes_sent.cpp: + * examples/Monitor/Message_Queue_Size/message_queue_size.cpp: + * examples/Monitor/Constraint/constraint.cpp: + * examples/Monitor/CPU_Load/cpu_load.cpp: + * examples/Monitor/MC_Test_Utilities.cpp: + * examples/Monitor/Group/group.cpp: + * examples/Monitor/Memory_Usage/memory_usage.cpp: + + Added appropriate preprocessor guards to ensure a + successful build when ACE_HAS_MONITOR_FRAMEWORK is + defined as 0. + + * examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc: + + Removed outdated macro additions from project. + Fri May 9 18:58:52 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> * ace/Service_Config.h: diff --git a/ACE/examples/Monitor/Bytes_Sent/bytes_sent.cpp b/ACE/examples/Monitor/Bytes_Sent/bytes_sent.cpp index a15553c2683..e431f842369 100644 --- a/ACE/examples/Monitor/Bytes_Sent/bytes_sent.cpp +++ b/ACE/examples/Monitor/Bytes_Sent/bytes_sent.cpp @@ -3,8 +3,11 @@ #include "ace/OS_NS_unistd.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::MonitorControl; /// Subclass of ACE_Task_Base, meaning that the override of @@ -43,9 +46,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Set the timer for # of threads check at 2 sec. Monitor_Base *monitor = create_os_monitor<BYTES_SENT_MONITOR> (0, ACE_Time_Value (2)); @@ -65,5 +72,7 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) monitor->remove_ref (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } diff --git a/ACE/examples/Monitor/CPU_Load/cpu_load.cpp b/ACE/examples/Monitor/CPU_Load/cpu_load.cpp index 834a9ff9bbe..aa6f0e39116 100644 --- a/ACE/examples/Monitor/CPU_Load/cpu_load.cpp +++ b/ACE/examples/Monitor/CPU_Load/cpu_load.cpp @@ -3,8 +3,11 @@ #include "ace/OS_NS_unistd.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Subclass of ACE_Task_Base, meaning that the override of /// the svc() method below will run in a new thread when /// activate() is called on a class instance. @@ -41,9 +44,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// The Admin class will own the reactor and destroy it. We are /// passing a vanilla reactor to show how it works, but in real /// life it could be some specialized reactor. @@ -89,5 +96,7 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) cpu_monitor->remove_ref (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } diff --git a/ACE/examples/Monitor/Constraint/constraint.cpp b/ACE/examples/Monitor/Constraint/constraint.cpp index 04d885edc39..8ec24ee63bf 100644 --- a/ACE/examples/Monitor/Constraint/constraint.cpp +++ b/ACE/examples/Monitor/Constraint/constraint.cpp @@ -4,8 +4,11 @@ #include "ace/Monitor_Control_Action.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::MonitorControl; /// Two control actions that will be associated with two different @@ -63,9 +66,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Set the timer for # of threads check at 2 sec. Monitor_Base *bytes_monitor = create_os_monitor<BYTES_RECEIVED_MONITOR> (0, ACE_Time_Value (2)); @@ -118,5 +125,7 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) trigger16k->remove_ref (); bytes_monitor->remove_ref (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } diff --git a/ACE/examples/Monitor/Group/group.cpp b/ACE/examples/Monitor/Group/group.cpp index d5bd339a232..68a108f3a6a 100644 --- a/ACE/examples/Monitor/Group/group.cpp +++ b/ACE/examples/Monitor/Group/group.cpp @@ -6,8 +6,11 @@ #include "ace/Monitor_Admin_Manager.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::MonitorControl; /// Subclass of ACE_Task_Base, meaning that the override of @@ -58,9 +61,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Creates these future group members without automatic update. Monitor_Base *cpu_load_monitor = create_os_monitor<CPU_LOAD_MONITOR> (); @@ -153,5 +160,7 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) memory_usage_monitor->remove_ref (); group->remove_ref (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } diff --git a/ACE/examples/Monitor/MC_Test_Utilities.cpp b/ACE/examples/Monitor/MC_Test_Utilities.cpp index a149d2f14e6..8950a71082e 100644 --- a/ACE/examples/Monitor/MC_Test_Utilities.cpp +++ b/ACE/examples/Monitor/MC_Test_Utilities.cpp @@ -5,6 +5,8 @@ #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + void MC_Test_Utilities::display_timestamp ( const Monitor_Control_Types::Data &data) @@ -95,5 +97,7 @@ MC_Test_Utilities::display_packets_received ( cout << static_cast<ACE_UINT64> (data.value_) << endl; } +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + diff --git a/ACE/examples/Monitor/MC_Test_Utilities.h b/ACE/examples/Monitor/MC_Test_Utilities.h index 734cb4ae31b..9898af09daf 100644 --- a/ACE/examples/Monitor/MC_Test_Utilities.h +++ b/ACE/examples/Monitor/MC_Test_Utilities.h @@ -23,8 +23,12 @@ #include "examples/Monitor/MC_Test_Utilities_export.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::MonitorControl; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + /** * @struct MC_Test_Utilities * @@ -34,6 +38,8 @@ using namespace ACE_VERSIONED_NAMESPACE_NAME::ACE::MonitorControl; */ struct MC_TEST_UTILITIES_Export MC_Test_Utilities { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + static void display_timestamp (const Monitor_Control_Types::Data &data); static void display_num_threads (const Monitor_Control_Types::Data &data); static void display_mq_size (const Monitor_Control_Types::Data &data); @@ -43,6 +49,8 @@ struct MC_TEST_UTILITIES_Export MC_Test_Utilities static void display_bytes_received (const Monitor_Control_Types::Data &data); static void display_packets_sent (const Monitor_Control_Types::Data &data); static void display_packets_received (const Monitor_Control_Types::Data &data); + +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ }; #include /**/ "ace/post.h" diff --git a/ACE/examples/Monitor/Memory_Usage/memory_usage.cpp b/ACE/examples/Monitor/Memory_Usage/memory_usage.cpp index af31f8188b7..f39eeabe5e3 100644 --- a/ACE/examples/Monitor/Memory_Usage/memory_usage.cpp +++ b/ACE/examples/Monitor/Memory_Usage/memory_usage.cpp @@ -3,8 +3,11 @@ #include "ace/OS_NS_unistd.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Subclass of ACE_Task_Base, meaning that the override of /// the svc() method below will run in a new thread when /// activate() is called on a class instance. @@ -41,9 +44,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Set the timer for memory usage check at 2 sec. Monitor_Base *memory_usage_monitor = create_os_monitor<MEMORY_USAGE_MONITOR> (0, ACE_Time_Value (2)); @@ -79,5 +86,8 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) memory_usage_monitor->remove_ref (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } + diff --git a/ACE/examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc b/ACE/examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc index b8657e7bd5f..78d484be9de 100644 --- a/ACE/examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc +++ b/ACE/examples/Monitor/Message_Queue_Size/Message_Queue_Size.mpc @@ -4,7 +4,6 @@ project (*) : aceexe, ace_mc, avoids_ace_for_tao { exename = message_queue_size after += MC_Test_Utilities libs += MC_Test_Utilities - macros += ENABLE_MONITORS ENABLE_ACE_MONITORS source_files { message_queue_size.cpp diff --git a/ACE/examples/Monitor/Message_Queue_Size/message_queue_size.cpp b/ACE/examples/Monitor/Message_Queue_Size/message_queue_size.cpp index 01b5b63cd59..b418a723d31 100644 --- a/ACE/examples/Monitor/Message_Queue_Size/message_queue_size.cpp +++ b/ACE/examples/Monitor/Message_Queue_Size/message_queue_size.cpp @@ -3,8 +3,11 @@ #include "ace/OS_NS_unistd.h" #include "ace/MonitorControl/MonitorControl.h" + #include "examples/Monitor/MC_Test_Utilities.h" +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Subclass of ACE_Task_Base, meaning that the override of /// the svc() method below will run in a new thread when /// activate() is called on a class instance. @@ -59,9 +62,13 @@ public: } }; +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + int ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) { +#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1) + /// Create a message queue with a built-in monitor (since ACE was /// compiled with monitors enabled) and add the monitor to the /// registry (some ACE activities create a message queue under @@ -103,5 +110,8 @@ ACE_TMAIN (int /* argc */, ACE_TCHAR * /* argv */ []) /// Clean up the remaining message queue resources. monitored_queue.flush (); +#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */ + return 0; } + |