Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/core/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static struct argp_option options[] = {
{"ckpt-fossil-period", CKPT_FOSSIL_PERIOD_KEY , "#EVENTS" , 0 , "Number of events to be executed before collection committed snapshot" , 0 },
{"ckpt-autonomic-period", CKPT_AUTONOMIC_PERIOD_KEY, 0 , OPTION_ARG_OPTIONAL, "Enable autonomic checkpointing period" , 0 },
{"ckpt_forced_full_period", CKPT_FORCED_FULL_PERIOD_KEY, "#CHECKPOINTS" , 0, "Number of incremental checkpoints before taking a full log" , 0 },
{"iss_enabled", ISS_ENABLED , 0 , OPTION_ARG_OPTIONAL, "Use mprotect as tracking mechanism for write accesses" , 0 },
{"iss_mode", ISS_MODE , 0 , OPTION_ARG_OPTIONAL, "Use mprotect as tracking mechanism for write accesses" , 0 },

{"distributed-fetch", DISTRIBUTED_FETCH_KEY , 0 , OPTION_ARG_OPTIONAL, "Enable distributed fetch" , 0 },
Expand Down Expand Up @@ -97,8 +98,11 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
pdes_config.ckpt_autonomic_period = 1;
break;

case ISS_MODE:
case ISS_ENABLED:
pdes_config.checkpointing = INCREMENTAL_STATE_SAVING;
break;

case ISS_MODE:
pdes_config.iss_mode = MPROTECT;
break;

Expand Down
9 changes: 4 additions & 5 deletions src/include/ROOT-Sim.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,16 @@ int Zipf(double skew, int limit);


extern void dirty(void*, size_t);
extern void set_chunk_dirty_from_address(void *, int);

#define MODEL_WRITE(var,val)({\
if(pdes_config.checkpointing == INCREMENTAL_STATE_SAVING){\
if (pdes_config.iss_mode == MPROTECT) {\
do{ dirty(&(var), sizeof((var)));(var) = (val);} while(0);\
}else {\
do { set_chunk_dirty_from_address(&(var), val); (var) = (val); } while (0);\
do{ dirty(&(var), sizeof((var))); (var) = (val); } while(0);\
} else {\
do { set_chunk_dirty_from_address(&(var), val); (var) = (val); } while(0);\
}\
}\
})
})



Expand Down
2 changes: 1 addition & 1 deletion src/mm/recoverable.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ size_t get_log_size(malloc_state *logged_state){
if (pdes_config.iss_mode == DDYMELOR) {
log_size = sizeof(malloc_state) + sizeof(seed_type) + logged_state->dirty_areas * sizeof(malloc_area) + logged_state->bitmap_size + logged_state->dirty_bitmap_size + logged_state->total_inc_size;
} else {
log_size = sizeof(malloc_state) + sizeof(seed_type) + logged_state->busy_areas * sizeof(malloc_area) + logged_state->bitmap_size + sizeof(void *);
log_size = sizeof(malloc_state) + sizeof(seed_type) + logged_state->busy_areas * sizeof(malloc_area) + logged_state->bitmap_size + logged_state->total_log_size + sizeof(void *);
}
}

Expand Down