X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/01b8de845b6b3de1ef6746d34870082df06a5b6d..d8fba529aba8e352c57974ff6b111808d087d3a0:/src/instr/instr_platform.cpp diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index b37ed60a7f..694a04adab 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2023. 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. */ @@ -16,7 +16,6 @@ #include "src/instr/instr_private.hpp" #include "src/kernel/resource/CpuImpl.hpp" #include "src/kernel/resource/NetworkModel.hpp" -#include "src/surf/surf_interface.hpp" #include @@ -24,7 +23,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_routing, instr, "Tracing platform hierarch std::string instr_pid(simgrid::s4u::Actor const& proc) { - return std::string(proc.get_name()) + "-" + std::to_string(proc.get_pid()); + return proc.get_name() + "-" + std::to_string(proc.get_pid()); } static simgrid::instr::Container* lowestCommonAncestor(const simgrid::instr::Container* a1, @@ -142,10 +141,10 @@ static void recursiveNewVariableType(const std::string& new_typename, const std: simgrid::instr::Type* root) { if (root->get_name() == "HOST" || root->get_name() == "VM") - root->by_name_or_create(std::string("p") + new_typename, color); + root->by_name_or_create("p" + new_typename, color); if (root->get_name() == "LINK") - root->by_name_or_create(std::string("b") + new_typename, color); + root->by_name_or_create("b" + new_typename, color); for (auto const& [_, child] : root->get_children()) { recursiveNewVariableType(new_typename, color, child.get()); @@ -455,7 +454,6 @@ void define_callbacks() static_cast(link.get_impl()->get_model())->get_bandwidth_factor() * link.get_bandwidth()); }); - s4u::NetZone::on_seal_cb([](s4u::NetZone const& /*netzone*/) { currentContainer.pop_back(); }); kernel::routing::NetPoint::on_creation.connect([](kernel::routing::NetPoint const& netpoint) { if (netpoint.is_router()) new RouterContainer(netpoint.get_name(), currentContainer.back()); @@ -501,14 +499,12 @@ void define_callbacks() if (TRACE_smpi_is_enabled() && TRACE_smpi_is_computing()) { s4u::Exec::on_start_cb([](s4u::Exec const& exec) { - Container::by_name(std::string("rank-") + std::to_string(s4u::Actor::self()->get_pid())) + Container::by_name("rank-" + std::to_string(s4u::Actor::self()->get_pid())) ->get_state("MPI_STATE") ->push_event("computing", new CpuTIData("compute", exec.get_cost())); }); s4u::Activity::on_completion_cb([](const s4u::Activity&) { - Container::by_name(std::string("rank-") + std::to_string(s4u::Actor::self()->get_pid())) - ->get_state("MPI_STATE") - ->pop_event(); + Container::by_name("rank-" + std::to_string(s4u::Actor::self()->get_pid()))->get_state("MPI_STATE")->pop_event(); }); }