From: Martin Quinson Date: Thu, 17 Nov 2016 10:34:35 +0000 (+0100) Subject: kill useless simcall handlers X-Git-Tag: v3_14~178 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a3f6c5e832f9966433370562ef59fc4670038c94?hp=bd02d8d308feab888032539a30702bf2fb4b445f kill useless simcall handlers --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 9d3f6e5d74..2329d65388 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -631,10 +631,6 @@ smx_activity_t SIMIX_process_suspend(smx_actor_t process, smx_actor_t issuer) } } -void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_actor_t process){ - SIMIX_process_resume(process); -} - void SIMIX_process_resume(smx_actor_t process) { XBT_IN("process = %p", process); diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index 9da45f34e8..b7d2284995 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -1155,14 +1155,11 @@ static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::f /* The prototype of all simcall handlers, automatically generated for you */ XBT_PRIVATE void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t ind_vm); -XBT_PRIVATE void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t ind_vm); XBT_PRIVATE void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, sg_host_t ind_vm); XBT_PRIVATE void simcall_HANDLER_vm_save(smx_simcall_t simcall, sg_host_t ind_vm); -XBT_PRIVATE void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t ind_vm); XBT_PRIVATE void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_actor_t process); XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid); XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process); -XBT_PRIVATE void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_actor_t process); XBT_PRIVATE void simcall_HANDLER_process_set_host(smx_simcall_t simcall, smx_actor_t process, sg_host_t dest); XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout); XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration); diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index bf3c72c124..de6f79485d 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -43,7 +43,8 @@ inline static void simcall_BODY_vm_suspend(sg_host_t ind_vm) { inline static void simcall_BODY_vm_resume(sg_host_t ind_vm) { /* Go to that function to follow the code flow through the simcall barrier */ - if (0) simcall_HANDLER_vm_resume(&SIMIX_process_self()->simcall, ind_vm); + if (0) + SIMIX_vm_resume(ind_vm); return simcall(SIMCALL_VM_RESUME, ind_vm); } @@ -61,7 +62,8 @@ inline static void simcall_BODY_vm_save(sg_host_t ind_vm) { inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) { /* Go to that function to follow the code flow through the simcall barrier */ - if (0) simcall_HANDLER_vm_restore(&SIMIX_process_self()->simcall, ind_vm); + if (0) + SIMIX_vm_restore(ind_vm); return simcall(SIMCALL_VM_RESTORE, ind_vm); } @@ -91,7 +93,8 @@ inline static void simcall_BODY_process_suspend(smx_actor_t process) { inline static void simcall_BODY_process_resume(smx_actor_t process) { /* Go to that function to follow the code flow through the simcall barrier */ - if (0) simcall_HANDLER_process_resume(&SIMIX_process_self()->simcall, process); + if (0) + SIMIX_process_resume(process); return simcall(SIMCALL_PROCESS_RESUME, process); } diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 696168e558..872041e5a6 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -109,9 +109,9 @@ case SIMCALL_VM_SUSPEND: break; case SIMCALL_VM_RESUME: - simcall_HANDLER_vm_resume(simcall, simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_vm_resume(simgrid::simix::unmarshal(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_VM_SHUTDOWN: simcall_HANDLER_vm_shutdown(simcall, simgrid::simix::unmarshal(simcall->args[0])); @@ -124,9 +124,9 @@ case SIMCALL_VM_SAVE: break; case SIMCALL_VM_RESTORE: - simcall_HANDLER_vm_restore(simcall, simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_vm_restore(simgrid::simix::unmarshal(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_PROCESS_KILL: simcall_HANDLER_process_kill(simcall, simgrid::simix::unmarshal(simcall->args[0])); @@ -148,9 +148,9 @@ case SIMCALL_PROCESS_SUSPEND: break; case SIMCALL_PROCESS_RESUME: - simcall_HANDLER_process_resume(simcall, simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_process_resume(simgrid::simix::unmarshal(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_PROCESS_SET_HOST: simcall_HANDLER_process_set_host(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index a2f70c7a37..887b1b6a4d 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -37,16 +37,16 @@ # compilation time) void vm_suspend(sg_host_t ind_vm); -void vm_resume(sg_host_t ind_vm); +void vm_resume(sg_host_t ind_vm) [[nohandler]]; void vm_shutdown(sg_host_t ind_vm); void vm_save(sg_host_t ind_vm); -void vm_restore(sg_host_t ind_vm); +void vm_restore(sg_host_t ind_vm) [[nohandler]]; void process_kill(smx_actor_t process); void process_killall(int reset_pid); void process_cleanup(smx_actor_t process) [[nohandler]]; void process_suspend(smx_actor_t process) [[block]]; -void process_resume(smx_actor_t process); +void process_resume(smx_actor_t process) [[nohandler]]; void process_set_host(smx_actor_t process, sg_host_t dest); int process_is_suspended(smx_actor_t process) [[nohandler]]; int process_join(smx_actor_t process, double timeout) [[block]]; diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index 2f88ed5e3e..b8d2920cd1 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -69,7 +69,7 @@ XBT_PRIVATE void SIMIX_set_category(smx_activity_t synchro, const char *category /* vm related stuff */ XBT_PRIVATE void SIMIX_vm_destroy(sg_host_t ind_vm); // -- -XBT_PRIVATE void SIMIX_vm_resume(sg_host_t ind_vm, smx_actor_t issuer); +XBT_PRIVATE void SIMIX_vm_resume(sg_host_t ind_vm); XBT_PRIVATE void SIMIX_vm_suspend(sg_host_t ind_vm, smx_actor_t issuer); // -- diff --git a/src/simix/smx_vm.cpp b/src/simix/smx_vm.cpp index dcf61aac33..de015591a5 100644 --- a/src/simix/smx_vm.cpp +++ b/src/simix/smx_vm.cpp @@ -110,8 +110,7 @@ void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst SIMIX_vm_migrate(vm, dst_pm); /* Resume the VM */ - smx_actor_t self = SIMIX_process_self(); - SIMIX_vm_resume(vm, self); + SIMIX_vm_resume(vm); } /** @@ -156,7 +155,7 @@ void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t vm) * * @param vm the vm host to resume (a sg_host_t) */ -void SIMIX_vm_resume(sg_host_t vm, smx_actor_t issuer) +void SIMIX_vm_resume(sg_host_t vm) { if (SIMIX_vm_get_state(vm) != SURF_VM_STATE_SUSPENDED) THROWF(vm_error, 0, "VM(%s) was not suspended", vm->name().c_str()); @@ -174,12 +173,6 @@ void SIMIX_vm_resume(sg_host_t vm, smx_actor_t issuer) } } -void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t vm) -{ - SIMIX_vm_resume(vm, simcall->issuer); -} - - /** * @brief Function to save a SIMIX VM host. * This function is the same as vm_suspend, but the state of the VM is saved to the disk, and not preserved on memory. @@ -236,12 +229,6 @@ void SIMIX_vm_restore(sg_host_t vm) } } -void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t vm) -{ - SIMIX_vm_restore(vm); -} - - /** * @brief Function to shutdown a SIMIX VM host. This function powers off the * VM. All the processes on this VM will be killed. But, the state of the VM is