action: fixup printing for RMW/RMWR
authorBrian Norris <banorris@uci.edu>
Fri, 1 Feb 2013 23:33:38 +0000 (15:33 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 6 Feb 2013 21:44:38 +0000 (13:44 -0800)
Some read actions didn't really have a correct 'value' saved in the
ModelAction. Now that we have the 'promise' recorded, always retrieve
the value from reads_from or reads_from_promise.

action.cc

index 13da2b9..2fb498f 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -510,8 +510,10 @@ void ModelAction::print() const
        }
 
        uint64_t valuetoprint;
-       if (type == ATOMIC_READ && reads_from != NULL)
+       if (is_read() && reads_from)
                valuetoprint = reads_from->value;
+       else if (is_read() && reads_from_promise)
+               valuetoprint = reads_from_promise->get_value();
        else
                valuetoprint = value;