From: Martin Quinson Date: Mon, 25 Jan 2021 07:45:30 +0000 (+0100) Subject: Start cleaning up the log channel hierarchy X-Git-Tag: v3.27~535 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d8cfc4c2e6eec35703dc7f3158188eaa6e2d24a5?ds=sidebyside Start cleaning up the log channel hierarchy --- diff --git a/examples/c/platform-failures/platform-failures.tesh b/examples/c/platform-failures/platform-failures.tesh index 5aa5c9ca16..bbcc1b81dc 100644 --- a/examples/c/platform-failures/platform-failures.tesh +++ b/examples/c/platform-failures/platform-failures.tesh @@ -3,7 +3,7 @@ p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED ! output sort 19 -$ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose +$ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=cpu.t:verbose > [ 0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard' > [ 0.000000] (0:maestro@) Deployment includes some initially turned off Hosts ... nevermind. > [ 0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process @@ -108,7 +108,7 @@ $ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${p p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED ! output sort 19 -$ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose +$ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=cpu.t:verbose > [ 0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard' > [ 0.000000] (0:maestro@) Deployment includes some initially turned off Hosts ... nevermind. > [ 0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process @@ -217,4 +217,4 @@ p complex with such an integration test. One day, we will setup a set of p unit tests for the surf solver, and such issues will be addressable again. p For the time being, I just give up, sorry. -p $ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose +p $ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../s4u/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=cpu.t:verbose diff --git a/examples/s4u/platform-failures/s4u-platform-failures.tesh b/examples/s4u/platform-failures/s4u-platform-failures.tesh index 9274a897ba..6de4ef060e 100644 --- a/examples/s4u/platform-failures/s4u-platform-failures.tesh +++ b/examples/s4u/platform-failures/s4u-platform-failures.tesh @@ -3,7 +3,7 @@ p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED ! output sort 19 -$ ${bindir:=.}/s4u-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose +$ ${bindir:=.}/s4u-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=cpu.t:verbose > [ 0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard' > [ 0.000000] (0:maestro@) Deployment includes some initially turned off Hosts ... nevermind. > [ 0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process @@ -108,7 +108,7 @@ $ ${bindir:=.}/s4u-platform-failures --log=xbt_cfg.thres:critical --log=no_loc $ p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED ! output sort 19 -$ ${bindir:=.}/s4u-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose +$ ${bindir:=.}/s4u-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=cpu.t:verbose > [ 0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard' > [ 0.000000] (0:maestro@) Deployment includes some initially turned off Hosts ... nevermind. > [ 0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process diff --git a/src/kernel/resource/DiskImpl.cpp b/src/kernel/resource/DiskImpl.cpp index 1c6c7c3ffa..f782122181 100644 --- a/src/kernel/resource/DiskImpl.cpp +++ b/src/kernel/resource/DiskImpl.cpp @@ -9,7 +9,7 @@ #include "src/kernel/EngineImpl.hpp" #include "src/kernel/lmm/maxmin.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(disk_kernel, surf, "Logging specific to the disk kernel resource"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(disk, resource, "Disk resource"); simgrid::kernel::resource::DiskModel* surf_disk_model = nullptr; diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index ade589190a..f5ec2a5658 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -10,7 +10,7 @@ #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_cas, surf_cpu, "Logging specific to the SURF CPU module"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_cas, cpu, "CPU resource, CAS01 model (used by default)"); /*********** * Options * diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 5019df3963..0c33ed9f53 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -8,8 +8,7 @@ #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" -XBT_LOG_EXTERNAL_CATEGORY(surf_kernel); -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, "Logging specific to the SURF cpu module"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu, resource, "CPU resource"); simgrid::kernel::resource::CpuModel* surf_cpu_model_pm; simgrid::kernel::resource::CpuModel* surf_cpu_model_vm; @@ -26,10 +25,10 @@ void CpuModel::update_actions_state_lazy(double now, double /*delta*/) { while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) { auto* action = static_cast(get_action_heap().pop()); - XBT_CDEBUG(surf_kernel, "Something happened to action %p", action); + XBT_DEBUG("Something happened to action %p", action); action->finish(kernel::resource::Action::State::FINISHED); - XBT_CDEBUG(surf_kernel, "Action %p finished", action); + XBT_DEBUG("Action %p finished", action); } } @@ -154,11 +153,11 @@ void CpuAction::update_remains_lazy(double now) double delta = now - get_last_update(); if (get_remains_no_update() > 0) { - XBT_CDEBUG(surf_kernel, "Updating action(%p): remains was %f, last_update was: %f", this, get_remains_no_update(), - get_last_update()); + XBT_DEBUG("Updating action(%p): remains was %f, last_update was: %f", this, get_remains_no_update(), + get_last_update()); update_remains(get_last_value() * delta); - XBT_CDEBUG(surf_kernel, "Updating action(%p): remains is now %f", this, get_remains_no_update()); + XBT_DEBUG("Updating action(%p): remains is now %f", this, get_remains_no_update()); } set_last_update(); diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 903b1dcc9a..bbb7797080 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -14,7 +14,7 @@ constexpr double EPSILON = 0.000000001; -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_ti, surf_cpu, "Logging specific to the SURF CPU TRACE INTEGRATION module"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_ti, cpu, "CPU resource, Trace Integration model"); namespace simgrid { namespace kernel { diff --git a/src/surf/disk_s19.cpp b/src/surf/disk_s19.cpp index 3436df2904..f9d081e245 100644 --- a/src/surf/disk_s19.cpp +++ b/src/surf/disk_s19.cpp @@ -11,7 +11,7 @@ #include "src/surf/xml/platf.hpp" #include "surf/surf.hpp" -XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(disk_kernel); +XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(disk); /********* * Model *