Actually, I just realized that the DynInstPtr is a reference counted pointer, so this -should- be unnecessary. The real problem seems to be that the translation stuff is using a literal DynInst pointer and not a DynInstPtr. The kernel is still chugging along so I'll see how far it gets, but once it finishes/crashes I'll revisit this and see how cleaning up the translation stuff works out.
Gabe On 07/03/11 16:23, Gabe Black wrote: > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.m5sim.org/r/769/ > ----------------------------------------------------------- > > Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and > Nathan Binkert. > > > Summary > ------- > > O3: Don't delete insts if they're still being translated. > > If O3 is done processing an instruction, it puts it into a "removeList". It > later goes through the list and deletes the instructions on it. The CPU might > be done with an instruction, but it could have triggered delayed translation > which might not have finished yet. When it does finish, the translation will > use the pointer it has to record things like faults. It's hard to say exactly > what will happen then, but in one instance the memory under the DynInst had > been allocated for a new instruction which was currently being executed. The > translation raised a fault (which is not surprising for a misspeculated > instruction) and that fault was effectively injected into the new, unrelated > instruction. > > This change forces O3 to stop going through the removeList if an instruction > on it is still being translated. When the translation finishes, then the > instruction can be removed. > > Another alternative would be to make commit wait on any instruction which was > still being translated, even if it was squashed or otherwise invalid. I > decided not to do that since it might unrealistically hurt performance if > other, valid instructions were held up for a result which was going to be > thrown away anyway. > > > Diffs > ----- > > src/cpu/o3/cpu.cc 1b4b9c05ad2b > > Diff: http://reviews.m5sim.org/r/769/diff > > > Testing > ------- > > > Thanks, > > Gabe > > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
