Android Monkey Does Not Generate HPROF Reset

I ran the following Android Monkey command:

adb shell monkey --hprof -v -p com.my.app 5000 

It should create an hprof file in / data / misc, but that is not the case. I am chmod'ed 777 / data / miscellaneous.

Then I tried to kill -10 APP_PID, but got the following under the logarithm:

 I/dalvikvm( 771): threadid=4: reacting to signal 10 I/dalvikvm( 771): SIGUSR1 forcing GC (no HPROF) D/dalvikvm( 771): GC_EXPLICIT freed 46K, 38% free 8352K/13383K, external 15387K/15496K, paused 98ms 

I am running Cyanogenmod version 7, version of Android 2.3.7 on Galaxy S.

Why is there β€œno HPROF”, and how do I get a HPROF reset via Monkey and kill -10?

thanks

+4
source share
1 answer

When called with --hprof monkey sends the SIGUSR1 signal to all processes, but the HPROF data reset was disabled from Dalvik by this patch:

commit b037a464512c0721bdca969ae19cce3d4b17b083 Posted by Andy McFadden Date: Fri Jul 16 11:07:58 2010 -0700

 Don't do heap dump on SIGUSR1. We still do the GC, but without the HPROF heap dump. Change-Id: I004a65b9571667dd320dfabec1441d0fc8b9970a 

So, on SIGUSR1 , only the GC is called. I think the --hprof should be removed from the monkey.

+3
source

Source: https://habr.com/ru/post/1384246/


All Articles