- /* Compare libsimgrid data segment(s) */
- is_diff = 0;
- i = data_libsimgrid_index;
- while(i < s1->num_reg && s1->regions[i]->type == 1){
- if(data_bss_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)){
- if(is_diff == 0){
- xbt_os_timer_stop(timer);
- if(ct1 != NULL)
- xbt_dynar_push_as(ct1->libsimgrid_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
- if(ct2 != NULL)
- xbt_dynar_push_as(ct2->libsimgrid_data_segment_comparison_times, double, xbt_os_timer_elapsed(timer));
- }
- XBT_DEBUG("Different memcmp for data in libsimgrid");
- errors++;
- is_diff = 1;
- }else{
- if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
- XBT_VERB("Different memcmp for data 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;
- }
- }
- i++;
- }
+ /* Compare libsimgrid global variables */
+ is_diff = compare_global_variables(s1->region_type[data_libsimgrid_index], s1->regions[data_libsimgrid_index]->data, s2->regions[data_libsimgrid_index]->data);
+ if(is_diff != 0){
+ #ifdef MC_DEBUG
+ xbt_os_timer_stop(timer);
+ mc_comp_times->libsimgrid_global_variables_comparison_time = xbt_os_timer_elapsed(timer);
+ XBT_DEBUG("Different global variables in libsimgrid");
+ errors++;
+ #else
+ #ifdef MC_VERBOSE
+ XBT_VERB("Different global variables in libsimgrid");
+ #endif
+
+ xbt_os_timer_free(timer);
+ xbt_os_timer_stop(global_timer);
+ mc_snapshot_comparison_time = xbt_os_timer_elapsed(global_timer);
+ xbt_os_timer_free(global_timer);
+
+ if(!raw_mem)
+ MC_UNSET_RAW_MEM;