Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove the SNAPSHOT and COMPARE_SNAPSHOTS MC simcalls
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 8 Mar 2016 09:44:49 +0000 (10:44 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 8 Mar 2016 09:44:49 +0000 (10:44 +0100)
They were not used.

12 files changed:
include/simgrid/modelchecker.h
include/simgrid/simix.h
src/mc/mc_base.cpp
src/mc/mc_checkpoint.cpp
src/mc/mc_client_api.cpp
src/mc/mc_request.cpp
src/simix/libsmx.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in

index b77f417..da3d831 100644 (file)
@@ -46,8 +46,6 @@ XBT_PUBLIC(void) MC_assert(int);
 XBT_PUBLIC(void) MC_automaton_new_propositional_symbol(const char* id, int(*fct)(void));
 XBT_PUBLIC(void) MC_automaton_new_propositional_symbol_pointer(const char *id, int* value);
 
-XBT_PUBLIC(void *) MC_snapshot(void);
-XBT_PUBLIC(int) MC_compare_snapshots(void *s1, void *s2);
 XBT_PUBLIC(void) MC_cut(void);
 XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
 
@@ -59,8 +57,6 @@ XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
 #define MC_assert(a)                    xbt_assert(a)
 #define MC_automaton_new_propositional_symbol(a, b) ((void)0)
 #define MC_automaton_new_propositional_symbol_pointer(a, b) ((void)0)
-#define MC_snapshot()                   ((void*)0)
-#define MC_compare_snapshots(a, b)      0
 #define MC_cut()                        ((void)0)
 #define MC_ignore(a, b)                 ((void)0)
 
index 5e930ff..ae24e72 100644 (file)
@@ -481,8 +481,6 @@ XBT_PUBLIC(xbt_dict_t) SIMIX_asr_get_properties(const char *name);
 XBT_PUBLIC(xbt_dict_t) simcall_asr_get_properties(const char *name);
 
 /************************** MC simcalls   **********************************/
-XBT_PUBLIC(void *) simcall_mc_snapshot(void);
-XBT_PUBLIC(int) simcall_mc_compare_snapshots(void *s1, void *s2);
 XBT_PUBLIC(int) simcall_mc_random(int min, int max);
 
 SG_END_DECL()
index c3fbeed..70ca01c 100644 (file)
@@ -187,10 +187,6 @@ bool request_is_visible(smx_simcall_t req)
       || req->call == SIMCALL_MC_RANDOM
       || req->call == SIMCALL_MUTEX_LOCK
       || req->call == SIMCALL_MUTEX_TRYLOCK
-#ifdef HAVE_MC
-      || req->call == SIMCALL_MC_SNAPSHOT
-      || req->call == SIMCALL_MC_COMPARE_SNAPSHOTS
-#endif
       ;
 }
 
index c831100..3e9a705 100644 (file)
@@ -635,9 +635,3 @@ void restore_snapshot(mc_snapshot_t snapshot)
 
 }
 }
-
-extern "C"
-mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall)
-{
-  return simgrid::mc::take_snapshot(1);
-}
index 21a1db9..9433798 100644 (file)
@@ -39,22 +39,6 @@ void MC_assert(int prop)
   }
 }
 
-void *MC_snapshot(void)
-{
-  return simcall_mc_snapshot();
-}
-
-int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall,
-                                   mc_snapshot_t s1, mc_snapshot_t s2)
-{
-  return snapshot_compare(s1, s2);
-}
-
-int MC_compare_snapshots(void *s1, void *s2)
-{
-  return simcall_mc_compare_snapshots(s1, s2);
-}
-
 void MC_cut(void)
 {
   user_max_depth_reached = 1;
index 0c2acf8..29d008e 100644 (file)
@@ -399,16 +399,6 @@ char *simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid::mc::
     break;
   }
 
-  case SIMCALL_MC_SNAPSHOT:
-    type = "MC_SNAPSHOT";
-    args = nullptr;
-    break;
-
-  case SIMCALL_MC_COMPARE_SNAPSHOTS:
-    type = "MC_COMPARE_SNAPSHOTS";
-    args = nullptr;
-    break;
-
   case SIMCALL_MC_RANDOM:
     type = "MC_RANDOM";
     args = bprintf("%d", value);
@@ -612,24 +602,6 @@ char *request_get_dot_output(smx_simcall_t req, int value)
       label = bprintf("[(%lu)] MC_RANDOM (%d)", issuer->pid, value);
     break;
 
-  case SIMCALL_MC_SNAPSHOT:
-    if (issuer->host)
-      label =
-          bprintf("[(%lu)%s] MC_SNAPSHOT", issuer->pid,
-                  MC_smx_process_get_host_name(issuer));
-    else
-      label = bprintf("[(%lu)] MC_SNAPSHOT", issuer->pid);
-    break;
-
-  case SIMCALL_MC_COMPARE_SNAPSHOTS:
-    if (issuer->host)
-      label =
-          bprintf("[(%lu)%s] MC_COMPARE_SNAPSHOTS", issuer->pid,
-                  MC_smx_process_get_host_name(issuer));
-    else
-      label = bprintf("[(%lu)] MC_COMPARE_SNAPSHOTS", issuer->pid);
-    break;
-
   default:
     THROW_UNIMPLEMENTED;
   }
index cdd3b40..5eacc32 100644 (file)
@@ -1291,18 +1291,6 @@ void simcall_run_kernel(std::function<void()> const& code)
   return simcall_BODY_run_kernel((void*) &code);
 }
 
-#ifdef HAVE_MC
-
-void *simcall_mc_snapshot(void) {
-  return simcall_BODY_mc_snapshot();
-}
-
-int simcall_mc_compare_snapshots(void *s1, void *s2) {
-  return simcall_BODY_mc_compare_snapshots((simgrid::mc::Snapshot*)s1, (simgrid::mc::Snapshot*)s2);
-}
-
-#endif /* HAVE_MC */
-
 int simcall_mc_random(int min, int max) {
   return simcall_BODY_mc_random(min, max);
 }
index d3c67e9..b7aa143 100644 (file)
@@ -1380,35 +1380,6 @@ static inline void* simcall_run_kernel__get__code(smx_simcall_t simcall) {
 static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-#ifdef HAVE_MC
-
-static inline mc_snapshot_t simcall_mc_snapshot__get__result(smx_simcall_t simcall){
-    return (mc_snapshot_t) simcall->result.dp;
-}
-static inline void simcall_mc_snapshot__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall) {
-  return (mc_snapshot_t) simcall->args[0].dp;
-}
-static inline void simcall_mc_compare_snapshots__set__s1(smx_simcall_t simcall, void* arg) {
-    simcall->args[0].dp = arg;
-}
-static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall) {
-  return (mc_snapshot_t) simcall->args[1].dp;
-}
-static inline void simcall_mc_compare_snapshots__set__s2(smx_simcall_t simcall, void* arg) {
-    simcall->args[1].dp = arg;
-}
-static inline int simcall_mc_compare_snapshots__get__result(smx_simcall_t simcall){
-    return  simcall->result.i;
-}
-static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-#endif
-
 
 /* The prototype of all simcall handlers, automatically generated for you */
 
@@ -1460,8 +1431,4 @@ XBT_PRIVATE int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd,
 XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage);
 XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
 XBT_PRIVATE xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
-XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
-#ifdef HAVE_MC
-XBT_PRIVATE mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
-XBT_PRIVATE int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
-#endif
+XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
\ No newline at end of file
index 2a0c62d..05e6b82 100644 (file)
@@ -1844,49 +1844,4 @@ inline static void simcall_BODY_run_kernel(void* code) {
       SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
-  }
-#ifdef HAVE_MC
-  
-inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
-    smx_process_t self = SIMIX_process_self();
-
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
-    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
-    self->simcall.call = SIMCALL_MC_SNAPSHOT;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_handle(&self->simcall, 0);
-    }    
-    return (mc_snapshot_t) self->simcall.result.dp;
-  }
-  
-inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
-    smx_process_t self = SIMIX_process_self();
-
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
-    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
-    self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) s1;
-    self->simcall.args[1].dp = (void*) s2;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_handle(&self->simcall, 0);
-    }    
-    return (int) self->simcall.result.i;
-  }
-#endif
+  }
\ No newline at end of file
index 4f357d8..877f0a3 100644 (file)
@@ -100,10 +100,5 @@ typedef enum {
   SIMCALL_ASR_GET_PROPERTIES,
   SIMCALL_MC_RANDOM,
   SIMCALL_SET_CATEGORY,
-  SIMCALL_RUN_KERNEL,
-#ifdef HAVE_MC
-  SIMCALL_MC_SNAPSHOT,
-  SIMCALL_MC_COMPARE_SNAPSHOTS,
-#endif
-  NUM_SIMCALLS
+  SIMCALL_RUN_KERNEL,  NUM_SIMCALLS
 } e_smx_simcall_t;
index 2306854..cee0200 100644 (file)
@@ -105,12 +105,7 @@ const char* simcall_names[] = {
   "SIMCALL_ASR_GET_PROPERTIES",
   "SIMCALL_MC_RANDOM",
   "SIMCALL_SET_CATEGORY",
-  "SIMCALL_RUN_KERNEL",
-#ifdef HAVE_MC
-  "SIMCALL_MC_SNAPSHOT",
-  "SIMCALL_MC_COMPARE_SNAPSHOTS",
-#endif
-};
+  "SIMCALL_RUN_KERNEL",};
 
 /**
  * @brief (in kernel mode) unpack the simcall and activate the handler
@@ -518,19 +513,6 @@ case SIMCALL_RUN_KERNEL:
        SIMIX_run_kernel( simcall->args[0].dp);
       SIMIX_simcall_answer(simcall);
       break;  
-
-#ifdef HAVE_MC
-case SIMCALL_MC_SNAPSHOT:
-      simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall );
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MC_COMPARE_SNAPSHOTS:
-      simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , (mc_snapshot_t) simcall->args[0].dp, (mc_snapshot_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-#endif
     case NUM_SIMCALLS:
       break;
     case SIMCALL_NONE:
index a98a6d3..904718d 100644 (file)
@@ -141,7 +141,3 @@ Func H mc_random (int) (min, int) (max, int)
 Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*)
 
 Proc - run_kernel (void) (code, void*)
-
-## HAVE_MC
-Func H mc_snapshot (void*, mc_snapshot_t)
-Func H mc_compare_snapshots (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)