base: Remove DPRINTF_UNCONDITIONAL (#1724)

This macro has been marked as deprecated since 2021. Wrap its
deprecation process up.

Signed-off-by: odanrc <odanrc@yahoo.com.br>
This commit is contained in:
Daniel Carvalho
2024-10-31 15:40:38 -03:00
committed by GitHub
parent b5a73b59ef
commit ad17fa040a
2 changed files with 0 additions and 39 deletions

View File

@@ -195,7 +195,6 @@ struct StringWrap
* \def DPRINTFV(x, ...)
* \def DPRINTFN(...)
* \def DPRINTFNR(...)
* \def DPRINTF_UNCONDITIONAL(x, ...) (deprecated)
*
* @ingroup api_trace
* @{
@@ -249,16 +248,6 @@ struct StringWrap
} \
} while (0)
#define DPRINTF_UNCONDITIONAL(x, ...) \
GEM5_DEPRECATED_MACRO_STMT(DPRINTF_UNCONDITIONAL, \
do { \
if (TRACING_ON) { \
::gem5::trace::getDebugLogger()->dprintf_flag( \
::gem5::curTick(), name(), #x, __VA_ARGS__); \
} \
} while (0), \
"Use DPRINTFN or DPRINTF with a debug flag instead.")
/** @} */ // end of api_trace
} // namespace gem5

View File

@@ -633,34 +633,6 @@ TEST(TraceTest, MacroDPRINTFNR)
#endif
}
/** Test DPRINTF_UNCONDITIONAL with tracing on. */
TEST(TraceTest, MacroDPRINTF_UNCONDITIONAL)
{
StringWrap name("Foo");
// Flag enabled
trace::enable();
EXPECT_TRUE(debug::changeFlag("TraceTestDebugFlag", true));
EXPECT_TRUE(debug::changeFlag("FmtFlag", true));
DPRINTF_UNCONDITIONAL(TraceTestDebugFlag, "Test message");
#if TRACING_ON
ASSERT_EQ(getString(trace::output()),
" 0: TraceTestDebugFlag: Foo: Test message");
#else
ASSERT_EQ(getString(trace::output()), "");
#endif
// Flag disabled
trace::disable();
EXPECT_TRUE(debug::changeFlag("TraceTestDebugFlag", false));
DPRINTF_UNCONDITIONAL(TraceTestDebugFlag, "Test message");
#if TRACING_ON
ASSERT_EQ(getString(trace::output()), " 0: Foo: Test message");
#else
ASSERT_EQ(getString(trace::output()), "");
#endif
}
/**
* Test that there is a global name() to fall through when a locally scoped
* name() is not defined.