From 8d92183669d8143d63d61f2e49d0b65dac88590e Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 3 Feb 2021 22:28:24 -0800 Subject: [PATCH] base,tests: Convert cprintftime from a "UnitTest" to a normal bin. This "UnitTest" was really not a unit test, it was a timing utility for measuring the performance of gem5's cprintf implementation. The name was misleading, but more than that, it was linked against all of gem5 which created a approximately 1.5 gigabyte binary for what is a very small program. Instead, the new version of cprintftime, which has the same functionality as the old version, weighs in at a svelte 500k with debug information. This also trims down the number of misleading "UnitTest" entries to 3, getting us closer to the point where we can eliminate that type of entity entirely. Change-Id: Id30d094f2844e948fe67e820c89412f8667aaa52 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40617 Maintainer: Gabe Black Maintainer: Jason Lowe-Power Tested-by: kokoro Reviewed-by: Daniel Carvalho Reviewed-by: Jason Lowe-Power --- src/base/SConscript | 1 + src/{unittest => base}/cprintftime.cc | 0 src/unittest/SConscript | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename src/{unittest => base}/cprintftime.cc (100%) diff --git a/src/base/SConscript b/src/base/SConscript index f8cd4ba07..1190b939e 100644 --- a/src/base/SConscript +++ b/src/base/SConscript @@ -39,6 +39,7 @@ Source('bmpwriter.cc') Source('channel_addr.cc') Source('cprintf.cc', add_tags='gtest lib') GTest('cprintf.test', 'cprintf.test.cc') +Executable('cprintftime', 'cprintftime.cc', 'cprintf.cc') Source('debug.cc') GTest('debug.test', 'debug.test.cc', 'debug.cc') if env['USE_FENV']: diff --git a/src/unittest/cprintftime.cc b/src/base/cprintftime.cc similarity index 100% rename from src/unittest/cprintftime.cc rename to src/base/cprintftime.cc diff --git a/src/unittest/SConscript b/src/unittest/SConscript index 19b254232..b0e29ed3f 100644 --- a/src/unittest/SConscript +++ b/src/unittest/SConscript @@ -30,7 +30,6 @@ Import('*') Source('unittest.cc') -UnitTest('cprintftime', 'cprintftime.cc') UnitTest('nmtest', 'nmtest.cc') stattest_py = PySource('m5', 'stattestmain.py', tags='stattest') -- 2.30.2