OSDN Git Service

New Java-based SamplingProfiler
authorBrian Carlstrom <bdc@google.com>
Fri, 23 Jul 2010 22:57:52 +0000 (15:57 -0700)
committerBrian Carlstrom <bdc@google.com>
Wed, 1 Sep 2010 17:16:51 +0000 (10:16 -0700)
commit51ee38b9c39b0c36bce728a797b2c5e637be3d2c
tree166bff5a21e0d994eed4a12c98a6499876703c27
parent5b65f4f2917a11ef9d2798203f5dca55682d9e81
New Java-based SamplingProfiler

Summary:
- libcore: new Java based SamplingProfiler
- dalvik: remove old SamplingProfiler native bits
- frameworks/base: New placeholder SamplingProfilerIntegration
- vendor/google: remove old profiler snapshot parsing code

Details:

libcore

   A new 100% Java SamplingProfiler. While it has more overhead that
   the old native one, the new one can actually collect more than the
   current PC and frame pointer, so you can get useful context of
   where your app is spending time. It currently provides ASCII hprof
   format output for use with tools like PerfAnal
dalvik/src/main/java/dalvik/system/SamplingProfiler.java

    Unit test for the new SamplingProfiler
dalvik/src/test/java/dalvik/system/SamplingProfilerTest.java

    Add core-tests-dalvik
JavaLibrary.mk

dalvik

    Removing native code that supported the old SamplingProfiler
vm/Dvm.mk
vm/native/InternalNative.c
vm/native/dalvik_system_SamplingProfiler.c

frameworks/base

  Placeholder SamplingProfilerIntegration. Later plans include
  generating EventStackTrace protobufs.

    New SamplingProfiler does not have a global instance, so
    SamplingProfilerIntegration provides one in INSTANCE. Old binary
    snapshot format is temporily replaced with ASCII hprof data.
core/java/com/android/internal/os/SamplingProfilerIntegration.java

    Simplified interface for zygote profile snapshotting
core/java/com/android/internal/os/ZygoteInit.java

    Current SamplingProfilerIntegration does not track event loop
    explicitly, but hprof information does include thread information.
core/java/android/app/ActivityThread.java

vendor/google

    Removing code for parsing old SamplingProfiler snapshot format
tools/samplingprofiler/Android.mk
tools/samplingprofiler/NOTICE
tools/samplingprofiler/profiler.iml
tools/samplingprofiler/profiler.ipr
tools/samplingprofiler/pull-snapshots.sh
tools/samplingprofiler/sorttable.js
tools/samplingprofiler/src/com/android/profiler/PrintHtml.java
JavaLibrary.mk
dalvik/src/main/java/dalvik/system/SamplingProfiler.java
dalvik/src/test/java/dalvik/system/SamplingProfilerTest.java [new file with mode: 0644]