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:
Baraldi, Giovanni
2025-03-15 02:11:10 +01:00
committed by GitHub
parent 914923f688
commit 821918a512
48 changed files with 763 additions and 1525 deletions
+36 -12
View File
@@ -90,7 +90,7 @@ def strtobool(val):
def search_path(path_list):
supported_option = []
lib_att_pattern = r"libatt_decoder_(trace|summary|debug|testing)\.so"
lib_att_pattern = r"libatt_decoder_(trace|debug|testing1|testing2)\.so"
file_list = []
for path in path_list:
@@ -100,7 +100,7 @@ def search_path(path_list):
for itr in file_list:
_match = re.match(lib_att_pattern, itr)
if _match:
lst = re.findall("trace|debug|summary|testing", itr)
lst = re.findall("trace|debug|testing1|testing2", itr)
supported_option.extend(lst)
return set(supported_option)
@@ -682,6 +682,20 @@ For MPI applications (or other job launchers such as SLURM), place rocprofv3 ins
choices=set(choice_list),
)
att_options.add_argument(
"--att-perfcounters",
help="Set performance counters, and optionally their mask",
default=None,
type=str.upper,
)
att_options.add_argument(
"--att-perfcounter-ctrl",
help="Integer in [0,32] range specifying collection period.",
default=None,
type=int,
)
add_parser_bool_argument(
att_options,
"--att-serialize-all",
@@ -1305,15 +1319,13 @@ def run(app_args, args, **kwargs):
f"{type(num_str)} is not supported. {num_str} should be of type integer or string."
)
if args.pmc or (
if (
args.pc_sampling_beta_enabled
or args.pc_sampling_unit
or args.pc_sampling_method
or args.pc_sampling_interval
):
fatal_error(
"Advanced thread trace cannot be enabled with counter collection or pc sampling"
)
fatal_error("Advanced thread trace cannot be enabled with pc sampling")
if not args.att_parse:
fatal_error("provide the parser choice")
@@ -1358,12 +1370,24 @@ def run(app_args, args, **kwargs):
":".join(args.att_library_path),
overwrite=True,
)
if args.att_percounters:
update_env(
"ROCPROF_ATT_PARAM_PERFCOUNTERS",
" ".join(args.att_perfcounters),
overwrite=True,
)
if args.att_perfcounters:
if args.pmc:
fatal_error("ATT perfcounters cannot be enabled with PMC")
else:
update_env(
"ROCPROF_ATT_PARAM_PERFCOUNTERS",
args.att_perfcounters,
overwrite=True,
)
if args.att_perfcounter_ctrl:
if args.pmc:
fatal_error("ATT perfcounters cannot be enabled with PMC")
else:
update_env(
"ROCPROF_ATT_PARAM_PERFCOUNTER_CTRL",
args.att_perfcounter_ctrl,
overwrite=True,
)
if args.log_level in ("info", "trace", "env"):
log_config(app_env)