History log of /frameworks/base/core/java/android/os/Debug.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1353df5655a551cbbf403d4f1f88b72761fe9e6b 11-Dec-2014 Dianne Hackborn <hackbod@google.com> Fix issue #18706195: Improve label names of memory types

Change-Id: Ia11153300e04aecd56baca9d4316ac362688d594
/frameworks/base/core/java/android/os/Debug.java
8b33cf4d34a9ea75e1121ee2f1d829b21f3cb5d6 09-Dec-2014 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #18640385: Add procstats test mode" into lmp-mr1-dev
1a4b5a4f02e7d8ff8ff645377d97e6062d36aeaa 09-Dec-2014 Dianne Hackborn <hackbod@google.com> Work on issue #18640385: Add procstats test mode

You can now do "adb shell dumpsys procstats --start-testing" to
enable high frequency pss sampling.

Also improved the low on RAM mem reporting to separate out RAM
from memtrack, in case the data we are getting from that is bad.

And fixed meminfo --oom to work correctly again.

Change-Id: I7af17eab110a82298bd7b0ce381f8fa5c96c1f6a
/frameworks/base/core/java/android/os/Debug.java
25c5e2b12d5d5d06739e3f70a0da968d97935b46 09-Dec-2014 Mathieu Chartier <mathieuc@google.com> Add more -d dalvik details to dumpsys

Added .NonMoving for the non moving space.
Added .Zygote for the zygote.
Added .IndirectRef for indirect reference tables (jobjects).

Example:
Dalvik Details
.Heap 2264 2264 0 0
.LOS 80 80 0 0
.GC 144 144 0 0
.Zygote 331 196 0 2428
.NonMoving 540 540 0 0
.IndirectRef 20 20 0 0

Bug: 18672069
Change-Id: Id14e5bc92ceb15fe7a17d9fb035f18aa2925e50c
/frameworks/base/core/java/android/os/Debug.java
184293076201ec510898f8d505a8fe50458d9604 03-Nov-2014 Dianne Hackborn <hackbod@google.com> Few more small meminfo improvements.

- Add in category for graphics driver, and knowledge about it
for N5 (more devices will be added later).
- Renaming the labels for the .oat and .art files to be just
that, so it is clear what they are talking about.

Change-Id: I663ca8bd2febce41fcdde74b0d3a96ef9325edf1
/frameworks/base/core/java/android/os/Debug.java
b3af4ec6bae4fe93d40f021e54cbbce10cc7b4c6 18-Oct-2014 Dianne Hackborn <hackbod@google.com> Fix issue #17948288: Improve accuracy of memory use reporting

We now use Mapped to not double-count cached pages that are
mapped in to app processes. Also read in some more values that
count towards kernel RAM use, and count buffers as free rather
than used RAM.

It also looks like the zram accounting is broken -- it was never
collecting the total zram reserved space. I need to figure out
how I was finding that before.

Change-Id: I883f6fc93966774b5c7d2801d1801666dd11ed41
/frameworks/base/core/java/android/os/Debug.java
70216e599e678d46b0630e261e25b5209465255a 15-Jan-2014 Jeff Hao <jeffhao@google.com> am ac20b469: am 6c13f384: am 56b11064: am 9a5005a3: am f6730d26: Merge "Add sample profiling interface to startMethodTracing."

* commit 'ac20b469259129df948bae1fa5434098b1801185':
Add sample profiling interface to startMethodTracing.
d02e60fbd41e4f35160f1ea17a9c606d611bb60e 07-Jan-2014 Jeff Hao <jeffhao@google.com> Add sample profiling interface to startMethodTracing.

Frameworks base side of this change. Also changed art and libcore.

Change-Id: Ib5ba0445163dca714d1ae66430750346ff8811be
/frameworks/base/core/java/android/os/Debug.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/core/java/android/os/Debug.java
0d763a901e6f205c05fbec3123225a41672def45 03-Oct-2013 Dianne Hackborn <hackbod@google.com> Merge "Implement issue #11050739: Show swapped out RAM" into klp-dev
fd6c7b12c312bef3ab9de2a8fcdeef9260fd85f1 03-Oct-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10378741: configupdater needs to be explicit when it calls startService()

Not enough time to fix everything, so instead we'll make it a warning
in this release and finish up turning it into a target-SDK based
exception in the next release.

Change-Id: I5aae64a1225a145f03ba4162238b53d5e401aba2
/frameworks/base/core/java/android/os/Debug.java
8883ced18ac25199330843964634fdf70647a127 03-Oct-2013 Dianne Hackborn <hackbod@google.com> Implement issue #11050739: Show swapped out RAM

Add "swapped out" field to mem info everywhere.

Change-Id: I89abe8eb0e91fa5c193da93815dc592593c8a3c8
/frameworks/base/core/java/android/os/Debug.java
bde988ade5f75c3d241422dce2ee4124871fab53 26-Sep-2013 Adam Lesinski <adamlesinski@google.com> Merge "Add Graphics alloc tracking via memtrack" into klp-dev
cbd9a52f256087426feb19ac6e51eff772e81375 25-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10903002: com.facebook.katana keeps itself in A Services

Now when memory low, if a service's process is above
a selected pss, then the process is not allowed to go
in to the service a list.

Also simplified the normal meminfo details dump to not
include the shared dirty and shared clean sizes by
default, since these can be very confusing. You will
still get to see them with the "-a" flag.

Finally some small steps to better managing service
processes in the LRU list, so hopefully we can some
day be better about letting them drop down in the list
when there isn't really much interesting happening in
the process. Not yet used at this point.

Change-Id: I654bfd6d05de2a63120185ebb15ffda8cbeb5dac
/frameworks/base/core/java/android/os/Debug.java
5b4ef81f2b79dd5d597b1681de4d0311d46693aa 23-Sep-2013 Adam Lesinski <adamlesinski@google.com> Add Graphics alloc tracking via memtrack

Any OpenGL memory reported by /proc/pid/smaps will not be included
in the GPU GL memory count and will be considered Unknown. This is
an artifact of how some memory reporting is done in libmemtrack
and some is done in this module.

bug:10294768

Change-Id: Id8fb63b2e86520f4dbc8410573a509e66b96b13b
/frameworks/base/core/java/android/os/Debug.java
3fa8969021793cf75f95540742cac04e6893488e 14-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10461477: KLP API Review: Debug.MemoryInfo

Oops.

Change-Id: I2143790af9e6649dba8d74618358c47232cf6cc4
/frameworks/base/core/java/android/os/Debug.java
8e69257a9c7e9c1781e1f53d8856358ada38921d 11-Sep-2013 Dianne Hackborn <hackbod@google.com> Implement #10749688: Improve low memory reporting

This significantly reworks the logging we do when
all cached processes are killed:

- We now collect the list of processes in-place so we
have a snapshot of exactly when the low memory situation
happened.
- In that snapshot we include the key process state: oom
adj, proc state, adj reasons.
- The report then asynchronously collects pss information
for those processes.
- The ultimate data printed to the log looks like a mix
between the "dumpsys meminfo" and "dumpsys activity"
output. This code no longer uses "dumpsys meminfo"
itself, so some of that data is no longer included,
in particular pss organized by allocation type.

In doing this, I realized that the existing code that is
supposed to run "procstats" is not currently working. And
at that point I realized, really, when we are collecting
this pss data we'd really like to include all those native
processes using ghod-only-knows how much RAM. And guess
what, we have a list of processes available in
ProcessCpuTracker.

So we now also collect and print information for native
processes, and we also do this for "dumpsys meminfo" which
really seems like a good thing when we are printing summaries
of all pss and such.

I also improved the code for reading /proc/meminfo to be
able to load all the interesting fields from there, and
am now printing that as well.

Change-Id: I9e7d13e9c07a8249c7a7e12e5433973b2c0fdc11
/frameworks/base/core/java/android/os/Debug.java
37c99432625e2adeb50baf25f471abc8481b2b3e 06-Sep-2013 Dianne Hackborn <hackbod@google.com> Implement issue #10550827: watching gpu memory for occam_svelte

Well, it would work if the published file permissions gave the
system process access to them. :(

Change-Id: I99e0c506f52c212384b20a042dcdd35516cf49c2
/frameworks/base/core/java/android/os/Debug.java
ac27705f75e74f022de8c7888b14b49fed899176 29-Aug-2013 Jeff Hao <jeffhao@google.com> Change IsMethodTracingActive to GetMethodTracingMode for frameworks.

Bug: 9968521

Change-Id: Ic63340e0d2fef18f27fdfabdd056ac5304c3d54f
(cherry picked from commit ffbe799f3824f4be705ca726988355d3943a9004)
/frameworks/base/core/java/android/os/Debug.java
7be3a138d57713bbe6d624998620081807e65b71 23-Aug-2013 Jeff Hao <jeffhao@google.com> Add frameworks support for sample profiling from traceview gui.

(cherry picked from commit ca307d3138ff1e5d0bcf190eb24f3b8dbcabfaa9)

Change-Id: I3553bafe24ac8deb4fa3f9a4d78939c3848b3850
/frameworks/base/core/java/android/os/Debug.java
c8230519728b14065effd3b7d4eca273ff86160c 14-Jul-2013 Dianne Hackborn <hackbod@google.com> Switch proc stats to use new process state constants.

These new constants are a better mapping to the kind of
information that procstats is wanting to collect about
processes. In doing this, the process states are tweaked
to have a bit more information that we care about for
procstats.

This changes the format of the data printed by procstats,
so the checkin version is bumped to 2. The structure is
the same, however the codes for process states have all
changed. The new codes are, in order of precedence:

p -- persistent system process.
t -- top activity; actually any visible activity.
f -- important foreground process (ime, wallpaper, etc).
b -- important background process
u -- performing backup operation.
w -- heavy-weight process (currently not used).
s -- background process running a service.
r -- process running a receiver.
h -- process hosting home/launcher app when not on top.
l -- process hosting the last app the user was in.
a -- cached process hosting a previous activity.
c -- cached process hosting a client activity.
e -- cached process that is empty.

In addition, we are now collecting uss along with pss
data for each process, so the pss checkin entries now
have three new values at the end of the min/avg/max uss
values of that process.

With this switch to using process state constants more
fundamentally, I realized that they could actually be
used by the core oom adj code to make it a lot cleaner.
So that change has been made, that code has changed quite
radically, and lost a lot of its secondary states and flags
that it used to use in its computation, now relying on
primarily the oom_adj and proc state values for the process.

This also cleaned up a few problems -- for example for
purposes of determing the memory level of the device, if a
long-running service dropped into the cached oom_adj level,
it would start being counted as a cached process and thus
make us think that the memory state is better than it is.
Now we do this based on the proc state, which always stays
as a service regardless of what is happening like this, giving
as a more consistent view of the memory state of the device.

Making proc state a more fundamentally part of the oom adj
computation means that the values can also be more carefully
tuned in semantic meaning so the value assigned to a process
doesn't tend to change unless the semantics of the process
has really significantly changed.

For example, a process will be assigned the service state
regardless of whether that services is executing operations
in the foreground, running normally, or has been dropped to
the lru list for pruning. The top state is used for everything
related to activities visible to the user: when actually on
top, visible but not on top, currently pausing, etc.

There is a new Context.BIND_SHOWING_UI added for when system
services bind to apps, to explicitly indicate that the app
is showing UI for the system. This gives us a better metric
to determine when it is showing UI, and thus when it needs
to do a memory trim when it is no longer in that state. Without
this, services could get in bad states of continually trimming.

Finally, more HashSet containers have been changed to ArraySet,
reducing the temporary iterators created for iterating over
them.

Change-Id: I1724113f42abe7862e8aecb6faae5a7620245e89
/frameworks/base/core/java/android/os/Debug.java
8c84109b9fbbf473b225707a38261ff5f99d95fb 24-Jun-2013 Dianne Hackborn <hackbod@google.com> Use FastPrintWriter... everywhere.

One problem this turned up is, because FastPrintWriter does
its own buffering, a lot of code that used to use PrintWriter
would fail -- if it pointed to a StringWriter, there was no
buffering, so it could just immediately get the result. Now
you need to first flush the FastPrintWriter.

Also added some new constructors to specify the size of buffer
that FastPrintWriter should use.

Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
/frameworks/base/core/java/android/os/Debug.java
64770d16b0907a8e1ee81ef6c8fa398a6bdbee79 24-May-2013 Dianne Hackborn <hackbod@google.com> Some improvements to meminfo output.

- Rename "Swappable PSS" to "PSS Clean" which I think is what it
means and is consistent with the other memory metrics.
- Split at the top level the dalvik heap from other dalvik allocations,
so when you look on the dalvik allocations line things are consistent
with the allocator's data and it is clear what are app allocations vs.
other data in dalvik.
- Don't print lines that are all 0.
- Don't print the detailed Dalvik allocation data by default; add a new
option to have it printed.

Here's what a typical system process dump now looks like:

** MEMINFO in pid 6358 [system] **
Pss Pss Shared Private Shared Private Heap Heap Heap
Total Clean Dirty Dirty Clean Clean Size Alloc Free
------ ------ ------ ------ ------ ------ ------ ------ ------
Native Heap 0 0 0 0 0 0 6964 3599 2048
Dalvik Heap 7541 0 4344 7356 0 0 11768 11194 574
Dalvik Other 3553 0 2792 3448 0 0
Stack 28 0 8 28 0 0
Cursor 4 0 0 4 0 0
Ashmem 5 0 12 0 0 0
Other dev 4004 0 24 4000 0 4
.so mmap 3959 684 2500 2280 5468 684
.apk mmap 173 68 0 0 692 68
.dex mmap 4358 3068 0 0 9276 3068
Other mmap 60 0 8 8 244 36
Unknown 4387 0 508 4380 0 0
TOTAL 28072 3820 10196 21504 15680 3860 18732 14793 2622

Objects
Views: 10 ViewRootImpl: 1
AppContexts: 8 Activities: 0
Assets: 3 AssetManagers: 3
Local Binders: 176 Proxy Binders: 341
Death Recipients: 141
OpenSSL Sockets: 0

SQL
MEMORY_USED: 473
PAGECACHE_OVERFLOW: 98 MALLOC_SIZE: 62

DATABASES
pgsz dbsz Lookaside(b) cache Dbname
4 68 49 7/21/7 /data/data/com.android.providers.settings/databases/settings.db
4 20 17 0/13/1 /data/system/locksettings.db
4 20 21 96/14/2 /data/system/locksettings.db (1)
4 20 21 75/13/2 /data/system/locksettings.db (2)
4 80 29 4/17/3 /data/system/users/0/accounts.db

Change-Id: Ifd511a7baaa8808f82f39509a5a15c71c41d1bac
/frameworks/base/core/java/android/os/Debug.java
3c61506b7147e13b9d39fc07fb189504fcab4541 13-May-2013 Anwar Ghuloum <anwarg@google.com> Add more memory usage stats

Added support for teasing apart different parts of the dalvik heap.

Note this adds more public api and we should talk to hackbod before going into master with this.

(cherry picked from commit 73407daf3f6110e933d8614605b21586c4c5fde2)

Change-Id: If4431f50e67e18bcc42e00694c97805477bd6815
/frameworks/base/core/java/android/os/Debug.java
3a8ce1bec819c9b104880493a6862fd2a9546132 27-Apr-2013 Anwar Ghuloum <anwarg@google.com> More stats for meminfo

Added shared clean tracking (for pageable stuff). Renamed .oat and .art mmap.

(cherry picked from commit 967d53b17b6010c3a675ca9c3bbd0e9dd2f2f092)

Change-Id: I741e0dbe0d3f9aee6975c6fad8af9905942962d4
/frameworks/base/core/java/android/os/Debug.java
88887d0a53f866e61a7524b0edfc95e6dde57d72 19-Mar-2013 Anwar Ghuloum <anwarg@google.com> break out boot.art

breaking out boot.art mapped pages

(cherry picked from commit eaa3f2d59adaeb87cd8d1726b696521f984659c4)

Change-Id: Ie89477bd3a93a15de3a4db76ef5eae497c3087e3
/frameworks/base/core/java/android/os/Debug.java
8884ef4fe80505bc6e41c167b67efbb93e43475d 15-Mar-2013 Anwar Ghuloum <anwarg@google.com> Break out Oat footprint for ram

Breaking out oat footprint in meminfo.

(cherry picked from commit c92f177d96b5952e0bfde01597972fc607aed93a)

Change-Id: I7b0452045c265b7544c41d3a5953e10a081c5315
/frameworks/base/core/java/android/os/Debug.java
c2a3adbd56e763ef0ad045fd8c58a54e41d1639d 19-Apr-2013 Ian Rogers <irogers@google.com> Adding matching @deprecated.

Bug: 8657266
Change-Id: Idbd22dc647f11441d15da12eb23723539768cf4c
/frameworks/base/core/java/android/os/Debug.java
7c9f30bfb361ccb864e6d130e0f4f2af53fc1c32 27-Feb-2013 Ian Rogers <irogers@google.com> Track stack memory in MemoryInfo.

In /proc/pid/maps the main stack is identified as "[stack]". In Linux 3.4
thread stacks are identified as "[stack:<tid>]" where <tid> is the thread ID of
the thread using that stack. Add support in MemInfo's otherStats to track
memory being used by the stack.

Add sanity check on the length of the otherStats array.
Add detail messages to two null pointer exceptions.

Bug: 8265251

Change-Id: I2b228b147da9bdc5c7a4d825dfc628fcc7923927
/frameworks/base/core/java/android/os/Debug.java
fe067a4cc586631881f51d0fd48100dd0f7cadf2 23-Feb-2013 Ian Rogers <irogers@google.com> Deprecate and document memory allocation counting.

Bug: 8241521
Change-Id: I174c4024600c5b78e74030ecc99e784a98295f09
/frameworks/base/core/java/android/os/Debug.java
ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52 30-Oct-2012 Dianne Hackborn <hackbod@google.com> Work on issue #7343200: Fails to show wallpaper in the background...

...for lockscreen sometimes and remains black / blank

Add some debug output to try to track down what is going on.

Change-Id: I98a96c5da9c04b988e948f6fc2766d927db49ebf
/frameworks/base/core/java/android/os/Debug.java
b049e212ab7fe8967893c202efcb30fecfdb82fb 08-Sep-2012 Jeff Sharkey <jsharkey@android.com> Include user identifier in external storage paths.

When building external storage paths, always include user in path
to enable cross-user paths and aid debugging.

Each Zygote process continues to only have access to the appropriate
user-specific emulated storage through bind mounts. A second set of
mounts continue supporting legacy /sdcard-style paths. For example,
a process running as owner has these mount points:

/storage/emulated_legacy
/storage/emulated_legacy/Android/obb
/storage/emulated/0
/storage/emulated/obb

Since Environment is created before Zygote forks, we need to update
its internal paths after each process launches.

Bug: 7131382
Change-Id: I6f8c6971f2a8edfb415c14cb4ed05ff97e587a21
/frameworks/base/core/java/android/os/Debug.java
f72467ad9843bf5d4b75fb308386e77ebb5c3447 09-Jun-2012 Dianne Hackborn <hackbod@google.com> Include important native processes in watchdog stacks.

Helps us track down deadlocks involving native service processes.

Bug: 6615693
Change-Id: I580047550772e29586195a8cf440141574e3f40c
/frameworks/base/core/java/android/os/Debug.java
a51a9564fd53b661446cd63eea23208656acc678 18-Apr-2012 Craig Mautner <cmautner@google.com> Add call-stack reporting methods into Debug

Added two public methods to Debug. These methods return a String
indicating the caller (getCaller()) or callers (getCallers(int depth))
of the calling method. The String indicates the class, method and line
number of the caller(s). Similar to using Throwable.fillInStackTrace()
but much more concise.

Change-Id: I53d0085aa50e4501d28e8eb3ad5b91ef700ac218
/frameworks/base/core/java/android/os/Debug.java
b437e090ec03a2bab10bdfcb9484577a7f34e157 06-Aug-2011 Dianne Hackborn <hackbod@google.com> Improved memory use reporting.

Change-Id: I38e53e6228bba92a142bafeedb5af8df4e4e5724
/frameworks/base/core/java/android/os/Debug.java
0e3328fbdd3845b0e2bec364e951498eaee6b079 17-Jul-2011 Dianne Hackborn <hackbod@google.com> Rework and fix "adb shell dumpsys meminfo"

We now collect more detailed information splitting the maps into
additional useful categories.

Fixed some bugs in account, such as not correctly handling all of
the current dalvik allocations.

The activity manager now prints a final summary of all pss organized
by the apps and the categories.

Change-Id: Iafc5f27c998095812b1483c6803b8e0f0587aeae
/frameworks/base/core/java/android/os/Debug.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/os/Debug.java
7e942848ace2e1f81345d4397679d65a048fe828 13-Jan-2011 Carl Shapiro <cshapiro@google.com> Note the release in which functionality was deprecated.

Change-Id: Ia0f361986e4232869f7d4123f75081100241638e
/frameworks/base/core/java/android/os/Debug.java
1107383e029e30bb18c77ca887db2af067a79154 13-Jan-2011 Carl Shapiro <cshapiro@google.com> Deprecate the allocation limit interfaces.

Allocation limits relied on conditionally compiled code in the virtual
machine that was disabled in released versions of Android. As such,
these setter methods were glorified no-ops. Now that the feature has
been removed from the allocator this interface is thoroughly obsolete.

Change-Id: Id7f9de37ecfece4b909e35f110e118e131457133
/frameworks/base/core/java/android/os/Debug.java
b596198d8d588a113e7e1b204ab09f46a02822c6 23-Dec-2010 Carl Shapiro <cshapiro@google.com> Remove functionality related to external allocation tracking.

The android.os.Debug class exposed two interfaces related to external
allocation. The first interface provided a counter of global external
allocation events. This change makes the global counter getters
constantly return 0 and stubs out the counter setters. The second
interface attempted to provide a counter of per-thread external
allocation events. That interface was never implemented. This change
makes the per-thread counter getters constantly return -1 and stubs
out the setters.

Change-Id: I240fe9bf05297a83607a4350d40d20581e2a9e2f
/frameworks/base/core/java/android/os/Debug.java
b96f58911e412fdb0ebdd2bda7dbe89a0829b5db 03-Dec-2010 Dan Bornstein <danfuzz@android.com> Propagate the concept of "packed opcode" values.

Dalvik now exposes a distinction between "packed" and regular opcode
values. The packed values are more densely defined in the range 0-0x1ff,
whereas the regular values are sparsely defined across the range 0-0xffff.

The only current use for packed values at this level is in opcode
usage reporting, but their use may expand over time.

Change-Id: Ie783b90cb2dcb9df8f3eb19a7c708a53906fdbe4
/frameworks/base/core/java/android/os/Debug.java
1d99b06ccf48891fbb47947d31f6fbb29c815713 30-Nov-2010 Dan Bornstein <danfuzz@android.com> Get rid of vm-internal constants.

This change makes Debug use less vm-implementation-specific code to
ask which opcodes represent method invocations.
/frameworks/base/core/java/android/os/Debug.java
9f3155418d0a504e45bc8c0ce47e11c8689ab36c 20-Nov-2010 Dan Bornstein <danfuzz@android.com> Dalvik opcode-related fixes.

This makes Debug not hard code the number of opcodes and includes an
api-update of other opcode-related changes done in dalvik.system.

Change-Id: I70d22e1c710f224d75a22e319916724aea53f78d
/frameworks/base/core/java/android/os/Debug.java
7495cfadd2d4680b60575fd962b075c0703b9cc8 01-Dec-2010 Brian Carlstrom <bdc@google.com> Tracking merge of dalvik-dev to master

Change-Id: I2f847003761d1300aca65c9471ed168bad82ffe0
/frameworks/base/core/java/android/os/Debug.java
2970c499388b4dcd1232cd622a9b80b395eeb2b4 09-Nov-2010 Chet Haase <chet@google.com> various fixes for animations and javadocs

Issues around threading of animations and AnimatorSet bugs are
fixed in this change. Unrelated fixes to javadocs in other
framework classes are also part of the change.

Change-Id: I35f7e03ffdec9143bc2eb155e8f9384798ad35b3
/frameworks/base/core/java/android/os/Debug.java
c21550a8d1dfc9e5359fe994cb48049a0bd4c82c 06-Oct-2010 Brian Carlstrom <bdc@google.com> Adding android.os.Debug.countInstancesOfClass

- Debug.countInstancesOfClass is just a wrapper on
dalvik.system.VMDebug.countInstancesOfClass to avoid code from
depending on the dalvik classes directly

- Existing usages of VMDebug.countInstancesOfClass in ActivityThread
and ViewDebug are converted to the new Debug.countInstancesOfClass

- Existing use of OpenSSLSocketImpl.instanceCount, which is being
removed, is converted to Debug.countInstancesOfClass(OpenSSLSocketImpl.class)

Bug: 3015791
Change-Id: Iefa781292d5b82a63bad7254c913a09deb3b7888
/frameworks/base/core/java/android/os/Debug.java
99a518ffabacb10171621d0293bf982b85505e66 20-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of ca48433a to master

Change-Id: I0dd2dee65ff72b7eae20019c6232b66388fe7990
798e2d3d0c80e269ead1489dbc3f2f762f1e52b5 17-Jun-2010 Christian Mehlmauer <FireFart@gmail.com> Replaced /sdcard with Environment.getExternalStorageDirectory()

Change-Id: Id789f44a8569e307b1b7ab15eb266c9ce7ef2029
/frameworks/base/core/java/android/os/Debug.java
06a6b558bd03d8f0fed8f94f1dcfc03c5a51bd1c 14-Jul-2010 Andy McFadden <fadden@android.com> Implement native dump for "am dumpheap -n".

This adds the ability to generate a trivial heap dump on demand. If
the appropriate system properties aren't set, the output file will
instead contain instructions for enabling them.

The data returned by get_malloc_leak_info() is processed and written
to the specified file. The output looks something like:

Android Native Heap Dump v1.0

Total memory: 2981301
Allocation records: 2152

z 1 sz 65557 num 1 bt 8010dd78 afd12618 ...
z 1 sz 52008 num 3 bt 8010dd78 afd12618 ...
z 1 sz 24428 num 1 bt 8010dd78 8010de84 ...
...2149 more...
END

(the "..." is actually the remaining entries in the stack backtrace;
I truncated it here)

"z" indicates whether the allocation was made pre- or post-zygote,
"sz" is the size allocated, and "num" is the number of allocations
made of that size with the specified backtrace.

Change-Id: I2d60f07444fce5f7178b3f51c928c8faa0b051bd
/frameworks/base/core/java/android/os/Debug.java
824c510752fd6a30cdba5ed7324cb80a5043ce26 10-Jul-2010 Andy McFadden <fadden@android.com> Allow "am" to initiate heap dumps.

This was mostly cloned from the "am profile" implementation. It's
intended to replace the old "kill -10" approach used by "runhat".

We could really use a native heap dump, so I pass a "managed"
flag through that indicates whether we want to dump the native or
managed heap. We don't currently have a native heap dump-to-file
function, so it currently just logs a warning.

(android.ddm.DdmHandleNativeHeap.getLeakInfo is a good start -- it
copies /proc/maps and then calls get_malloc_leak_info to get some
goodies. Needs some formatting to make it human-readable. I didn't
want to cram all that into this change.)

It would be useful if "am" didn't exit until the heap dump operation
completed, but I'm not sure how to do that.

Bug 2759474.

Change-Id: I46bc98067738d8c72ac0fc10002ca67bb4929271
/frameworks/base/core/java/android/os/Debug.java
3eda9799a162765dd49f481cc303fc5702a9c5fe 05-Mar-2010 Dan Egnor <egnor@google.com> Add Debug.dumpService(), a public method for "dumpsys" functionality
/frameworks/base/core/java/android/os/Debug.java
c4e1bf7282d454ba3e9ba16cde5b660d79dd5345 23-Feb-2010 Andy McFadden <fadden@android.com> Add class init stats to alloc counters (API change).

Add calls to retrieve class initialization stats via the allocation
count mechanism.

For bug 2461549.
/frameworks/base/core/java/android/os/Debug.java
07a9661f31797a68b8ecd3f135fe1417f214663b 29-Jan-2010 Andy McFadden <fadden@android.com> Added dumpHprofDataDdms() call.

This adds a hidden dumpHprofDataDdms() method, which initiates an hprof
dump that sends its data directly to DDMS.
/frameworks/base/core/java/android/os/Debug.java
72a20db0c71c6bddaa9fd2e4046242fc9d540e1c 22-Jan-2010 Andy McFadden <fadden@android.com> Add streaming method profiling support.

This adds a new (hidden) startMethodTracingDdms call. It's like the
normal method tracing calls, but you don't specify an output file.
Instead, when tracing stops, the data is sent directly to DDMS.

This also adds handlers for the MPSS/MPSE requests that DDMS sends.
/frameworks/base/core/java/android/os/Debug.java
e577232406649450a513140bf09cb3fc8c3fe046 22-Jan-2010 Andy McFadden <fadden@android.com> Move VM feature strings (used by DDMS) into VM.

Until now, we used a place-holder in frameworks/base.

Disable a test that shouldn't have been on.
/frameworks/base/core/java/android/os/Debug.java
bfd6d481fa6a7217cafa6d7760674ec927500b5a 23-Oct-2009 Andy McFadden <fadden@android.com> Add a reference table dump call.

This is just an android.os.Debug method that calls into the VM.

Bug 2075355
/frameworks/base/core/java/android/os/Debug.java
4f21c4cf077cfee5b35a56703618115614bc40f2 17-Sep-2009 Dianne Hackborn <hackbod@google.com> Add API to retrieve memory used by running processes.

Change-Id: I9c1935c2ef3c78bd67ec4dfd811a1caaab4514c3
/frameworks/base/core/java/android/os/Debug.java
3025ef332c29e255388f74b2afefe05f64bce07c 01-Sep-2009 Dianne Hackborn <hackbod@google.com> Various infrastructure to support a running services UI.

Some of this is temporary (in particular the two approaches for getting
process memory, one working but horrible, the other not working but
preferred) until I figure out the best way to do it.

Change-Id: I8c8f25062d481fcea22a47d459b083d2fd8a5040
/frameworks/base/core/java/android/os/Debug.java
afed82bca9e173cabe2c2f25314b202e5c1ccbca 25-Jun-2009 Dianne Hackborn <hackbod@google.com> am 9c8dd55a: Fix bug 1829561 ("am profile" with bad filename kills process).

Merge commit '9c8dd55a9d829c29a3feee9469d8c2f27a9f5516'

* commit '9c8dd55a9d829c29a3feee9469d8c2f27a9f5516':
Fix bug 1829561 ("am profile" with bad filename kills process).
9c8dd55a9d829c29a3feee9469d8c2f27a9f5516 24-Jun-2009 Dianne Hackborn <hackbod@google.com> Fix bug 1829561 ("am profile" with bad filename kills process).

The am command is now the one that takes care of opening the target file,
handling the opened file descriptor to the process that will be profiled.
This allows you to send profile data to anywhere the shell can access, and
avoids any problems coming up from the target process trying to open the
file.
/frameworks/base/core/java/android/os/Debug.java
a9e0bdbbd06c90c8f79ef6d59afedc1401c4926f 14-May-2009 Romain Guy <romainguy@android.com> am d4103d0d: Fix the build

Merge commit 'd4103d0d143f3774a2fc9e35afb0fffc2160d7fc'

* commit 'd4103d0d143f3774a2fc9e35afb0fffc2160d7fc':
Fix the build
a64b860749ad7e5f9e887013d87b56b928c5d405 14-May-2009 Android (Google) Code Review <android-gerrit@google.com> am aa642c0c: Merge changes 1591,1596 into donut

Merge commit 'aa642c0cc20293137376d44f8221876c121e5be9'

* commit 'aa642c0cc20293137376d44f8221876c121e5be9':
Get the backup calling through to the file backup helper.
Fix typos.
Add a new feature to android.os.Debug to add the ability to inject only specific fields when calling setFieldsOn().
Fixes #1836075. Adds consistency checks for the View hierarchy. To enable them, you need a debug build and ViewDebug.sConsistencyCheckEnabled set to true in debug.prop. This change also lets you easily enable drawing and layout profiling in ViewRoot by setting ViewRoot.sProfileDrawing, ViewRoot.sProfileLayout and ViewRoot.sShowFps in debug.prop with a debug build.
Add Intent.ACTION_APP_ERROR
d4103d0d143f3774a2fc9e35afb0fffc2160d7fc 14-May-2009 Romain Guy <romainguy@android.com> Fix the build
/frameworks/base/core/java/android/os/Debug.java
c4b11a79fb164310af03c1190622fe52e3695d2b 14-May-2009 Romain Guy <romainguy@android.com> Add a new feature to android.os.Debug to add the ability to inject only specific fields when calling setFieldsOn().
/frameworks/base/core/java/android/os/Debug.java
d52d8dee7768e04b936b8df86028823bdc5b1dc6 05-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 2c9eec6: Merge change 952 into donut

Merge commit '2c9eec6b1d072a665b17dd4285260aa4d4fadcf4'

* commit '2c9eec6b1d072a665b17dd4285260aa4d4fadcf4':
Debug: Minor cleanup
e9bfd9b873fcce4fad31c99f51a14449ee074c6b 04-May-2009 Dave Bort <dbort@android.com> Debug: Minor cleanup

Address crazybob's comments.

Avoid referring to a static in one of the helper methods.
/frameworks/base/core/java/android/os/Debug.java
c34c8c6fa1164576cfbe5db5fce9fda458aae18e 04-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 7ff9436: Merge change 911 into donut

Merge commit '7ff943673e48a912eb7cc5add08e206c2c25d68e'

* commit '7ff943673e48a912eb7cc5add08e206c2c25d68e':
Debug: Add setPropertiesOn(), and @hide it for now
1ce5bd34632e91a928aa12a30b1c160a35db033b 23-Apr-2009 Dave Bort <dbort@android.com> Debug: Add setPropertiesOn(), and @hide it for now

This lets a caller reflectively set the static fields of a class
based on debug build properties.

Signed-off-by: Dave Bort <dbort@android.com>
/frameworks/base/core/java/android/os/Debug.java
599c918d9794b51992de85b42befa0c71d9ec07f 08-Apr-2009 Andy McFadden <> AI 144931: Added a (hidden) way to "pre-cache" register maps.
The 50 methods that appeared on the GC stacks of the most applications
require 13KB of native heap for their uncompressed register maps, and
the full set took 5ms to uncompress. Pre-computation doesn't represent
a significant improvement in space or time, at the cost of a big pile
of strings in ZygoteInit.
I'm leaving the method in ZygoteInit, but it's not called, and the
static final String[] of method descriptors is empty. We may want to
revisit this later.
BUG=1729570

Automated import of CL 144931
/frameworks/base/core/java/android/os/Debug.java
07970839eb39a1a18013c8bd15052b761736208e 25-Mar-2009 Andy McFadden <> Automated import from //branches/donutburger/...@140700,140700
/frameworks/base/core/java/android/os/Debug.java
7b0b1ed979aa665175bf3952c8902ce13c763ab8 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
/frameworks/base/core/java/android/os/Debug.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Debug.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Debug.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/os/Debug.java
9266c558bf1d21ff647525ff99f7dadbca417309 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
/frameworks/base/core/java/android/os/Debug.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/os/Debug.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Debug.java