Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a few more simplifications
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 30 Oct 2017 14:35:47 +0000 (15:35 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 30 Oct 2017 14:35:47 +0000 (15:35 +0100)
src/instr/instr_paje_types.cpp
src/instr/instr_paje_types.hpp
src/instr/instr_paje_values.cpp
src/msg/instr_msg_process.cpp
src/msg/instr_msg_task.cpp
src/msg/msg_vm.cpp
src/smpi/internals/instr_smpi.cpp
src/surf/instr_routing.cpp

index e9bd24f..03995c7 100644 (file)
@@ -111,22 +111,19 @@ void VariableType::subEvent(double timestamp, Container* container, double value
 LinkType::LinkType(std::string name, std::string alias, Type* father) : ValueType(name, alias, father)
 {
 }
-void LinkType::startEvent(double timestamp, Container* container, container_t endpoint, std::string value,
-                          std::string key)
+void LinkType::startEvent(Container* container, container_t endpoint, std::string value, std::string key)
 {
-  startEvent(timestamp, container, endpoint, value, key, -1);
+  startEvent(container, endpoint, value, key, -1);
 }
 
-void LinkType::startEvent(double timestamp, Container* container, container_t endpoint, std::string value,
-                          std::string key, int size)
+void LinkType::startEvent(Container* container, container_t endpoint, std::string value, std::string key, int size)
 {
-  new LinkEvent(timestamp, container, this, PAJE_StartLink, endpoint, value, key, size);
+  new LinkEvent(SIMIX_get_clock(), container, this, PAJE_StartLink, endpoint, value, key, size);
 }
 
-void LinkType::endEvent(double timestamp, Container* container, container_t endpoint, std::string value,
-                        std::string key)
+void LinkType::endEvent(Container* container, container_t endpoint, std::string value, std::string key)
 {
-  new LinkEvent(timestamp, container, this, PAJE_EndLink, endpoint, value, key);
+  new LinkEvent(SIMIX_get_clock(), container, this, PAJE_EndLink, endpoint, value, key);
 }
 
 void Type::logDefinition(e_event_type event_type)
index 10916d9..6d9a9bf 100644 (file)
@@ -87,12 +87,10 @@ public:
 class LinkType : public ValueType {
 public:
   LinkType(std::string name, std::string alias, Type* father);
-  void startEvent(double timestamp, Container* source_container, Container* sourceContainer, std::string value,
-                  std::string key);
-  void startEvent(double timestamp, Container* source_container, Container* sourceContainer, std::string value,
-                  std::string key, int size);
-  void endEvent(double timestamp, Container* source_container, Container* destContainer, std::string value,
-                std::string key);
+  void startEvent(Container* source_container, Container* sourceContainer, std::string value, std::string key);
+  void startEvent(Container* source_container, Container* sourceContainer, std::string value, std::string key,
+                  int size);
+  void endEvent(Container* source_container, Container* destContainer, std::string value, std::string key);
 };
 
 class EventType : public ValueType {
index 5f50455..d0bdb9d 100644 (file)
@@ -20,15 +20,13 @@ void EntityValue::print()
   if (instr_fmt_type != instr_fmt_paje)
     return;
   std::stringstream stream;
-  XBT_DEBUG("%s: event_type=%u", __FUNCTION__, simgrid::instr::PAJE_DefineEntityValue);
-  stream << std::fixed << std::setprecision(TRACE_precision());
-  stream << simgrid::instr::PAJE_DefineEntityValue;
+  XBT_DEBUG("%s: event_type=%u", __FUNCTION__, PAJE_DefineEntityValue);
+  stream << std::fixed << std::setprecision(TRACE_precision()) << PAJE_DefineEntityValue;
   stream << " " << id_ << " " << father_->getId() << " " << name_;
   if (not color_.empty())
     stream << " \"" << color_ << "\"";
   XBT_DEBUG("Dump %s", stream.str().c_str());
-  stream << std::endl;
-  fprintf(tracing_file, "%s", stream.str().c_str());
+  fprintf(tracing_file, "%s\n", stream.str().c_str());
 }
 
 }
index 6966e90..1d4201b 100644 (file)
@@ -26,7 +26,7 @@ void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host)
     container_t msg = simgrid::instr::Container::byName(instr_pid(process));
     simgrid::instr::LinkType* link =
         static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_LINK"));
-    link->startEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), msg, "M", key);
+    link->startEvent(simgrid::instr::Container::getRootContainer(), msg, "M", key);
 
     //destroy existing container of this process
     TRACE_msg_process_destroy (MSG_process_get_name (process), MSG_process_get_PID (process));
@@ -36,7 +36,7 @@ void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host)
 
     //end link
     msg = simgrid::instr::Container::byName(instr_pid(process));
-    link->endEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), msg, "M", key);
+    link->endEvent(simgrid::instr::Container::getRootContainer(), msg, "M", key);
   }
 }
 
index 4ed8629..eabb375 100644 (file)
@@ -94,7 +94,7 @@ void TRACE_msg_task_get_end(double start_time, msg_task_t task)
     std::string key = std::string("p") + std::to_string(task->counter);
     simgrid::instr::LinkType* link =
         static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_TASK_LINK"));
-    link->endEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), process_container, "SR", key);
+    link->endEvent(simgrid::instr::Container::getRootContainer(), process_container, "SR", key);
   }
 }
 
@@ -110,7 +110,7 @@ int TRACE_msg_task_put_start(msg_task_t task)
     std::string key = std::string("p") + std::to_string(task->counter);
     simgrid::instr::LinkType* link =
         static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MSG_PROCESS_TASK_LINK"));
-    link->startEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), process_container, "SR", key);
+    link->startEvent(simgrid::instr::Container::getRootContainer(), process_container, "SR", key);
   }
 
   return 1;
index 2e067af..ef8219c 100644 (file)
@@ -295,7 +295,7 @@ static int migration_rx_fun(int argc, char *argv[])
     container_t msg            = simgrid::instr::Container::byName(vm->getName());
     simgrid::instr::LinkType* link =
         static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MSG_VM_LINK"));
-    link->startEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), msg, "M", key);
+    link->startEvent(simgrid::instr::Container::getRootContainer(), msg, "M", key);
 
     // destroy existing container of this vm
     container_t existing_container = simgrid::instr::Container::byName(vm->getName());
@@ -307,7 +307,7 @@ static int migration_rx_fun(int argc, char *argv[])
 
     // end link
     msg  = simgrid::instr::Container::byName(vm->getName());
-    link->endEvent(MSG_get_clock(), simgrid::instr::Container::getRootContainer(), msg, "M", key);
+    link->endEvent(simgrid::instr::Container::getRootContainer(), msg, "M", key);
   }
 
   // Inform the SRC that the migration has been correctly performed
index dfe1b8b..d934f1a 100644 (file)
@@ -321,7 +321,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int tag, int size)
   simgrid::instr::LinkType* link =
       static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MPI_LINK"));
   XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key.c_str());
-  link->startEvent(SIMIX_get_clock(), simgrid::instr::Container::getRootContainer(), container, "PTP", key, size);
+  link->startEvent(simgrid::instr::Container::getRootContainer(), container, "PTP", key, size);
 }
 
 void TRACE_smpi_recv(int src, int dst, int tag)
@@ -335,5 +335,5 @@ void TRACE_smpi_recv(int src, int dst, int tag)
   simgrid::instr::LinkType* link =
       static_cast<simgrid::instr::LinkType*>(simgrid::instr::Type::getRootType()->byName("MPI_LINK"));
   XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key.c_str());
-  link->endEvent(SIMIX_get_clock(), simgrid::instr::Container::getRootContainer(), container, "PTP", key);
+  link->endEvent(simgrid::instr::Container::getRootContainer(), container, "PTP", key);
 }
index e9c886b..f2c5ecf 100644 (file)
@@ -110,8 +110,8 @@ static void linkContainers(container_t src, container_t dst, std::set<std::strin
   std::string key = std::to_string(counter);
   counter++;
 
-  link->startEvent(SIMIX_get_clock(), father, src, "topology", key);
-  link->endEvent(SIMIX_get_clock(), father, dst, "topology", key);
+  link->startEvent(father, src, "topology", key);
+  link->endEvent(father, dst, "topology", key);
 
   XBT_DEBUG("  linkContainers %s <-> %s", src->getCname(), dst->getCname());
 }