[rocprof-sys] Use fmt APIs to construct strings instead of JOIN (#2643)
## Motivation With the introduction of the new logging system base on `spdlog` library, opportunity shows to replace `timemory` dependent JOIN implementation with `fmt` library `format` and `join` APIs, which are shipped as a part of `spdlog` lib ## Technical Details Use `fmt` provided APIs to properly format and package strings.
This commit is contained in:
gecommit door
GitHub
bovenliggende
3318c540ea
commit
956a73c4c8
@@ -22,6 +22,8 @@
|
||||
|
||||
#include "core/config.hpp"
|
||||
|
||||
#include <spdlog/fmt/fmt.h>
|
||||
|
||||
#if !defined(TIMEMORY_USE_BFD)
|
||||
# error "BFD support not enabled"
|
||||
#endif
|
||||
@@ -119,7 +121,8 @@ symbol::operator()(const std::vector<scope_filter>& _filters) const
|
||||
return (sf::satisfies_filter(_filters, sf::FUNCTION_FILTER,
|
||||
rocprofsys::utility::demangle(func)) &&
|
||||
(sf::satisfies_filter(_filters, sf::SOURCE_FILTER, file) ||
|
||||
sf::satisfies_filter(_filters, sf::SOURCE_FILTER, join(':', file, line))));
|
||||
sf::satisfies_filter(_filters, sf::SOURCE_FILTER,
|
||||
fmt::format("{}:{}", file, line))));
|
||||
}
|
||||
|
||||
symbol&
|
||||
@@ -288,7 +291,7 @@ symbol::get_inline_symbols(const std::vector<scope_filter>& _filters) const
|
||||
rocprofsys::utility::demangle(itr.func)) &&
|
||||
(sf::satisfies_filter(_filters, sf::SOURCE_FILTER, itr.file) ||
|
||||
sf::satisfies_filter(_filters, sf::SOURCE_FILTER,
|
||||
join(':', itr.file, itr.line))))
|
||||
fmt::format("{}:{}", itr.file, itr.line))))
|
||||
{
|
||||
if constexpr(concepts::is_unqualified_same<value_type, symbol>::value)
|
||||
{
|
||||
@@ -325,7 +328,7 @@ symbol::get_debug_line_info(const std::vector<scope_filter>& _filters) const
|
||||
{
|
||||
if(sf::satisfies_filter(_filters, sf::SOURCE_FILTER, itr.file) ||
|
||||
sf::satisfies_filter(_filters, sf::SOURCE_FILTER,
|
||||
join(':', itr.file, itr.line)))
|
||||
fmt::format("{}:{}", itr.file, itr.line)))
|
||||
{
|
||||
if constexpr(concepts::is_unqualified_same<value_type, symbol>::value)
|
||||
{
|
||||
|
||||
Verwijs in nieuw issue
Block a user