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 13da2b96312f0ee9c524b04fb13f0fcc997697b5..2fb498f4a05baf6dc783f7efdf2efc5bd2db0c9b 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;