PC Sampling API: emit info logs instead of error (#53)
* PC Sampling API: emit info logs instead of error
Inside PC sampling API, emit info logs instead of
error logs. The tests verifies status code of each
API call and decide when to skip, instead of relying
on messages in logs.
The samples_processing.cpp test has been removed as it's
not used.
[ROCm/rocprofiler-sdk commit: b4d7ee7887]
This commit is contained in:
@@ -50,7 +50,10 @@ is_pc_sampling_explicitly_enabled()
|
||||
auto pc_sampling_enabled =
|
||||
rocprofiler::common::get_env("ROCPROFILER_PC_SAMPLING_BETA_ENABLED", false);
|
||||
|
||||
if(!pc_sampling_enabled) LOG(ERROR) << "PC sampling unavailable\n";
|
||||
if(!pc_sampling_enabled)
|
||||
ROCP_INFO << "PC sampling unavailable. The feature is implicitly disabled. "
|
||||
<< "To use it on a supported architecture, "
|
||||
<< "set ROCPROFILER_PC_SAMPLING_BETA_ENABLED=ON in the environment";
|
||||
|
||||
return pc_sampling_enabled;
|
||||
}
|
||||
@@ -93,7 +96,7 @@ rocprofiler_configure_pc_sampling_service(rocprofiler_context_id_t conte
|
||||
(void) interval;
|
||||
(void) buffer_id;
|
||||
|
||||
ROCP_ERROR << "PC sampling unavailable\n";
|
||||
ROCP_INFO << "PC sampling unavailable. The feature depends on the latest HSA runtime.";
|
||||
|
||||
// ROCr runtime is missing PC sampling.
|
||||
return ROCPROFILER_STATUS_ERROR_NOT_AVAILABLE;
|
||||
@@ -121,7 +124,7 @@ rocprofiler_query_pc_sampling_agent_configurations(
|
||||
(void) cb;
|
||||
(void) user_data;
|
||||
|
||||
ROCP_ERROR << "PC sampling unavailable\n";
|
||||
ROCP_INFO << "PC sampling unavailable. The feature depends on the latest HSA runtime.";
|
||||
|
||||
// ROCr runtime is missing PC sampling.
|
||||
return ROCPROFILER_STATUS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
Reference in New Issue
Block a user