From: Marion Guthmuller Date: Wed, 1 Aug 2012 13:48:04 +0000 (+0200) Subject: model-checker : init list of irrelevant differences in simix instead of msg X-Git-Tag: v3_8~226 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a62f7fd52f7273e5cfb7de48e8d530f805c67d74 model-checker : init list of irrelevant differences in simix instead of msg --- diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index 9892190358..cbc7ce302e 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -14,6 +14,7 @@ #include "simgrid/simix.h" #include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */ #include "xbt/automaton.h" +#include "xbt/dynar.h" #define STD_HEAP_SIZE 20480000 /* Maximum size of the system's heap */ @@ -21,6 +22,8 @@ SG_BEGIN_DECL() extern char*_surf_mc_property_file; /* fixme: better location? */ +extern xbt_dynar_t mmalloc_ignore; + /********************************* Global *************************************/ void _mc_cfg_cb_reduce(const char *name, int pos); void _mc_cfg_cb_checkpoint(const char *name, int pos); diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index ca077e1352..16f3507a33 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -50,11 +50,8 @@ void MSG_init_nocheck(int *argc, char **argv) { msg_global->vms = xbt_swag_new(xbt_swag_offset(vm,all_vms_hookup)); if(MC_IS_ENABLED){ - /* Create list of elements to ignore for heap comparison algorithm */ - MC_ignore_init(); /* Ignore total amount of messages sent during the simulation for heap comparison */ MC_ignore(&(msg_global->sent_msg), sizeof(msg_global->sent_msg)); - } /* initialization of the action module */ diff --git a/src/simix/smx_context_raw.c b/src/simix/smx_context_raw.c index 6c6b435fd3..a3b94739d3 100644 --- a/src/simix/smx_context_raw.c +++ b/src/simix/smx_context_raw.c @@ -8,6 +8,7 @@ #include "smx_private.h" #include "xbt/parmap.h" +#include "mc/mc.h" #ifdef HAVE_VALGRIND_VALGRIND_H # include @@ -226,6 +227,12 @@ static void smx_ctx_raw_runall(void); */ void SIMIX_ctx_raw_factory_init(smx_context_factory_t *factory) { + + if(MC_IS_ENABLED && mmalloc_ignore == NULL){ + /* Create list of elements to ignore for heap comparison algorithm */ + MC_ignore_init(); + } + XBT_VERB("Using raw contexts. Because the glibc is just not good enough for us."); smx_ctx_base_factory_init(factory);