Merge "Add --all-heaps to heap_profile script."
diff --git a/tools/heap_profile b/tools/heap_profile
index 058555b..5c41f65 100755
--- a/tools/heap_profile
+++ b/tools/heap_profile
@@ -187,6 +187,11 @@
help="Comma-separated list of heaps to collect, e.g: malloc,art. "
"Requires Android 12.",
metavar="HEAPS")
+ parse.add_argument(
+ "--all-heaps",
+ action="store_true",
+ help="Collect allocations from all heaps registered by target."
+ )
parser.add_argument(
"--disable-selinux",
action="store_true",
@@ -304,6 +309,8 @@
target_cfg += "dump_at_max: true\n"
if args.disable_fork_teardown:
target_cfg += "disable_fork_teardown: true\n"
+ if args.all_heaps:
+ target_cfg += "all_heaps: true\n"
if args.pid:
for pid in args.pid.split(','):
try: