From: Frederic Suter Date: Thu, 6 Jul 2017 08:26:58 +0000 (+0200) Subject: various cleanups in actors/processes X-Git-Tag: v3_17~445 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/69fa0c6e72fedc8b1016965248dc3c5665c24292 various cleanups in actors/processes --- diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index dae571e079..9f51fd57fd 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -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); diff --git a/src/bindings/java/JavaContext.cpp b/src/bindings/java/JavaContext.cpp index f7fcca21a3..e39a7b9740 100644 --- a/src/bindings/java/JavaContext.cpp +++ b/src/bindings/java/JavaContext.cpp @@ -51,7 +51,7 @@ void JavaContextFactory::run_all() smx_actor_t process; unsigned int cursor; xbt_dynar_foreach(processes, cursor, process) { - static_cast(SIMIX_process_get_context(process))->resume(); + static_cast(process->context)->resume(); } } diff --git a/src/mc/remote/Client.cpp b/src/mc/remote/Client.cpp index 602c2eb95b..ecf10e6f97 100644 --- a/src/mc/remote/Client.cpp +++ b/src/mc/remote/Client.cpp @@ -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; diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index ba8894b6f5..24ae88250f 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -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 diff --git a/src/plugins/vm/VirtualMachineImpl.cpp b/src/plugins/vm/VirtualMachineImpl.cpp index 0a64e685b7..ec2c1466c6 100644 --- a/src/plugins/vm/VirtualMachineImpl.cpp +++ b/src/plugins/vm/VirtualMachineImpl.cpp @@ -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; diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index 342bfb5aad..81d3323e0e 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -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() diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index fab8b8cb09..a9cbed4c42 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -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 code) @@ -240,9 +254,9 @@ smx_actor_t SIMIX_process_create(const char* name, std::function 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()->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. diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index b15d40ef10..e7dd3b0d06 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -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() diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 0e3ba0c89b..c3bfd8dab7 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -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 diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index 45ed9326c8..76cf97b3e6 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -67,19 +67,6 @@ static inline void simcall_process_suspend__set__process(smx_simcall_t simcall, simgrid::simix::marshal(simcall->args[0], arg); } -static inline smx_actor_t simcall_process_resume__get__process(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args[0]); -} -static inline smx_actor_t simcall_process_resume__getraw__process(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void simcall_process_resume__set__process(smx_simcall_t simcall, smx_actor_t arg) -{ - simgrid::simix::marshal(simcall->args[0], arg); -} - static inline smx_actor_t simcall_process_join__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index a156c36fe2..e1fb759745 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -60,12 +60,6 @@ inline static void simcall_BODY_process_suspend(smx_actor_t process) { return simcall(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(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); diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index 3ea2507c9a..262f662fc9 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -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, diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 3135e6fe80..654a8c46d0 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -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(simcall->args[0])); break; -case SIMCALL_PROCESS_RESUME: - SIMIX_process_resume(simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_PROCESS_JOIN: simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); break; diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 22c455e503..cdf2d15664 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -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]]; diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 39c1c41507..202f269f3e 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -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; } diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index d9ce39c07b..151a5772fa 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -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()); diff --git a/src/smpi/private.h b/src/smpi/private.h index 649f42ef9a..13eb9f9c3e 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -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 diff --git a/src/smpi/smpi_process.cpp b/src/smpi/smpi_process.cpp index 41dd614fb7..92d552eaad 100644 --- a/src/smpi/smpi_process.cpp +++ b/src/smpi/smpi_process.cpp @@ -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(xbt_malloc(SIMIX_process_count()*sizeof(int))); diff --git a/src/xbt/log.c b/src/xbt/log.c index 9b215b3205..df31ba7b0a 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -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)