mem: Remove null-check bypassing in Packet::getPtr
Review Request #2490 - Created Nov. 16, 2014 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10563:3a541e8c1ff1 --------------------------- mem: Remove null-check bypassing in Packet::getPtr This patch removes the parameter that enables bypassing the null check in the Packet::getPtr method. A number of call sites assume the value to be non-null. The one odd case is the RubyTester, which issues zero-sized prefetches(!), and despite being reads they had no valid data pointer. This is now fixed, but the size oddity remains (unless anyone object or has any good suggestions). Finally, in the Ruby Sequencer, appropriate checks are made for flush packets as they have no valid data pointer.
Posted (Nov. 18, 2014, 7:44 a.m.)
Overall I am fine with the patch. Can we set the size to 1 when the prefetch request is being created? I don't see any harm in that.
-
src/mem/ruby/system/Sequencer.cc (Diff revision 1) -
Typo in prefetche.
Review request changed
Updated (Nov. 24, 2014, 4:18 a.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+20 -17) |
The changes to getPtr() look good to me. On the broader topic of zero-sized prefetches, I'm a little confused... I can see a CPU or CPU-like object (i.e., a tester) generate a zero-size prefetch as a "touch" operation, but then it seems like the cache would need to generate a cache-line-sized prefetch read since it's going to need to receive data. At least that's how it would work in the classic memory system, which makes sense to me :). I don't understand why Ruby should be different.
