Skip to content

Commit

Permalink
Moving get_xrt_build_info into sysinfo and updating profiling call (X…
Browse files Browse the repository at this point in the history
  • Loading branch information
jvillarre authored Nov 29, 2023
1 parent 1b81b4f commit 975c671
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/runtime_src/core/common/sysinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 4 additions & 0 deletions src/runtime_src/core/common/sysinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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&);
Expand Down
9 changes: 0 additions & 9 deletions src/runtime_src/core/common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;
Expand Down

0 comments on commit 975c671

Please sign in to comment.