Fix init order for getMetricIdMap (#341)

* Fix init order for getMetricIdMap

Ensure that getMetricIdMap() stays valid until the destruction
of the counting service. Adds a test to ensure that this behavior
is maintained (this test fails without this change).

* source formatting (clang-format v11) (#343)

Co-authored-by: bwelton <bwelton@users.noreply.github.com>

* cmake formatting (cmake-format) (#342)

Co-authored-by: bwelton <bwelton@users.noreply.github.com>

* Remove threading

* Update usage of rocprofiler::counters::get{Metric,MetricId}Map()

- uses common::static_object

* Update counter init_order testing

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Dieser Commit ist enthalten in:
verfasst und GitHub committed 2024-01-11 23:35:12 -08:00
1 Ursprung 78dd471110
Commit ef71cc38c1
9 Dateien geändert
+225 -15

Keine Dateien entsprechen Ihrer Suche

@@ -115,7 +115,7 @@ get_ast_map()
{
static std::unordered_map<std::string, EvaluateASTMap> ast_map = []() {
std::unordered_map<std::string, EvaluateASTMap> data;
const auto& metric_map = counters::getMetricMap();
const auto& metric_map = *CHECK_NOTNULL(counters::getMetricMap());
for(const auto& [gfx, metrics] : metric_map)
{
// TODO: Remove global XML from derrived counters...