The 'value' field of a ModelAction might actually represent a signed
number, a pointer, or something else entirely, so values look very huge
and uninformative when printed, especially in decimal. Hexadecimal
representation makes everything a little more readable, I think.
While I'm at it, I adjust the spacing a little and make VALUE_NONE into
a different magic number which is more recognizable in hex.
break;
}
- printf("(%3d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-12" PRIu64,
+ printf("(%4d) Thread: %-2d Action: %-13s MO: %7s Loc: %14p Value: %-#18" PRIx64,
seq_number, id_to_int(tid), type_str, mo_str, location, valuetoprint);
if (is_read()) {
if (reads_from)
- printf(" Rf: %d", reads_from->get_seq_number());
+ printf(" Rf: %-3d", reads_from->get_seq_number());
else
- printf(" Rf: ?");
+ printf(" Rf: ? ");
}
if (cv) {
- printf("\t");
+ if (is_read())
+ printf(" ");
+ else
+ printf(" ");
cv->print();
} else
printf("\n");
/** Note that this value can be legitimately used by a program, and
hence by iteself does not indicate no value. */
-#define VALUE_NONE 1234567890
+#define VALUE_NONE 0xdeadbeef
/** A special value to represent a successful trylock */