Contexts update + buffer flushing + cleanup (#338)
* Update lib/rocprofiler-sdk/context/context.*
- get_registered_contexts functions (local copy)
* Update lib/rocprofiler-sdk/hsa/{queue,queue_controller}.cpp
- remove ROCPROFILER_BUFFER_TRACING_MEMORY_COPY code
* Update tests/kernel-tracing/kernel-tracing.cpp
- move stop() and flush() in tool_fini to before reporting of sizes of data collected
* Update lib/rocprofiler-sdk/hsa/hsa.*
- remove stale set_callback / activity_functor_t code
* Update lib/rocprofiler-sdk/buffer.cpp
- full wait instead of returning busy when buffer is busy
- use task_group::join instead of task_group::wait to fully wait for tasks to finish (bug fix)
* Update lib/rocprofiler-sdk/agent.cpp
- support agent mapping for CPU agents
* Remove direct access to vector of registered contexts
This commit is contained in:
committed by
GitHub
parent
c5e45803e9
commit
199f0b5421
@@ -174,21 +174,24 @@ start_context(rocprofiler_context_id_t id);
|
||||
/// \brief disable the contexturation.
|
||||
rocprofiler_status_t stop_context(rocprofiler_context_id_t);
|
||||
|
||||
using unique_context_vec_t =
|
||||
common::container::stable_vector<allocator::unique_static_ptr_t<context>, 8>;
|
||||
using active_context_vec_t = common::container::stable_vector<std::atomic<const context*>, 8>;
|
||||
using context_array_t = common::container::small_vector<const context*>;
|
||||
using context_array_t = common::container::small_vector<const context*>;
|
||||
|
||||
unique_context_vec_t&
|
||||
get_registered_contexts();
|
||||
context*
|
||||
get_mutable_registered_context(rocprofiler_context_id_t id);
|
||||
|
||||
const context*
|
||||
get_registered_context(rocprofiler_context_id_t id);
|
||||
|
||||
using context_filter_t = bool (*)(const context*);
|
||||
|
||||
inline bool
|
||||
default_context_filter(const context* val)
|
||||
{
|
||||
return (val != nullptr);
|
||||
}
|
||||
default_context_filter(const context* val);
|
||||
|
||||
context_array_t&
|
||||
get_registered_contexts(context_array_t& data, context_filter_t filter = default_context_filter);
|
||||
|
||||
context_array_t
|
||||
get_registered_contexts(context_filter_t filter = default_context_filter);
|
||||
|
||||
context_array_t&
|
||||
get_active_contexts(context_array_t& data, context_filter_t filter = default_context_filter);
|
||||
@@ -200,5 +203,11 @@ void deactivate_client_contexts(rocprofiler_client_id_t);
|
||||
|
||||
// should only be called if the client failed to initialize
|
||||
void deregister_client_contexts(rocprofiler_client_id_t);
|
||||
|
||||
inline bool
|
||||
default_context_filter(const context* val)
|
||||
{
|
||||
return (val != nullptr);
|
||||
}
|
||||
} // namespace context
|
||||
} // namespace rocprofiler
|
||||
|
||||
Reference in New Issue
Block a user