Update documentation.
Fix the incorrect mention of when the zygote flag is set on a size. Add information about how to use am dumpheap -n to dump the native heap to a file. Test: Documentation only change. Change-Id: I82e810ee7ffffcf7506fb6fd9bcfdfb0465a48be
This commit is contained in:
parent
1d20532f5c
commit
ac66d16a52
|
@ -409,3 +409,15 @@ like two arguments instead of one.
|
|||
# setprop libc.debug.malloc.options backtrace
|
||||
# export LIBC_DEBUG_MALLOC_ENABLE 1
|
||||
# ls
|
||||
|
||||
Enable malloc debug and dump the native allocation with backtraces to
|
||||
a file. This only works for zygote based java processes.
|
||||
|
||||
adb shell stop
|
||||
adb shell setprop libc.debug.malloc.options backtrace
|
||||
adb shell start
|
||||
adb shell am dumpheap -n <PID_TO_DUMP> /data/local/tmp/heap.txt
|
||||
|
||||
It is possible to use the backtrace\_enable\_on\_signal option as well,
|
||||
but it must be enabled through the signal before the file will contain
|
||||
any data.
|
||||
|
|
|
@ -50,5 +50,5 @@ The total number of these structures returned in *info* is
|
|||
*overall\_size* divided by *info\_size*.
|
||||
|
||||
Note, the size value in each allocation data structure will have bit 31 set
|
||||
if this allocation was created by the Zygote process. This helps to distinguish
|
||||
between native allocations created by the application.
|
||||
if this allocation was created in a process forked from the Zygote process.
|
||||
This helps to distinguish between native allocations created by the application.
|
||||
|
|
Loading…
Reference in New Issue