On Sat, Oct 23, 2010 at 1:52 PM, Nilay Vaish <[email protected]> wrote: > > >> On 2010-10-21 13:35:21, Steve Reinhardt wrote: >> > src/cpu/testers/rubytest/CheckTable.cc, line 114 >> > <http://reviews.m5sim.org/r/277/diff/1/?file=4453#file4453line114> >> > >> > These adjacent DPRINTFs should be consolidated into one. It's more >> > efficient (since it's a single check of the trace flag and a single call >> > to cprintf), and in this case (and many others) we don't really need the >> > function name, file name, and line number printed redundantly. >> > >> > Also you don't need to use c_str(), cprintf() handles std::string just >> > fine (and anything else that supports the '<<' operator, I believe). > > Does that mean that format specifiers used in DPRINTF() statements are just > place holders? In not, what would be the format specifier for printing an > object of some class that supports << operator?
Pretty much... if you just want DPRINTF to use '<<' without any other modifiers or overhead, a format string of "%s" is your best choice. Steve _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
