diff options
| author | 2025-01-23 08:16:30 -0800 | |
|---|---|---|
| committer | 2025-01-23 08:16:30 -0800 | |
| commit | d44cf56dc6345acb27f91018a056b935b8a0a8a2 (patch) | |
| tree | b38269d678b42044abc4c37040221158b352863d | |
| parent | 01c01e77cb876e678a9b72a2e1402cea17f93d54 (diff) | |
| parent | 190510c5d335f608c3e0d36e85f91afaaaf66d67 (diff) | |
Support generating split dirty-image-objects profile am: ea1443585c am: 190510c5d3
Original change: https://android-review.googlesource.com/c/platform/art/+/3460185
Change-Id: If3f0f8e57433fbaaa6fb8da658b02c6d180fda16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rwxr-xr-x | imgdiag/create_dirty_image_objects.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/imgdiag/create_dirty_image_objects.py b/imgdiag/create_dirty_image_objects.py index da0ed2c918..cabb097015 100755 --- a/imgdiag/create_dirty_image_objects.py +++ b/imgdiag/create_dirty_image_objects.py @@ -101,6 +101,18 @@ def process_dirty_entries(entries, sort_type): return (dirty_obj_lines, sort_keys) +def split_dirty_objects(dirty_objects): + art_objects = list() + framework_objects = list() + for obj in dirty_objects: + obj_without_location = obj.split(' ', 1)[1] + is_art_module_object = obj.startswith('/apex/com.android.art/') + is_primitive_array = obj.startswith('primitive') + if is_art_module_object or is_primitive_array: + art_objects.append(obj_without_location) + else: + framework_objects.append(obj_without_location) + return art_objects, framework_objects def main(): parser = argparse.ArgumentParser( @@ -172,6 +184,12 @@ def main(): with open(args.output_filename, 'w') as f: f.writelines(dirty_image_objects) + art_objs, framework_objs = split_dirty_objects(dirty_image_objects) + with open('art_' + args.output_filename, 'w') as f: + f.writelines(art_objs) + with open('framework_' + args.output_filename, 'w') as f: + f.writelines(framework_objs) + if args.print_stats: print(','.join(k for k, v in entries), ',obj_count') total_count = 0 |