Stop all client contexts prior to finalization (#721)

* Stop all client contexts prior to finalization

* Update lib/common/container/static_vector.hpp

- improve emplace_back for non-{move,copy}-assignable object

* Update samples/intercept_table/client.cpp

- improve robustness against static object destruction

* Update lib/rocprofiler-sdk/context/context.cpp

- change storage of registered context array
  - stable_vector of optional contexts
  - common::static_object wrapper around stable_vector

* Update samples/intercept_table/client.cpp

- use variable template for underlying function pointer

[ROCm/rocprofiler-sdk commit: 939e23e9d1]
このコミットが含まれているのは:
Jonathan R. Madsen
2024-04-02 03:05:11 -05:00
committed by GitHub
コミット 6fe6bcc832
9個のファイルの変更、115行の追加、63行の削除
+2 -1
ファイルの表示
@@ -30,6 +30,7 @@
#include <cstddef>
#include <cstdlib>
#include <initializer_list>
#include <type_traits>
namespace rocprofiler
{
@@ -208,7 +209,7 @@ static_vector<Tp, N, AtomicSizeV>::emplace_back(Args&&... _v)
else
m_data[_idx] = Tp{std::forward<Args>(_v)...};
}
else
else if constexpr(std::is_move_assignable<Tp>::value || std::is_copy_assignable<Tp>::value)
{
m_data[_idx] = {};
}