SWDEV-516846: Fix serialization services conflicts and ATT counter streaming (#230)
* Update TT API * Rework serialization * update att_core * Fix tests * Fix tool * Formatting * Fix perfcounter * Formatting * Rename agent TT * Format * Workaround for codeQL alert * Tidy fix * Fix compiler error * Tidy * Fix some tests * Fixing some tests * formatting * Fixing ATT serialization * Format * Fix test commandline * Fixing init order * Format * Tidy fixes * Removing unused sample * Fix tests and schema * Added ATT + PMC test * Fix mode * Fix file mode * Review comments * Fix typo * Review comments * Review comments * Fix missing id inc after review comment * Review comments * Suggested Fixes * Testing changes * Test fix * Build fixes * Minor build fix --------- Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com> Co-authored-by: Benjamin Welton <bewelton@amd.com> Co-authored-by: Welton, Benjamin <Benjamin.Welton@amd.com>
This commit is contained in:
committed by
GitHub
parent
914923f688
commit
821918a512
@@ -113,13 +113,13 @@ has_counter_format(std::string const& str)
|
||||
}
|
||||
|
||||
// validate kernel names
|
||||
std::unordered_set<uint32_t>
|
||||
std::unordered_set<size_t>
|
||||
get_kernel_filter_range(const std::string& kernel_filter)
|
||||
{
|
||||
if(kernel_filter.empty()) return {};
|
||||
|
||||
auto delim = rocprofiler::sdk::parse::tokenize(kernel_filter, "[], ");
|
||||
auto range_set = std::unordered_set<uint32_t>{};
|
||||
auto range_set = std::unordered_set<size_t>{};
|
||||
for(const auto& itr : delim)
|
||||
{
|
||||
if(itr.find('-') != std::string::npos)
|
||||
@@ -129,8 +129,8 @@ get_kernel_filter_range(const std::string& kernel_filter)
|
||||
ROCP_FATAL_IF(drange.size() != 2)
|
||||
<< "bad range format for '" << itr << "'. Expected [A-B] where A and B are numbers";
|
||||
|
||||
uint32_t start_range = std::stoul(drange.front());
|
||||
uint32_t end_range = std::stoul(drange.back());
|
||||
size_t start_range = std::stoul(drange.front());
|
||||
size_t end_range = std::stoul(drange.back());
|
||||
for(auto i = start_range; i <= end_range; i++)
|
||||
range_set.emplace(i);
|
||||
}
|
||||
@@ -180,7 +180,6 @@ parse_att_counters(std::string line)
|
||||
};
|
||||
|
||||
// regex to check if string is of the form "counter_name:simd_mask"
|
||||
std::regex pattern(R"([a-zA-Z0-9_]+(:0x[0-9a-fA-F]+)?)");
|
||||
std::set<std::string> unique_counters;
|
||||
|
||||
auto input_ss = std::stringstream{line};
|
||||
@@ -190,13 +189,6 @@ parse_att_counters(std::string line)
|
||||
input_ss >> counter;
|
||||
if(counter.empty()) break;
|
||||
|
||||
// check if the counter string matches the pattern
|
||||
if(!std::regex_match(counter, pattern))
|
||||
{
|
||||
ROCP_FATAL << "Invalid counter format for ATT: " << counter
|
||||
<< ". Expected format : Counter_name:optional_simd_mask(hexadecimal)";
|
||||
}
|
||||
|
||||
// Consider only those counters where combination of counter name and simd mask is unique
|
||||
if(unique_counters.insert(counter).second == false) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user