#include <cassert>
#include <sstream>
#include <tuple>
#include <utility>
#include "base/compiler.hh"
#include "base/cprintf.hh"
Go to the source code of this file.
|
#define | base_message(logger, ...) logger.print(::gem5::Logger::Loc(__FILE__, __LINE__), __VA_ARGS__) |
|
#define | base_message_once(...) |
|
#define | exit_message(logger, ...) |
|
#define | panic(...) exit_message(::gem5::Logger::getPanic(), __VA_ARGS__) |
| This implements a cprintf based panic() function. More...
|
|
#define | fatal(...) exit_message(::gem5::Logger::getFatal(), __VA_ARGS__) |
| This implements a cprintf based fatal() function. More...
|
|
#define | panic_if(cond, ...) |
| Conditional panic macro that checks the supplied condition and only panics if the condition is true and allows the programmer to specify diagnostic printout. More...
|
|
#define | fatal_if(cond, ...) |
| Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condition is true and allows the programmer to specify diagnostic printout. More...
|
|
#define | NDEBUG_DEFINED 0 |
|
#define | gem5_assert(cond, ...) |
| The assert macro will function like a normal assert, but will use panic instead of straight abort(). More...
|
|
#define | chatty_assert(...) |
|
|
#define | warn(...) base_message(::gem5::Logger::getWarn(), __VA_ARGS__) |
|
#define | inform(...) base_message(::gem5::Logger::getInfo(), __VA_ARGS__) |
|
#define | hack(...) base_message(::gem5::Logger::getHack(), __VA_ARGS__) |
|
#define | warn_once(...) base_message_once(::gem5::Logger::getWarn(), __VA_ARGS__) |
|
#define | inform_once(...) base_message_once(::gem5::Logger::getInfo(), __VA_ARGS__) |
|
#define | hack_once(...) base_message_once(::gem5::Logger::getHack(), __VA_ARGS__) |
|
|
#define | warn_if(cond, ...) |
| Conditional warning macro that checks the supplied condition and only prints a warning if the condition is true. More...
|
|
#define | warn_if_once(cond, ...) |
|
◆ base_message
#define base_message |
( |
|
logger, |
|
|
|
... |
|
) |
| logger.print(::gem5::Logger::Loc(__FILE__, __LINE__), __VA_ARGS__) |
◆ base_message_once
#define base_message_once |
( |
|
... | ) |
|
Value: do { \
static bool once = false; \
if (!once) { \
base_message(__VA_ARGS__); \
once = true; \
} \
} while (0)
Definition at line 154 of file logging.hh.
◆ chatty_assert
#define chatty_assert |
( |
|
... | ) |
|
Value: do { \
gem5_assert(__VA_ARGS__); \
GEM5_DEPRECATED_MACRO(
chatty_assert, {},
"Please use gem5_assert()"); \
} while(0)
Definition at line 326 of file logging.hh.
◆ exit_message
#define exit_message |
( |
|
logger, |
|
|
|
... |
|
) |
| |
Value: do { \
base_message(logger, __VA_ARGS__); \
logger.exit_helper(); \
} while (0)
Definition at line 162 of file logging.hh.
◆ hack
◆ inform
◆ inform_once
◆ NDEBUG_DEFINED
◆ warn
◆ warn_if
#define warn_if |
( |
|
cond, |
|
|
|
... |
|
) |
| |
Value: do { \
if (GEM5_UNLIKELY(
cond)) \
warn(__VA_ARGS__); \
} while (0)
Conditional warning macro that checks the supplied condition and only prints a warning if the condition is true.
Useful to replace if + warn.
- Parameters
-
cond | Condition that is checked; if true -> warn |
... | Printf-based format string with arguments, extends printout. |
Definition at line 273 of file logging.hh.
◆ warn_once