> On 2011-02-18 13:33:14, Nathan Binkert wrote: > > src/mem/ruby/network/simple/Throttle.cc, line 253 > > <http://reviews.m5sim.org/r/489/diff/2/?file=10363#file10363line253> > > > > ccprintf() > > Korey Sewell wrote: > In general, is it just a matter of preference or M5 style to do > {cc/cs}printf where possible instead of concatenating strings or using > multiple extraction operators? > > I can fix this one line for Ruby, but unfortunately a lot of the imported > Ruby code likes that format so maybe that should be a separate change where > somebody goes through and updates all of the "out << ..." to ccprintfs.
cprintf is generally easier to read and write, so it is preferable. I'd also generally prefer not to use to_string when csprintf is a better choice. In general, I don't think you need to change operator<< stuff to cprintf, though if you're already editing the code and it doesn't disrupt the flow, you may as well do it. Some day I'll go through and to a massive source update, but it's pretty low on the list. - Nathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/489/#review875 ----------------------------------------------------------- On 2011-02-18 09:18:43, Korey Sewell wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.m5sim.org/r/489/ > ----------------------------------------------------------- > > (Updated 2011-02-18 09:18:43) > > > Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and > Nathan Binkert. > > > Summary > ------- > > ruby: cleaning up RubyQueue and RubyNetwork dprintfs > Overall, continue to progress Ruby debug messages to more of the normal M5 > debug message style > - add a name() to the Ruby Throttle & PerfectSwitch objects so that the debug > output > isn't littered w/"global:" everywhere. > - clean up messages that print over multiple lines when possible > - clean up duplicate prints in the message buffer > > > Diffs > ----- > > src/mem/ruby/buffers/MessageBuffer.hh 42f772dc5a96 > src/mem/ruby/buffers/MessageBuffer.cc 42f772dc5a96 > src/mem/ruby/common/NetDest.hh 42f772dc5a96 > src/mem/ruby/network/simple/PerfectSwitch.hh 42f772dc5a96 > src/mem/ruby/network/simple/PerfectSwitch.cc 42f772dc5a96 > src/mem/ruby/network/simple/Throttle.hh 42f772dc5a96 > src/mem/ruby/network/simple/Throttle.cc 42f772dc5a96 > > Diff: http://reviews.m5sim.org/r/489/diff > > > Testing > ------- > > > Thanks, > > Korey > >
_______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
