Commit graph

8 commits

Author SHA1 Message Date
Curtis Dunham 02881a7bf3 base: remove Trace::enabled flag
The DTRACE() macro tests both Trace::enabled and the specific flag. This
change uses the same administrative interface for enabling/disabling
tracing, but masks the SimpleFlags settings directly. This eliminates a
load for every DTRACE() test, e.g. DPRINTF.
2015-09-30 15:21:55 -05:00
Andrew Bardsley 960935a5bd 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.
2014-10-16 05:49:53 -04:00
Nathan Binkert eddac53ff6 trace: reimplement the DTRACE function so it doesn't use a vector
At the same time, rename the trace flags to debug flags since they
have broader usage than simply tracing.  This means that
--trace-flags is now --debug-flags and --trace-help is now --debug-help
2011-04-15 10:44:32 -07:00
Nathan Binkert 18ef1bcfa2 swig: don't override SWIG_name anymore
It doesn't appear to be necessary and it is somewhat odd.  I'm pretty
sure that the package parameter to %module does whatever this might
have been before.  It's necessary in future revisions anyway.
2010-09-09 14:15:40 -07:00
Nathan Binkert eef3a2e142 types: Move stuff for global types into src/base/types.hh
--HG--
rename : src/sim/host.hh => src/base/types.hh
2009-05-17 14:34:50 -07:00
Nathan Binkert 184decd196 Clean up tracing stuff more, get rid of the trace log since
its not all that useful. Fix a few bugs with python/C++
integration.

--HG--
extra : convert_revision : a706512f7dc8b0c88f1ff96fe35ab8fbf9548b78
2007-02-10 15:14:50 -08:00
Nathan Binkert 81c5d0e3d8 Clean up from my last commit to the trace stuff.
--HG--
extra : convert_revision : b6a975d1c4195a764ba875bc3aaaa064be4955b7
2007-02-09 16:30:06 -08:00
Nathan Binkert a24ccc1ef2 Get rid of the Trace ParamContext and give python direct
access to enabling/disabling tracing.  Command line is
unchanged except for the removal of --trace-cycle since
it's not so clear what that means.

--HG--
extra : convert_revision : c0164d92d3615d76d0c6acaabaafd92a9278212a
2007-02-09 14:39:56 -08:00