X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/afb806d0615c22ac119575596b71691f4e2bc9d1..19759270d7d4b85df2dd599fe8936278d840780a:/src/surf/cpu_ti.cpp diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index f3feb36580..6a1d618a5a 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -5,8 +5,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "cpu_ti.hpp" -#include "trace_mgr_private.h" #include "xbt/heap.h" +#include "src/surf/trace_mgr.hpp" +#include "src/surf/platform.hpp" #ifndef SURF_MODEL_CPUTI_H_ #define SURF_MODEL_CPUTI_H_ @@ -390,7 +391,9 @@ int CpuTiTrace::binarySearch(double *array, double a, int low, int high) static void cpu_ti_define_callbacks() { - sg_platf_postparse_add_cb(simgrid::surf::cpu_add_traces); + simgrid::surf::on_postparse.connect([]() { + surf_cpu_model_pm->addTraces(); + }); } /********* @@ -434,7 +437,7 @@ CpuTiModel::~CpuTiModel() xbt_heap_free(p_tiActionHeap); } -Cpu *CpuTiModel::createCpu(simgrid::Host *host, +Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, @@ -547,7 +550,7 @@ void CpuTiModel::addTraces() /************ * Resource * ************/ -CpuTi::CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak, +CpuTi::CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, tmgr_trace_t speedTrace, int core, int initiallyOn, tmgr_trace_t stateTrace) : Cpu(model, host, NULL, pstate, core, 0, speedScale, initiallyOn) @@ -585,7 +588,7 @@ CpuTi::~CpuTi() delete p_actionSet; } -void CpuTi::updateState(tmgr_trace_event_t event_type, +void CpuTi::updateState(tmgr_trace_iterator_t event_type, double value, double date) { CpuTiAction *action;