adb shell am force-stop com.foo.baradb shell monkey -p com.foo.bar -c android.intent.category.LAUNCHER 1adb shell perfetto -c - --txt --detach=session1 \ -o /data/misc/perfetto-traces/trace \<<EOF
buffers: { size_kb: 100352 fill_policy: RING_BUFFER}buffers: { size_kb: 2048 fill_policy: RING_BUFFER}
data_sources: { config { name: "android.heapprofd" target_buffer: 0 heapprofd_config { sampling_interval_bytes: 4096 process_cmdline: "com.foo.bar" shmem_size_bytes: 67108864 } }}
flush_period_ms: 3000write_into_file: true
EOF
adb shell perfetto --attach=session1 --stop
adb pull /data/misc/perfetto-traces/trace trace
03-06 14:48:55.406 12971 12971 W perfetto: type=1400 audit(0.0:740): avc: denied { getattr } for path="socket:[321589]" dev="sockfs" ino=321589 scontext=u:r:perfetto:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0
03-06 14:48:55.413 12981 12981 I perfetto: perfetto_cmd.cc:604 Connected to the Perfetto traced service, starting tracing for 0 ms
03-06 14:48:55.414 941 941 I perfetto: tracing_service_impl.cc:529 Configured tracing, #sources:1, duration:0 ms, #buffers:1, total buffer size:102400 KB, total sessions:1
03-06 14:48:56.088 13030 13030 I perfetto: heapprofd_producer.cc:181 Connected to the service, mode [child].
03-06 14:48:56.098 13008 13028 I perfetto: malloc_hooks.cc:406 heapprofd_client initialized.
03-06 14:49:01.724 13073 13064 I perfetto: client.cc:257 Detected post-fork child situation, stopping profiling.
03-06 14:50:13.603 12981 12981 I perfetto: perfetto_cmd.cc:815 SIGINT/SIGTERM received: disabling tracing.
03-06 14:50:13.701 12981 12981 I perfetto: perfetto_cmd.cc:677 Wrote 448780 bytes into /data/misc/perfetto-traces/trace
03-06 14:50:13.732 941 941 I perfetto: tracing_service_impl.cc:1660 Tracing session 5 ended, total sessions:0
Pss Private Private SwapPss Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 288372 288328 0 13907 321040 309487 11552
Dalvik Heap 5407 5336 0 96 5199 2600 2599
Dalvik Other 1732 1728 0 20
Stack 36 36 0 20
Ashmem 12 0 0 0
Gfx dev 49672 49672 0 0
Other dev 161 8 148 0
.so mmap 27031 920 24048 316
.jar mmap 2218 0 152 0
.apk mmap 681 0 8 0
.dex mmap 3875 3628 4 3000
.oat mmap 236 0 120 0
.art mmap 5196 4280 64 700
Other mmap 557 160 84 0
EGL mtrack 78276 78276 0 0
GL mtrack 5972 5972 0 0
Unknown 114590 114552 0 781
TOTAL 602864 552896 24628 18840 326239 312087 14151
App Summary
Pss(KB)
------
Java Heap: 9680
Native Heap: 288328
Code: 28880
Stack: 36
Graphics: 133920
Private Other: 116680
System: 25340
TOTAL: 602864 TOTAL SWAP PSS: 18840
I think the root should show 280MB, not 2.32MB in my mind.
Maybe the log can help.
03-06 14:49:01.724 13073 13064 I perfetto: client.cc:257 Detected post-fork child situation, stopping profiling.
03-06 14:48:55.414 941 941 I perfetto: tracing_service_impl.cc:529 Configured tracing, #sources:1, duration:0 ms, #buffers:1, total buffer size:102400 KB, total sessions:1
[...]
03-06 14:50:13.603 12981 12981 I perfetto: perfetto_cmd.cc:815 SIGINT/SIGTERM received: disabling tracing.
--
You received this message because you are subscribed to a topic in the Google Groups "android-platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-platform/rAMUnoMfys8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/eec2d2ac-1756-438d-bacd-6052939e845d%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to android-...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to android-...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to android-...@googlegroups.com.