Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix tracing debug mode (and please sonar)
[simgrid.git] / src / simix / ActorImpl.cpp
index a858523..07e515a 100644 (file)
@@ -337,9 +337,7 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
   XBT_DEBUG("Inserting %s(%s) in the to_run list", process->get_cname(), host->get_cname());
   simix_global->process_to_run.push_back(process);
   intrusive_ptr_add_ref(process);
-  /* Tracing the process creation */
-  if (TRACE_actor_is_enabled())
-    simgrid::instr::Container::byName(process->host->get_name())->createChild(instr_pid(process->ciface()), "ACTOR");
+
   /* The onCreation() signal must be delayed until there, where the pid and everything is set */
   simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
   simgrid::s4u::Actor::on_creation(tmp);
@@ -395,15 +393,17 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn
   simix_global->process_to_run.push_back(process);
   intrusive_ptr_add_ref(process);
 
-  /* Tracing the process creation */
-  if (TRACE_actor_is_enabled())
-    simgrid::instr::Container::byName(process->host->get_name())->createChild(instr_pid(process->ciface()), "ACTOR");
 
   auto* context = dynamic_cast<simgrid::kernel::context::AttachContext*>(process->context);
   if (not context)
     xbt_die("Not a suitable context");
 
   context->attach_start();
+
+  /* The onCreation() signal must be delayed until there, where the pid and everything is set */
+  simgrid::s4u::ActorPtr tmp = process->iface(); // Passing this directly to onCreation will lead to crashes
+  simgrid::s4u::Actor::on_creation(tmp);
+
   return process;
 }
 
@@ -565,10 +565,6 @@ void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const
 
 }
 
-void simcall_HANDLER_process_killall(smx_simcall_t simcall)
-{
-  SIMIX_process_killall(simcall->issuer);
-}
 /**
  * \brief Kills all running processes.
  * \param issuer this one will not be killed
@@ -793,7 +789,7 @@ void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart) {
  * \param code the main function of the process
  * \param data a pointer to any data one may want to attach to the new object. It is for user-level information and can
  * be nullptr.
- * It can be retrieved with the function \ref simcall_process_get_data.
+ * It can be retrieved with the method ActorImpl::getUserData().
  * \param host where the new agent is executed.
  * \param argc first argument passed to \a code
  * \param argv second argument passed to \a code