History log of /art/runtime/base/scoped_arena_containers.h
Revision Date Author Comments
67bf42e89592c3a1c648f927f2ce3ccb189a1161 27-Feb-2018 David Sehr <sehr@google.com> Header library to remove dependence on runtime/

Add a new header library to remove libdexfile and others' dependence on
runtime (typically runtime/base) includes in libdexfile. Also a small step
to tease dexlayout and profman away from relying on these as well.

Bug: 22322814
Test: make -j 50 checkbuild
make -j 50 test-art-host-gtest

Change-Id: I38e2fe399a75f4bc6318c77a71954c00ea73ec2b
5573c37e795668eca81a8488078f798d977685c3 16-Nov-2017 Igor Murashkin <iam@google.com> cpplint: Remove many unnecessary NOLINT

Now that we updated to upstream cpplint, a lot of these NOLINTs are no
longer necessary.

Bug: 68951293
Change-Id: If8ed5ffe89727f313f907a214b6d8fd2a2eddbad
e764d2e50c544c2cb98ee61a15d613161ac6bd17 05-Oct-2017 Vladimir Marko <vmarko@google.com> Use ScopedArenaAllocator for register allocation.

Memory needed to compile the two most expensive methods for
aosp_angler-userdebug boot image:
BatteryStats.dumpCheckinLocked() : 25.1MiB -> 21.1MiB
BatteryStats.dumpLocked(): 49.6MiB -> 42.0MiB
This is because all the memory previously used by Scheduler
is reused by the register allocator; the register allocator
has a higher peak usage of the ArenaStack.

And continue the "arena"->"allocator" renaming.

Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 64312607
Change-Id: Idfd79a9901552b5147ec0bf591cb38120de86b01
ca6fff898afcb62491458ae8bcd428bfb3043da1 03-Oct-2017 Vladimir Marko <vmarko@google.com> ART: Use ScopedArenaAllocator for pass-local data.

Passes using local ArenaAllocator were hiding their memory
usage from the allocation counting, making it difficult to
track down where memory was used. Using ScopedArenaAllocator
reveals the memory usage.

This changes the HGraph constructor which requires a lot of
changes in tests. Refactor these tests to limit the amount
of work needed the next time we change that constructor.

Test: m test-art-host-gtest
Test: testrunner.py --host
Test: Build with kArenaAllocatorCountAllocations = true.
Bug: 64312607
Change-Id: I34939e4086b500d6e827ff3ef2211d1a421ac91a
8cf9cb386cd9286d67e879f1ee501ec00d72a4e1 19-Jul-2017 Andreas Gampe <agampe@google.com> ART: Include cleanup

Let clang-format reorder the header includes.

Derived with:

* .clang-format:
BasedOnStyle: Google
IncludeIsMainRegex: '(_test|-inl)?$'

* Steps:
find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup'
git-clang-format -style=file HEAD^
manual inspection
git commit -a --amend

Test: mmma art
Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
a5931185c97c7b17981a9fc5016834a0bdd9480b 02-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in art.

* Add explicit keyword to conversion constructors,
or NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I1e1ee2661812944904fedadeff97b620506db47d
8817760ca9f0590be373f5939cc86941e25d8f18 17-Feb-2016 Mathieu Chartier <mathieuc@google.com> Clean up register line

Fixed formatting and style. Also added proper null handling for arena
deleter.

Change-Id: I6a44cb29ca6ad17b35e18dc6be1d12416f211631
361e04aaa5d3eca9f978a802ee44b1213f31da58 16-Feb-2016 Mathieu Chartier <mathieuc@google.com> Add custom arena deleter for RegisterLine

Previously it protected by using sizeof(RegisterLine) but this was
not accurate due to register lines being variable sized.

Bug: 27156726
Change-Id: Ia4b134b85a2e61993d17bd4f0eff60c89c164dc3
784e790503380383326af4a749665a413016e729 24-Oct-2015 Andreas Gampe <agampe@google.com> ART: Support trivially-destructible arrays in ArenaUniquePtr

For trivially-destructible types of arrays, we do not have to call
the destructor on all elements. This is minimal support to tag
ownership of some arena-allocated arrays.

Change-Id: I45ec7ed6bab3842c9447d954e359cb8cf047aee6
7b05e17db15879b486f3299a9a41ac17b87700f4 16-Oct-2015 Mathieu Chartier <mathieuc@google.com> Add ArenaUniquePtr

Motivation is to use it for adding arenas in the verifier.
Also added arena tags to prevent double free errors.

Bug: 10921004
Change-Id: I545f3374eceb9a6a35e738cb899d1493098fb760
4b8f1ecd3aa5a29ec1463ff88fee9db365f257dc 26-Aug-2015 Roland Levillain <rpl@google.com> Use ATTRIBUTE_UNUSED more.

Use it in lieu of UNUSED(), which had some incorrect uses.

Change-Id: If247dce58b72056f6eea84968e7196f0b5bef4da
1f49764f7d62b2f80ce3418234a5036a59b2b762 05-Oct-2015 Vladimir Marko <vmarko@google.com> ART: Use arena allocator with HashSet/HashMap.

Allow passing ArenaAllocatorAdapter (or any other allocator)
to HashSet/HashMap and create appropriate Arena- aliases.
Use the ArenaHashMap in StackMapsStream.

Update arena allocator adapters' construct()/destroy() to
C++11 std::allocator<> API.

Change-Id: I18544f718f84c6d6580228dd35297daf7f6afb5e
ec7802a102d49ab5c17495118d4fe0bcc7287beb 01-Oct-2015 Vladimir Marko <vmarko@google.com> Add DCHECKs to ArenaVector and ScopedArenaVector.

Implement dchecked_vector<> template that DCHECK()s element
access and insert()/emplace()/erase() positions. Change the
ArenaVector<> and ScopedArenaVector<> aliases to use the new
template instead of std::vector<>. Remove DCHECK()s that
have now become unnecessary from the Optimizing compiler.

Change-Id: Ib8506bd30d223f68f52bd4476c76d9991acacadc
2a408a3bef330551818f9cec9a7c5aa7a3f1129e 18-Sep-2015 Vladimir Marko <vmarko@google.com> ART: Mark deallocated arena memory as inaccessible.

Mark arena and scoped arena memory freed by allocator
adapters as inaccessible. This can help catch accesses to
old storage of a container, for example the old data of an
ArenaVector<> that's been resized.

Together with debug-mode enforcement of destruction of all
scoped arena containers, this provides strong verification
of their memory usage. However, this does not apply to the
normal (non-scoped) arena memory held by arena containers
as they are typically not destroyed if they are themselves
located in the arena. ArenaBitVector memory, whether in
normal or scoped arena, isn't marked either.

Change-Id: I4d2a80fedf7ceb7d4ce24ee8e7bcd53513171388
3d21bdf8894e780d349c481e5c9e29fe1556051c 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997

(cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33)

Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d

Fix some ArtMethod related bugs

Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.

Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.

Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.

TODO: Fix JDWP tests.

Bug: 19264997

Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3

ART: Fix casts for 64-bit pointers on 32-bit compiler.

Bug: 19264997
Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457

Fix JDWP tests after ArtMethod change

Fixes Throwable::GetStackDepth for exception event detection after
internal stack trace representation change.

Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of
proxy method.

Bug: 19264997
Change-Id: I363e293796848c3ec491c963813f62d868da44d2

Fix accidental IMT and root marking regression

Was always using the conflict trampoline. Also included fix for
regression in GC time caused by extra roots. Most of the regression
was IMT.

Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to
detached thread.

EvaluateAndApplyChanges:
From ~2500 -> ~1980
GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots

Bug: 19264997
Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0

Fix bogus image test assert

Previously we were comparing the size of the non moving space to
size of the image file.

Now we properly compare the size of the image space against the size
of the image file.

Bug: 19264997
Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a

[MIPS64] Fix art_quick_invoke_stub argument offsets.

ArtMethod reference's size got bigger, so we need to move other args
and leave enough space for ArtMethod* and 'this' pointer.

This fixes mips64 boot.

Bug: 19264997
Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
e401d146407d61eeb99f8d6176b2ac13c4df1e33 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
c801f0d79b8c5bf28401a040356b59b2f41520f4 25-Feb-2015 Andreas Gampe <agampe@google.com> ART: Fix "unused parameters"

GCC 4.8 decides that parameters for functions implemented with
"= default" are unused. This currently only impacts x86, but remove
the parameter names anyways.

Change-Id: I01865faa81af68c4c0e0b1cb1fb19e88ef548769
b666f4805c8ae707ea6fd7f6c7f375e0b000dba8 18-Feb-2015 Mathieu Chartier <mathieuc@google.com> Move arenas into runtime

Moved arena pool into the runtime.

Motivation:
Allow GC to use arena allocators, recycle arena pool for linear alloc.

Bug: 19264997
Change-Id: I8ddbb6d55ee923a980b28fb656c758c5d7697c2f