Agent Profiling Fixes for Broken/Improper API Usage (#1122)
Prevent's multiple setups of agent profiling on the same agent. Fixes agent read context to only read agents that were setup. Prevent copy of agent profiling internal data struct and reset hsa_signal on move to prevent inadvertant delete.
This commit is contained in:
committad av
GitHub
förälder
b502f98ea3
incheckning
788e687167
@@ -92,6 +92,11 @@ CounterController::configure_agent_collection(rocprofiler_context_id_t context_i
|
||||
std::make_unique<rocprofiler::context::device_counting_service>();
|
||||
}
|
||||
|
||||
if(ctx.device_counter_collection->conf_agents.emplace(agent_id.handle).second == false)
|
||||
{
|
||||
return ROCPROFILER_STATUS_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
ctx.device_counter_collection->agent_data.emplace_back();
|
||||
ctx.device_counter_collection->agent_data.back().callback_data =
|
||||
rocprofiler_user_data_t{.ptr = user_data};
|
||||
|
||||
Referens i nytt ärende
Block a user