On Thu, 30 Jul 2015, Beckmann, Brad wrote:
Hi Nilay,
As part of our check-ins tomorrow, I would like to check in a single
line bug fix to this patch. Specifically we plant to remove the assert
in the overload function of the MsgPtr operator>. It is perfectly valid
to compare the same MsgPtr to itself. Currently the assert prevents
such a comparison.
I don't expect this to be much of an issue, but I wanted you to be aware.
Thanks,
Brad
Specific patch:
diff --git a/src/mem/ruby/slicc_interface/Message.hh
b/src/mem/ruby/slicc_interface/Message.hh
--- a/src/mem/ruby/slicc_interface/Message.hh
+++ b/src/mem/ruby/slicc_interface/Message.hh
@@ -121,7 +121,6 @@
const Message *r = rhs.get();
if (l->getLastEnqueueTime() == r->getLastEnqueueTime()) {
- assert(l->getMsgCounter() != r->getMsgCounter());
return l->getMsgCounter() > r->getMsgCounter();
}
return l->getLastEnqueueTime() > r->getLastEnqueueTime();
I am ok with the change. But I am surprised you end up comparing a
message to itself. As I understand, this operator is only used for
pushing to and popping from message buffers. And I would be surprised if
stl compares an object to itself for heap/priority queue operations.
--
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev