#include "src/mc/mc_private.h"
#include "src/mc/mc_snapshot.h"
#include "src/mc/mc_dwarf.hpp"
#include "src/mc/mc_private.h"
#include "src/mc/mc_snapshot.h"
#include "src/mc/mc_dwarf.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt,
"Logging specific to mc_diff in mc");
/*********************************** Heap comparison ***********************************/
/***************************************************************************************/
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_diff, xbt,
"Logging specific to mc_diff in mc");
/*********************************** Heap comparison ***********************************/
/***************************************************************************************/
if (current_pair->block1 == block1 && current_pair->block2 == block2
&& current_pair->fragment1 == fragment1
&& current_pair->fragment2 == fragment2)
return 0;
if (current_pair->block1 == block1 && current_pair->block2 == block2
&& current_pair->fragment1 == fragment1
&& current_pair->fragment2 == fragment2)
return 0;
int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2,
std::vector<simgrid::mc::IgnoredHeapRegion>* i1,
int init_heap_information(xbt_mheap_t heap1, xbt_mheap_t heap2,
std::vector<simgrid::mc::IgnoredHeapRegion>* i1,
memset(state->equals_to2, 0,
state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(s_heap_area_t));
memset(state->types1, 0,
memset(state->equals_to2, 0,
state->heaplimit * MAX_FRAGMENT_PER_BLOCK * sizeof(s_heap_area_t));
memset(state->types1, 0,
res_compare =
compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1,
snapshot2, previous, nullptr, 0);
res_compare =
compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1,
snapshot2, previous, nullptr, 0);
&& ((ignore1 = heap_comparison_ignore_size(state->to_ignore1, real_area1))
> 0)
&& ((ignore2 = heap_comparison_ignore_size(state->to_ignore2, real_area2))
&& ((ignore1 = heap_comparison_ignore_size(state->to_ignore1, real_area1))
> 0)
&& ((ignore2 = heap_comparison_ignore_size(state->to_ignore2, real_area2))
return (MC_snapshot_region_memcmp(real_area1, heap_region1, real_area2, heap_region2, type->byte_size) != 0);
return (MC_snapshot_region_memcmp(real_area1, heap_region1, real_area2, heap_region2, type->byte_size) != 0);
} else {
for(simgrid::mc::Member& member : type->members) {
// TODO, optimize this? (for the offset case)
} else {
for(simgrid::mc::Member& member : type->members) {
// TODO, optimize this? (for the offset case)
snapshot1, snapshot2,
previous, member.type, -1,
check_ignore, 0);
snapshot1, snapshot2,
previous, member.type, -1,
check_ignore, 0);
|| (block1 > (ssize_t) state->heapsize1) || (block1 < 1)
|| ((char *) area2 < (char *) state->std_heap_copy.heapbase)
|| (block2 > (ssize_t) state->heapsize2) || (block2 < 1)) {
|| (block1 > (ssize_t) state->heapsize1) || (block1 < 1)
|| ((char *) area2 < (char *) state->std_heap_copy.heapbase)
|| (block2 > (ssize_t) state->heapsize2) || (block2 < 1)) {
// Remember (basic) type inference.
// The current data structure only allows us to do this for the whole block.
// Remember (basic) type inference.
// The current data structure only allows us to do this for the whole block.
// Remember (basic) type inference.
// The current data structure only allows us to do this for the whole fragment.
// Remember (basic) type inference.
// The current data structure only allows us to do this for the whole fragment.
- if (offset1 == 0 && offset2 == 0) {
- if (!add_heap_area_pair(previous, block1, frag1, block2, frag2)) {
+ if (offset1 == 0 && offset2 == 0
+ && !add_heap_area_pair(previous, block1, frag1, block2, frag2)) {
if (match_pairs) {
match_equals(state, previous);
xbt_dynar_free(&previous);
}
return 0;
}
if (match_pairs) {
match_equals(state, previous);
xbt_dynar_free(&previous);
}
return 0;
}
res_compare =
compare_heap_area_with_type(state, process_index, area1, area2, snapshot1, snapshot2,
previous, type, size, check_ignore,
pointer_level);
res_compare =
compare_heap_area_with_type(state, process_index, area1, area2, snapshot1, snapshot2,
previous, type, size, check_ignore,
pointer_level);
res_compare =
compare_heap_area_without_type(state, process_index, area1, area2, snapshot1, snapshot2,
previous, size, check_ignore);
res_compare =
compare_heap_area_without_type(state, process_index, area1, area2, snapshot1, snapshot2,
previous, size, check_ignore);
frag =
((uintptr_t) (ADDR2UINT(area) % (BLOCKSIZE))) >> heapinfo[block].type;
return (int) heapinfo[block].busy_frag.frag_size[frag];
frag =
((uintptr_t) (ADDR2UINT(area) % (BLOCKSIZE))) >> heapinfo[block].type;
return (int) heapinfo[block].busy_frag.frag_size[frag];