From 975c671fbe05b37275074d880f34bd787a4869d2 Mon Sep 17 00:00:00 2001 From: Jason Villarreal <40246282+jvillarre@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:36:26 -0800 Subject: [PATCH] Moving get_xrt_build_info into sysinfo and updating profiling call (#7821) --- src/runtime_src/core/common/sysinfo.cpp | 9 +++++++++ src/runtime_src/core/common/sysinfo.h | 4 ++++ src/runtime_src/core/common/system.cpp | 9 --------- .../xdp/profile/writer/vp_base/summary_writer.cpp | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/runtime_src/core/common/sysinfo.cpp b/src/runtime_src/core/common/sysinfo.cpp index fa40337b71a..15c8c4c4ce5 100644 --- a/src/runtime_src/core/common/sysinfo.cpp +++ b/src/runtime_src/core/common/sysinfo.cpp @@ -21,6 +21,15 @@ get_xrt_info(boost::property_tree::ptree& pt) xrt_core::get_driver_info(pt); } +void +get_xrt_build_info(boost::property_tree::ptree& pt) +{ + pt.put("version", xrt_build_version); + pt.put("branch", xrt_build_version_branch); + pt.put("hash", xrt_build_version_hash); + pt.put("build_date", xrt_build_version_date); +} + void get_os_info(boost::property_tree::ptree& pt) { diff --git a/src/runtime_src/core/common/sysinfo.h b/src/runtime_src/core/common/sysinfo.h index c949b05946f..ee7828a9f88 100644 --- a/src/runtime_src/core/common/sysinfo.h +++ b/src/runtime_src/core/common/sysinfo.h @@ -15,6 +15,10 @@ XRT_CORE_COMMON_EXPORT void get_xrt_info(boost::property_tree::ptree&); +XRT_CORE_COMMON_EXPORT +void +get_xrt_build_info(boost::property_tree::ptree&); + XRT_CORE_COMMON_EXPORT void get_os_info(boost::property_tree::ptree&); diff --git a/src/runtime_src/core/common/system.cpp b/src/runtime_src/core/common/system.cpp index b11841965ee..708f92c4846 100644 --- a/src/runtime_src/core/common/system.cpp +++ b/src/runtime_src/core/common/system.cpp @@ -96,15 +96,6 @@ instance() throw std::runtime_error("system singleton is not loaded"); } -void -get_xrt_build_info(boost::property_tree::ptree& pt) -{ - pt.put("version", xrt_build_version); - pt.put("branch", xrt_build_version_branch); - pt.put("hash", xrt_build_version_hash); - pt.put("build_date", xrt_build_version_date); -} - void get_driver_info(boost::property_tree::ptree &pt) { diff --git a/src/runtime_src/xdp/profile/writer/vp_base/summary_writer.cpp b/src/runtime_src/xdp/profile/writer/vp_base/summary_writer.cpp index 6a570334b82..b37b5de04d3 100644 --- a/src/runtime_src/xdp/profile/writer/vp_base/summary_writer.cpp +++ b/src/runtime_src/xdp/profile/writer/vp_base/summary_writer.cpp @@ -139,7 +139,7 @@ namespace xdp { #endif boost::property_tree::ptree xrtInfo ; - xrt_core::sysinfo::get_xrt_info(xrtInfo) ; + xrt_core::sysinfo::get_xrt_build_info(xrtInfo) ; fout << "Profile Summary\n" ; fout << "Generated on: " << getCurrentDateTime() << "\n" ;