-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2456/#review5378
-----------------------------------------------------------



src/base/trace.cc
<http://reviews.gem5.org/r/2456/#comment4875>

    This isn't necessary for stuff in base, right?



src/base/trace.cc
<http://reviews.gem5.org/r/2456/#comment4877>

    This has the same static construction problem I described below.



src/base/trace.cc
<http://reviews.gem5.org/r/2456/#comment4876>

    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;
    }


- Nathan Binkert


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

Reply via email to