diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-08-10 10:32:26 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-08-10 10:32:26 +0200 |
commit | 1cf406cdd07dd66a51d5a78dcbf65499fe21be92 (patch) | |
tree | 4834f1235c0747a4ce63c8f7b5fefdebb5f9328d | |
parent | c534c7d92cb95fe9424eeceec259836455f9b432 (diff) | |
download | ATCD-1cf406cdd07dd66a51d5a78dcbf65499fe21be92.tar.gz |
Logging enhancements
* TAO/bin/tao_other_tests.lst:
* TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp:
* TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h:
* TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp:
* TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp:
* TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp:
* TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp:
* TAO/orbsvcs/ImplRepo_Service/LiveCheck.h:
* TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp:
* TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp:
* TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h:
* TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp:
* TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp:
-rw-r--r-- | TAO/bin/tao_other_tests.lst | 1 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp | 60 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp | 57 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp | 30 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/LiveCheck.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp | 17 |
13 files changed, 109 insertions, 112 deletions
diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst index dbb65c31e9e..40cd164b23e 100644 --- a/TAO/bin/tao_other_tests.lst +++ b/TAO/bin/tao_other_tests.lst @@ -145,6 +145,7 @@ TAO/orbsvcs/tests/ImplRepo/locked/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_ TAO/orbsvcs/tests/ImplRepo/manual_start/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !LynxOS !ACE_FOR_TAO !OpenVMS TAO/orbsvcs/tests/ImplRepo/scale/run_test.pl -servers 5 -objects 5: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/scale_clients/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS +TAO/orbsvcs/tests/ImplRepo/scale_clients/run_test.pl -clients 3 -secs_between_clients 0 -activationmode per_client: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/servers_list/run_test.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/servers_list/run_test_ft.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/Bug_689_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp index 8a2f03e2fe1..baa03e37c36 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp @@ -27,8 +27,8 @@ AsyncAccessManager::AsyncAccessManager (UpdateableServerInfo &info, if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ctor server <%C> pid = %d, %d\n"), - this, info->ping_id (), info->pid, info_->pid)); + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ctor server <%C> pid <%d>\n"), + this, info->ping_id (), info->pid)); } this->prev_pid_ = info_->pid; } @@ -66,7 +66,7 @@ void AsyncAccessManager::report (void) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@) - Server: %C, pid: %d, lastpid: %d, status: %C, waiters: %d\n"), + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@) - Server <%C> pid <%d> lastpid <%d> status <%C> waiters <%d>\n"), this, info_->ping_id (), info_->pid, this->prev_pid_, status_name (this->status_), this->rh_list_ .size())); } @@ -97,7 +97,7 @@ AsyncAccessManager::add_interest (ImR_ResponseHandler *rh, bool manual) if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::add_interest status <%s>\n"), + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::add_interest status <%C>\n"), this, status_name (this->status_))); } @@ -262,7 +262,7 @@ AsyncAccessManager::notify_waiters (void) ("Server terminating."); default: { ACE_CString reason = ACE_CString ("AAM_Status is ") + - ACE_TEXT_ALWAYS_CHAR (status_name (this->status_)); + status_name (this->status_); throw ImplementationRepository::CannotActivate (reason.c_str()); } } @@ -288,44 +288,44 @@ AsyncAccessManager::is_final (ImplementationRepository::AAM_Status s) s == ImplementationRepository::AAM_RETRIES_EXCEEDED); } -const ACE_TCHAR * +const char * AsyncAccessManager::status_name (ImplementationRepository::AAM_Status s) { switch (s) { case ImplementationRepository::AAM_INIT: - return ACE_TEXT ("INIT"); + return "INIT"; case ImplementationRepository::AAM_SERVER_STARTED_RUNNING: - return ACE_TEXT ("SERVER_STARTED_RUNNING"); + return "SERVER_STARTED_RUNNING"; case ImplementationRepository::AAM_ACTIVATION_SENT: - return ACE_TEXT ("ACTIVATION_SENT"); + return "ACTIVATION_SENT"; case ImplementationRepository::AAM_WAIT_FOR_RUNNING: - return ACE_TEXT ("WAIT_FOR_RUNNING"); + return "WAIT_FOR_RUNNING"; case ImplementationRepository::AAM_WAIT_FOR_PING: - return ACE_TEXT ("WAIT_FOR_PING"); + return "WAIT_FOR_PING"; case ImplementationRepository::AAM_WAIT_FOR_ALIVE: - return ACE_TEXT ("WAIT_FOR_ALIVE"); + return "WAIT_FOR_ALIVE"; case ImplementationRepository::AAM_WAIT_FOR_DEATH: - return ACE_TEXT ("WAIT_FOR_DEATH"); + return "WAIT_FOR_DEATH"; case ImplementationRepository::AAM_SERVER_READY: - return ACE_TEXT ("SERVER_READY"); + return "SERVER_READY"; case ImplementationRepository::AAM_SERVER_DEAD: - return ACE_TEXT ("SERVER_DEAD"); + return "SERVER_DEAD"; case ImplementationRepository::AAM_NOT_MANUAL: - return ACE_TEXT ("NOT_MANUAL"); + return "NOT_MANUAL"; case ImplementationRepository::AAM_NO_ACTIVATOR: - return ACE_TEXT ("NO_ACTIVATOR"); + return "NO_ACTIVATOR"; case ImplementationRepository::AAM_NO_COMMANDLINE: - return ACE_TEXT ("NO_COMMANDLINE"); + return "NO_COMMANDLINE"; case ImplementationRepository::AAM_RETRIES_EXCEEDED: - return ACE_TEXT ("RETRIES_EXCEEDED"); + return "RETRIES_EXCEEDED"; case ImplementationRepository::AAM_UPDATE_FAILED: - return ACE_TEXT ("UPDATE_FAILED"); + return "UPDATE_FAILED"; case ImplementationRepository::AAM_ACTIVE_TERMINATE: - return ACE_TEXT ("ACTIVE_TERMINATE"); + return "ACTIVE_TERMINATE"; } - return ACE_TEXT ("<undefined status>"); + return "<undefined status>"; } ImplementationRepository::AAM_Status @@ -367,7 +367,7 @@ AsyncAccessManager::activator_replied (bool success, int pid) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::activator_replied with ") - ACE_TEXT ("pid = %d this pid = %d, status = %s\n"), + ACE_TEXT ("pid <%d> this pid <%d> status <%C>\n"), this, pid, this->info_->pid, status_name (this->status_))); } this->update_status (ImplementationRepository::AAM_SERVER_READY); @@ -389,7 +389,7 @@ AsyncAccessManager::shutdown_initiated (void) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::shutdown_initiated ") - ACE_TEXT ("on server <%C> pid <%d> current status <%s>\n"), + ACE_TEXT ("on server <%C> pid <%d> current status <%C>\n"), this, this->info_->ping_id(), this->info_->pid, status_name (this->status_))); } this->prev_pid_ = this->info_->pid; @@ -409,7 +409,7 @@ AsyncAccessManager::server_is_shutting_down (void) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::server_is_shutting_down ") - ACE_TEXT ("on server <%C> pid <%d> prev_pid <%d> current status <%s>\n"), + ACE_TEXT ("on server <%C> pid <%d> prev_pid <%d> current status <%C>\n"), this, this->info_->ping_id(), this->info_->pid, this->prev_pid_, status_name (this->status_))); } this->prev_pid_ = this->info_->pid; @@ -468,8 +468,8 @@ AsyncAccessManager::notify_child_death (int pid) if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), child death, pid = %d, status = %s ") - ACE_TEXT ("this info_.pid = %d, prev_pid = %d, waiter count = %d\n"), + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), child death, pid <%d>, status <%C> ") + ACE_TEXT ("this info_.pid <%d> prev_pid <%d> waiter count <%d>\n"), this, pid, status_name (status_), this->info_->pid, this->prev_pid_, this->rh_list_.size() )); } @@ -495,7 +495,7 @@ AsyncAccessManager::listener_disconnected (void) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::listener_disconnected,") - ACE_TEXT (" this status %s\n"), + ACE_TEXT (" this status <%C>\n"), this, status_name (this->status_))); } @@ -509,8 +509,8 @@ AsyncAccessManager::ping_replied (LiveStatus server) if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied %s,") - ACE_TEXT (" this status %s\n"), + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::ping_replied <%C>,") + ACE_TEXT (" this status <%C>\n"), this, LiveEntry::status_name (server), status_name (this->status_))); } diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h index 02688459cd0..cb58cfb3319 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.h @@ -77,7 +77,7 @@ class Locator_Export AsyncAccessManager AsyncAccessManager *_add_ref (void); void _remove_ref (void); - static const ACE_TCHAR *status_name (ImplementationRepository::AAM_Status s); + static const char *status_name (ImplementationRepository::AAM_Status s); static bool is_final (ImplementationRepository::AAM_Status s); void report (void); void update_prev_pid (void); diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp index 8ebeff1cc95..4823ed44345 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp @@ -300,8 +300,8 @@ AsyncListManager::ping_replied (CORBA::ULong index, LiveStatus status, int pid) if (ImR_Locator_i::debug() > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncListManager(%@)::ping_replied, index = %d ") - ACE_TEXT ("status = %C, server pid = %d, waiters = %d\n"), + ACE_TEXT ("(%P|%t) AsyncListManager(%@)::ping_replied, index <%d> ") + ACE_TEXT ("status <%C>, server pid <%d>, waiters <%d>\n"), this,index, LiveEntry::status_name (status), pid, this->waiters_)); } if (evaluate_status (index, status, pid)) diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index cc9a8f65027..fdb5dbe6bc0 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -81,7 +81,7 @@ ImR_Activator_i::register_with_imr (ImplementationRepository::Activator_ptr acti try { if (this->debug_ > 1) - ORBSVCS_DEBUG( (LM_DEBUG, "ImR Activator: Contacting ImplRepoService...\n")); + ORBSVCS_DEBUG( (LM_DEBUG, "(%P|%t) ImR Activator: Contacting ImplRepoService...\n")); // First, resolve the ImR, without this we can go no further CORBA::Object_var obj = @@ -97,7 +97,7 @@ ImR_Activator_i::register_with_imr (ImplementationRepository::Activator_ptr acti if (this->debug_ > 9) { CORBA::String_var ior = orb_->object_to_string (obj.in ()); - ORBSVCS_DEBUG((LM_DEBUG, "ImR Activator: ImplRepoService ior <%C>\n", + ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: ImplRepoService ior <%C>\n", ior.in())); } @@ -105,22 +105,21 @@ ImR_Activator_i::register_with_imr (ImplementationRepository::Activator_ptr acti locator_->register_activator (name_.c_str (), activator); if (debug_ > 0) - ORBSVCS_DEBUG((LM_DEBUG, "ImR Activator: Registered with ImR.\n")); + ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: Registered with ImR.\n")); return; } else if (this->debug_ > 1) - ORBSVCS_DEBUG((LM_DEBUG, "ImR Activator: ImplRepoService not found\n")); + ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: ImplRepoService not found\n")); } catch (const CORBA::Exception& ex) { if (debug_ > 1) - ex._tao_print_exception ( - "ImR Activator: Can't register with ImR."); + ex._tao_print_exception ("ImR Activator: Can't register with ImR."); } if (debug_ > 0) - ORBSVCS_DEBUG ((LM_DEBUG, "ImR Activator: Not registered with ImR.\n")); + ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) ImR Activator: Not registered with ImR.\n")); } int @@ -170,7 +169,7 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt CORBA::String_var ior = this->orb_->object_to_string (activator.in ()); if (this->debug_ > 0) - ORBSVCS_DEBUG((LM_DEBUG, "ImR Activator: Starting %C\n", name_.c_str ())); + ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: Starting <%C>\n", name_.c_str ())); // initialize our process manager. // This requires a reactor that has signal handling. @@ -180,7 +179,7 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt if (this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE, reactor) == -1) { ORBSVCS_ERROR_RETURN ((LM_ERROR, - "The ACE_Process_Manager didnt get initialized\n"), -1); + "(%P|%t) ImR Activator: The ACE_Process_Manager didn't get initialized\n"), -1); } } @@ -193,7 +192,7 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt if (this->debug_ > 1) { ORBSVCS_DEBUG ((LM_DEBUG, - "ImR Activator: The Activator IOR is: <%C>\n", ior.in ())); + "(%P|%t) ImR Activator: The Activator IOR is: <%C>\n", ior.in ())); } // The last thing we do is write out the ior so that a test program can assume @@ -204,7 +203,7 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt if (fp == 0) { ORBSVCS_ERROR_RETURN ((LM_ERROR, - "ImR Activator: Could not open file: %s\n", opts.ior_filename ().c_str ()), -1); + "(%P|%t) ImR Activator: Could not open file <%s>\n", opts.ior_filename ().c_str ()), -1); } ACE_OS::fprintf (fp, "%s", ior.in ()); ACE_OS::fclose (fp); @@ -212,8 +211,7 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ( - "ImR_Activator_i::init_with_orb"); + ex._tao_print_exception ("ImR_Activator_i::init_with_orb"); throw; } return 0; @@ -229,10 +227,9 @@ ImR_Activator_i::init (Activator_Options& opts) ACE_ARGV av (ACE_TEXT_CHAR_TO_TCHAR (cmdline.c_str ())); int argc = av.argc (); - CORBA::ORB_var orb = - CORBA::ORB_init (argc, av.argv (), "TAO_ImR_Activator"); + CORBA::ORB_var orb = CORBA::ORB_init (argc, av.argv (), "TAO_ImR_Activator"); - int ret = this->init_with_orb(orb.in (), opts); + int const ret = this->init_with_orb(orb.in (), opts); return ret; } @@ -243,7 +240,7 @@ ImR_Activator_i::fini (void) try { if (debug_ > 1) - ORBSVCS_DEBUG ((LM_DEBUG, "ImR Activator: Shutting down...\n")); + ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) ImR Activator: Shutting down...\n")); this->process_mgr_.close (); @@ -259,13 +256,13 @@ ImR_Activator_i::fini (void) { if (debug_ > 1) ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) ImR Activator: Unable to unregister from ImR.\n"))); + ACE_TEXT ("(%P|%t) ImR Activator: COMM_FAILURE, unable to unregister from ImR.\n"))); } catch (const CORBA::TRANSIENT&) { if (debug_ > 1) ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) ImR Activator: Unable to unregister from ImR.\n"))); + ACE_TEXT ("(%P|%t) ImR Activator: TRANSIENT, unable to unregister from ImR.\n"))); } catch (const CORBA::Exception& ex) { @@ -278,7 +275,7 @@ ImR_Activator_i::fini (void) this->orb_->destroy (); if (debug_ > 0) - ORBSVCS_DEBUG ((LM_DEBUG, "ImR Activator: Shut down successfully.\n")); + ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) ImR Activator: Shut down successfully.\n")); } catch (const CORBA::Exception& ex) { @@ -322,7 +319,7 @@ ImR_Activator_i::shutdown (bool signaled) if (signaled && this->in_upcall ()) { if (debug_ > 0) - ORBSVCS_DEBUG ((LM_DEBUG, "ImR Activator: ignoring signal during upcall.\n")); + ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) ImR Activator: ignoring signal during upcall.\n")); return; } if (! CORBA::is_nil (this->locator_.in ()) && this->registration_token_ != 0) @@ -347,9 +344,9 @@ ImR_Activator_i::kill_server (const char* name, CORBA::Long lastpid, CORBA::Shor { if (debug_ > 1) ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: Killing server <%C>, lastpid = %d\n", + "(%P|%t) ImR Activator: Killing server <%C>, lastpid <%d>\n", name, lastpid)); - pid_t lpid = static_cast<pid_t>(lastpid); + pid_t const lpid = static_cast<pid_t>(lastpid); pid_t pid = 0; bool found = false; int result = -1; @@ -385,8 +382,8 @@ ImR_Activator_i::kill_server (const char* name, CORBA::Long lastpid, CORBA::Shor if (debug_ > 1) ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: Killing server <%C> " - "signal %d to pid %d, found %d, this->notify_imr_ %d, result = %d\n", + "(%P|%t) ImR Activator: Killing server <%C> " + "signal <%d> to pid <%d> found <%d> this->notify_imr_ <%d> result <%d>\n", name, signum, static_cast<int> (pid), found, this->notify_imr_, result)); if (!found && result == 0 && this->notify_imr_) { @@ -461,7 +458,7 @@ ImR_Activator_i::start_server(const char* name, if (debug_ > 0) { ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: Starting %C <%C>...\n", + "(%P|%t) ImR Activator: Starting %C <%C>...\n", (unique ? "unique server" : "server"), name)); } @@ -471,7 +468,7 @@ ImR_Activator_i::start_server(const char* name, if (debug_ > 0) { ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: Unique instance already running pid <%d>\n", + "(%P|%t) ImR Activator: Unique instance already running pid <%d>\n", static_cast<int> (pid))); } char reason[32]; @@ -483,7 +480,7 @@ ImR_Activator_i::start_server(const char* name, size_t const cmdline_buf_len = ACE_OS::strlen(cmdline); if (debug_ > 0) ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: command line : len=<%d> <%C>\n\tdirectory <%C>\n", + "(%P|%t) ImR Activator: command line len <%d> <%C> directory <%C>\n", cmdline_buf_len, cmdline, dir) ); ACE_Process_Options proc_opts ( @@ -530,7 +527,7 @@ ImR_Activator_i::start_server(const char* name, if (pid == ACE_INVALID_PID) { ORBSVCS_ERROR ((LM_ERROR, - "ImR Activator: Cannot start server <%C> using <%C>\n", name, cmdline)); + "(%P|%t) ImR Activator: Cannot start server <%C> using <%C>\n", name, cmdline)); throw ImplementationRepository::CannotActivate(CORBA::string_dup ("Process Creation Failed")); } @@ -539,7 +536,7 @@ ImR_Activator_i::start_server(const char* name, if (debug_ > 1) { ORBSVCS_DEBUG((LM_DEBUG, - "ImR Activator: register death handler for server <%C> pid <%d>\n", + "(%P|%t) ImR Activator: register death handler for server <%C> pid <%d>\n", name, static_cast<int> (pid))); } diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp index e40411c6aa4..0b914394794 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp @@ -1338,7 +1338,8 @@ ImR_Locator_i::server_is_running if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) ImR_Locator_i::server_is_running aam is not nil\n"))); + ACE_TEXT ("(%P|%t) ImR_Locator_i::server_is_running <%C> aam is not nil\n"), + id)); } aam->server_is_running (partial_ior, srvobj.in()); } @@ -1347,7 +1348,8 @@ ImR_Locator_i::server_is_running if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) ImR_Locator_i::server_is_running aam is nil\n"))); + ACE_TEXT ("(%P|%t) ImR_Locator_i::server_is_running <<%C>> aam is nil\n"), + id)); } if (!info->is_mode(ImplementationRepository::PER_CLIENT)) { diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index 3161c1871e3..c41b9c80756 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -67,31 +67,31 @@ LiveListener::_remove_ref (void) const int LiveEntry::reping_msec_[] = {10, 100, 500, 1000, 1000, 2000, 2000, 5000, 5000}; int LiveEntry::reping_limit_ = sizeof (LiveEntry::reping_msec_) / sizeof (int); -const ACE_TCHAR * +const char * LiveEntry::status_name (LiveStatus s) { switch (s) { case LS_INIT: - return ACE_TEXT ("INIT"); + return "INIT"; case LS_UNKNOWN: - return ACE_TEXT ("UNKNOWN"); + return "UNKNOWN"; case LS_PING_AWAY: - return ACE_TEXT ("PING_AWAY"); + return "PING_AWAY"; case LS_DEAD: - return ACE_TEXT ("DEAD"); + return "DEAD"; case LS_ALIVE: - return ACE_TEXT ("ALIVE"); + return "ALIVE"; case LS_TRANSIENT: - return ACE_TEXT ("TRANSIENT"); + return "TRANSIENT"; case LS_LAST_TRANSIENT: - return ACE_TEXT ("LAST_TRANSIENT"); + return "LAST_TRANSIENT"; case LS_TIMEDOUT: - return ACE_TEXT ("TIMEDOUT"); + return "TIMEDOUT"; case LS_CANCELED: - return ACE_TEXT ("CANCELED"); + return "CANCELED"; } - return ACE_TEXT ("<undefined status>"); + return "<undefined status>"; } void @@ -208,7 +208,7 @@ LiveEntry::reset_status (void) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) LiveEntry::reset_status this <%x>, ") - ACE_TEXT ("server <%C> status <%s>\n"), + ACE_TEXT ("server <%C> status <%C>\n"), this, this->server_.c_str(), status_name (this->liveliness_))); } @@ -290,7 +290,7 @@ LiveEntry::status (LiveStatus l) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) LiveEntry::status change, ") - ACE_TEXT ("server <%C> status <%s>\n"), + ACE_TEXT ("server <%C> status <%C>\n"), this->server_.c_str(), status_name (this->liveliness_))); } @@ -340,7 +340,7 @@ LiveEntry::validate_ping (bool &want_reping, ACE_Time_Value& next) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) LiveEntry::validate_ping, status ") - ACE_TEXT ("<%s>, listeners <%d> server <%C>\n"), + ACE_TEXT ("<%C>, listeners <%d> server <%C>\n"), status_name (this->liveliness_), this->listeners_.size (), this->server_.c_str())); } @@ -360,7 +360,7 @@ LiveEntry::validate_ping (bool &want_reping, ACE_Time_Value& next) { ORBSVCS_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) LiveEntry::validate_ping, ") - ACE_TEXT ("status <%s>, listeners <%d>, ") + ACE_TEXT ("status <%C>, listeners <%d>, ") ACE_TEXT ("msec <%d> server <%C>\n"), status_name (this->liveliness_), this->listeners_.size (), msec, this->server_.c_str())); diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h index 10248c6d3a4..6bf8b811b06 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h @@ -125,7 +125,7 @@ class Locator_Export LiveEntry void reset_status (void); /// the current state value as text - static const ACE_TCHAR *status_name (LiveStatus s); + static const char *status_name (LiveStatus s); void update_listeners (void); bool validate_ping (bool &want_reping, ACE_Time_Value &next); diff --git a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp index 0a4925b5cb8..5179c01c0ff 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp @@ -90,7 +90,7 @@ namespace { ((flags_ & O_RDWR) != 0) ? ACE_TEXT ("r+") : (((flags_ & O_WRONLY) != 0) ? ACE_TEXT ("w") : ACE_TEXT ("r")); this->filename_ = file; -#ifdef ACE_WIN32 +#if defined (ACE_WIN32) this->file_ = ACE_OS::fopen (file.c_str(), flags_str); #else this->file_lock_.reset @@ -111,7 +111,7 @@ namespace { ACE_OS::fflush (this->file_); ACE_OS::fclose (this->file_); this->file_ = 0; -#ifdef ACE_WIN32 +#if defined (ACE_WIN32) if (this->unlink_in_destructor_) { ACE_OS::unlink (this->filename_.c_str ()); @@ -122,7 +122,7 @@ namespace { void lock (void) { -#ifndef ACE_WIN32 +#if defined (ACE_WIN32) if (this->locked_) return; @@ -1042,7 +1042,7 @@ Shared_Backing_Store::process_updates (void) if (this->opts_.debug() > 4) { ORBSVCS_DEBUG ((LM_INFO, - ACE_TEXT("(%P|%t) notify_access_state_update, %C now %s\n"), + ACE_TEXT("(%P|%t) notify_access_state_update, <%C> now <%C>\n"), entity.name.in (), AsyncAccessManager::status_name (entity.action.state ()))); } diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp index c5eaa18069f..80795493a74 100644 --- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp @@ -1365,7 +1365,7 @@ TAO_IMR_Op_Register::run (void) if (!this->quiet_) { ORBSVCS_DEBUG((LM_DEBUG, - "Server <%C> already registered.\n", + "(%P|%t) ImR: Server <%C> already registered.\n", this->server_name_.c_str ())); } return ALREADY_REGISTERED; @@ -1379,7 +1379,7 @@ TAO_IMR_Op_Register::run (void) if (!this->quiet_) { ORBSVCS_DEBUG((LM_DEBUG, - "Adding Server <%C> on update command.\n", + "(%P|%t) Adding Server <%C> on update command.\n", this->server_name_.c_str ())); } is_add_ = true; @@ -1415,8 +1415,8 @@ TAO_IMR_Op_Register::run (void) if (!this->quiet_) { ORBSVCS_DEBUG ((LM_DEBUG, - "Updating Server <%C> with default " - "activator of <%C>.\n", + "(%P|%t) ImR: Updating Server <%C> with default " + "activator of <%C>\n", this->server_name_.c_str (), options->activator.in ())); } @@ -1426,13 +1426,13 @@ TAO_IMR_Op_Register::run (void) if (!this->quiet_) { ORBSVCS_DEBUG((LM_DEBUG, - "Successfully registered <%C>.\n", + "(%P|%t) ImR: Successfully registered <%C>\n", this->server_name_.c_str ())); } } catch (const CORBA::NO_PERMISSION&) { - ORBSVCS_ERROR ((LM_ERROR, "No Permission: ImplRepo is in Locked mode\n")); + ORBSVCS_ERROR ((LM_ERROR, "(%P|%t) ImR: No Permission: ImplRepo is in Locked mode\n")); return TAO_IMR_Op::NO_PERMISSION; } catch (const CORBA::Exception& ex) diff --git a/TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h b/TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h index d43ae9d214f..8251b878f15 100644 --- a/TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/scale_clients/Test_i.h @@ -13,7 +13,6 @@ class Test_i : public virtual POA_Test { public: - Test_i (CORBA::Short num_requests_expected); virtual ~Test_i (); @@ -24,8 +23,7 @@ public: static bool expected_requests_made (); private: - - CORBA::Short num_requests_expected_; + CORBA::Short const num_requests_expected_; CORBA::Short num_requests_made_; static bool expected_requests_made_; diff --git a/TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp b/TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp index 1428de5a075..e8578b2c28b 100644 --- a/TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/scale_clients/client.cpp @@ -61,8 +61,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) CORBA::Object_var obj; - ///// Specify the relative round trip policy ///// - + //Specify the relative round trip policy if (rt_timeout_msecs > 0) { // Timeout specified in hundreds of nanoseconds which is @@ -99,7 +98,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (max_tries > 1) { ACE_DEBUG ((LM_DEBUG, - "Maximum number of tries = %d\n", + "(%P|%t) Maximum number of tries = %d\n", max_tries)); } @@ -121,17 +120,22 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (n == 0) { ACE_ERROR_RETURN ((LM_ERROR, - "ERROR: Expected number of requests from " - "server to by > 0\n"), + "(%P|%t) ERROR: Expected number of requests from " + "server to be > 0\n"), -1); } - + else + { + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Client got back <%d>\n", + n)); + } return 0; } catch(const CORBA::Exception& ex) { - ex._tao_print_exception ("client:"); + ex._tao_print_exception ("Client:"); } return -1; diff --git a/TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp b/TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp index ae0a11baa0e..8798c44b1a7 100644 --- a/TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/scale_clients/server.cpp @@ -1,4 +1,3 @@ -// server.cpp // This version uses the Implementation Repository. #include "Test_i.h" @@ -58,7 +57,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) break; case '?': ACE_DEBUG ((LM_DEBUG, - "usage: %s " + "Server: usage: %s " "-d <seconds to delay before initializing POA> ", "-n <number of expected requests> \n", argv[0])); @@ -67,11 +66,11 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } ACE_DEBUG ((LM_DEBUG, - "Delaying in initialization for %d seconds\n", + "(%P|%t) Server: delaying in initialization for <%d> seconds\n", init_delay_secs)); ACE_OS::sleep (init_delay_secs); ACE_DEBUG ((LM_DEBUG, - "Done with delay\n")); + "(%P|%t) Server: done with delay\n")); CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj.in()); @@ -89,24 +88,20 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) PortableServer::ObjectId_var object_id = PortableServer::string_to_ObjectId("test_object"); - // // Activate the servant with the test POA, // obtain its object reference, and get a // stringified IOR. - // test_poa->activate_object_with_id(object_id.in(), test_servant.in()); - // // Create binding between "TestService" and // the test object reference in the IOR Table. // Use a TAO extension to get the non imrified poa // to avoid forwarding requests back to the ImR. - TAO_Root_POA* tpoa = dynamic_cast<TAO_Root_POA*>(test_poa.in()); if (!tpoa) { ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Could not cast POA to root POA") + ACE_TEXT ("(%P|%t) Server: Could not cast POA to root POA") )); return -1; } @@ -130,7 +125,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) mgr->activate(); ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Server: Started <%C>\n", + "(%P|%t) Server: started <%C>\n", poa_name.c_str())); { @@ -154,7 +149,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (!expected_requests_made) { ACE_ERROR ((LM_ERROR, - "ERROR: Expected number of requests were not made\n")); + "(%P|%t) Server: ERROR: Expected number of requests were not made\n")); } int const status = expected_requests_made ? 0 : -1; |