Hi,

on a "regular" JVM you can generate a dump in the very moment the
first OOM occurs (starting it with the -XX:+HeapDumpOnOutOfMemoryError
option), which is very useful.

>From your previous posts I have deduced that's impossible with
Dalvik... am I right? are you considering this feature?

Thanks,

Jose Luis.

On Feb 4, 1:18 am, fadden <[email protected]> wrote:
> On Feb 3, 1:42 am, blindfold <[email protected]> wrote:
>
> > One thing that kept me from further working with this a few days ago
> > is that I ran the monkey tool with the --hprof option, which according
> > tohttp://code.google.com/intl/zh-TW/android/reference/monkey.html
> > puts results in the data/misc folder. However, it seems impossible
> > (prohibited) to access that folder on the phone to retrieve the
> > generated profiling results? So can this only be used by people who
> > flash their own phones with a development build, or did I overlook
> > something (I did not dig for long)?
>
> The VM is listening for two signals, SIGQUIT and SIGUSR1.  If you send
> it a SIGQUIT it will dump the stacks from all running threads; if you
> send it a SIGUSR1 it will dump the heap profiling data.
>
> On a production device, you can't send signals to arbitrary processes,
> so "adb shell kill -10 <pid>" isn't going to work.  You can, however,
> send the process a signal from itself, using
> android.os.Process.sendSignal(myPid(), SIGNAL_USR1).  Unfortunately
> (as you've noted) this isn't useful unless (a) the process can write
> to /data/misc, and (b) you can "adb pull" the files out once they have
> been written.
>
> In not-yet-public Cupcake there's a new call in android.os.Debug that
> will dump the heap profiling data to a file you specify.  In the
> future we hope to be able to control this through DDMS.
>
> In the mean time, you need to use a development device or the
> emulator, either of which will allow you to "chmod 777 /data/misc".
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to