- /* Compare libsimgrid data segment(s) */
- i = data_libsimgrid_index;
- while(i < s1->num_reg && s1->regions[i]->type == 1){
- if(data_libsimgrid_region_compare(s1->regions[i]->data, s2->regions[i]->data, s1->regions[i]->size) != 0){
- if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
- XBT_DEBUG("Different memcmp for data in libsimgrid");
- errors++;
- }else{
- if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
- XBT_VERB("Different memcmp for data in libsimgrid");
- if(!raw_mem_set)
- MC_UNSET_RAW_MEM;
- return 1;
- }
+ if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+ if(is_diff == 0)
+ xbt_os_timer_stop(timer);
+ xbt_os_timer_start(timer);
+ }
+
+ /* Compare libsimgrid global variables */
+ is_diff = compare_global_variables(s1->regions[data_libsimgrid_index]->type, s1->regions[data_libsimgrid_index]->data, s2->regions[data_libsimgrid_index]->data);
+ if(is_diff != 0){
+ if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_debug)){
+ xbt_os_timer_stop(timer);
+ if(ct1 != NULL)
+ xbt_dynar_push_as(ct1->libsimgrid_global_variables_comparison_times, double, xbt_os_timer_elapsed(timer));
+ if(ct2 != NULL)
+ xbt_dynar_push_as(ct2->libsimgrid_global_variables_comparison_times, double, xbt_os_timer_elapsed(timer));
+ XBT_DEBUG("Different global variables in libsimgrid");
+ errors++;
+ }else{
+ if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
+ XBT_VERB("Different global variables in libsimgrid");
+
+ xbt_os_timer_free(timer);
+ xbt_os_timer_stop(global_timer);
+ if(ct1 != NULL)
+ xbt_dynar_push_as(ct1->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
+ if(ct2 != NULL)
+ xbt_dynar_push_as(ct2->snapshot_comparison_times, double, xbt_os_timer_elapsed(global_timer));
+ xbt_os_timer_free(global_timer);
+
+ if(!raw_mem)
+ MC_UNSET_RAW_MEM;
+ return 1;