From 27032003460976597e8a3fc709c0aae9fbc653a5 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 31 May 2019 15:11:22 +0200 Subject: [PATCH] cleanup after the split of kernel/resource/profile into several classes --- src/kernel/resource/Resource.cpp | 5 ++- src/kernel/resource/profile/DatedValue.cpp | 4 +- src/kernel/resource/profile/DatedValue.hpp | 8 +++- src/kernel/resource/profile/FutureEvtSet.cpp | 6 ++- src/kernel/resource/profile/FutureEvtSet.hpp | 9 ++++- src/kernel/resource/profile/Profile.cpp | 26 ++++++++++-- src/kernel/resource/profile/Profile.hpp | 19 ++++----- src/kernel/resource/profile/trace_mgr.cpp | 40 ------------------- src/kernel/resource/profile/trace_mgr.hpp | 28 ------------- .../resource/profile/trace_mgr_test.cpp | 4 +- src/surf/StorageImpl.hpp | 1 - src/surf/cpu_cas01.cpp | 1 + src/surf/cpu_interface.cpp | 3 +- src/surf/cpu_interface.hpp | 1 - src/surf/cpu_ti.cpp | 5 ++- src/surf/cpu_ti.hpp | 2 +- src/surf/network_cm02.cpp | 1 + src/surf/network_interface.cpp | 5 ++- src/surf/network_interface.hpp | 1 - src/surf/ptask_L07.cpp | 1 + src/surf/sg_platf.cpp | 1 + src/surf/surf_c_bindings.cpp | 9 +++-- src/surf/surf_interface.cpp | 2 + src/surf/xml/surfxml_sax_cb.cpp | 2 + tools/cmake/DefinePackages.cmake | 10 ++++- 25 files changed, 87 insertions(+), 107 deletions(-) delete mode 100644 src/kernel/resource/profile/trace_mgr.cpp delete mode 100644 src/kernel/resource/profile/trace_mgr.hpp diff --git a/src/kernel/resource/Resource.cpp b/src/kernel/resource/Resource.cpp index 16851b210e..a8e7f5d7e4 100644 --- a/src/kernel/resource/Resource.cpp +++ b/src/kernel/resource/Resource.cpp @@ -5,7 +5,8 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "src/kernel/lmm/maxmin.hpp" // Constraint -#include "src/kernel/resource/profile/trace_mgr.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/surf_interface.hpp" namespace simgrid { @@ -22,7 +23,7 @@ double Resource::get_load() const void Resource::set_state_profile(profile::Profile* profile) { xbt_assert(state_event_ == nullptr, "Cannot set a second state profile to %s", get_cname()); - state_event_ = profile->schedule(&future_evt_set, this); + state_event_ = profile->schedule(&profile::future_evt_set, this); } } // namespace resource diff --git a/src/kernel/resource/profile/DatedValue.cpp b/src/kernel/resource/profile/DatedValue.cpp index b104af7cdc..62cb0654f4 100644 --- a/src/kernel/resource/profile/DatedValue.cpp +++ b/src/kernel/resource/profile/DatedValue.cpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -//#include "src/kernel/resource/profile/DatedValue.hpp" +#include "src/kernel/resource/profile/DatedValue.hpp" #include namespace simgrid { @@ -22,4 +22,4 @@ std::ostream& operator<<(std::ostream& out, const DatedValue& e) } // namespace profile } // namespace kernel -} // namespace simgrid \ No newline at end of file +} // namespace simgrid diff --git a/src/kernel/resource/profile/DatedValue.hpp b/src/kernel/resource/profile/DatedValue.hpp index 8530fb77c2..84bdf99bae 100644 --- a/src/kernel/resource/profile/DatedValue.hpp +++ b/src/kernel/resource/profile/DatedValue.hpp @@ -3,6 +3,10 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#ifndef SIMGRID_KERNEL_PROFILE_DATEDVALUE +#define SIMGRID_KERNEL_PROFILE_DATEDVALUE + +#include "simgrid/forward.h" #include namespace simgrid { @@ -32,4 +36,6 @@ std::ostream& operator<<(std::ostream& out, const DatedValue& e); } // namespace profile } // namespace kernel -} // namespace simgrid \ No newline at end of file +} // namespace simgrid + +#endif diff --git a/src/kernel/resource/profile/FutureEvtSet.cpp b/src/kernel/resource/profile/FutureEvtSet.cpp index 3579fe889c..19937f44d3 100644 --- a/src/kernel/resource/profile/FutureEvtSet.cpp +++ b/src/kernel/resource/profile/FutureEvtSet.cpp @@ -4,11 +4,15 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/kernel/resource/profile/Event.hpp" +#include "src/kernel/resource/profile/Profile.hpp" namespace simgrid { namespace kernel { namespace profile { +simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern + FutureEvtSet::FutureEvtSet() = default; FutureEvtSet::~FutureEvtSet() { @@ -50,4 +54,4 @@ Event* FutureEvtSet::pop_leq(double date, double* value, resource::Resource** re } } // namespace profile } // namespace kernel -} // namespace simgrid \ No newline at end of file +} // namespace simgrid diff --git a/src/kernel/resource/profile/FutureEvtSet.hpp b/src/kernel/resource/profile/FutureEvtSet.hpp index f565f0ab85..a324d57e0c 100644 --- a/src/kernel/resource/profile/FutureEvtSet.hpp +++ b/src/kernel/resource/profile/FutureEvtSet.hpp @@ -3,10 +3,12 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include #ifndef FUTUREEVTSET_HPP #define FUTUREEVTSET_HPP +#include "simgrid/forward.h" +#include + namespace simgrid { namespace kernel { namespace profile { @@ -28,8 +30,11 @@ private: std::priority_queue, std::greater> heap_; }; +// FIXME: kill that singleton +extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set; + } // namespace profile } // namespace kernel } // namespace simgrid -#endif \ No newline at end of file +#endif diff --git a/src/kernel/resource/profile/Profile.cpp b/src/kernel/resource/profile/Profile.cpp index a73c4c0e91..288d618482 100644 --- a/src/kernel/resource/profile/Profile.cpp +++ b/src/kernel/resource/profile/Profile.cpp @@ -5,12 +5,15 @@ #include "src/kernel/resource/profile/Profile.hpp" #include "simgrid/forward.h" -#include "src/kernel/resource/profile/DatedValue.cpp" -#include "src/kernel/resource/profile/FutureEvtSet.cpp" -#include "xbt/log.h" -#include "xbt/sysdep.h" +#include "src/kernel/resource/profile/DatedValue.hpp" +#include "src/kernel/resource/profile/Event.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/surf/surf_interface.hpp" + #include +#include #include +#include #include static std::unordered_map trace_list; @@ -126,3 +129,18 @@ Profile* Profile::from_file(const std::string& path) } // namespace profile } // namespace kernel } // namespace simgrid + +void tmgr_finalize() +{ + for (auto const& kv : trace_list) + delete kv.second; + trace_list.clear(); +} + +void tmgr_trace_event_unref(simgrid::kernel::profile::Event** event) +{ + if ((*event)->free_me) { + delete *event; + *event = nullptr; + } +} diff --git a/src/kernel/resource/profile/Profile.hpp b/src/kernel/resource/profile/Profile.hpp index fdae8c5f9d..3c173db61a 100644 --- a/src/kernel/resource/profile/Profile.hpp +++ b/src/kernel/resource/profile/Profile.hpp @@ -3,11 +3,13 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#ifndef PROFILE_HPP -#define PROFILE_HPP +#ifndef SIMGRID_KERNEL_PROFILE_HPP +#define SIMGRID_KERNEL_PROFILE_HPP +#include "simgrid/forward.h" #include "src/kernel/resource/profile/DatedValue.hpp" #include "src/kernel/resource/profile/FutureEvtSet.hpp" + #include #include @@ -15,14 +17,6 @@ namespace simgrid { namespace kernel { namespace profile { -class Event { -public: - Profile* profile; - unsigned int idx; - resource::Resource* resource; - bool free_me; -}; - /** @brief A profile is a set of timed values, encoding the value that a variable takes at what time * * It is useful to model dynamic platforms, where an external load that makes the resource availability change over @@ -50,4 +44,7 @@ private: } // namespace kernel } // namespace simgrid -#endif \ No newline at end of file +/** Module finalizer: frees all profiles */ +XBT_PUBLIC void tmgr_finalize(); + +#endif diff --git a/src/kernel/resource/profile/trace_mgr.cpp b/src/kernel/resource/profile/trace_mgr.cpp deleted file mode 100644 index 6c0d0db658..0000000000 --- a/src/kernel/resource/profile/trace_mgr.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "xbt/log.h" -#include "xbt/sysdep.h" - -#include "src/kernel/resource/profile/trace_mgr.hpp" -#include "src/surf/surf_interface.hpp" -#include -#include -#include -#include -#include -#include -#include - -#include "src/kernel/resource/profile/Profile.cpp" - -/** This file has been splitted into three different files: - - Profile, defining the class Profile and functions that allow to use provided profiles; - - DatedValue, the class of a DatedValue (a value and a timestamp); - - FutureEvtSet, a set of events happening in the future. **/ - -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(profile, resource, "Surf profile management"); -void tmgr_finalize() -{ - for (auto const& kv : trace_list) - delete kv.second; - trace_list.clear(); -} - -void tmgr_trace_event_unref(simgrid::kernel::profile::Event** event) -{ - if ((*event)->free_me) { - delete *event; - *event = nullptr; - } -} \ No newline at end of file diff --git a/src/kernel/resource/profile/trace_mgr.hpp b/src/kernel/resource/profile/trace_mgr.hpp deleted file mode 100644 index 5ed634a3f0..0000000000 --- a/src/kernel/resource/profile/trace_mgr.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#ifndef SURF_PMGR_H -#define SURF_PMGR_H - -#include "simgrid/forward.h" -#include "src/kernel/resource/profile/Profile.hpp" -#include "xbt/sysdep.h" - -#include -#include - -extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set; - -/** - * @brief Free a trace event structure - * - * This function frees a trace_event if it can be freed, ie, if it has the free_me flag set to 1. - * This flag indicates whether the structure is still used somewhere or not. - * When the structure is freed, the argument is set to nullptr - */ -XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_event); -XBT_PUBLIC void tmgr_finalize(); - -#endif /* SURF_PMGR_H */ diff --git a/src/kernel/resource/profile/trace_mgr_test.cpp b/src/kernel/resource/profile/trace_mgr_test.cpp index 97a93174ee..c995ef83e9 100644 --- a/src/kernel/resource/profile/trace_mgr_test.cpp +++ b/src/kernel/resource/profile/trace_mgr_test.cpp @@ -6,7 +6,9 @@ #include "catch.hpp" #include "simgrid/kernel/resource/Resource.hpp" -#include "src/kernel/resource/profile/trace_mgr.hpp" +#include "src/kernel/resource/profile/DatedValue.hpp" +#include "src/kernel/resource/profile/Event.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/surf_interface.hpp" #include "xbt/log.h" diff --git a/src/surf/StorageImpl.hpp b/src/surf/StorageImpl.hpp index 1e38c513f8..3590cae7ee 100644 --- a/src/surf/StorageImpl.hpp +++ b/src/surf/StorageImpl.hpp @@ -8,7 +8,6 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Io.hpp" #include "simgrid/s4u/Storage.hpp" -#include "src/kernel/resource/profile/trace_mgr.hpp" #include "src/surf/PropertyHolder.hpp" #include "surf_interface.hpp" diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 1bb85a7711..18fc64dbd8 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -5,6 +5,7 @@ #include "cpu_cas01.hpp" #include "simgrid/sg_config.hpp" +#include "src/kernel/resource/profile/Event.hpp" #include "src/surf/cpu_ti.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 8325194bbe..7342a03e97 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "cpu_interface.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" @@ -129,7 +130,7 @@ void Cpu::set_speed_profile(kernel::profile::Profile* profile) { xbt_assert(speed_.event == nullptr, "Cannot set a second speed trace to Host %s", host_->get_cname()); - speed_.event = profile->schedule(&future_evt_set, this); + speed_.event = profile->schedule(&profile::future_evt_set, this); } diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index a011ad3c73..10a4cf4e11 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -10,7 +10,6 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Host.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "src/kernel/resource/profile/trace_mgr.hpp" #include diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 997b716ae3..eb5574af86 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -4,7 +4,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "cpu_ti.hpp" -#include "src/kernel/resource/profile/trace_mgr.hpp" +#include "src/kernel/resource/profile/Event.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" @@ -350,7 +351,7 @@ void CpuTi::set_speed_profile(kernel::profile::Profile* profile) kernel::profile::DatedValue val = profile->event_list.back(); if (val.date_ < 1e-12) { simgrid::kernel::profile::Profile* prof = new simgrid::kernel::profile::Profile(); - speed_.event = prof->schedule(&future_evt_set, this); + speed_.event = prof->schedule(&profile::future_evt_set, this); } } } diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index f304375052..03781049e1 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -6,7 +6,7 @@ #ifndef SURF_MODEL_CPUTI_H_ #define SURF_MODEL_CPUTI_H_ -#include "src/kernel/resource/profile/trace_mgr.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/cpu_interface.hpp" #include diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 0145c1f9a5..3a09e280f6 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -9,6 +9,7 @@ #include "network_cm02.hpp" #include "simgrid/s4u/Host.hpp" #include "simgrid/sg_config.hpp" +#include "src/kernel/resource/profile/Event.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index 530b483ad7..33d0764303 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -6,6 +6,7 @@ #include "network_interface.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/surf_interface.hpp" #include "surf/surf.hpp" @@ -148,13 +149,13 @@ void LinkImpl::on_bandwidth_change() void LinkImpl::set_bandwidth_profile(profile::Profile* profile) { xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth profile to Link %s", get_cname()); - bandwidth_.event = profile->schedule(&future_evt_set, this); + bandwidth_.event = profile->schedule(&profile::future_evt_set, this); } void LinkImpl::set_latency_profile(profile::Profile* profile) { xbt_assert(latency_.event == nullptr, "Cannot set a second latency profile to Link %s", get_cname()); - latency_.event = profile->schedule(&future_evt_set, this); + latency_.event = profile->schedule(&profile::future_evt_set, this); } /********** diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index a83d5e52a9..c92e3d6211 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -10,7 +10,6 @@ #include "simgrid/kernel/resource/Resource.hpp" #include "simgrid/s4u/Link.hpp" #include "src/kernel/lmm/maxmin.hpp" -#include "src/kernel/resource/profile/trace_mgr.hpp" #include "src/surf/PropertyHolder.hpp" #include diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 384656cf45..b31f4de604 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -4,6 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "ptask_L07.hpp" +#include "src/kernel/resource/profile/Event.hpp" #include "surf/surf.hpp" #include "xbt/config.hpp" diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 83178f8d8a..21dd6c1989 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -19,6 +19,7 @@ #include "src/include/simgrid/sg_config.hpp" #include "src/include/surf/surf.hpp" #include "src/kernel/EngineImpl.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/simix/smx_private.hpp" #include "src/surf/HostImpl.hpp" #include "src/surf/xml/platf_private.hpp" diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 0a12d8578c..b0a82806f6 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -6,6 +6,7 @@ #include "simgrid/s4u/Engine.hpp" #include "src/include/surf/surf.hpp" #include "src/instr/instr_private.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" #include "src/plugins/vm/VirtualMachineImpl.hpp" #include @@ -26,11 +27,11 @@ void surf_presolve() simgrid::kernel::resource::Resource* resource = nullptr; XBT_DEBUG ("Consume all trace events occurring before the starting time."); - while ((next_event_date = future_evt_set.next_date()) != -1.0) { + while ((next_event_date = simgrid::kernel::profile::future_evt_set.next_date()) != -1.0) { if (next_event_date > NOW) break; - while ((event = future_evt_set.pop_leq(next_event_date, &value, &resource))) { + while ((event = simgrid::kernel::profile::future_evt_set.pop_leq(next_event_date, &value, &resource))) { if (value >= 0) resource->apply_event(event, value); } @@ -82,7 +83,7 @@ double surf_solve(double max_date) XBT_DEBUG("Looking for next trace event"); while (1) { // Handle next occurring events until none remains - double next_event_date = future_evt_set.next_date(); + double next_event_date = simgrid::kernel::profile::future_evt_set.next_date(); XBT_DEBUG("Next TRACE event: %f", next_event_date); if (not surf_network_model->next_occuring_event_is_idempotent()) { // NS3, I see you @@ -109,7 +110,7 @@ double surf_solve(double max_date) XBT_DEBUG("Updating models (min = %g, NOW = %g, next_event_date = %g)", time_delta, NOW, next_event_date); - while ((event = future_evt_set.pop_leq(next_event_date, &value, &resource))) { + while ((event = simgrid::kernel::profile::future_evt_set.pop_leq(next_event_date, &value, &resource))) { if (resource->is_used() || (watched_hosts.find(resource->get_cname()) != watched_hosts.end())) { time_delta = next_event_date - NOW; XBT_DEBUG("This event invalidates the next_occuring_event() computation of models. Next event set to %f", time_delta); diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index dc56933077..1cd5f1e3fc 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -7,6 +7,8 @@ #include "mc/mc.h" #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/simgrid/version.h" #include "src/surf/HostImpl.hpp" #include "src/surf/xml/platf.hpp" diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 811474ea1b..7d0f2fc34c 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -6,6 +6,8 @@ #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.hpp" +#include "src/kernel/resource/profile/FutureEvtSet.hpp" +#include "src/kernel/resource/profile/Profile.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/surf_interface.hpp" #include "src/surf/xml/platf_private.hpp" diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 7e12ac3f03..d42372cb7c 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -312,8 +312,14 @@ set(SURF_SRC src/kernel/resource/Action.cpp src/kernel/resource/Model.cpp src/kernel/resource/Resource.cpp - src/kernel/resource/profile/trace_mgr.hpp - src/kernel/resource/profile/trace_mgr.cpp + + src/kernel/resource/profile/DatedValue.cpp + src/kernel/resource/profile/DatedValue.hpp + src/kernel/resource/profile/Event.hpp + src/kernel/resource/profile/FutureEvtSet.cpp + src/kernel/resource/profile/FutureEvtSet.hpp + src/kernel/resource/profile/Profile.cpp + src/kernel/resource/profile/Profile.hpp src/kernel/routing/ClusterZone.cpp src/kernel/routing/DijkstraZone.cpp -- 2.20.1