diff options
-rwxr-xr-x | tools/testing/selftests/damon/drgn_dump_damon_status.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/damon/drgn_dump_damon_status.py b/tools/testing/selftests/damon/drgn_dump_damon_status.py index 8db081f965f5..cf5d492670d8 100755 --- a/tools/testing/selftests/damon/drgn_dump_damon_status.py +++ b/tools/testing/selftests/damon/drgn_dump_damon_status.py @@ -25,6 +25,11 @@ def to_dict(object, attr_name_converter): d[attr_name] = converter(getattr(object, attr_name)) return d +def ops_to_dict(ops): + return to_dict(ops, [ + ['id', int], + ]) + def intervals_goal_to_dict(goal): return to_dict(goal, [ ['access_bp', int], @@ -148,6 +153,7 @@ def schemes_to_list(schemes): def damon_ctx_to_dict(ctx): return to_dict(ctx, [ + ['ops', ops_to_dict], ['attrs', attrs_to_dict], ['adaptive_targets', targets_to_list], ['schemes', schemes_to_list], |