/* 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 "simgrid/plugins/live_migration.h"
/* 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 "simgrid/plugins/live_migration.h"
void track(kernel::activity::ExecImpl const* exec, double amount) { dp_objs_.insert({exec, amount}); }
void untrack(kernel::activity::ExecImpl const* exec) { dp_objs_.erase(exec); }
double get_stored_remains(kernel::activity::ExecImpl const* exec) { return dp_objs_.at(exec); }
void update_dirty_page_count(double delta) { dp_updated_by_deleted_tasks_ += delta; }
double computed_flops_lookup();
void track(kernel::activity::ExecImpl const* exec, double amount) { dp_objs_.insert({exec, amount}); }
void untrack(kernel::activity::ExecImpl const* exec) { dp_objs_.erase(exec); }
double get_stored_remains(kernel::activity::ExecImpl const* exec) { return dp_objs_.at(exec); }
void update_dirty_page_count(double delta) { dp_updated_by_deleted_tasks_ += delta; }
double computed_flops_lookup();
void set_working_set_memory(sg_size_t size) { working_set_memory_ = size; }
void set_migration_speed(double speed) { mig_speed_ = speed; }
void set_working_set_memory(sg_size_t size) { working_set_memory_ = size; }
void set_migration_speed(double speed) { mig_speed_ = speed; }
- double get_migration_speed() { return mig_speed_; }
- double get_max_downtime() { return max_downtime_; }
+ double get_migration_speed() const { return mig_speed_; }
+ double get_max_downtime() const { return max_downtime_; }
static simgrid::xbt::Extension<VirtualMachineImpl, DirtyPageTrackingExt> EXTENSION_ID;
virtual ~DirtyPageTrackingExt() = default;
static simgrid::xbt::Extension<VirtualMachineImpl, DirtyPageTrackingExt> EXTENSION_ID;
virtual ~DirtyPageTrackingExt() = default;
if (vm == nullptr)
return;
/* If we are in the middle of dirty page tracking, we record how much computation has been done until now, and keep
* the information for the lookup_() function that will called soon. */
if (vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->is_tracking()) {
if (vm == nullptr)
return;
/* If we are in the middle of dirty page tracking, we record how much computation has been done until now, and keep
* the information for the lookup_() function that will called soon. */
if (vm->get_impl()->extension<simgrid::vm::DirtyPageTrackingExt>()->is_tracking()) {
simgrid::vm::DirtyPageTrackingExt::EXTENSION_ID =
simgrid::vm::VirtualMachineImpl::extension_create<simgrid::vm::DirtyPageTrackingExt>();
simgrid::vm::VirtualMachineImpl::on_creation.connect(&on_virtual_machine_creation);
simgrid::vm::DirtyPageTrackingExt::EXTENSION_ID =
simgrid::vm::VirtualMachineImpl::extension_create<simgrid::vm::DirtyPageTrackingExt>();
simgrid::vm::VirtualMachineImpl::on_creation.connect(&on_virtual_machine_creation);
- simgrid::kernel::activity::ExecImpl::on_creation.connect(&on_exec_creation);
- simgrid::kernel::activity::ExecImpl::on_completion.connect(&on_exec_completion);
+ simgrid::s4u::Exec::on_start.connect(&on_exec_creation);
+ simgrid::s4u::Exec::on_completion.connect(&on_exec_completion);