#include "xbt/mmalloc.h"
#include "xbt/mmalloc/mmprivate.h"
+#include <xbt/probes.h>
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, mc,
"Logging specific to mc_compare");
(char *) current_var->address, snapshot2, r2,
bvariable_type, 0);
if (res == 1) {
+ XBT_TRACE3(mc, global_diff, -1, -1, current_var->name);
XBT_VERB("Global variable %s (%p) is different between snapshots",
current_var->name, (char *) current_var->address);
return 1;
if (res == 1) {
// TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
+ XBT_TRACE3(mc, local_diff, -1, -1, current_var1->name);
XBT_VERB
("Local variable %s (%p - %p) in frame %s is different between snapshots",
current_var1->name, current_var1->address, current_var2->address,
if (_sg_mc_hash) {
hash_result = (s1->hash != s2->hash);
if (hash_result) {
+ XBT_TRACE2(mc, hash_diff, num1, num2);
XBT_VERB("(%d - %d) Different hash : 0x%" PRIx64 "--0x%" PRIx64, num1,
num2, s1->hash, s2->hash);
#ifndef MC_DEBUG
unsigned int cursor;
int pid;
xbt_dynar_foreach(s1->enabled_processes, cursor, pid){
- if(!xbt_dynar_member(s2->enabled_processes, &pid))
+ if(!xbt_dynar_member(s2->enabled_processes, &pid)) {
+ //XBT_TRACE3(mc, state_diff, num1, num2, "Different enabled processes");
XBT_VERB("(%d - %d) Different enabled processes", num1, num2);
+ // return 1; ??
+ }
}
unsigned long i = 0;
XBT_VERB("(%d - %d) Different size used in stacks : %zu - %zu", num1,
num2, size_used1, size_used2);
#endif
+ XBT_TRACE3(mc, state_diff, num1, num2, "Different stack size");
xbt_os_walltimer_stop(timer);
xbt_os_timer_free(timer);
errors++;
#else
#ifdef MC_VERBOSE
+ XBT_TRACE3(mc, state_diff, num1, num2, "Different heap information");
XBT_VERB("(%d - %d) Different heap information", num1, num2);
#endif
else diff_local =
compare_local_variables(stack1->process_index, s1, s2, stack1, stack2);
if (diff_local > 0) {
+ XBT_TRACE3(mc, state_diff, num1, num2, "Different local variables");
#ifdef MC_DEBUG
if (is_diff == 0) {
xbt_os_walltimer_stop(timer);
compare_global_variables(object_infos[k], MC_NO_PROCESS_INDEX, s1->regions[k], s2->regions[k], s1, s2);
if (is_diff != 0) {
+ XBT_TRACE3(mc, state_diff, num1, num2, "Different global variables");
#ifdef MC_DEBUG
xbt_os_walltimer_stop(timer);
*times[k] = xbt_os_timer_elapsed(timer);
/* Compare heap */
if (mmalloc_compare_heap(s1, s2) > 0) {
+ XBT_TRACE3(mc, state_diff, num1, num2, "Different heap");
#ifdef MC_DEBUG
xbt_os_walltimer_stop(timer);
/**************************** MC snapshot compare simcall **************************/
/***********************************************************************************/
-int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall,
+int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall,
mc_snapshot_t s1, mc_snapshot_t s2)
{
return snapshot_compare(s1, s2);