Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 6 Jul 2017 08:27:27 +0000 (10:27 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 6 Jul 2017 08:27:27 +0000 (10:27 +0200)
19 files changed:
include/simgrid/simix.h
src/bindings/java/JavaContext.cpp
src/mc/remote/Client.cpp
src/msg/msg_process.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/s4u/s4u_actor.cpp
src/simix/ActorImpl.cpp
src/simix/ActorImpl.hpp
src/simix/libsmx.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in
src/simix/smx_global.cpp
src/simix/smx_network.cpp
src/smpi/private.h
src/smpi/smpi_process.cpp
src/xbt/log.c

index dae571e..9f51fd5 100644 (file)
@@ -159,8 +159,6 @@ XBT_PUBLIC(smx_actor_t) SIMIX_process_self();
 XBT_PUBLIC(const char*) SIMIX_process_self_get_name();
 XBT_PUBLIC(void) SIMIX_process_self_set_data(void *data);
 XBT_PUBLIC(void*) SIMIX_process_self_get_data();
-XBT_PUBLIC(smx_context_t) SIMIX_process_get_context(smx_actor_t process);
-XBT_PUBLIC(void) SIMIX_process_set_context(smx_actor_t p,smx_context_t c);
 XBT_PUBLIC(int) SIMIX_process_has_pending_comms(smx_actor_t process);
 XBT_PUBLIC(void) SIMIX_process_on_exit_runall(smx_actor_t process);
 XBT_PUBLIC(void) SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data);
@@ -214,14 +212,12 @@ XBT_PUBLIC(void) SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int
 /* Process handling */
 XBT_PUBLIC(void) simcall_process_cleanup(smx_actor_t process);
 XBT_PUBLIC(void) simcall_process_suspend(smx_actor_t process);
-XBT_PUBLIC(void) simcall_process_resume(smx_actor_t process);
 
 /* Getters and Setters */
 XBT_PUBLIC(int) simcall_process_count();
 XBT_PUBLIC(void) simcall_process_set_data(smx_actor_t process, void *data);
 XBT_PUBLIC(xbt_dict_t) simcall_process_get_properties(smx_actor_t host);
 XBT_PUBLIC(void) simcall_process_set_kill_time(smx_actor_t process, double kill_time);
-XBT_PUBLIC(double) simcall_process_get_kill_time(smx_actor_t process);
 XBT_PUBLIC(void) simcall_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data);
 XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_actor_t process, int auto_restart);
 XBT_PUBLIC(smx_actor_t) simcall_process_restart(smx_actor_t process);
index f7fcca2..e39a7b9 100644 (file)
@@ -51,7 +51,7 @@ void JavaContextFactory::run_all()
   smx_actor_t process;
   unsigned int cursor;
   xbt_dynar_foreach(processes, cursor, process) {
-    static_cast<JavaContext*>(SIMIX_process_get_context(process))->resume();
+    static_cast<JavaContext*>(process->context)->resume();
   }
 }
 
index 602c2eb..ecf10e6 100644 (file)
@@ -232,7 +232,7 @@ void Client::declareStack(void* stack, size_t size, smx_actor_t process, ucontex
   region.block   = ((char*)stack - (char*)heap->heapbase) / BLOCKSIZE + 1;
 #if HAVE_SMPI
   if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP && process)
-    region.process_index = smpi_process_index_of_smx_process(process);
+    region.process_index = process->pid - 1;
   else
 #endif
     region.process_index = -1;
index ba8894b..24ae882 100644 (file)
@@ -432,7 +432,7 @@ msg_error_t MSG_process_resume(msg_process_t process)
   xbt_assert(process != nullptr, "Invalid parameter: First argument must not be nullptr");
 
   TRACE_msg_process_resume(process);
-  simcall_process_resume(process->getImpl());
+  process->resume();
   return MSG_OK;
 }
 
@@ -447,7 +447,7 @@ int MSG_process_is_suspended(msg_process_t process)
 }
 
 smx_context_t MSG_process_get_smx_ctx(msg_process_t process) {
-  return SIMIX_process_get_context(process->getImpl());
+  return process->getImpl()->context;
 }
 /**
  * \ingroup m_process_management
index 0a64e68..ec2c146 100644 (file)
@@ -196,7 +196,7 @@ void VirtualMachineImpl::resume()
   smx_actor_t smx_process_safe;
   xbt_swag_foreach_safe(smx_process, smx_process_safe, process_list) {
     XBT_DEBUG("resume %s", smx_process->cname());
-    SIMIX_process_resume(smx_process);
+    smx_process->resume();
   }
 
   vmState_ = SURF_VM_STATE_RUNNING;
index 342bfb5..81d3323 100644 (file)
@@ -112,21 +112,22 @@ void Actor::suspend()
 
 void Actor::resume()
 {
-  simcall_process_resume(pimpl_);
+  simgrid::simix::kernelImmediate([this] { pimpl_->resume(); });
 }
 
 int Actor::isSuspended()
 {
-  return simgrid::simix::kernelImmediate([this]() { return pimpl_->suspended; });
+  return simgrid::simix::kernelImmediate([this] { return pimpl_->suspended; });
 }
 
 void Actor::setKillTime(double time) {
   simcall_process_set_kill_time(pimpl_,time);
 }
 
+/** \brief Get the kill time of an actor(or 0 if unset). */
 double Actor::killTime()
 {
-  return simcall_process_get_kill_time(pimpl_);
+  return SIMIX_timer_get_date(pimpl_->kill_timer);
 }
 
 void Actor::kill(aid_t pid)
@@ -175,6 +176,7 @@ const char* Actor::property(const char* key)
 {
   return (char*)xbt_dict_get_or_null(simcall_process_get_properties(pimpl_), key);
 }
+
 void Actor::setProperty(const char* key, const char* value)
 {
   simgrid::simix::kernelImmediate([this, key, value] {
@@ -275,7 +277,8 @@ void suspend()
 
 void resume()
 {
-  simcall_process_resume(SIMIX_process_self());
+  smx_actor_t process = SIMIX_process_self();
+  simgrid::simix::kernelImmediate([process] { process->resume(); });
 }
 
 bool isSuspended()
index fab8b8c..a9cbed4 100644 (file)
@@ -167,10 +167,24 @@ void ActorImpl::daemonize()
   }
 }
 
-/** Whether this process is daemonized */
-bool ActorImpl::isDaemon()
+void ActorImpl::resume()
 {
-  return daemon;
+  XBT_IN("process = %p", this);
+
+  if (context->iwannadie) {
+    XBT_VERB("Ignoring request to suspend a process that is currently dying.");
+    return;
+  }
+
+  if (not suspended)
+    return;
+  suspended = 0;
+
+  /* resume the synchronization that was blocking the resumed process. */
+  if (waiting_synchro)
+    waiting_synchro->resume();
+
+  XBT_OUT();
 }
 
 void create_maestro(std::function<void()> code)
@@ -240,9 +254,9 @@ smx_actor_t SIMIX_process_create(const char* name, std::function<void()> code, v
 #if HAVE_SMPI
     if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) {
       if (parent_process->pid != 0) {
-        SIMIX_segment_index_set(process, parent_process->segment_index);
+        process->segment_index = parent_process->segment_index;
       } else {
-        SIMIX_segment_index_set(process, process->pid - 1);
+        process->segment_index = process->pid - 1;
       }
     }
 #endif
@@ -306,9 +320,9 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn
 #if HAVE_SMPI
     if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) {
       if (parent_process->pid != 0) {
-        SIMIX_segment_index_set(process, parent_process->segment_index);
+        process->segment_index = parent_process->segment_index;
       } else {
-        SIMIX_segment_index_set(process, process->pid - 1);
+        process->segment_index = process->pid - 1;
       }
     }
 #endif
@@ -464,7 +478,7 @@ void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const
   SMX_EXCEPTION(process, cat, value, msg);
 
   if (process->suspended)
-    SIMIX_process_resume(process);
+    process->resume();
 
   /* cancel the blocking synchro if any */
   if (process->waiting_synchro) {
@@ -537,7 +551,6 @@ void SIMIX_process_change_host(smx_actor_t process, sg_host_t dest)
   xbt_swag_insert(process, dest->extension<simgrid::simix::Host>()->process_list);
 }
 
-
 void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process)
 {
   smx_activity_t sync_suspend = SIMIX_process_suspend(process, simcall->issuer);
@@ -574,26 +587,6 @@ smx_activity_t SIMIX_process_suspend(smx_actor_t process, smx_actor_t issuer)
   }
 }
 
-void SIMIX_process_resume(smx_actor_t process)
-{
-  XBT_IN("process = %p", process);
-
-  if (process->context->iwannadie) {
-    XBT_VERB("Ignoring request to suspend a process that is currently dying.");
-    return;
-  }
-
-  if (not process->suspended)
-    return;
-  process->suspended = 0;
-
-  /* resume the synchronization that was blocking the resumed process. */
-  if (process->waiting_synchro)
-    process->waiting_synchro->resume();
-
-  XBT_OUT();
-}
-
 int SIMIX_process_get_maxpid() {
   return simix_process_maxpid;
 }
@@ -603,14 +596,6 @@ int SIMIX_process_count()
   return simix_global->process_list.size();
 }
 
-int SIMIX_process_get_PID(smx_actor_t self)
-{
-  if (self == nullptr)
-    return 0;
-  else
-    return self->pid;
-}
-
 void* SIMIX_process_self_get_data()
 {
   smx_actor_t self = SIMIX_process_self();
@@ -652,16 +637,6 @@ smx_actor_t SIMIX_process_get_by_name(const char* name)
   return nullptr;
 }
 
-int SIMIX_process_is_suspended(smx_actor_t process)
-{
-  return process->suspended;
-}
-
-xbt_dict_t SIMIX_process_get_properties(smx_actor_t process)
-{
-  return process->properties;
-}
-
 void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout)
 {
   if (process->finished) {
@@ -823,14 +798,6 @@ void SIMIX_process_exception_terminate(xbt_ex_t * e)
   xbt_abort();
 }
 
-smx_context_t SIMIX_process_get_context(smx_actor_t p) {
-  return p->context;
-}
-
-void SIMIX_process_set_context(smx_actor_t p,smx_context_t c) {
-  p->context = c;
-}
-
 /**
  * \brief Returns the list of processes to run.
  */
@@ -917,10 +884,6 @@ smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer) {
   return actor;
 }
 
-void SIMIX_segment_index_set(smx_actor_t proc, int index){
-  proc->segment_index = index;
-}
-
 /**
  * \ingroup simix_process_management
  * \brief Creates and runs a new SIMIX process.
index b15d40e..e7dd3b0 100644 (file)
@@ -104,7 +104,9 @@ private:
   bool daemon = false;
 public:
   void daemonize();
-  bool isDaemon();
+  bool isDaemon() { return daemon; } /** Whether this actor has been daemonized */
+  bool isSuspended() { return suspended; }
+  void resume();
 };
 
 }
@@ -132,17 +134,12 @@ XBT_PRIVATE void SIMIX_process_empty_trash();
 XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
 XBT_PRIVATE void SIMIX_process_exception_terminate(xbt_ex_t * e);
 XBT_PRIVATE void SIMIX_process_change_host(smx_actor_t process, sg_host_t dest);
-XBT_PRIVATE void SIMIX_process_resume(smx_actor_t process);
-XBT_PRIVATE int SIMIX_process_get_PID(smx_actor_t self);
 XBT_PRIVATE void SIMIX_process_set_data(smx_actor_t process, void *data);
 XBT_PRIVATE smx_actor_t SIMIX_process_get_by_name(const char* name);
-XBT_PRIVATE int SIMIX_process_is_suspended(smx_actor_t process);
-XBT_PRIVATE xbt_dict_t SIMIX_process_get_properties(smx_actor_t process);
 
 XBT_PRIVATE void SIMIX_process_auto_restart_set(smx_actor_t process, int auto_restart);
 XBT_PRIVATE smx_actor_t SIMIX_process_restart(smx_actor_t process, smx_actor_t issuer);
 
-void SIMIX_segment_index_set(smx_actor_t process, int segment_index);
 extern void (*SMPI_switch_data_segment)(int dest);
 
 SG_END_DECL()
index 0e3ba0c..c3bfd8d 100644 (file)
@@ -208,20 +208,6 @@ void simcall_process_suspend(smx_actor_t process)
   simcall_BODY_process_suspend(process);
 }
 
-/**
- * \ingroup simix_process_management
- * \brief Resumes a suspended process.
- *
- * This function resumes a suspended process by resuming the synchro
- * it was waiting for completion.
- *
- * \param process a SIMIX process
- */
-void simcall_process_resume(smx_actor_t process)
-{
-  simcall_BODY_process_resume(process);
-}
-
 /**
  * \ingroup simix_process_management
  * \brief Returns the amount of SIMIX processes in the system
@@ -261,23 +247,17 @@ void simcall_process_set_kill_time(smx_actor_t process, double kill_time)
     process->kill_timer=nullptr;
   });
 }
-/**
- * \ingroup simix_process_management
- * \brief Get the kill time of a process (or 0 if unset).
- */
-double simcall_process_get_kill_time(smx_actor_t process) {
-  return SIMIX_timer_get_date(process->kill_timer);
-}
 
 /**
  * \ingroup simix_process_management
  * \brief Return the properties
  *
- * This functions returns the properties associated with this process
+ * This function returns the properties associated with this process
  */
 xbt_dict_t simcall_process_get_properties(smx_actor_t process)
 {
-  return SIMIX_process_get_properties(process);
+  return process->properties;
+  ;
 }
 /**
  * \ingroup simix_process_management
index 45ed932..76cf97b 100644 (file)
@@ -67,19 +67,6 @@ static inline void simcall_process_suspend__set__process(smx_simcall_t simcall,
   simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
 }
 
-static inline smx_actor_t simcall_process_resume__get__process(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
-}
-static inline smx_actor_t simcall_process_resume__getraw__process(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
-}
-static inline void simcall_process_resume__set__process(smx_simcall_t simcall, smx_actor_t arg)
-{
-  simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
-}
-
 static inline smx_actor_t simcall_process_join__get__process(smx_simcall_t simcall)
 {
   return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
index a156c36..e1fb759 100644 (file)
@@ -60,12 +60,6 @@ inline static void simcall_BODY_process_suspend(smx_actor_t process) {
     return simcall<void, smx_actor_t>(SIMCALL_PROCESS_SUSPEND, process);
   }
 
-inline static void simcall_BODY_process_resume(smx_actor_t process) {
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_process_resume(process);
-    return simcall<void, smx_actor_t>(SIMCALL_PROCESS_RESUME, process);
-  }
-
 inline static int simcall_BODY_process_join(smx_actor_t process, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_join(&SIMIX_process_self()->simcall, process, timeout);
index 3ea2507..262f662 100644 (file)
@@ -23,7 +23,6 @@ typedef enum {
   SIMCALL_PROCESS_KILLALL,
   SIMCALL_PROCESS_CLEANUP,
   SIMCALL_PROCESS_SUSPEND,
-  SIMCALL_PROCESS_RESUME,
   SIMCALL_PROCESS_JOIN,
   SIMCALL_PROCESS_SLEEP,
   SIMCALL_EXECUTION_START,
index 3135e6f..654a8c4 100644 (file)
@@ -29,7 +29,6 @@ const char* simcall_names[] = {
     "SIMCALL_PROCESS_KILLALL",
     "SIMCALL_PROCESS_CLEANUP",
     "SIMCALL_PROCESS_SUSPEND",
-    "SIMCALL_PROCESS_RESUME",
     "SIMCALL_PROCESS_JOIN",
     "SIMCALL_PROCESS_SLEEP",
     "SIMCALL_EXECUTION_START",
@@ -105,11 +104,6 @@ case SIMCALL_PROCESS_SUSPEND:
       simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
       break;
 
-case SIMCALL_PROCESS_RESUME:
-      SIMIX_process_resume(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
-      SIMIX_simcall_answer(simcall);
-      break;
-
 case SIMCALL_PROCESS_JOIN:
       simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
       break;
index 22c455e..cdf2d15 100644 (file)
@@ -39,7 +39,6 @@ void process_kill(smx_actor_t process);
 void process_killall(int reset_pid);
 void process_cleanup(smx_actor_t process) [[nohandler]];
 void process_suspend(smx_actor_t process) [[block]];
-void process_resume(smx_actor_t process) [[nohandler]];
 int  process_join(smx_actor_t process, double timeout) [[block]];
 int  process_sleep(double duration) [[block]];
 
index 39c1c41..202f269 100644 (file)
@@ -340,8 +340,8 @@ static int process_syscall_color(void *p)
   case SIMCALL_NONE:
   case SIMCALL_PROCESS_KILL:
     return 2;
-  case SIMCALL_PROCESS_RESUME:
-    return 1;
+  //  case SIMCALL_PROCESS_RESUME:
+  //    return 1;
   default:
     return 0;
   }
index d9ce39c..151a577 100644 (file)
@@ -471,8 +471,8 @@ static inline void SIMIX_comm_start(simgrid::kernel::activity::CommImplPtr comm)
 
     /* If any of the process is suspend, create the synchro but stop its execution,
        it will be restarted when the sender process resume */
-    if (SIMIX_process_is_suspended(comm->src_proc) || SIMIX_process_is_suspended(comm->dst_proc)) {
-      if (SIMIX_process_is_suspended(comm->src_proc))
+    if (comm->src_proc->isSuspended() || comm->dst_proc->isSuspended()) {
+      if (comm->src_proc->isSuspended())
         XBT_DEBUG("The communication is suspended on startup because src (%s@%s) was suspended since it initiated the "
                   "communication",
                   comm->src_proc->cname(), comm->src_proc->host->cname());
index 649f42e..13eb9f9 100644 (file)
@@ -378,12 +378,5 @@ extern XBT_PRIVATE smpi_privatisation_region_t smpi_privatisation_regions;
 extern XBT_PRIVATE int smpi_loaded_page;
 extern XBT_PRIVATE int smpi_universe_size;
 
-XBT_PRIVATE int SIMIX_process_get_PID(smx_actor_t self);
-
-static inline __attribute__ ((always_inline))
-int smpi_process_index_of_smx_process(smx_actor_t process) {
-  return SIMIX_process_get_PID(process) -1;
-}
-
 SG_END_DECL()
 #endif
index 41dd614..92d552e 100644 (file)
@@ -273,7 +273,7 @@ void Process::init(int *argc, char ***argv){
     smx_actor_t proc = SIMIX_process_self();
     proc->context->set_cleanup(&MSG_process_cleanup_from_SIMIX);
 
-    int index = smpi_process_index_of_smx_process(proc);
+    int index = proc->pid - 1;
 
     if(index_to_process_data == nullptr){
       index_to_process_data=static_cast<int*>(xbt_malloc(SIMIX_process_count()*sizeof(int)));
index 9b215b3..df31ba7 100644 (file)
@@ -806,54 +806,56 @@ void xbt_log_additivity_set(xbt_log_category_t cat, int additivity)
 
 static void xbt_log_help(void)
 {
-  printf(
-"Description of the logging output:\n"
-"\n"
-"   Threshold configuration: --log=CATEGORY_NAME.thres:PRIORITY_LEVEL\n"
-"      CATEGORY_NAME: defined in code with function 'XBT_LOG_NEW_CATEGORY'\n"
-"      PRIORITY_LEVEL: the level to print (trace,debug,verbose,info,warning,error,critical)\n"
-"         -> trace: enter and return of some functions\n"
-"         -> debug: crufty output\n"
-"         -> verbose: verbose output for the user wanting more\n"
-"         -> info: output about the regular functionning\n"
-"         -> warning: minor issue encountered\n"
-"         -> error: issue encountered\n"
-"         -> critical: major issue encountered\n"
-"\n"
-"   Format configuration: --log=CATEGORY_NAME.fmt:OPTIONS\n"
-"      OPTIONS may be:\n"
-"         -> %%%%: the %% char\n"
-"         -> %%n: platform-dependent line separator (LOG4J compatible)\n"
-"         -> %%e: plain old space (SimGrid extension)\n"
-"\n"
-"         -> %%m: user-provided message\n"
-"\n"
-"         -> %%c: Category name (LOG4J compatible)\n"
-"         -> %%p: Priority name (LOG4J compatible)\n"
-"\n"
-"         -> %%h: Hostname (SimGrid extension)\n"
-"         -> %%P: Process name (SimGrid extension)\n"
-"         -> %%t: Thread \"name\" (LOG4J compatible -- actually the address of the thread in memory)\n"
-"         -> %%i: Process PID (SimGrid extension -- this is a 'i' as in 'i'dea)\n"
-"\n"
-"         -> %%F: file name where the log event was raised (LOG4J compatible)\n"
-"         -> %%l: location where the log event was raised (LOG4J compatible, like '%%F:%%L' -- this is a l as in 'l'etter)\n"
-"         -> %%L: line number where the log event was raised (LOG4J compatible)\n"
-"         -> %%M: function name (LOG4J compatible -- called method name here of course).\n"
-"                 Defined only when using gcc because there is no __FUNCTION__ elsewhere.\n"
-"\n"
-"         -> %%b: full backtrace (Called %%throwable in LOG4J). Defined only under windows or when using the GNU libc because\n"
-"                 backtrace() is not defined elsewhere, and we only have a fallback for windows boxes, not mac ones for example.\n"
-"         -> %%B: short backtrace (only the first line of the %%b). Called %%throwable{short} in LOG4J; defined where %%b is.\n"
-"\n"
-"         -> %%d: date (UNIX-like epoch)\n"
-"         -> %%r: application age (time elapsed since the beginning of the application)\n"
-"\n"
-"   Miscellaneous:\n"
-"      --help-log-categories    Display the current hierarchy of log categories.\n"
-"      --log=no_loc             Don't print file names in messages (for tesh tests).\n"
-"\n"
-    );
+  printf("Description of the logging output:\n"
+         "\n"
+         "   Threshold configuration: --log=CATEGORY_NAME.thres:PRIORITY_LEVEL\n"
+         "      CATEGORY_NAME: defined in code with function 'XBT_LOG_NEW_CATEGORY'\n"
+         "      PRIORITY_LEVEL: the level to print (trace,debug,verbose,info,warning,error,critical)\n"
+         "         -> trace: enter and return of some functions\n"
+         "         -> debug: crufty output\n"
+         "         -> verbose: verbose output for the user wanting more\n"
+         "         -> info: output about the regular functioning\n"
+         "         -> warning: minor issue encountered\n"
+         "         -> error: issue encountered\n"
+         "         -> critical: major issue encountered\n"
+         "\n"
+         "   Format configuration: --log=CATEGORY_NAME.fmt:OPTIONS\n"
+         "      OPTIONS may be:\n"
+         "         -> %%%%: the %% char\n"
+         "         -> %%n: platform-dependent line separator (LOG4J compatible)\n"
+         "         -> %%e: plain old space (SimGrid extension)\n"
+         "\n"
+         "         -> %%m: user-provided message\n"
+         "\n"
+         "         -> %%c: Category name (LOG4J compatible)\n"
+         "         -> %%p: Priority name (LOG4J compatible)\n"
+         "\n"
+         "         -> %%h: Hostname (SimGrid extension)\n"
+         "         -> %%P: Process name (SimGrid extension)\n"
+         "         -> %%t: Thread \"name\" (LOG4J compatible -- actually the address of the thread in memory)\n"
+         "         -> %%i: Process PID (SimGrid extension -- this is a 'i' as in 'i'dea)\n"
+         "\n"
+         "         -> %%F: file name where the log event was raised (LOG4J compatible)\n"
+         "         -> %%l: location where the log event was raised (LOG4J compatible, like '%%F:%%L' -- this is a l as "
+         "in 'l'etter)\n"
+         "         -> %%L: line number where the log event was raised (LOG4J compatible)\n"
+         "         -> %%M: function name (LOG4J compatible -- called method name here of course).\n"
+         "                 Defined only when using gcc because there is no __FUNCTION__ elsewhere.\n"
+         "\n"
+         "         -> %%b: full backtrace (Called %%throwable in LOG4J). Defined only under windows or when using the "
+         "GNU libc because\n"
+         "                 backtrace() is not defined elsewhere, and we only have a fallback for windows boxes, not "
+         "mac ones for example.\n"
+         "         -> %%B: short backtrace (only the first line of the %%b). Called %%throwable{short} in LOG4J; "
+         "defined where %%b is.\n"
+         "\n"
+         "         -> %%d: date (UNIX-like epoch)\n"
+         "         -> %%r: application age (time elapsed since the beginning of the application)\n"
+         "\n"
+         "   Miscellaneous:\n"
+         "      --help-log-categories    Display the current hierarchy of log categories.\n"
+         "      --log=no_loc             Don't print file names in messages (for tesh tests).\n"
+         "\n");
 }
 
 static int xbt_log_cat_cmp(const void *pa, const void *pb)