diff options
author | Ciro Santilli <ciro.santilli@arm.com> | 2019-10-08 14:31:47 +0100 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@arm.com> | 2019-11-26 12:46:59 +0000 |
commit | 105b2c8914946867f040caf6a8ff7da3c5d028d7 (patch) | |
tree | 63ed34a98e44bfeb7d5a10820f7fc2002a0fdef8 /util/systemc | |
parent | e82a6f32cb3432566bbe9f00bc93e3b14f8db998 (diff) | |
download | gem5-105b2c8914946867f040caf6a8ff7da3c5d028d7.tar.xz |
base: add the --debug-flag to DPRINTF output with FmtFlag
This makes it easier to determine which messages come from which
flags when enabling multiple flags at once.
This commit covers the bulk of the debug messages, which use the DPRINTF*
family of macros. There however macros that use DTRACE to check for
enable, those will be covered in future patches.
Change-Id: I6738b18f08ccfd1e11f2874b426c1827b42e82a2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22004
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'util/systemc')
-rw-r--r-- | util/systemc/gem5_within_systemc/sc_logger.cc | 6 | ||||
-rw-r--r-- | util/systemc/gem5_within_systemc/sc_logger.hh | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/util/systemc/gem5_within_systemc/sc_logger.cc b/util/systemc/gem5_within_systemc/sc_logger.cc index a8b9020f4..195a0cbaf 100644 --- a/util/systemc/gem5_within_systemc/sc_logger.cc +++ b/util/systemc/gem5_within_systemc/sc_logger.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 ARM Limited + * Copyright (c) 2014, 2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -79,7 +79,7 @@ class CuttingStreambuf : public std::streambuf void CuttingStreambuf::outputLine() { - logger->logMessage((Tick)-1, "gem5", line.str()); + logger->logMessage((Tick)-1, "gem5", "", line.str()); line.clear(); line.str(""); } @@ -133,7 +133,7 @@ Logger::~Logger() /** Log a single message as a single sc_report call */ void Logger::logMessage(Tick when, const std::string &name, - const std::string &message) + const std::string &flag, const std::string &message) { /* Need to chop the newline off the message */ std::string message_without_nl = message; diff --git a/util/systemc/gem5_within_systemc/sc_logger.hh b/util/systemc/gem5_within_systemc/sc_logger.hh index 4143f8bb8..0f9c6a18f 100644 --- a/util/systemc/gem5_within_systemc/sc_logger.hh +++ b/util/systemc/gem5_within_systemc/sc_logger.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 ARM Limited + * Copyright (c) 2014, 2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -70,7 +70,7 @@ class Logger : public Trace::Logger /** Log a single message as a single sc_report call */ void logMessage(Tick when, const std::string &name, - const std::string &message); + const std::string &flag, const std::string &message) override; std::ostream &getOstream(); }; |