History log of /art/imgdiag/imgdiag.cc
Revision Date Author Comments
1398cf23ab47d250ea3eea39812e29a748b70777 08-Apr-2016 Mathieu Chartier <mathieuc@google.com> Add imgdiag support for diff against zygote

Adds option --zygote-diff-pid. If this option is passed in then it
tries to differentiate objects that are private dirty by comparing
them against the zygote image contents if they are different from
the boot image contents.

Bug: 27906566

Change-Id: I6d214f73af5bf6de1f1a07f309065fc455cf7543
2ba04eab7d9d121515d66faee3b99e919f8a68f5 09-Apr-2016 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Reduce dirty image pages by improving binning""

This reverts commit 8ace610a222892f7b700e4f95e50fa6315ab85c0.

(cherry picked from commit 80c563ba136fd8da8791cf0f1a5f8f7026816ead)

Change-Id: I5b312f41d8b96eb189ea8b9d3a3ab861c5c9d515
d464fa12eda46d6271f488c09ecffb6380c77c54 09-Apr-2016 Mathieu Chartier <mathieuc@google.com> Revert "Reduce dirty image pages by improving binning"

This reverts commit 794bff5f622c79fd7bd9899e700cf052a375c675.

(cherry picked from commit 8ace610a222892f7b700e4f95e50fa6315ab85c0)

Change-Id: Id53d64a04aa8766a2cb283a2f7b8354590213b13
f3cee191b3e7de48ac70907f11e78af8c2c9545b 07-Apr-2016 Mathieu Chartier <mathieuc@google.com> Reduce dirty image pages by improving binning

Change ordering from dirty to less dirty since ArtFields are clean
and they are last. Add separate binning for DexCache and instances
of java lang object (probably a lock object).

Business card .art RAM (on shamu):
PSS Private Dirty
.art mmap 1011 600
.art mmap 990 560

Bug: 27906566

(cherry picked from commit 794bff5f622c79fd7bd9899e700cf052a375c675)

Change-Id: I31c9ff41c3d713fc3b14573c2b731325ac6f366f
80c563ba136fd8da8791cf0f1a5f8f7026816ead 09-Apr-2016 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Reduce dirty image pages by improving binning""

This reverts commit 8ace610a222892f7b700e4f95e50fa6315ab85c0.
8ace610a222892f7b700e4f95e50fa6315ab85c0 09-Apr-2016 Mathieu Chartier <mathieuc@google.com> Revert "Reduce dirty image pages by improving binning"

This reverts commit 794bff5f622c79fd7bd9899e700cf052a375c675.
794bff5f622c79fd7bd9899e700cf052a375c675 07-Apr-2016 Mathieu Chartier <mathieuc@google.com> Reduce dirty image pages by improving binning

Change ordering from dirty to less dirty since ArtFields are clean
and they are last. Add separate binning for DexCache and instances
of java lang object (probably a lock object).

Business card .art RAM (on shamu):
PSS Private Dirty
.art mmap 1011 600
.art mmap 990 560

Bug: 27906566

Change-Id: Ib3116953df7adafdc1560b064365c8b56e71483e
7ad71d06a87db9336cc90f8a2d9d77d29452a434 04-Apr-2016 Andreas Gampe <agampe@google.com> ART: Refactor imgdiag internals

Use a struct to collect class data. This ensures a smaller frame
size.

Change-Id: If100b30779247a37449f284bf8b9b0e93c0d5e47
9d07e3d128ccfa0ef7670feadd424a825e447d1d 31-Mar-2016 Vladimir Marko <vmarko@google.com> Clean up OatQuickMethodHeader after Quick removal.

This reduces the size of the pre-header by 8 bytes, reducing
oat file size and mmapped .text section size. The memory
needed to store a CompiledMethod by dex2oat is also reduced,
for 32-bit dex2oat by 8B and for 64-bit dex2oat by 16B. The
aosp_flounder-userdebug 32-bit and 64-bit boot.oat are each
about 1.1MiB smaller.

Disable the broken StubTest.IMT, b/27991555 .

Change-Id: I05fe45c28c8ffb7a0fa8b1117b969786748b1039
cb044bc5732d3ac44d22ebab01502fa303731aeb 01-Apr-2016 Mathieu Chartier <mathieuc@google.com> Dump different fields in imgdiag

Dump which fields are different, also print field values.

(cherry picked from commit ec1533880f3606546baceafe2db513d1a63c20da)

Change-Id: Ie91ea07fb8ff7822fb7a03227cd7139e5e54db0e
ec1533880f3606546baceafe2db513d1a63c20da 01-Apr-2016 Mathieu Chartier <mathieuc@google.com> Dump different fields in imgdiag

Dump which fields are different, also print field values.

Bug: 27906566
Change-Id: Ia7b49981b59ccf058f098edcff4c39c10448b89e
8994a04162a92759f8ec531d18ee8901145dfda0 30-Dec-2015 Andreas Gampe <agampe@google.com> Revert "Revert "ART: Fix up some multi-image cases""

This reverts commit de38b797c3e5ba3ee44c480db7093386975c51eb.

Fix up imgdiag for std::string and multi-image.

Bug: 26317072
Bug: 26320300

Change-Id: I94ce9528e9fea6fb3231a70c32db02d567143db9
dcdc85bbd569f0ee66c331b4219c19304a616214 04-Dec-2015 Jeff Hao <jeffhao@google.com> Dex2oat support for multiple oat file and image file outputs.

Multiple changes to dex2oat and the runtime to support a --multi-image
option. This generates a separate oat file and image file output for
each dex file input.

Change-Id: Ie1d6f0b8afa8aed5790065b8c2eb177990c60129
073b16c8429d302d5413e8ffc488b03b8f770780 10-Nov-2015 Mathieu Chartier <mathieuc@google.com> Image space cleanup for app images

Removed Heap::GetImageSpace, added Heap::GetBootImageSpace.

Generalized some logic in the class linker for image spaces.

Bug: 22858531

Change-Id: Ib3e12bb061a247e232d3dc93b0d6b35eb3a34d25
90443477f9a0061581c420775ce3b7eeae7468bc 17-Jul-2015 Mathieu Chartier <mathieuc@google.com> Move to newer clang annotations

Also enable -Wthread-safety-negative.

Changes:
Switch to capabilities and negative capabilities.

Future work:
Use capabilities to implement uninterruptible annotations to work
with AssertNoThreadSuspension.

Bug: 20072211

Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
7bf2b4f1d08050f80782217febac55c8cfc5e4ef 08-Jul-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Revert "Remove interpreter entrypoint in ArtMethod.""

The start of the interned strings in the image was not aligned
properly, now that ArtMethods just need to be word aligned.

This reverts commit 7070ccd8b6439477eafeea7ed3736645d78e003f.

bug:22242193

Change-Id: I580c23310c33c239fe0e5d15c72f23a936f58ed1
7070ccd8b6439477eafeea7ed3736645d78e003f 08-Jul-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Remove interpreter entrypoint in ArtMethod."

Build failures on bots. Investigating.

This reverts commit fa2c054b28d4b540c1b3651401a7a091282a015f.

Change-Id: Id65b2009aa66cb291fb8c39758a58e0b0d22616c
fa2c054b28d4b540c1b3651401a7a091282a015f 01-Jul-2015 Nicolas Geoffray <ngeoffray@google.com> Remove interpreter entrypoint in ArtMethod.

Saves 4/8 bytes for each ArtMethod.

Change-Id: I110ecdddf8516b0759a31fa157609643e6d60b15
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
2cebb24bfc3247d3e9be138a3350106737455918 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Replace NULL with nullptr

Also fixed some lines that were too long, and a few other minor
details.

Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
c785344b87221f5e4e6473e5b762e4e61fe65dcf 27-Mar-2015 Mathieu Chartier <mathieuc@google.com> Move ArtField to native

Add linear alloc. Moved ArtField to be native object. Changed image
writer to put ArtFields after the mirror section.

Savings:
2MB on low ram devices
4MB on normal devices

Total PSS measurements before (normal N5, 95s after shell start):
Image size: 7729152 bytes
23112 kB: .NonMoving
23212 kB: .NonMoving
22868 kB: .NonMoving
23072 kB: .NonMoving
22836 kB: .NonMoving
19618 kB: .Zygote
19850 kB: .Zygote
19623 kB: .Zygote
19924 kB: .Zygote
19612 kB: .Zygote
Avg: 42745.4 kB

After:
Image size: 7462912 bytes
17440 kB: .NonMoving
16776 kB: .NonMoving
16804 kB: .NonMoving
17812 kB: .NonMoving
16820 kB: .NonMoving
18788 kB: .Zygote
18856 kB: .Zygote
19064 kB: .Zygote
18841 kB: .Zygote
18629 kB: .Zygote
3499 kB: .LinearAlloc
3408 kB: .LinearAlloc
3424 kB: .LinearAlloc
3600 kB: .LinearAlloc
3436 kB: .LinearAlloc
Avg: 39439.4 kB

No reflection performance changes.

Bug: 19264997
Bug: 17643507

Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
3774335b08076117d6950cd472cdd59a167470b5 13-Nov-2014 Igor Murashkin <iam@google.com> Add a new imgdiag tool to diff boot.art/core.art against a process

Analyze the dirty memory pages of a running process per-object,
this allows is to to fine-tune the dirty object binning algorithm in
image writer.

Also:
* Factor out oatdump command line parsing code into cmdline.h
* Factor out common build rules for building variations of binaries
* Add a gtest for imgdiag

Bug: 17611661
Change-Id: I3ac852a0d223af66f6d59ae5dbc3df101475e3d0