From 247d96de592ac1fcd59411032c6528f238764516 Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Sun, 18 Nov 2012 19:22:43 +0100 Subject: [PATCH] model-checker : stateful mode disabled by default --- src/mc/mc_checkpoint.c | 3 ++- src/mc/mc_global.c | 8 +++++++- src/surf/surf_config.c | 4 ++-- src/xbt/xbt_main.c | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index df6c9c4f6b..d816cdb70a 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -245,7 +245,8 @@ mc_snapshot_t MC_take_snapshot() } } - snapshot->stacks = take_snapshot_stacks(heap); + if(_surf_mc_stateful > 0 || _surf_mc_property_file) + snapshot->stacks = take_snapshot_stacks(heap); free_memory_map(maps); diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 0447fa4e4a..9f7ae0fb8f 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -207,7 +207,13 @@ void MC_modelcheck_safety(void) MC_UNSET_RAW_MEM; - MC_init(); + if(_surf_mc_stateful > 0){ + MC_init(); + }else{ + MC_init_memory_map_info(); + get_libsimgrid_plt_section(); + get_binary_plt_section(); + } MC_dpor_init(); diff --git a/src/surf/surf_config.c b/src/surf/surf_config.c index 32b361afb0..293a32ae62 100644 --- a/src/surf/surf_config.c +++ b/src/surf/surf_config.c @@ -533,9 +533,9 @@ void surf_config_init(int *argc, char **argv) _mc_cfg_cb_max_depth, NULL); /* Set number of visited state stored in stateful mode */ - default_value_int = 10; + default_value_int = 0; xbt_cfg_register(&_surf_cfg_set, "model-check/stateful", - "Specify the number of visited state stored in stateful mode. The default value is 10 which means that we only keep in memory the last 10 visited states", + "Specify the number of visited state stored in stateful mode. If value=5, the last 5 visited states are stored", xbt_cfgelm_int, &default_value, 0, 1, _mc_cfg_cb_stateful, NULL); #endif diff --git a/src/xbt/xbt_main.c b/src/xbt/xbt_main.c index c1ebcf465f..7687e5d8d1 100644 --- a/src/xbt/xbt_main.c +++ b/src/xbt/xbt_main.c @@ -34,7 +34,7 @@ int _surf_mc_checkpoint=0; char* _surf_mc_property_file=NULL; int _surf_mc_timeout=0; int _surf_mc_max_depth=1000; -int _surf_mc_stateful=10; +int _surf_mc_stateful=0; /* Declare xbt_preinit and xbt_postexit as constructor/destructor of the library. * This is crude and rather compiler-specific, unfortunately. -- 2.20.1