Disable counter collection if PC sampling is enabled (#924)

Этот коммит содержится в:
Vladimir Indic
2024-06-13 18:26:05 +02:00
коммит произвёл GitHub
родитель c32d8b6696
Коммит c66aacd537
2 изменённых файлов: 149 добавлений и 0 удалений
+9
Просмотреть файл
@@ -76,6 +76,11 @@ CounterController::configure_agent_collection(rocprofiler_context_id_t
auto& ctx = *ctx_p;
if(ctx.counter_collection) return ROCPROFILER_STATUS_ERROR_AGENT_DISPATCH_CONFLICT;
// FIXME: Due to the clock gating issue, counter collection and PC sampling service
// cannot coexist in the same context for now.
if(ctx.pc_sampler) return ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT;
if(!rocprofiler::buffer::get_buffer(buffer_id.handle))
{
return ROCPROFILER_STATUS_ERROR_BUFFER_NOT_FOUND;
@@ -115,6 +120,10 @@ CounterController::configure_dispatch(
if(ctx.agent_counter_collection) return ROCPROFILER_STATUS_ERROR_AGENT_DISPATCH_CONFLICT;
// FIXME: Due to the clock gating issue, counter collection and PC sampling service
// cannot coexist in the same context for now.
if(ctx.pc_sampler) return ROCPROFILER_STATUS_ERROR_CONTEXT_CONFLICT;
if(!ctx.counter_collection)
{
ctx.counter_collection =