X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/321102577020b194dfb7ba89e48687952816849e..c6d6e5b87aed9c7080c981b11f91f2d0205623c3:/src/plugins/vm/dirty_page_tracking.cpp diff --git a/src/plugins/vm/dirty_page_tracking.cpp b/src/plugins/vm/dirty_page_tracking.cpp index dc0b8d5f7f..816006882c 100644 --- a/src/plugins/vm/dirty_page_tracking.cpp +++ b/src/plugins/vm/dirty_page_tracking.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2017-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. */ @@ -10,9 +10,7 @@ #include "src/kernel/activity/ExecImpl.hpp" #include "src/kernel/resource/VirtualMachineImpl.hpp" -namespace simgrid { -namespace plugin { -namespace vm { +namespace simgrid::plugin::vm { class DirtyPageTrackingExt { bool dp_tracking_ = false; std::map dp_objs_; @@ -67,9 +65,7 @@ double DirtyPageTrackingExt::computed_flops_lookup() return total; } -} // namespace vm -} // namespace plugin -} // namespace simgrid +} // namespace simgrid::plugin::vm using simgrid::plugin::vm::DirtyPageTrackingExt; @@ -92,9 +88,9 @@ static void on_exec_creation(simgrid::s4u::Exec const& e) } } -static void on_exec_completion(const simgrid::s4u::Activity& e) +static void on_exec_completion(const simgrid::s4u::Exec& e) { - const auto exec = dynamic_cast(e.get_impl()); + const auto* exec = dynamic_cast(e.get_impl()); if (exec == nullptr) return; const simgrid::s4u::VirtualMachine* vm = dynamic_cast(exec->get_host()); @@ -117,7 +113,7 @@ void sg_vm_dirty_page_tracking_init() simgrid::kernel::resource::VirtualMachineImpl::extension_create(); simgrid::s4u::VirtualMachine::on_creation_cb(&on_virtual_machine_creation); simgrid::s4u::Exec::on_start_cb(&on_exec_creation); - simgrid::s4u::Activity::on_completion_cb(&on_exec_completion); + simgrid::s4u::Exec::on_completion_cb(&on_exec_completion); } }