----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/21/#review47 -----------------------------------------------------------
Ship it! Thanks Nate. This patch catches a few potential bugs and removes the complexity of having two separate allocators in GEM5. - Brad On 2010-06-02 15:56:26, Nathan Binkert wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.m5sim.org/r/21/ > ----------------------------------------------------------- > > (Updated 2010-06-02 15:56:26) > > > Review request for Ruby Reviewers. > > > Summary > ------- > > ruby: get rid of RefCnt and Allocator stuff use base/refcnt.hh > > This was somewhat tricky because the RefCnt API was somewhat odd. The > biggest confusion was that the the RefCnt object's constructor that > took a TYPE& cloned the object. I created an explicit virtual clone() > function for things that took advantage of this version of the > constructor. I was conservative and used clone() when I was in doubt > of whether or not it was necessary. I still think that there are > probably too many instances of clone(), but hopefully not too many. > > I converted several instances of const MsgPtr & to a simple MsgPtr. > If the function wants to avoid the overhead of creating another > reference, then it should just use a regular pointer instead of a ref > counting ptr. > > There were a couple of instances where refcounted objects were created > on the stack. This seems pretty dangerous since if you ever > accidentally make a reference to that object with a ref counting > pointer, bad things are bound to happen. > > > Diffs > ----- > > src/mem/gems_common/Allocator.hh 9ea24d102d66 > src/mem/gems_common/RefCnt.hh 9ea24d102d66 > src/mem/gems_common/RefCnt_tester.cc 9ea24d102d66 > src/mem/gems_common/RefCountable.hh 9ea24d102d66 > src/mem/gems_common/SConscript 9ea24d102d66 > src/mem/ruby/buffers/MessageBuffer.hh 9ea24d102d66 > src/mem/ruby/buffers/MessageBuffer.cc 9ea24d102d66 > src/mem/ruby/common/Debug.hh 9ea24d102d66 > src/mem/ruby/common/Debug.cc 9ea24d102d66 > src/mem/ruby/network/garnet/fixed-pipeline/NetworkInterface_d.cc > 9ea24d102d66 > src/mem/ruby/network/garnet/fixed-pipeline/RoutingUnit_d.cc 9ea24d102d66 > src/mem/ruby/network/garnet/flexible-pipeline/NetworkInterface.cc > 9ea24d102d66 > src/mem/ruby/network/garnet/flexible-pipeline/Router.cc 9ea24d102d66 > src/mem/ruby/network/simple/PerfectSwitch.cc 9ea24d102d66 > src/mem/ruby/network/simple/Throttle.cc 9ea24d102d66 > src/mem/ruby/slicc_interface/Message.hh 9ea24d102d66 > src/mem/ruby/slicc_interface/NetworkMessage.hh 9ea24d102d66 > src/mem/ruby/system/DMASequencer.cc 9ea24d102d66 > src/mem/ruby/system/MemoryControl.cc 9ea24d102d66 > src/mem/ruby/system/Sequencer.cc 9ea24d102d66 > src/mem/slicc/ast/EnqueueStatementAST.py 9ea24d102d66 > src/mem/slicc/symbols/Type.py 9ea24d102d66 > > Diff: http://reviews.m5sim.org/r/21/diff > > > Testing > ------- > > All regressions pass > > > Thanks, > > Nathan > > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
