X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/daefac7fa79cf337ea13cb729b170b16dd36647a..b9b0ba08f86e11674ff24a6b7389e7dec2984af3:/src/smpi/internals/instr_smpi.cpp diff --git a/src/smpi/internals/instr_smpi.cpp b/src/smpi/internals/instr_smpi.cpp index a8453046a4..63ee87112a 100644 --- a/src/smpi/internals/instr_smpi.cpp +++ b/src/smpi/internals/instr_smpi.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2018. 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,6 +15,8 @@ #include #include +#include "src/smpi/include/smpi_actor.hpp" + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI"); static std::unordered_map*> keys; @@ -187,7 +188,7 @@ void TRACE_smpi_init(int rank) TRACE_smpi_setup_container(rank, sg_host_self()); #if HAVE_PAPI - container_t container = simgrid::instr::Container::by_name(str); + container_t container = smpi_container(rank); papi_counter_t counters = smpi_process()->papi_counters(); for (auto const& it : counters) { @@ -195,9 +196,7 @@ void TRACE_smpi_init(int rank) * Check whether this variable already exists or not. Otherwise, it will be created * multiple times but only the last one would be used... */ - if (s_type::getOrNull(it.first.c_str(), container->type_) == nullptr) { - Type::variableNew(it.first.c_str(), "", container->type_); - } + container->type_->by_name_or_create(it.first, ""); } #endif } @@ -252,23 +251,6 @@ void TRACE_smpi_sleeping_out(int rank) smpi_container(rank)->get_state("MPI_STATE")->pop_event(); } -void TRACE_smpi_testing_in(int rank) -{ - //do not forget to set the color first, otherwise this will explode - if (not TRACE_smpi_is_enabled()) - return; - - simgrid::instr::StateType* state = smpi_container(rank)->get_state("MPI_STATE"); - state->add_entity_value("test"); - state->push_event("test", new simgrid::instr::NoOpTIData("test")); -} - -void TRACE_smpi_testing_out(int rank) -{ - if (TRACE_smpi_is_enabled()) - smpi_container(rank)->get_state("MPI_STATE")->pop_event(); -} - void TRACE_smpi_comm_in(int rank, const char* operation, simgrid::instr::TIData* extra) { if (not TRACE_smpi_is_enabled()) {