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.
Этот коммит содержится в:
1 родитель
bd447ab941
Коммит
b4d7ee7887
6 files changed
+25
-446
No files matched your search
@@ -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