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
vanhempi
c5e45803e9
commit
199f0b5421
@@ -642,6 +642,9 @@ tool_fini(void* tool_data)
|
||||
static auto _once = std::atomic_flag{ATOMIC_FLAG_INIT};
|
||||
if(_once.test_and_set()) return;
|
||||
|
||||
stop();
|
||||
flush();
|
||||
|
||||
std::cerr << "[" << getpid() << "][" << __FUNCTION__
|
||||
<< "] Finalizing... agents=" << agents.size()
|
||||
<< ", code_object_callback_records=" << code_object_records.size()
|
||||
@@ -652,9 +655,6 @@ tool_fini(void* tool_data)
|
||||
<< ", hsa_api_bf_records=" << hsa_api_bf_records.size() << " ...\n"
|
||||
<< std::flush;
|
||||
|
||||
stop();
|
||||
flush();
|
||||
|
||||
auto* _call_stack = static_cast<call_stack_t*>(tool_data);
|
||||
if(_call_stack)
|
||||
{
|
||||
@@ -799,6 +799,7 @@ flush()
|
||||
{
|
||||
for(auto* itr : buffers)
|
||||
{
|
||||
if(!itr) continue;
|
||||
auto status = rocprofiler_flush_buffer(*itr);
|
||||
if(status != ROCPROFILER_STATUS_ERROR_BUFFER_BUSY)
|
||||
{
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user