| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use dvmIsHeapPointer outside the GC. (This still isn't safe because there's
no synchronization when dealing with the HeapSource.)
Bug: 5049447
Change-Id: Ie0b325ef0a92687ea1eaf1491a4bb832298893c5
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Bug: 4984352
When applied system-wide, trimming the heap can help recover
multiple megabytes worth of pages that are no longer used.
This is especially useful for applications that periodically
allocate large objects during initialization that they then
discard when running in the background.
Change-Id: Iafffd65a70ae62022f0c74f836a84a7afbe23c3c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to distinguish between "cleared weak global" and "deleted weak global".
Previously we used NULL for both. Now we add a magic value for cleared weak
globals. I've also switched the GC over to using iterators, so IndirectRefTable
itself becomes responsible for not showing bad pointers to the GC.
I've also improved the reference table dumping to cope with the new scheme and
to be a bit easier to read (through extra indentation).
Bug: 4260055
Change-Id: I26af301fb2b46d014c6f6b0915a8f8a7fb6d7c5b
|
|
|
|
| |
Change-Id: I291fd42e91085c51772f560d424334874bef8add
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The main purpose here was to have slightly less unclear warnings for
JNI local reference abuse.
Change-Id: I2c6378dd0a94d8afb96a8e409f7460205e3cd315
|
|\ \
| |/
|/|
| |
| | |
* commit '0c632a8484839ceeffc6fdf04c310c02c7531530':
Add isDebuggerActive API for the finalizer watchdog.
|
| |
| |
| |
| |
| | |
Change-Id: Ib0afcd15327c0a3dd8c565036a8f010e318adc9e
http://b/4144865
|
| |
| |
| |
| |
| |
| |
| | |
These aren't necessarily good abstractions, but they're no worse than what
we had, and having them factored out is a step in the right direction.
Change-Id: I5b839608317d2ca1ca54d8a38624fb686f2c37de
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An leading underscore followed by a capital letter is a reserved
name space in C and C++.
This change also moves any #include directives within the include
guard in some of the compiler/codegen/arm header files.
Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
|
|\ \
| | |
| | |
| | | |
into dalvik-dev
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, clearing the growth limit only updated the maximumSize of
the unlimited heap without updating the limit value. This caused any
operations iterated over the extent of the heap to ignore allocations
beyond the original heap size. With this change the limit is always
kept in agreement with the maximumSize.
Bug: 4539441
Change-Id: I08c8004e724549d196e1fd5d6ad22efc85b0c8d2
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible to cause a recursive garbage collection by writing a
program that triggers a concurrent garbage collection and initiates a
concurrent garbage collection before the garbage collection thread is
scheduled. For example
for (;;) { new byte[16 << 20]; System.gc(); }
When this condition occurs a warning is logged although such warnings
ought to be upgraded to fatal errors. With this change, when the
garbage collection thread is scheduled it first checks to see if there
is a running collection before calling down to start the collection.
Change-Id: Ia7baf5eba245bbf3fe053d3bad3f90876cad2459
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I615dbff3e81a1128dc3ba43d6d426c370ae3abcf
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several tricks are used to adjust the base of the card table to save
instructions in the write barrier. This change corrects two
situtations where the card table did not properly account for the
effects of these tricks.
First, the card table is over allocated to ensure that the start
address can be magically aligned. When releasing the allocation these
additional bytes were not supplied to munmap creating a potential
leak.
Second, the valid card check did not use the right base address for a
containment check. The check used the allocation base which is may be
lower than the actual starting address. This would cause valid cards
at the high end of the heap to be considered invalid and invalid cards
at the low end of the heap to be considered valid.
Change-Id: I83bf4167b7c081c8626b6ff504342f42d0e776a2
|
|
|
|
|
|
|
| |
This changes all the places I could find where the log string was on the
line after its LOG call.
Change-Id: Iac6a9fcc64f46631fb093824ab60237dce1a5241
|
|
|
|
|
|
| |
Friends don't let friends end LOG() strings with newlines.
Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
|
|
|
|
|
|
|
|
|
|
|
| |
This routine served answering questions about object addresses. While
it was private to the garbage collector, its remaining use was inside
the heap profiler. Within the heap profiler, a single path was
executed to tested a pointer for containment within the zygote. In
its place, a new function, dvmIsZygoteObject, has been added to the GC
interface superseding the only use of dvmHeapSourceGetPtrFlag.
Change-Id: I347c9adb293bd6c196bbac3765015453133dc492
|
|
|
|
| |
Change-Id: Id0a9c4f8ee073e8260571a0f48605ae1f9b04219
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Combine definitions with initialization. This had to be foregone in
two instances where that would have otherwise caused an unused variable
warning.
* Move the HS_BOILERPLATE macro to the top of the calling function. This
macro checks that certain globals are initialized. It should be removed
after the callers become members functions of a class.
* A few cases of inconsistent function declaration styles have been brought
in line with the rest of the file. These were overlooked in a previous
clean-up.
* The unused heap source debugging macros and tracing code have been
removed.
* One stale comments has been removed and another has been updated.
Change-Id: I20bf4b78161096310b79d7dd294d7636e6bb6f48
|
|
|
|
| |
Change-Id: Iae4e3d22bc185060b3a0b4c080eafaa2ec824ac2
|
|
|
|
| |
Change-Id: I3192d957ebace59a3b8f8330591f05d403280d1f
|
|
|
|
| |
Change-Id: Id349b359489bb6b1bbb4ab78d29d85c0e6b33799
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present objects referenced from dex files must have stable reference
values. With this change, only non-moving strings are interned. If a
user interns a movable string a non-moving copy is made and the copy is
added to the intern table.
As part of this change, the internal string hash code access routine will
update the hash code slot of a string object. In addition, StringObject
has been made a subclass of Object eliminating various down-casts that
would otherwise be explicitly required.
Change-Id: I6b015b972aac44948470c0034ad17e5eef456aeb
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I977ee5045010a846098944d3e8048893ac550533
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
At present, class objects, non-moving arrays, and interned strings have
location dependencies in native code. Allocating non-moving is a no-op
for the present heap, but this option will have an effect after the
copying collector is integrated.
Change-Id: I674f83a086ac65db303baab0599831f80f52a4a5
|
|/
|
|
| |
Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
|
|
|
|
|
|
|
|
| |
This change pulls a few enumeration types to the top of their header
file alongside other types. It also eliminates the use of the now
redundant enum qualifier.
Change-Id: I6f853bed09176cde9a83faccea7a76f595f60f2b
|
|
|
|
|
|
|
|
| |
Some interfaces in Alloc.h had to be left with C linkage as they are
referenced by the interpreter assembler code. That dependency will be
addressed in a future commit.
Change-Id: I6b2097a2139ddf6b4b13e592710e241442e08488
|
|
|
|
|
|
|
| |
We ended up with two locations in the Thread structure for saved
Dalvik frame pointer. This change consolidates them.
Change-Id: I78f288e4e57e232f29663be930101e775bfe370f
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original implementation for thin locks used a magic non-zero value
to encode the initial thin lock state. This magic value was kept
around in DVM_LOCK_INITIAL_THIN_VALUE and stored into the lock word of
newly allocated objects. A later revision to the thin locking code
made the initial thin lock value be 0. That change eliminated the
requirement that lock words be explicitly initialized as the allocator
always returns zero-filled memory.
Change-Id: I34e0b43b4c4db0f45cf7cf524e15d4a6096c1365
|
|
|
|
| |
Change-Id: Ica749f6defa890363ec531b29e25bc415dc2cbb9
|
|
|
|
| |
Change-Id: Icf4c9b22c0f11159efb7cb43ab1158cc4f10c82f
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag is only turned on for the unique class Class, and it is
meant to make it possible to quickly test objects for "classiness" as
well as trivially figure out if one is looking at the class Class
itself.
Bonus: Made a few places that directly set class->accessFlags use
the prescribed macro for doing same.
Change-Id: I89fce708c407b597f28ce610b778123f5dcaecf6
|
|
|
|
| |
Change-Id: Ibdc37f3d7eb6385da1059d5525727b090626ec4c
|
|
|
|
|
|
|
|
|
|
| |
Previously, we were using a non-standard C dialect which did not permit
the nicer variable scoping in loops. Now that we are using C++ in the
collector we can guarantee that feature is available. This change also
rearranges some of the surrounding code to take advantage of the more
flexible scoping rules.
Change-Id: I9be35794cc12bcbc0d5299fe387d4bc406481075
|
|
|
|
| |
Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
|
|
|
|
| |
Change-Id: If3177d924193cd665f12758ce83f3be4cc5a66c8
|
|
|
|
| |
Change-Id: I8696fb2f6d408049ec39609db34238edee171f79
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the garbage collector would pass each cleared reference to
the heap worker thread for queuing. The heap worker thread would then
perform a callback into managed code for each cleared reference which
assigned the reference to its reference queue.
With this change, the garbage collector instead links together all of
the cleared references and calls back into managed code exactly once
to hand off the references for processing. This change makes the heap
worker thread and its data structures obsolete.
Change-Id: I28e02638f0877a7fd2ac96b9c3f5597a38541ebb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Based on discussion yesterday, the code in Copying.c was already
superfluous. I'm leaving dvmForEachRequiredReference(), except with a
note, just in case it ends up being needed. If by the time I'm done
with the next round of VM changes, it turns out not to be needed, then
I'll just go ahead and axe it.
Change-Id: Ib7cf06ba75851c7ffd98108c4c73cddee9259ddf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a restructuring of the Dalvik ARM and x86 interpreters:
o Combine the old portstd and portdbg interpreters into a single
portable interpreter.
o Add debug/profiling support to the fast (mterp) interpreters.
o Delete old mechansim of switching between interpreters. Now, once
you choose an interpreter at startup, you stick with it.
o Allow JIT to co-exist with profiling & debugging (necessary for
first-class support of debugging with the JIT active).
o Adds single-step capability to the fast assembly interpreters without
slowing them down (and, in fact, measurably improves their performance).
o Remove old "polling for safe point" mechanism. Breakouts now achieved
via modifying base of interpreter handler table.
o Simplify interpeter control mechanism.
o Allow thread-granularity control for profiling & debugging
The primary motivation behind this change was to improve the responsiveness
of debugging and profiling and to make it easier to add new debugging and
profiling capabilities in the future. Instead of always bailing out to the
slow debug portable interpreter, we can now stay in the fast interpreter.
A nice side effect of the change is that the fast interpreters
got a healthy speed boost because we were able to replace the
polling safepoint check that involved a dozen or so instructions
with a single table-base reload. When combined with the two earlier CLs
related to this restructuring, we show a 5.6% performance improvement
using libdvm_interp.so on the Checkers benchmark relative to Honeycomb.
Change-Id: I8d37e866b3618def4e582fc73f1cf69ffe428f3c
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: I5d5130702e17bb95c835b9ccc3ec0aa86eda9dea
|
| |
| |
| |
| | |
Change-Id: Ic96f58baabdf0d1a694b51efc991de5caef66a38
|