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>
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
GitHub
γονέας
78dd471110
υποβολή
ef71cc38c1
@@ -40,6 +40,12 @@ namespace counters
|
||||
class CounterController
|
||||
{
|
||||
public:
|
||||
CounterController()
|
||||
{
|
||||
// Pre-read metrics map file to catch faliures during initial setup.
|
||||
rocprofiler::counters::getMetricIdMap();
|
||||
}
|
||||
|
||||
// Adds a counter collection profile to our global cache.
|
||||
// Note: these profiles can be used across multiple contexts
|
||||
// and are independent of the context.
|
||||
|
||||
Αναφορά σε νέο ζήτημα
Block a user