History log of /art/compiler/debug/elf_debug_writer.h
Revision Date Author Comments
c684f337eae6bd3d77fa44cb568d2bab113e4cee 19-Jan-2018 David Srbecky <dsrbecky@google.com> Refactor jit debugger interface and its ELF creation.

Make it possible to store more then one method per entry,
and ref-count the number of live methods per entry.

Test: m test-art-host-gtest
Change-Id: I45d69185e85e47fbee88a8d1f549ede9875a3c0a
32210b9f8c30e202e275764200315fe26f22f34c 04-Dec-2017 David Srbecky <dsrbecky@google.com> Generate debug symbols for interpreted methods.

Add .symtab symbols for method bytecodes in the dex section
(only if the full --generate-debug-info is enabled for now).

Test: m test-art-host-gtest
Test: testrunner.py -b --host --optimizing

Change-Id: Ie90034c921484bc4ff27c5458da78690b629dd0b
f4886df5e72fa21eddfc4cc7860f4154929b3380 11-Dec-2017 David Srbecky <dsrbecky@google.com> Add mini-debug-info generation mode for JIT.

This excludes everything that is not needed for backtraces and
compresses the resulting ELF file (wrapped in another ELF file).

This approximately halves the size of the debug data for JIT.
The vast majority of the data is the overhead of ELF header.
We could amortize this by storing more methods per ELF file.

It also adds NOBITS .text section to all debug ELF files,
as that seems necessary for gdb to find the symbols.
On the other hand, it removes .rodata from debug ELF files.

Test: Manually tested that gdb can use this data to unwind.
Test: m test-art-host-gtest
Test: testrunner.py --optimizing --host
Test: testrunner.py -t 137-cfi

Change-Id: Ic0a2dfa953cb79973a7b2ae99d32018599e61171
7452797678c4345d4a9e65b03e00af703c2c5fe0 29-Nov-2016 Vladimir Marko <vmarko@google.com> Refactor linker files from compiler/ to dex2oat/.

This shifts some code from the libart-compiler.so to dex2oat
and reduces memory needed for JIT. We also avoid loading the
libart-dexlayout.so for JIT but the memory savings are
minimal (one shared clean page, two shared dirty pages and
some per-app kernel mmap data) as the code has never been
needed in memory by JIT.

aosp_angler-userdebug file sizes (stripped):
lib64/libart-compiler.so: 2989112 -> 2671888 (-310KiB)
lib/libart-compiler.so: 2160816 -> 1939276 (-216KiB)
bin/dex2oat: 141868 -> 368808 (+222KiB)
LOAD/executable elf mapping sizes:
lib64/libart-compiler.so: 2866308 -> 2555500 (-304KiB)
lib/libart-compiler.so: 2050960 -> 1834836 (-211KiB)
bin/dex2oat: 129316 -> 345916 (+212KiB)

Test: m test-art-host-gtest
Test: testrunner.py --host
Test: cd art/; mma; cd -
Change-Id: If62f02847a6cbb208eaf7e1f3e91af4663fa4a5f
1b404a8b34f6fa80342955cb0a61673503328b51 01-Sep-2017 Vladimir Marko <vmarko@google.com> Add debug info for link-time generated thunks.

Add debug info for method call thunks (currently unused) and
Baker read barrier thunks. Refactor debug info generation
for trampolines and record their sizes; change their names
to start with upper-case letters, so that they can be easily
generated as `#fn_name`.

This improved debug info must be generated by `dex2oat -g`,
the debug info generated by `oatdump --symbolize` remains
the same as before, except for the renamed trampolines and
an adjustment for "code delta", i.e. the Thumb mode bit.

Cortex-A53 erratum 843419 workaround thunks are not covered
by this CL.

Test: Manual; run-test --gdb -Xcompiler-option -g 160, pull
symbols for gdbclient, break in the introspection
entrypoint, check that gdb knows the new symbols
(and disassembles them) and `backtrace` works when
setting $pc to an address in the thunk.
Bug: 36141117
Change-Id: Id224b72cfa7a0628799c7db65e66e24c8517aabf
deae7db5864fa50c5a1cd6c232a17aeb986b36e1 30-May-2017 Andreas Gampe <agampe@google.com> ART: Add missing namespace comments

Add closing namespace comments.

Bug: 32619234
Test: m
Change-Id: I1f50e09dcd1038c4b540b87e5c19e319c1f592e4
d9c90373d640a5e08072cf469c372e24a8c0fc35 14-Sep-2016 David Brazdil <dbrazdil@google.com> Move ArrayRef to runtime/base

Will be used in upcoming CLs regarding VDEX and VerifierDeps.

Test: m test-art-host
Change-Id: I68e611a4a52246c2bdf45eab7c61f3212908afd4
bdf7f1c3ab65ccb70f62db5ab31dba060632d458 31-Aug-2016 Andreas Gampe <agampe@google.com> ART: SHARED_REQUIRES to REQUIRES_SHARED

This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.

Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
d1ee80948144526b985afb44a0574248cf7da58a 13-Apr-2016 Vladimir Marko <vmarko@google.com> Move Assemblers to the Arena.

And clean up some APIs to return std::unique_ptr<> instead
of raw pointers that don't communicate ownership.

(cherry picked from commit 93205e395f777c1dd81d3f164cf9a4aec4bde45f)

Bug: 27505766
Change-Id: I3017302307a0253d661240750298802fb0d9585e
93205e395f777c1dd81d3f164cf9a4aec4bde45f 13-Apr-2016 Vladimir Marko <vmarko@google.com> Move Assemblers to the Arena.

And clean up some APIs to return std::unique_ptr<> instead
of raw pointers that don't communicate ownership.

Change-Id: I3017302307a0253d661240750298802fb0d9585e
09c2a6be63337ee060e2d54bd01cf18be7301d29 11-Mar-2016 David Srbecky <dsrbecky@google.com> Add trampoline symbols to native debug info.

The debugger needs them to unwind through the trampolines and to
understand what is happening in the call stack.

Change-Id: Ia554058c3796788adcd7336d620a7734eb366905
fe736b775c7774bb2f7072e022099ca47dd21a3c 09-Mar-2016 David Srbecky <dsrbecky@google.com> Allow generation of native debug info for multiple methods.

Slight tweak in the API which I will need in the near future.

Change-Id: I45954ae16710bc941a9a06a3a17c70798315ca53
5d8112029d0e085c5a0099257daa4c7e29c12310 08-Mar-2016 David Srbecky <dsrbecky@google.com> Propagate InstructionSetFeatures to ElfBuilder.

This is subset of CL171665 and it separates it into two.
It will be needed to generate .MIPS.abiflags ELF section.

Change-Id: I5557e7cb98d0fa1dc57c85cf6161e119c6d50a1a
c5bfa97c47d656b76f297af8abcd5f7502987399 05-Feb-2016 David Srbecky <dsrbecky@google.com> Split elf_writer_debug.cc to several files.

Refactoring only. The file has grown significantly over time,
and it is time to split it so it can be better managed.

Change-Id: Idce0231718add722292f4701df353d5baf31de5f