[Rocprofiler-systems] : Refactor papi enumeration to fix a hang on Intel systems (#1672)
* Refactor papi enumeration to fix a hang on Intel systems - Add an exclude argument to available_events_info() for perf_event_uncore causing hang like case on Intel systems with large number of uncore events. - Enumerate papi available events only when papi events are specified by users inside early initialization logic - Move papi available event query for ROCPROFSYS_SAMPLING_OVERFLOW_EVENT config setting to the avail component, to move the heavy logic outside initialization. - Make category option for rocprof-sys-avail -H -c case insensitive - Provide new option to query available overflow events that can be specified for ROCPROFSYS_SAMPLING_OVERFLOW_EVENT using new command option rocprof-sys-avail -H -c overflow * Update projects/rocprofiler-systems/source/bin/rocprof-sys-avail/common.cpp Co-authored-by: Milan Radosavljevic <milan.radosavljevic@amd.com> * Update timemory submodule pointer Signed-off-by: David Galiffi <David.Galiffi@amd.com> * Fix errors on compile * Change 1: Optimization for the category matching lambda Optmization changes. * Modify the rocprof-sys-avail -c option for overflow Overflow should not be displayed as a device in rocprof-sys-avail -H -c CPU Users can instead do regex on summary where overflow is appended in description User can do rocprof-sys-avail -H -c CPU -d -r overflow * Revert change to column width --------- Signed-off-by: David Galiffi <David.Galiffi@amd.com> Co-authored-by: Milan Radosavljevic <milan.radosavljevic@amd.com> Co-authored-by: David Galiffi <David.Galiffi@amd.com>
Esse commit está contido em:
@@ -31,35 +31,6 @@ namespace perf
|
||||
{
|
||||
namespace units = ::tim::units;
|
||||
|
||||
std::vector<std::string>
|
||||
get_config_choices()
|
||||
{
|
||||
namespace regex_const = ::std::regex_constants;
|
||||
|
||||
auto _data = std::vector<std::string>{};
|
||||
auto _papi_events = tim::papi::available_events_info();
|
||||
const auto _prefix = std::string_view{ "perf::" };
|
||||
auto _regex =
|
||||
std::regex{ "^(perf::|)PERF_COUNT_(HW|SW|HW_CACHE)_([A-Z_]+)(|:[A-Z]+)$",
|
||||
regex_const::optimize };
|
||||
|
||||
for(const auto& itr : _papi_events)
|
||||
{
|
||||
if(std::regex_match(itr.symbol(), _regex))
|
||||
{
|
||||
auto _symbol = itr.symbol();
|
||||
auto _pos = _symbol.find(_prefix);
|
||||
if(_pos == 0) _symbol = _symbol.substr(_prefix.length());
|
||||
_data.emplace_back(_symbol);
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(_data.begin(), _data.end());
|
||||
_data.erase(std::unique(_data.begin(), _data.end()), _data.end());
|
||||
|
||||
return _data;
|
||||
}
|
||||
|
||||
event_type
|
||||
get_event_type(std::string_view _v)
|
||||
{
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário