On Feb 15, 7:04 pm, "Fred Grott(Android Expert, 
http://mobilebytes.wordpress.com)"
<[email protected]> wrote:
> Is Google aware that docs are listing two hrprof file locations?
>
> hprof dump method gives /sdcard/dump.hprof as the default in docs
> whereas monkey dev page indicate data/misc..
>
> ahem  which one is correct?

To some extent, they both are.

If you initiate an HPROF dump by sending a signal to the process, it
ends up in /data/misc.  This is not generally available to end users,
because (a) you can't send the signal unless you're root, and (b) /
data/misc isn't world-writable by default.

The android.os.Debug.dumpHprofData() call takes the filename as an
argument, and mentions "/sdcard/dump.hprof" as a nice place to put
it.  Passing a null filename earns you an exception, so it's not
really accurate to say that it's the default.  More like a
recommendation.

If you use the hprof-dump button in DDMS, it will go onto /sdcard with
an app-specific filename.

In a future release of the system it won't hit the filesystem at all
when you use DDMS, which is very convenient since otherwise the target
app must have the "external storage" permission to write the dump
there.

See also dalvik/docs/heap-profiling.html:
  
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/heap-profiling.html;hb=HEAD

-- 
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
  • [android-deve... Fred Grott(Android Expert, http://mobilebytes.wordpress.com)
    • [android... fadden

Reply via email to