]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: Automatic trace collector start
authorprascle <prascle>
Mon, 26 Sep 2005 07:20:43 +0000 (07:20 +0000)
committerprascle <prascle>
Mon, 26 Sep 2005 07:20:43 +0000 (07:20 +0000)
13 files changed:
src/Container/SALOME_Container.cxx
src/Container/SALOME_ContainerManagerServer.cxx
src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/TestLifeCycleCORBA.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx
src/Registry/SALOME_Registry_Server.cxx
src/ResourcesManager/SALOME_ResourcesManager.cxx
src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx
src/SALOMELocalTrace/LocalTraceCollector.hxx
src/SALOMETraceCollector/SALOMETraceCollector.cxx
src/SALOMETraceCollector/SALOMETraceCollector.hxx
src/TestContainer/TestContainer.cxx

index 451523f2902e1dea52a051489a5e76240ae591b1..8c8249158844bf8439adb05c432f2318025872eb 100644 (file)
@@ -69,7 +69,7 @@ int main(int argc, char* argv[])
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
   CORBA::ORB_var orb = init(0 , 0 ) ;
          
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   INFOS_COMPILATION;
   BEGIN_OF(argv[0]);
 
index b63bca83775ff508ce684a0d3d6cce0259e541f8..5968657a8d93b2e8d3e6d3bd4d9febecb174c91f 100644 (file)
@@ -9,7 +9,7 @@ int main(int argc, char* argv[])
   CORBA::Object_var obj;
 
   CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   INFOS_COMPILATION;
   BEGIN_OF(argv[0]);
   try{ 
index 12eb91004bebbb790be27d983d2dc9e0d14eb554..0f288ed9e5e8731161fe3f091f863f5245a48ca4 100644 (file)
@@ -38,7 +38,7 @@ int main(int argc,char **argv)
 {
   // initialize the ORB
   CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   try 
     {
       CosNaming::NamingContext_var _rootContext, catalogContext;
index fc6ee8201a7784bdca076b8882f598e5a107b8be..46fa004090504ce2381ca1a7bd9fda2608c8467f 100644 (file)
@@ -73,7 +73,7 @@ SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns)
   char *xargv = "";
   char **argv = &xargv;
   CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   if (!ns)
     {
       _NS = new SALOME_NamingService(orb);
index 78716e123ccc72d07c71a1119805d55d98bc33ea..1d097ece8eaced309882242a2ac3e6f8e1d7da94 100644 (file)
@@ -53,7 +53,7 @@ int main (int argc, char * argv[])
     {
       // Initializing omniORB
       CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
-      SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+      LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
     
       // Obtain a reference to the root POA
       CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") ;
index 4f8425f91f29157a0346b4173b9f8fb7edc90ed3..fe32cd71de9ce0b2ae453c7f5cecb4f3157f64fc 100644 (file)
@@ -41,7 +41,7 @@ int main(int argc,char **argv)
 {
   // initialize the ORB
   CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   try 
     {
       CosNaming::NamingContext_var _rootContext, catalogContext;
index ab79d199a134416547aae80d573afd0f835af470..7105c5134a1d65ecc5995c6dbccca0abdabb5f85 100644 (file)
@@ -54,7 +54,7 @@ int main( int argc , char **argv )
 {
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   CORBA::ORB_var &orb = init( argc , argv ) ;
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   BEGIN_OF( argv[0] )
     INFOS_COMPILATION 
     SCRUTE(argc) 
index 2e826f6138d0eace49fc40fdb1e6fc7b7b44da0a..02feab8b0429c030568d121ae0bc78b52124be6e 100644 (file)
@@ -282,6 +282,7 @@ string SALOME_ResourcesManager::BuildTempFileToLaunchRemoteContainer(const strin
     command = "ssh ";
   else
     throw SALOME_Exception("Unknown protocol");
+   
 //   command+=machine;
 //   _CommandForRemAccess=command;
 //   command+=" ";
@@ -293,6 +294,7 @@ string SALOME_ResourcesManager::BuildTempFileToLaunchRemoteContainer(const strin
 //   command += machine;
 //   command += ".log 2>&1 &";
 //   cout << "Command is ... " << command << endl;
+
   command += machine; // on suppose le même user par defaut
   command += " ";
   command += getenv("APPLI"); // chemin relatif a $HOME
index f6f930a7933c6e91b58813181691a26e741340fe..a9612ec6c50e50597d501f2c035348a30cb7ed91 100644 (file)
@@ -38,7 +38,7 @@ int main(int argc,char **argv)
 {
   // initialize the ORB
   CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   try
     {
       CosNaming::NamingContext_var _rootContext, catalogContext;
index 01c5f35e823dc381d54e7a8831ce87cf6c1c7268..5551b41fadf95afe0191f6960d7fc9db2750246d 100644 (file)
@@ -42,7 +42,6 @@ class SALOMELOCALTRACE_EXPORT LocalTraceCollector
  protected:
   LocalTraceCollector();
 
- private:
   static int _threadToClose;
   static int _toFile;
   static LocalTraceCollector* _singleton;
index b9c2914b63fc1efeee9cf680a7c7cb60866c2868..8a7eb8905a39292e7726c186c476dd5cb65cbf84 100644 (file)
@@ -40,16 +40,6 @@ using namespace std;
 
 // Class attributes initialisation, for class method SALOMETraceCollector::run
 
-SALOMETraceCollector* SALOMETraceCollector::_singleton = 0;
-#ifndef WNT
-pthread_mutex_t SALOMETraceCollector::_singletonMutex;
-#else
-pthread_mutex_t SALOMETraceCollector::_singletonMutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
-int SALOMETraceCollector::_threadToClose = 0;
-pthread_t* SALOMETraceCollector::_threadId = 0; // used to control single run
-int SALOMETraceCollector::_toFile = 0;
-std::string SALOMETraceCollector::_fileName = "";
 CORBA::ORB_ptr SALOMETraceCollector::_orb = 0;
 
 // ============================================================================
@@ -68,7 +58,7 @@ CORBA::ORB_ptr SALOMETraceCollector::_orb = 0;
  */
 // ============================================================================
 
-SALOMETraceCollector* SALOMETraceCollector::instance(CORBA::ORB_ptr theOrb,
+LocalTraceCollector* SALOMETraceCollector::instance(CORBA::ORB_ptr theOrb,
                                                   int typeTrace)
 {
   if (_singleton == 0) // no need of lock when singleton already exists
index a726be3e1366264376bc6b14bfc66b2c515ee5d4..f439ac49269a35c2d269b1e9d689684271b48c66 100644 (file)
 
 #include <string>
 #include <CORBA.h>
+#include "LocalTraceCollector.hxx"
 #include "LocalTraceBufferPool.hxx"
 
-//! See LocalTraceCollector instead of SALOMETraceCollector for usage without CORBA
+//! See LocalTraceCollector instead of SALOMETraceCollector,
+//! for usage without CORBA
 
 #if defined SALOMETRACECOLLECTOR_EXPORTS
 #if defined WIN32
 #endif
 #endif
 
-class SALOMETRACECOLLECTOR_EXPORT SALOMETraceCollector
+class SALOMETRACECOLLECTOR_EXPORT SALOMETraceCollector:  LocalTraceCollector
 {
  public:
-  static SALOMETraceCollector* instance(CORBA::ORB_ptr theOrb, int typeTrace=0);
+  static LocalTraceCollector* instance(CORBA::ORB_ptr theOrb, int typeTrace=0);
   static void *run(void *bid);
   ~SALOMETraceCollector();
 
@@ -58,12 +60,6 @@ class SALOMETRACECOLLECTOR_EXPORT SALOMETraceCollector
   SALOMETraceCollector();
 
  private:
-  static int _threadToClose;
-  static int _toFile;
-  static SALOMETraceCollector* _singleton;
-  static pthread_mutex_t _singletonMutex;
-  static pthread_t* _threadId;
-  static std::string _fileName;
   static CORBA::ORB_ptr _orb;
 };
 
index 89137f358d7e9a17250e3f12d84e38a132785629..fea1b4f21837f0ef039d96fb224bb8cbc8159345 100644 (file)
@@ -82,7 +82,7 @@ int main (int argc, char * argv[])
   // Initializing omniORB
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   CORBA::ORB_var &orb = init( argc , argv ) ;
-  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
 
   try
     {