From 14079b7cb1f7f4894386a1cc78b077eaaceed100 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Fri, 13 Dec 2024 19:01:02 -0500 Subject: [PATCH] Add hardware information to startup dump. --- console/executor_dumps.cpp | 17 ++++++++--------- console/executor_runner.cpp | 2 ++ console/localize.hpp | 25 +++++++++++++++++-------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/console/executor_dumps.cpp b/console/executor_dumps.cpp index 65845900..7b8fc5d9 100644 --- a/console/executor_dumps.cpp +++ b/console/executor_dumps.cpp @@ -61,20 +61,19 @@ void executor::dump_version() const // The "try" functions are safe for instructions not compiled in. void executor::dump_hardware() const { - logger("Intrinsics..."); - logger(format("arm..... platform:%1%.") % with_arm); - logger(format("intel... platform:%1%.") % with_xcpu); - logger(format("avx512.. platform:%1% compiled:%2%.") % system::try_avx512() % with_avx512); - logger(format("avx2.... platform:%1% compiled:%2%.") % system::try_avx2() % with_avx2); - logger(format("sse41... platform:%1% compiled:%2%.") % system::try_sse41() % with_sse41); - logger(format("shani... platform:%1% compiled:%2%.") % system::try_shani() % with_shani); - logger(format("neon.... platform:%1% compiled:%2%.") % system::try_neon() % with_neon); + logger(BN_HARDWARE_HEADER); + logger(format("arm..... " BN_HARDWARE_TABLE1) % with_arm); + logger(format("intel... " BN_HARDWARE_TABLE1) % with_xcpu); + logger(format("avx512.. " BN_HARDWARE_TABLE2) % system::try_avx512() % with_avx512); + logger(format("avx2.... " BN_HARDWARE_TABLE2) % system::try_avx2() % with_avx2); + logger(format("sse41... " BN_HARDWARE_TABLE2) % system::try_sse41() % with_sse41); + logger(format("shani... " BN_HARDWARE_TABLE2) % system::try_shani() % with_shani); + logger(format("neon.... " BN_HARDWARE_TABLE2) % system::try_neon() % with_neon); } // logging compilation and initial values. void executor::dump_options() const { - logger(BN_NODE_INTERRUPT); logger(BN_LOG_TABLE_HEADER); logger(format("[a]pplication.. " BN_LOG_TABLE) % levels::application_defined % toggle_.at(levels::application)); logger(format("[n]ews......... " BN_LOG_TABLE) % levels::news_defined % toggle_.at(levels::news)); diff --git a/console/executor_runner.cpp b/console/executor_runner.cpp index 6a92edd1..ad1e207a 100644 --- a/console/executor_runner.cpp +++ b/console/executor_runner.cpp @@ -141,7 +141,9 @@ bool executor::do_run() // Stopped by stopper. capture_.start(); dump_version(); + dump_hardware(); dump_options(); + logger(BN_NODE_INTERRUPT); // Create node. metadata_.configured.network.initialize(); diff --git a/console/localize.hpp b/console/localize.hpp index 4cce2458..290fca03 100644 --- a/console/localize.hpp +++ b/console/localize.hpp @@ -232,22 +232,31 @@ namespace node { #define BN_CHANNEL_STOP_TARGET \ "Stop target: %1%" -#define BN_LOG_TABLE \ - "compiled:%1% enabled:%2%." +#define BN_VERSION_MESSAGE \ + "Version Information...\n" \ + "libbitcoin-node: %1%\n" \ + "libbitcoin-database: %2%\n" \ + "libbitcoin-network: %3%\n" \ + "libbitcoin-system: %4%" + +#define BN_HARDWARE_HEADER \ + "Hardware configuration..." +#define BN_HARDWARE_TABLE1 \ + "platform:%1%." +#define BN_HARDWARE_TABLE2 \ + "platform:%1% compiled:%2%." + #define BN_LOG_TABLE_HEADER \ "Log system configuration..." +#define BN_LOG_TABLE \ + "compiled:%1% enabled:%2%." + #define BN_LOG_INITIALIZE_FAILURE \ "Failed to initialize logging." #define BN_USING_CONFIG_FILE \ "Using config file: %1%" #define BN_USING_DEFAULT_CONFIG \ "Using default configuration settings." -#define BN_VERSION_MESSAGE \ - "Version Information...\n" \ - "libbitcoin-node: %1%\n" \ - "libbitcoin-database: %2%\n" \ - "libbitcoin-network: %3%\n" \ - "libbitcoin-system: %4%" #define BN_LOG_HEADER \ "====================== startup =======================" #define BN_NODE_FOOTER \