diff options
| author | 2025-01-23 16:01:44 -0800 | |
|---|---|---|
| committer | 2025-01-23 16:01:44 -0800 | |
| commit | 35f3a8a1c34cb233fee43885cf4626dfb45f6bbe (patch) | |
| tree | 8ebf0b5e4c8471f832bb4b1061574607baa81364 /imgdiag/create_dirty_image_objects.py | |
| parent | aa717c9dce95d4353e20b21aa0225d4fd8238a6f (diff) | |
| parent | 98645abb2142fdb6dda39384b6764b89d09a7625 (diff) | |
Snap for 12962709 from 98645abb2142fdb6dda39384b6764b89d09a7625 to 25Q2-release
Change-Id: Ic3f7c0489bb4d5c52f48349e87b01521bd56c396
Diffstat (limited to 'imgdiag/create_dirty_image_objects.py')
| -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 |