diff --git a/projects/rocprofiler/src/tools/tool.cpp b/projects/rocprofiler/src/tools/tool.cpp index 395ce7432c..3a53a05918 100644 --- a/projects/rocprofiler/src/tools/tool.cpp +++ b/projects/rocprofiler/src/tools/tool.cpp @@ -152,6 +152,11 @@ std::vector GetCounterNames() { const char* line_c_str = getenv("ROCPROFILER_COUNTERS"); if (line_c_str) { std::string line = line_c_str; + //skip commented lines + auto found = line.find_first_not_of(" \t"); + if (found != std::string::npos) { + if (line[found] == '#') return {}; + } if (line.find("pmc") == std::string::npos) return counters; char seperator = ' '; std::string::size_type prev_pos = 0, pos = line.find(seperator, prev_pos);