Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill useless simcall handlers
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 17 Nov 2016 10:34:35 +0000 (11:34 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 17 Nov 2016 10:34:35 +0000 (11:34 +0100)
src/simix/ActorImpl.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/simcalls.in
src/simix/smx_host_private.h
src/simix/smx_vm.cpp

index 9d3f6e5..2329d65 100644 (file)
@@ -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);
index 9da45f3..b7d2284 100644 (file)
@@ -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);
index bf3c72c..de6f794 100644 (file)
@@ -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<void, sg_host_t>(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<void, sg_host_t>(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<void, smx_actor_t>(SIMCALL_PROCESS_RESUME, process);
   }
   
index 696168e..872041e 100644 (file)
@@ -109,9 +109,9 @@ case SIMCALL_VM_SUSPEND:
       break;
 
 case SIMCALL_VM_RESUME:
-      simcall_HANDLER_vm_resume(simcall, simgrid::simix::unmarshal<sg_host_t>(simcall->args[0]));
-      SIMIX_simcall_answer(simcall);
-      break;
+  SIMIX_vm_resume(simgrid::simix::unmarshal<sg_host_t>(simcall->args[0]));
+  SIMIX_simcall_answer(simcall);
+  break;
 
 case SIMCALL_VM_SHUTDOWN:
       simcall_HANDLER_vm_shutdown(simcall, simgrid::simix::unmarshal<sg_host_t>(simcall->args[0]));
@@ -124,9 +124,9 @@ case SIMCALL_VM_SAVE:
       break;
 
 case SIMCALL_VM_RESTORE:
-      simcall_HANDLER_vm_restore(simcall, simgrid::simix::unmarshal<sg_host_t>(simcall->args[0]));
-      SIMIX_simcall_answer(simcall);
-      break;
+  SIMIX_vm_restore(simgrid::simix::unmarshal<sg_host_t>(simcall->args[0]));
+  SIMIX_simcall_answer(simcall);
+  break;
 
 case SIMCALL_PROCESS_KILL:
       simcall_HANDLER_process_kill(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
@@ -148,9 +148,9 @@ case SIMCALL_PROCESS_SUSPEND:
       break;
 
 case SIMCALL_PROCESS_RESUME:
-      simcall_HANDLER_process_resume(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
-      SIMIX_simcall_answer(simcall);
-      break;
+  SIMIX_process_resume(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
+  SIMIX_simcall_answer(simcall);
+  break;
 
 case SIMCALL_PROCESS_SET_HOST:
       simcall_HANDLER_process_set_host(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<sg_host_t>(simcall->args[1]));
index a2f70c7..887b1b6 100644 (file)
 # 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]];
index 2f88ed5..b8d2920 100644 (file)
@@ -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);
 // --
index dcf61aa..de01559 100644 (file)
@@ -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