diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-01-29 00:38:18 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-01-29 00:38:18 -0500 |
commit | 2db1b6ea1b61665908138d7004001d494c168d85 (patch) | |
tree | e57ab8297cc47a1bfc93bd63e84577f4ad59303f /base | |
parent | f994cf4b5edb0eea23b695e1ee4f3a9d7b811b82 (diff) | |
download | gem5-2db1b6ea1b61665908138d7004001d494c168d85.tar.xz |
provide an output stream for simulator output. (This takes place of the
statStream catchall that we had before)
Also provide an optional output directory that multiple simulator output
files can be written to.
Make most output files use the output directory
base/misc.cc:
send warnings to the outputStream as well
base/trace.cc:
dprintf_stream defaults to cerr
dev/console.cc:
use the output directory for the console output if it exists
dev/etherdump.cc:
dump to the output directory if it exists
sim/builder.cc:
sim/builder.hh:
move constructor and destructor to .cc file
use a function to get the stream that the builder dumps its
output to, and create a separate file in the output directory
if able
sim/main.cc:
statStream -> outputStream
sim/serialize.cc:
dump checkpoints to the output directory if specified
sim/universe.cc:
provide an output stream for simulator output. (This takes place of the
statStream catchall that we had before)
Also provide an optional output directory that multiple simulator output
files can be written to.
--HG--
extra : convert_revision : 03abce20edbbf7ec19c9ddd8d69ec8485c383532
Diffstat (limited to 'base')
-rw-r--r-- | base/misc.cc | 2 | ||||
-rw-r--r-- | base/trace.cc | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/base/misc.cc b/base/misc.cc index 80968bd44..5caf96d40 100644 --- a/base/misc.cc +++ b/base/misc.cc @@ -121,6 +121,8 @@ __warn(const string &format, cp::ArgList &args, const char *func, #endif args.dump(cerr, fmt); + if (outputStream != &cerr && outputStream != &cout) + args.dump(*outputStream, fmt); delete &args; } diff --git a/base/trace.cc b/base/trace.cc index 99e97e7ea..156110376 100644 --- a/base/trace.cc +++ b/base/trace.cc @@ -49,7 +49,7 @@ FlagVec flags(NumFlags, false); // directly; use DebugOut() (see below) to access this stream for // output. // -ostream *dprintf_stream = NULL; +ostream *dprintf_stream = &cerr; int dprintf_ignore_size; vector<string> dprintf_ignore; @@ -267,10 +267,7 @@ RawDataRecord::dump(ostream &os) std::ostream & DebugOut() { - if (Trace::dprintf_stream) - return *Trace::dprintf_stream; - else - return cerr; + return *Trace::dprintf_stream; } ///////////////////////////////////////////// |