Added error log for query counter info (#903)
* Added error log for query counter info
[ROCm/rocprofiler-sdk commit: 10fdba985f]
此提交包含在:
@@ -900,12 +900,13 @@ get_counter_info_name(uint64_t record_id)
|
||||
auto counter_id = rocprofiler_counter_id_t{};
|
||||
ROCPROFILER_CALL(rocprofiler_query_record_counter_id(record_id, &counter_id),
|
||||
"query record counter id");
|
||||
ROCPROFILER_CALL(rocprofiler_query_counter_info(rocprofiler_counter_id_t{counter_id},
|
||||
ROCPROFILER_COUNTER_INFO_VERSION_0,
|
||||
static_cast<void*>(&info)),
|
||||
"query counter info");
|
||||
std::string counter_name = info.name;
|
||||
return counter_name;
|
||||
if(rocprofiler_query_counter_info(rocprofiler_counter_id_t{counter_id},
|
||||
ROCPROFILER_COUNTER_INFO_VERSION_0,
|
||||
static_cast<void*>(&info)) != ROCPROFILER_STATUS_SUCCESS)
|
||||
{
|
||||
ROCP_FATAL << "Could not find name for record id: " << record_id;
|
||||
}
|
||||
return {info.name};
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include "lib/common/container/small_vector.hpp"
|
||||
#include "lib/common/logging.hpp"
|
||||
#include "lib/common/static_object.hpp"
|
||||
#include "lib/common/synchronized.hpp"
|
||||
#include "lib/rocprofiler-sdk/agent.hpp"
|
||||
@@ -74,6 +75,7 @@ rocprofiler_query_counter_info(rocprofiler_counter_id_t counter_id,
|
||||
return ROCPROFILER_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
ROCP_ERROR << fmt::format("Could not find counter with id = {}", counter_id.handle);
|
||||
return ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
新增問題並參考
封鎖使用者