GOTCHA + Kokkos + tasking + more (#47)
* GOTCHA + Kokkos + tasking + more
- update gotcha with fix for dlsym(RTLD_NEXT, ...)
- support for standalone KOKKOS_PROFILE_LIBRARY
- remove extra flags for omnitrace-user
- roctracer and critical_trace namespaces in tasking
- generic tasking functions, e.g. join(), shutdown(), etc.
- omnitrace_init_tooling_hidden in api.hpp
- ompt.cpp uses OMNITRACE_USE_OMPT
- kokkosp uses user_region instead of omnitrace component
- re-enable recycling thread ids
- more generic _{push,pop}_perfetto functors
- fix for thread_data::instance(construct_on_init, ...)
- fix for omnitrace-headers interface target
- omnitrace_watch_for_change
This commit is contained in:
committed by
GitHub
parent
791375bb24
commit
29220cba58
@@ -70,6 +70,7 @@ extern "C"
|
||||
|
||||
// these are the real implementations for internal calling convention
|
||||
void omnitrace_init_library_hidden(void) OMNITRACE_HIDDEN_API;
|
||||
bool omnitrace_init_tooling_hidden(void) OMNITRACE_HIDDEN_API;
|
||||
void omnitrace_init_hidden(const char*, bool, const char*) OMNITRACE_HIDDEN_API;
|
||||
void omnitrace_finalize_hidden(void) OMNITRACE_HIDDEN_API;
|
||||
void omnitrace_set_env_hidden(const char* env_name,
|
||||
|
||||
@@ -52,6 +52,11 @@ TIMEMORY_DECLARE_TYPE_TRAIT(name, typename Tp)
|
||||
{ \
|
||||
static constexpr auto value = NAME; \
|
||||
}; \
|
||||
template <> \
|
||||
struct name<type_list<__VA_ARGS__>> \
|
||||
{ \
|
||||
static constexpr auto value = NAME; \
|
||||
}; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -32,22 +32,55 @@ namespace omnitrace
|
||||
{
|
||||
namespace tasking
|
||||
{
|
||||
void
|
||||
setup();
|
||||
|
||||
void
|
||||
join();
|
||||
|
||||
void
|
||||
shutdown();
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
//
|
||||
// roctracer
|
||||
//
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
namespace roctracer
|
||||
{
|
||||
std::mutex&
|
||||
get_roctracer_mutex();
|
||||
get_mutex();
|
||||
|
||||
PTL::ThreadPool&
|
||||
get_roctracer_thread_pool();
|
||||
get_thread_pool();
|
||||
|
||||
PTL::TaskGroup<void>&
|
||||
get_roctracer_task_group();
|
||||
get_task_group();
|
||||
|
||||
bool
|
||||
get_thread_pool_is_active();
|
||||
} // namespace roctracer
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
//
|
||||
// critical trace
|
||||
//
|
||||
//--------------------------------------------------------------------------------------//
|
||||
|
||||
namespace critical_trace
|
||||
{
|
||||
std::mutex&
|
||||
get_critical_trace_mutex();
|
||||
get_mutex();
|
||||
|
||||
PTL::ThreadPool&
|
||||
get_critical_trace_thread_pool();
|
||||
get_thread_pool();
|
||||
|
||||
PTL::TaskGroup<void>&
|
||||
get_critical_trace_task_group();
|
||||
get_task_group();
|
||||
|
||||
bool
|
||||
get_thread_pool_is_active();
|
||||
} // namespace critical_trace
|
||||
} // namespace tasking
|
||||
} // namespace omnitrace
|
||||
|
||||
@@ -134,8 +134,8 @@ template <typename... Args>
|
||||
typename thread_data<Tp, Tag, MaxThreads>::instance_array_t&
|
||||
thread_data<Tp, Tag, MaxThreads>::instances(construct_on_init, Args&&... _args)
|
||||
{
|
||||
static auto _v = [&]() {
|
||||
auto _internal = instance_array_t{};
|
||||
static auto& _v = [&]() -> instance_array_t& {
|
||||
auto& _internal = instances();
|
||||
for(size_t i = 0; i < MaxThreads; ++i)
|
||||
_internal.at(i) = unique_ptr_t<Tp>{ new Tp(std::forward<Args>(_args)...) };
|
||||
return _internal;
|
||||
|
||||
Reference in New Issue
Block a user