(IMPORTANT: AFAR V ) Hide PC sampling if HSA does not support it. (#881)

* Hide PC sampling if HSA does not support it.

* missing hsa.hpp include
이 커밋은 다음에 포함됨:
Vladimir Indic 작성하고 GitHub가 2024-05-29 03:02:14 +02:00를 커밋함
1 부모 00f31e593c
커밋 7201aa321e
13 파일이 변경됨
+118 -71

검색과 일치하는 파일 없음

+4
파일 보기
@@ -323,7 +323,9 @@ start_context(rocprofiler_context_id_t context_id)
if(cfg->counter_collection) rocprofiler::counters::start_context(cfg);
if(cfg->thread_trace) cfg->thread_trace->start_context();
if(cfg->agent_counter_collection) status = rocprofiler::counters::start_agent_ctx(cfg);
#if ROCPROFILER_SDK_HSA_PC_SAMPLING > 0
if(cfg->pc_sampler) status = rocprofiler::pc_sampling::start_service(cfg);
#endif
return status;
}
@@ -360,10 +362,12 @@ stop_context(rocprofiler_context_id_t idx)
rocprofiler::counters::stop_agent_ctx(const_cast<context*>(_expected));
}
#if ROCPROFILER_SDK_HSA_PC_SAMPLING > 0
if(_expected->pc_sampler)
{
rocprofiler::pc_sampling::stop_service(_expected);
}
#endif
return ROCPROFILER_STATUS_SUCCESS;
}