> On Sept. 29, 2014, 1:19 p.m., Nathan Binkert wrote: > > src/base/trace.cc, line 5 > > <http://reviews.gem5.org/r/2456/diff/1/?file=42022#file42022line5> > > > > This isn't necessary for stuff in base, right?
Is there a copyright policy thing I don't know about base? > On Sept. 29, 2014, 1:19 p.m., Nathan Binkert wrote: > > src/base/trace.cc, line 74 > > <http://reviews.gem5.org/r/2456/diff/1/?file=42022#file42022line74> > > > > default_logger may not be constructed during a static constructor > > anymore, so if someone had log statements very early, things would break. > > Consider something more like this: > > > > Logger *&debugLogger() { > > static OstreamLogger the_default(std::cerr); > > static Logger *the_logger = &the_default; > > return the_logger; > > } Yes, static construction order would be a problem here. I haven't looked through the codebase to see if there are any static object constructions which may present a problem. I will - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2456/#review5378 ----------------------------------------------------------- On Sept. 29, 2014, 10:45 a.m., Andreas Hansson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2456/ > ----------------------------------------------------------- > > (Updated Sept. 29, 2014, 10:45 a.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 10453:682695bc3ee7 > --------------------------- > base: Reimplement the DPRINTF mechanism in a Logger class > > This patch adds a Logger class encapsulating dprintf. This allows > variants of DPRINTF logging to be constructed and substituted in > place of the default behaviour. > > The Logger provides a logMessage(when, name, format, ...) member > function like Trace::dprintf and a getOstream member function to > use a raw ostream for logging. > > A class OstreamLogger is provided which generates the customary > debugging output with Trace::OstreamLogger::logMessage being the > old Trace::dprintf. > > > Diffs > ----- > > src/base/trace.hh 28b31101d9e6 > src/base/trace.cc 28b31101d9e6 > src/python/swig/trace.i 28b31101d9e6 > > Diff: http://reviews.gem5.org/r/2456/diff/ > > > Testing > ------- > > > Thanks, > > Andreas Hansson > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
