From: Marion Guthmuller Date: Mon, 30 Jan 2012 16:29:00 +0000 (+0100) Subject: remove function MC_take_snapshot_to_restore_liveness X-Git-Tag: exp_20120216~97^2~29 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/36346603a122ffd961c5af349e9ad8ce00ff80cd remove function MC_take_snapshot_to_restore_liveness --- diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index da376da567..1bb54ef713 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -123,40 +123,6 @@ void MC_take_snapshot_liveness(mc_snapshot_t snapshot) i = 0; - /* Save the std heap and the writable mapped pages of libsimgrid */ - while (i < maps->mapsize) { - reg = maps->regions[i]; - if ((reg.prot & PROT_WRITE)){ - if (maps->regions[i].pathname == NULL){ - if (reg.start_addr == std_heap){ // only save the std heap (and not the raw one) - MC_snapshot_add_region(snapshot, 0, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); - } - }else { - if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){ - MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr); - } - } - } - i++; - } - - /* FIXME: free the memory map */ -} - -void MC_take_snapshot_to_restore_liveness(mc_snapshot_t snapshot) -{ - unsigned int i = 0; - s_map_region reg; - memory_map_t maps = get_memory_map(); - - for(i=0; i< snapshot->num_reg; i++){ - MC_region_destroy(snapshot->regions[i]); - } - - snapshot->num_reg = 0; - - i = 0; - /* Save the std heap and the writable mapped pages of libsimgrid */ while (i < maps->mapsize) { reg = maps->regions[i]; diff --git a/src/mc/mc_liveness.c b/src/mc/mc_liveness.c index 75615b70f9..2795f00c43 100644 --- a/src/mc/mc_liveness.c +++ b/src/mc/mc_liveness.c @@ -836,7 +836,7 @@ void MC_ddfs_init(void){ /* Save the initial state */ initial_snapshot_liveness = xbt_new0(s_mc_snapshot_t, 1); - MC_take_snapshot_to_restore_liveness(initial_snapshot_liveness); + MC_take_snapshot_liveness(initial_snapshot_liveness); MC_UNSET_RAW_MEM; diff --git a/src/mc/private.h b/src/mc/private.h index d277c41014..54d193ec3c 100644 --- a/src/mc/private.h +++ b/src/mc/private.h @@ -40,7 +40,6 @@ extern char *prog_name; void MC_take_snapshot(mc_snapshot_t); void MC_take_snapshot_liveness(mc_snapshot_t s); -void MC_take_snapshot_to_restore_liveness(mc_snapshot_t s); void MC_restore_snapshot(mc_snapshot_t); void MC_free_snapshot(mc_snapshot_t);