X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a8ef16dfe15a51e315150b693b11f80f23b1d5af..0199ba108d66c94df94e4f044994e79efdece4b1:/src/instr/instr_platform.cpp diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index 908d7b8627..6db1c3bbad 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -120,12 +120,11 @@ static void recursiveGraphExtraction(const simgrid::s4u::NetZone* netzone, simgr return; } XBT_DEBUG("Graph extraction for NetZone = %s", netzone->get_cname()); - if (not netzone->get_children().empty()) { - // bottom-up recursion - for (auto const& nz_son : netzone->get_children()) { - simgrid::instr::Container* child_container = container->children_.at(nz_son->get_name()); - recursiveGraphExtraction(nz_son, child_container, filter); - } + + // bottom-up recursion + for (auto const& nz_son : netzone->get_children()) { + simgrid::instr::Container* child_container = container->children_.at(nz_son->get_name()); + recursiveGraphExtraction(nz_son, child_container, filter); } auto* graph = xbt_graph_new_graph(0, nullptr); @@ -337,20 +336,20 @@ static void on_action_state_change(kernel::resource::Action const& action, auto n = static_cast(action.get_variable()->get_number_of_constraint()); for (unsigned i = 0; i < n; i++) { - double value = action.get_variable()->get_value() * action.get_variable()->get_constraint_weight(i); + double value = action.get_rate() * action.get_variable()->get_constraint_weight(i); /* Beware of composite actions: ptasks put links and cpus together. Extra pb: we cannot dynamic_cast from void* */ kernel::resource::Resource* resource = action.get_variable()->get_constraint(i)->get_id(); const kernel::resource::CpuImpl* cpu = dynamic_cast(resource); if (cpu != nullptr) resource_set_utilization("HOST", "speed_used", cpu->get_cname(), action.get_category(), value, - action.get_last_update(), SIMIX_get_clock() - action.get_last_update()); + action.get_last_update(), simgrid_get_clock() - action.get_last_update()); const kernel::resource::LinkImpl* link = dynamic_cast(resource); if (link != nullptr) resource_set_utilization("LINK", "bandwidth_used", link->get_cname(), action.get_category(), value, - action.get_last_update(), SIMIX_get_clock() - action.get_last_update()); + action.get_last_update(), simgrid_get_clock() - action.get_last_update()); } }