Ignoring commented lines in input for profiling

Change-Id: I31c089024473f0b22e26d54d6db7e5818a064a0d


[ROCm/rocprofiler commit: 591e3d734b]
This commit is contained in:
gobhardw
2023-04-22 00:23:31 +05:30
committed by Ammar Elwazir
orang tua 0da1e506b3
melakukan 5ab5d37fb9
@@ -152,6 +152,11 @@ std::vector<std::string> 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);