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
Šī revīzija ir iekļauta:
revīziju iesūtīja
GitHub
vecāks
c5e45803e9
revīzija
199f0b5421
@@ -152,16 +152,11 @@ rocprofiler_push_external_correlation_id(rocprofiler_context_id_t context,
|
||||
static uint64_t pid_v = getpid();
|
||||
if(tid < pid_v) return ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
for(auto& itr : rocprofiler::context::get_registered_contexts())
|
||||
{
|
||||
if(itr->context_idx == context.handle)
|
||||
{
|
||||
itr->correlation_tracer.external_correlator.push(tid, external_correlation_id);
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
auto* ctx = rocprofiler::context::get_mutable_registered_context(context);
|
||||
if(!ctx) return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND;
|
||||
|
||||
return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND;
|
||||
ctx->correlation_tracer.external_correlator.push(tid, external_correlation_id);
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
rocprofiler_status_t
|
||||
@@ -173,16 +168,11 @@ rocprofiler_pop_external_correlation_id(rocprofiler_context_id_t context,
|
||||
static uint64_t pid_v = getpid();
|
||||
if(tid < pid_v) return ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
for(auto& itr : rocprofiler::context::get_registered_contexts())
|
||||
{
|
||||
if(itr->context_idx == context.handle)
|
||||
{
|
||||
auto former = itr->correlation_tracer.external_correlator.pop(tid);
|
||||
if(external_correlation_id) *external_correlation_id = former;
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
auto* ctx = rocprofiler::context::get_mutable_registered_context(context);
|
||||
if(!ctx) return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND;
|
||||
|
||||
return ROCPROFILER_STATUS_ERROR_CONTEXT_NOT_FOUND;
|
||||
auto former = ctx->correlation_tracer.external_correlator.pop(tid);
|
||||
if(external_correlation_id) *external_correlation_id = former;
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user