From: Frederic Suter Date: Fri, 1 Mar 2019 17:52:08 +0000 (+0100) Subject: The creation of the pimpl needs no simcall X-Git-Tag: v3_22~199 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/debe4e5871c0c3d1c714bbb1bd28ba7147454aa5?hp=58bb34bb3a854fb4ea3f1daf6ed3c742efb89e1d The creation of the pimpl needs no simcall Now that init and start are split, creating the ExecImpl in init (the constructor) has no impact on the simulation kernel. The action is created by start(). This slightly modifies the ordering of the output in one tesh file --- diff --git a/examples/s4u/exec-monitor/s4u-exec-monitor.tesh b/examples/s4u/exec-monitor/s4u-exec-monitor.tesh index eb63d1e91e..45de5dd098 100644 --- a/examples/s4u/exec-monitor/s4u-exec-monitor.tesh +++ b/examples/s4u/exec-monitor/s4u-exec-monitor.tesh @@ -9,8 +9,8 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-exec-monitor$EXEEXT ${platfdir}/small_platform > [Tremblay:monitor 1:(2) 10.000000] [s4u_test/INFO] activity remaining duration: 2.3704e+08 (24%) > [Fafard:executor:(1) 13.106847] [s4u_test/INFO] The monitored task is over. Let's start 3 of them now. > [Jupiter:monitor 2:(3) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%) -> [Ginette:monitor 3:(4) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%) > [Fafard:executor:(1) 13.106847] [s4u_test/INFO] All activities are started; finish now +> [Ginette:monitor 3:(4) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%) > [Bourassa:monitor 4:(5) 13.106847] [s4u_test/INFO] activity remaining duration: 1e+09 (100%) > [Tremblay:monitor 1:(2) 15.000000] [s4u_test/INFO] My task is over. > [Bourassa:monitor 4:(5) 18.106847] [s4u_test/INFO] activity remaining duration: 8.7284e+08 (87%) diff --git a/src/s4u/s4u_Exec.cpp b/src/s4u/s4u_Exec.cpp index d75abb13cb..300a12e43f 100644 --- a/src/s4u/s4u_Exec.cpp +++ b/src/s4u/s4u_Exec.cpp @@ -18,9 +18,7 @@ simgrid::xbt::signal s4u::Exec::on_completion; Exec::Exec(sg_host_t host, double flops_amount) : Activity(), host_(host), flops_amount_(flops_amount) { Activity::set_remaining(flops_amount_); - pimpl_ = simix::simcall([this] { - return kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, host_)); - }); + pimpl_ = kernel::activity::ExecImplPtr(new kernel::activity::ExecImpl(name_, tracing_category_, host_)); } Exec* Exec::start()