Convert LOG() -> ROCP_X logging macros. (#695)
* Convert LOG() -> ROCP_X logging macros. This patch converts the LOG() macro to the ROCP_X logging macros. There are the following levels of logs. Logs whos expressions are not evaluated unless the log level is enabled: ROCP_TRACE - VLOG(2) (enabeled by env variable GLOG_v=2) ROCP_INFO - VLOG(1) (enabeled by env variable GLOG_v=1) Logs whos expressions are always evaluated: ROCP_WARNING - LOG(WARNING) ROCP_ERROR - LOG(ERROR) ROCP_FATAL - LOG(FATAL) ROCP_DFATAL - DLOG(FATAL) (only fatal in debug mode) * source formatting (clang-format v11) (#696) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * Minor fix * Fixes for VLOG before main * fix vmodule * source formatting (clang-format v11) (#718) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> * memory leak fix * Vlog change --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
5e4dd502d9
commit
41c0ddd72d
@@ -187,11 +187,11 @@ findDeviceMetrics(const hsa::AgentCache& agent, const std::unordered_set<std::st
|
||||
std::vector<counters::Metric> ret;
|
||||
auto all_counters = counters::getMetricMap();
|
||||
|
||||
LOG(ERROR) << "Looking up counters for " << std::string(agent.name());
|
||||
ROCP_ERROR << "Looking up counters for " << std::string(agent.name());
|
||||
auto gfx_metrics = common::get_val(*all_counters, std::string(agent.name()));
|
||||
if(!gfx_metrics)
|
||||
{
|
||||
LOG(ERROR) << "No counters found for " << std::string(agent.name());
|
||||
ROCP_ERROR << "No counters found for " << std::string(agent.name());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ TEST(dimension, block_dim_test)
|
||||
*/
|
||||
std::unordered_map<counters::rocprofiler_profile_counter_instance_types, uint64_t>
|
||||
rocp_dims;
|
||||
LOG(ERROR) << metric.name() << " " << metric.special();
|
||||
ROCP_ERROR << metric.name() << " " << metric.special();
|
||||
if(!metric.special().empty())
|
||||
{
|
||||
rocp_dims[counters::rocprofiler_profile_counter_instance_types::
|
||||
|
||||
Reference in New Issue
Block a user