(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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user