[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:
@@ -300,7 +300,9 @@ config_perfetto_counter_tracks(type_list<Types...>, std::array<const char*, N> _
|
||||
constexpr auto _idx = tim::index_of<type, type_list<Types...>>::value;
|
||||
if(!track::exists(0))
|
||||
{
|
||||
auto addendum = [&](const char* _v) { return JOIN(" ", "CPU", _v, "(S)"); };
|
||||
auto addendum = [&](const char* _v) {
|
||||
return fmt::format("CPU [{}] (S)", _v);
|
||||
};
|
||||
track::emplace(0, addendum(_labels.at(_idx)), _units.at(_idx));
|
||||
}
|
||||
};
|
||||
@@ -351,7 +353,7 @@ post_process()
|
||||
if(!freq_track::exists(_idx))
|
||||
{
|
||||
auto addendum = [&](const char* _v) {
|
||||
return JOIN(" ", "CPU", _v, JOIN("", '[', _idx, ']'), "(S)");
|
||||
return fmt::format("CPU {} [{}] (S)", _v, _idx);
|
||||
};
|
||||
freq_track::emplace(_idx, addendum("Frequency"), "MHz");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user