Allow to request smaps from java hprof.
Fix a latent UI bug that broke compilation because now
JavaHprofConfig has a field that HeapprofdConfig does not.
Bug: 150930222
Change-Id: Ib6e9fa46fa5574b813df971b3ca28c263ba94b02
diff --git a/tools/java_heap_dump b/tools/java_heap_dump
index 4860aa8..f84a594 100755
--- a/tools/java_heap_dump
+++ b/tools/java_heap_dump
@@ -95,6 +95,10 @@
action="store_true",
help="Do not get version information about APKs.")
parser.add_argument(
+ "--dump-smaps",
+ action="store_true",
+ help="Get information about /proc/$PID/smaps of target.")
+ parser.add_argument(
"--print-config",
action="store_true",
help="Print config instead of running. For debugging.")
@@ -118,6 +122,8 @@
if args.name:
for name in args.name.split(','):
target_cfg += '{}process_cmdline: "{}"\n'.format(CFG_IDENT, name)
+ if args.dump_smaps:
+ target_cfg += '{}dump_smaps: true\n'.format(CFG_IDENT)
if fail:
parser.print_help()