OSDN Git Service

android-x86/art.git
10 years agoART: Generic JNI for x86
Andreas Gampe [Tue, 10 Jun 2014 01:29:38 +0000 (18:29 -0700)]
ART: Generic JNI for x86

Add the generic JNI trampoline for x86. Small cleanup in the C code.

Change-Id: Icaf9de7c0e5e8d1e6cb1135a54552040344cc5a3

10 years agoMerge "Fix GetFreeMemory to use fooprint limit instead of max memory."
Mathieu Chartier [Mon, 9 Jun 2014 20:54:50 +0000 (20:54 +0000)]
Merge "Fix GetFreeMemory to use fooprint limit instead of max memory."

10 years agoFix GetFreeMemory to use fooprint limit instead of max memory.
Mathieu Chartier [Mon, 9 Jun 2014 20:25:22 +0000 (13:25 -0700)]
Fix GetFreeMemory to use fooprint limit instead of max memory.

Based on definitions in:
http://developer.android.com/reference/java/lang/Runtime.html

Bug: 15507122
Change-Id: I02f34682d7ac2d379a07631b5207b6cfb224da6b

10 years agoMerge "AArch64: Fix kOpLsl, rem-float/double."
Bill Buzbee [Mon, 9 Jun 2014 16:29:12 +0000 (16:29 +0000)]
Merge "AArch64: Fix kOpLsl, rem-float/double."

10 years agoMerge "Avoid a memory allocation in OatFile::GetOatDexFile()."
Vladimir Marko [Mon, 9 Jun 2014 09:16:36 +0000 (09:16 +0000)]
Merge "Avoid a memory allocation in OatFile::GetOatDexFile()."

10 years agoAArch64: Fix kOpLsl, rem-float/double.
Zheng Xu [Mon, 9 Jun 2014 03:05:31 +0000 (11:05 +0800)]
AArch64: Fix kOpLsl, rem-float/double.

Change-Id: I6f7293493c0f94f96882d2e559e3eef659a23aec

10 years agoMerge "Fix some bugs in graph construction/simplification methods."
Nicolas Geoffray [Mon, 9 Jun 2014 08:00:05 +0000 (08:00 +0000)]
Merge "Fix some bugs in graph construction/simplification methods."

10 years agoFix some bugs in graph construction/simplification methods.
Nicolas Geoffray [Fri, 6 Jun 2014 10:24:33 +0000 (11:24 +0100)]
Fix some bugs in graph construction/simplification methods.

Also fix a brano during SSA construction. The code should
not have been commented out. Added a test to cover what the code
intends.

Change-Id: Ia00ae79dcf75eb0d412f07649d73e7f94dbfb6f0

10 years agoMerge "Add Move with Sign Extend Double to disassembler"
Ian Rogers [Mon, 9 Jun 2014 05:28:30 +0000 (05:28 +0000)]
Merge "Add Move with Sign Extend Double to disassembler"

10 years agoAdd Move with Sign Extend Double to disassembler
Mark Mendell [Fri, 6 Jun 2014 19:19:45 +0000 (15:19 -0400)]
Add Move with Sign Extend Double to disassembler

I noticed another missing instruction.

Change-Id: I71170496b014ac2609116eff2aeb13a13e71e263
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoMerge "ART: Fix inline assembly constraints in stub_test"
Ian Rogers [Mon, 9 Jun 2014 04:19:55 +0000 (04:19 +0000)]
Merge "ART: Fix inline assembly constraints in stub_test"

10 years agoMerge "ART: Fix casts in atomic.h to please GCC"
Ian Rogers [Mon, 9 Jun 2014 04:15:07 +0000 (04:15 +0000)]
Merge "ART: Fix casts in atomic.h to please GCC"

10 years agoMerge "x86_64: Add long bytecode supports (2/2)"
Bill Buzbee [Sat, 7 Jun 2014 19:50:43 +0000 (19:50 +0000)]
Merge "x86_64: Add long bytecode supports (2/2)"

10 years agox86_64: Add long bytecode supports (2/2)
Chao-ying Fu [Sat, 7 Jun 2014 01:38:49 +0000 (18:38 -0700)]
x86_64: Add long bytecode supports (2/2)

This patch adds implementation of math and complex long bytcodes,
and basic long arithmetic.

Change-Id: I811397d7e0ee8ad0d12b23d32ba58314d479d714
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoMerge "x86_64: Add long bytecode supports (1/2)"
Bill Buzbee [Sat, 7 Jun 2014 19:12:08 +0000 (19:12 +0000)]
Merge "x86_64: Add long bytecode supports (1/2)"

10 years agox86_64: Add long bytecode supports (1/2)
Chao-ying Fu [Sat, 7 Jun 2014 00:32:37 +0000 (17:32 -0700)]
x86_64: Add long bytecode supports (1/2)

This patch includes switch enabling and GenFillArray,
assembler changes, updates of regalloc behavior for 64-bit,
usage in basic utility operations, loading constants,
and update for memory operations.

Change-Id: I6d8aa35a75c5fd01d69c38a770c3398d0188cc8a
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoMerge "x86_64: Hard Float ABI support in QCG"
Bill Buzbee [Sat, 7 Jun 2014 18:28:59 +0000 (18:28 +0000)]
Merge "x86_64: Hard Float ABI support in QCG"

10 years agoART: Fix inline assembly constraints in stub_test
Andreas Gampe [Sat, 7 Jun 2014 08:32:33 +0000 (01:32 -0700)]
ART: Fix inline assembly constraints in stub_test

GCC 4.9 is the first compiler actually using the (incorrect)
absence of the memory clobber constraint to elide some stores
and reloads to the thread, leaving garbage in there on exit
of the invoke method when the called stub will reach C code
with FinishCalleeSaveFrame.

Change-Id: I3afe9926bf537e6e92e3ad44eb6541776ac0e75f

10 years agoART: Fix casts in atomic.h to please GCC
Andreas Gampe [Sat, 7 Jun 2014 04:27:01 +0000 (21:27 -0700)]
ART: Fix casts in atomic.h to please GCC

GCC 4.9 for ARM64 is not happy about reinterpret_cast-ing between
int64_t and uint64_t, which is according to spec. Change the
concrete casts to static_cast.

However, we also use this for pointers, and we cannot static_cast
those to int64_t. So add a reinterpret_cast to uintptr_t.

Change-Id: If6513fbcbb8ee8f610f172310af61cf2e9ab0c43

10 years agoMerge "Don't assert int64_t alignment on x86."
Hans Boehm [Sat, 7 Jun 2014 01:41:29 +0000 (01:41 +0000)]
Merge "Don't assert int64_t alignment on x86."

10 years agoMerge "Add missing initializtaion of last_gc_time_ns_."
Mathieu Chartier [Sat, 7 Jun 2014 01:41:18 +0000 (01:41 +0000)]
Merge "Add missing initializtaion of last_gc_time_ns_."

10 years agoDon't assert int64_t alignment on x86.
Hans Boehm [Sat, 7 Jun 2014 01:17:43 +0000 (18:17 -0700)]
Don't assert int64_t alignment on x86.

Fix build.

Change-Id: I1b798bb3c5ab4954b46d54cda8f8c237ab4ae53e

10 years agox86_64: Hard Float ABI support in QCG
Dmitry Petrochenko [Fri, 16 May 2014 18:02:18 +0000 (01:02 +0700)]
x86_64: Hard Float ABI support in QCG

This patch shows our efforts on resolving the ART limitations:
 - passing "float"/"double" arguments via FPR
 - passing "long" arguments via single GPR, not pair
 - passing more than 3 agruments via GPR.

Work done:
 - Extended SpecialTargetRegister enum with kARG4, kARG5, fARG4..fARG7.
 - Created initial LoadArgRegs/GenDalvikX/FlushIns version in X86Mir2Lir.
 - Unlimited number of long/double/float arguments support
 - Refactored (v2)

Change-Id: I5deadd320b4341d5b2f50ba6fa4a98031abc3902
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoAdd missing initializtaion of last_gc_time_ns_.
Mathieu Chartier [Sat, 7 Jun 2014 00:51:16 +0000 (17:51 -0700)]
Add missing initializtaion of last_gc_time_ns_.

Fixes some valgrind warnings.

Bug: 15426766
Change-Id: Ibaa78465739bf6919509cf87c72b25c84ed1d12c

10 years agoMerge "Fix white space issues and long long use in assertion."
Hans Boehm [Sat, 7 Jun 2014 00:21:19 +0000 (00:21 +0000)]
Merge "Fix white space issues and long long use in assertion."

10 years agoMerge "Fix mismatched new[] delete in verifier."
Mathieu Chartier [Sat, 7 Jun 2014 00:19:05 +0000 (00:19 +0000)]
Merge "Fix mismatched new[] delete in verifier."

10 years agoFix white space issues and long long use in assertion.
Hans Boehm [Sat, 7 Jun 2014 00:13:03 +0000 (17:13 -0700)]
Fix white space issues and long long use in assertion.

Fix Build.

Change-Id: If67a910ffed25c03c46638d6c132dc0e3a20ef62

10 years agoFix mismatched new[] delete in verifier.
Mathieu Chartier [Fri, 6 Jun 2014 20:59:39 +0000 (13:59 -0700)]
Fix mismatched new[] delete in verifier.

Done in order to please valgrind.

Bug: 15432385
Change-Id: Iebb6fe50eb71fc7f4c2f8e7aa93ad6ab226be5a8

10 years agoMerge "Clean up and augment Atomic class. Replace QuasiAtomic MemBars."
Hans Boehm [Fri, 6 Jun 2014 23:45:51 +0000 (23:45 +0000)]
Merge "Clean up and augment Atomic class.  Replace QuasiAtomic MemBars."

10 years agoMerge "Change FieldHelper to use a handle."
Mathieu Chartier [Fri, 6 Jun 2014 23:37:27 +0000 (23:37 +0000)]
Merge "Change FieldHelper to use a handle."

10 years agoMerge "Reduce header files including header files."
Ian Rogers [Fri, 6 Jun 2014 23:37:16 +0000 (23:37 +0000)]
Merge "Reduce header files including header files."

10 years agoReduce header files including header files.
Ian Rogers [Fri, 6 Jun 2014 22:58:22 +0000 (15:58 -0700)]
Reduce header files including header files.

Main focus is getting heap.h out of runtime.h.

Change-Id: I8d13dce8512816db2820a27b24f5866cc871a04b

10 years agoClean up and augment Atomic class. Replace QuasiAtomic MemBars.
Hans Boehm [Thu, 22 May 2014 00:46:23 +0000 (17:46 -0700)]
Clean up and augment Atomic class.  Replace QuasiAtomic MemBars.

Add a number of missing C++11 operations to Atomic class.
Invoke the 64 bit routines in QuasiAtomic when necessary.
Replace QuasiAtomic membars with fences that correspond to C++11 fences.

QuasiAtomic was moved to the top of the file.  Only fence implementations
actually changed.

This replaces some buggy uses of MembarStoreStore, as reported
in b/14685856 .

Avoid some redundant fences for long volatile operations.

Incompletely converts low-level memory access operations to Atomic.

Change-Id: Iea828431a0cea46540eb74fcaa02071cab6fdcda

10 years agoMerge "x86_64: Fix stubs after 4-byte method handler"
Andreas Gampe [Fri, 6 Jun 2014 21:08:40 +0000 (21:08 +0000)]
Merge "x86_64: Fix stubs after 4-byte method handler"

10 years agox86_64: Fix stubs after 4-byte method handler
Serguei Katkov [Fri, 6 Jun 2014 17:50:37 +0000 (10:50 -0700)]
x86_64: Fix stubs after 4-byte method handler

It is 4 byte now and should be handled accordingly.

Change-Id: Ie373235f961eabfd33266bd89fbf8169a3714a03
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoChange FieldHelper to use a handle.
Mathieu Chartier [Fri, 6 Jun 2014 00:42:53 +0000 (17:42 -0700)]
Change FieldHelper to use a handle.

Fixed compaction bugs related to FieldHelper::GetType in:
artSet32InstanceFromCode
SetFieldValueImpl
CheckReceiver
Field_set
interpreter::DoFieldPut
MethodVerifier::VerifyISGet
MethodVerifier::VerifyISPut
MethodVerifier::VerifyIGetQuick

Bug: 13077697

Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72

10 years agoMerge "Fix top K percentage computation when loading profile data."
Calin Juravle [Fri, 6 Jun 2014 15:02:08 +0000 (15:02 +0000)]
Merge "Fix top K percentage computation when loading profile data."

10 years agoFix top K percentage computation when loading profile data.
Calin Juravle [Fri, 6 Jun 2014 11:24:21 +0000 (12:24 +0100)]
Fix top K percentage computation when loading profile data.

Don't count boot and null methods when computing top K percentage for
sampled methods.

Bug: 15462067
Bug: 12877748
Change-Id: I11c2ea541066a15bc8a5ad323e21ccbfdf81c2c5

10 years agoMerge "Use ScopedArenaVector instead of std::vector in SSA transformation."
Vladimir Marko [Fri, 6 Jun 2014 11:24:31 +0000 (11:24 +0000)]
Merge "Use ScopedArenaVector instead of std::vector in SSA transformation."

10 years agoMerge "Fixed and refactored profiler options handling"
Calin Juravle [Fri, 6 Jun 2014 11:15:25 +0000 (11:15 +0000)]
Merge "Fixed and refactored profiler options handling"

10 years agoFixed and refactored profiler options handling
Calin Juravle [Fri, 30 May 2014 22:44:11 +0000 (23:44 +0100)]
Fixed and refactored profiler options handling

- extracted profiler options in a separate class
- switched from system property reading to command line arguments
- added profile based compilation options to CompilerOptions
- removed no longer used kProfile compilation filter
- optimize dex files only if the profiler is enabled
- clean up unused arguments

Bug: 12877748
Bug: 15275634
Change-Id: I37ff68e7694370950ce8db2360562e9058ecebb7

10 years agoMerge "Clean up the sampling profiler"
Calin Juravle [Fri, 6 Jun 2014 10:58:10 +0000 (10:58 +0000)]
Merge "Clean up the sampling profiler"

10 years agoClean up the sampling profiler
Calin Juravle [Fri, 23 May 2014 16:33:29 +0000 (17:33 +0100)]
Clean up the sampling profiler

- rename variables/fields names to match the code style (use
_underscore_names_)
- extract common property parsing in utils.cc
- fail to load profile file if any line is malformed
- added ProfileFile to manage the profile data generate in the previous
runs (replaces ProfileHelper and nests ProfileData)

Bug: 12877748
Change-Id: Ie7bda30bfdeb7e78534c986615b0649eac12a97b

10 years agoUse ScopedArenaVector instead of std::vector in SSA transformation.
Vladimir Marko [Thu, 5 Jun 2014 19:09:47 +0000 (20:09 +0100)]
Use ScopedArenaVector instead of std::vector in SSA transformation.

Change-Id: Ibf8471274f2d5e11fcc185044745434c3c82ed74

10 years agoMerge "Fix crash in JDWP ReferenceType.SourceFile command"
Sebastien Hertz [Fri, 6 Jun 2014 07:02:39 +0000 (07:02 +0000)]
Merge "Fix crash in JDWP ReferenceType.SourceFile command"

10 years agoMerge "Add an optimization for removing redundant suspend tests in ART"
Bill Buzbee [Thu, 5 Jun 2014 22:34:57 +0000 (22:34 +0000)]
Merge "Add an optimization for removing redundant suspend tests in ART"

10 years agoAdd an optimization for removing redundant suspend tests in ART
Wei Jin [Fri, 30 May 2014 01:04:29 +0000 (18:04 -0700)]
Add an optimization for removing redundant suspend tests in ART

This CL:
(1) eliminates redundant suspend checks (dominated by another check),

(2) removes the special treatment of the R4 register, which got
reset on every native call, possibly yielding long execution
sequences without any suspend checks, and

(3) fixes the absence of suspend checks in leaf methods.

(2) and (3) increase the frequency of suspend checks, which improves
the performance of GC and the accuracy of profile data.  To
compensate for the increased number of checks, we implemented an
optimization that leverages dominance information to remove
redundant suspend checks on back edges.  Based on the results of
running the Caffeine benchmark on Nexus 7, the patch performs
roughly 30% more useful suspend checks, spreading them much more
evenly along the execution trace, while incurring less than 1%
overhead.  For flexibility consideration, this CL defines two flags
to control the enabling of optimizations.  The original
implementation is the default.

Change-Id: I31e81a5b3c53030444dbe0434157274c9ab8640f
Signed-off-by: Wei Jin <wejin@google.com>
10 years agoMerge "Disable thumb assembler test to fix art build"
Dave Allison [Thu, 5 Jun 2014 22:01:16 +0000 (22:01 +0000)]
Merge "Disable thumb assembler test to fix art build"

10 years agoDisable thumb assembler test to fix art build
Dave Allison [Thu, 5 Jun 2014 21:44:13 +0000 (14:44 -0700)]
Disable thumb assembler test to fix art build

Having difficulty getting this to run on the build server.
Disable until I can figure out how to do it.

Change-Id: I4f356fd1168b213b770426adc34bf62b8fb56b8f

10 years agoMerge "Remove unused variable in assembler test."
Dave Allison [Thu, 5 Jun 2014 21:27:40 +0000 (21:27 +0000)]
Merge "Remove unused variable in assembler test."

10 years agoRemove unused variable in assembler test.
Dave Allison [Thu, 5 Jun 2014 21:16:30 +0000 (14:16 -0700)]
Remove unused variable in assembler test.

This is flagged as an error when building master, but not others...

Change-Id: Iaea5307b06d8e4fa1a9d1035905fc204eb98559a

10 years agoMerge "Fix assembler test to use path if it can't find tools."
Dave Allison [Thu, 5 Jun 2014 21:05:59 +0000 (21:05 +0000)]
Merge "Fix assembler test to use path if it can't find tools."

10 years agoFix assembler test to use path if it can't find tools.
Dave Allison [Thu, 5 Jun 2014 20:58:56 +0000 (13:58 -0700)]
Fix assembler test to use path if it can't find tools.

This fixes build breakage.

Change-Id: I8074d47f1c1470cf886d517e9e68a6a6b4330485

10 years agoMerge "Thumb2 assembler for JNI compiler and optimizing compiler"
Dave Allison [Thu, 5 Jun 2014 19:47:18 +0000 (19:47 +0000)]
Merge "Thumb2 assembler for JNI compiler and optimizing compiler"

10 years agoThumb2 assembler for JNI compiler and optimizing compiler
Dave Allison [Mon, 28 Apr 2014 20:45:27 +0000 (13:45 -0700)]
Thumb2 assembler for JNI compiler and optimizing compiler

This provides a programmatic assembler for the thumb2 instruction set for
ARM.  The interface is the same as the ARM assembler and the ARM assembler has
been moved into Arm32Assembler.  The assembler handles most 16 and 32 bit instructions
and also allows relocations due to branch expansion.  It will also rewrite cbz/cbnz
instructions if they go out of range.

It also changes the JNI compiler to use the thumb2 assembler as opposed
to forcing it to use ARM32.  The trampoline compiler still uses ARM due to the
way it returns the address of its generated code.  A trampoline in thumb2 is the
same size as that in ARM anyway (8 bytes).

Provides gtest for testing the thumb2 instruction output.  This gtest only runs
on the host as it uses arm-eabi-objdump to disassemble the generated code.  On the
target the output is not checked but the assembler will still be run to perform
all its checks.

Change-Id: Icd9742b6f13541bec5b23097896727392e3a6fb6

10 years agoMerge "Verify there's no mem map gap for immune region not to break."
Hiroshi Yamauchi [Thu, 5 Jun 2014 18:48:54 +0000 (18:48 +0000)]
Merge "Verify there's no mem map gap for immune region not to break."

10 years agoAvoid a memory allocation in OatFile::GetOatDexFile().
Vladimir Marko [Thu, 5 Jun 2014 17:36:42 +0000 (18:36 +0100)]
Avoid a memory allocation in OatFile::GetOatDexFile().

Use StringPiece instead of std::string as the map key.

Change-Id: I05516d273de617a7d714e39ce6c4236cec6a09f7

10 years agoMerge "Workaround for running out of address space on N7v1."
Vladimir Marko [Thu, 5 Jun 2014 16:46:02 +0000 (16:46 +0000)]
Merge "Workaround for running out of address space on N7v1."

10 years agoWorkaround for running out of address space on N7v1.
Vladimir Marko [Thu, 5 Jun 2014 14:48:04 +0000 (15:48 +0100)]
Workaround for running out of address space on N7v1.

Bug: 13564922
Change-Id: I2ac466f613e465691078c41b2693f2327d07a0a8

10 years agoMerge "Use std::enable_if instead of a custom helper class."
Vladimir Marko [Thu, 5 Jun 2014 16:14:28 +0000 (16:14 +0000)]
Merge "Use std::enable_if instead of a custom helper class."

10 years agoMerge "Fix X86 disassambler printing of XMM, MM registers"
Ian Rogers [Thu, 5 Jun 2014 15:53:47 +0000 (15:53 +0000)]
Merge "Fix X86 disassambler printing of XMM, MM registers"

10 years agoUse std::enable_if instead of a custom helper class.
Vladimir Marko [Thu, 5 Jun 2014 15:35:31 +0000 (16:35 +0100)]
Use std::enable_if instead of a custom helper class.

Change-Id: Iffa0f0350ccc4fce698b9a16aefd340e16654076

10 years agoMerge "x86_64: Turn on 64-bit core registers initialization."
Bill Buzbee [Thu, 5 Jun 2014 15:08:53 +0000 (15:08 +0000)]
Merge "x86_64: Turn on 64-bit core registers initialization."

10 years agox86_64: Turn on 64-bit core registers initialization.
Dmitry Petrochenko [Thu, 5 Jun 2014 14:15:08 +0000 (21:15 +0700)]
x86_64: Turn on 64-bit core registers initialization.

This enables 64-bit core registers initialization for x86_64.
The backend update with 64-bit temp support is in progress.

Change-Id: If7c9a62c1145f81050adda86f2beed427220baa2
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoFix X86 disassambler printing of XMM, MM registers
Mark Mendell [Thu, 5 Jun 2014 01:20:00 +0000 (21:20 -0400)]
Fix X86 disassambler printing of XMM, MM registers

Printing of uint8_t is done as a char, rather than an integer.

Change-Id: I996e7d7dd902695be6366ab816fea65b675c2ad9
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoMerge "Avoid register pool allocations on the heap."
Vladimir Marko [Thu, 5 Jun 2014 12:16:01 +0000 (12:16 +0000)]
Merge "Avoid register pool allocations on the heap."

10 years agoAvoid register pool allocations on the heap.
Vladimir Marko [Thu, 5 Jun 2014 09:57:05 +0000 (10:57 +0100)]
Avoid register pool allocations on the heap.

Create a helper template class ArrayRef and use it instead
of std::vector<> for register pools in target_<arch>.cc to
avoid these heap allocations during program startup.

Change-Id: I4ab0205af9c1d28a239c0a105fcdc60ba800a70a

10 years agoFix crash in JDWP ReferenceType.SourceFile command
Sebastien Hertz [Thu, 5 Jun 2014 08:15:45 +0000 (10:15 +0200)]
Fix crash in JDWP ReferenceType.SourceFile command

Updates Dbg::GetSourceFile to return ABSENT_INFORMATION error code when
Class::GetSourceFile returns nullptr. This happens if the class has no source
file information.

Updates Class:GetSourceFile to return nullptr for classes which have no
ClassDef item like generated classes. This allows to remove the IsProxyClass
test from Dbg::GetSourceFile. Adds this test in proxy_test.

Bug: 15426710
Change-Id: I019da4ced83778d5264484c43b225f8b5c95632e

10 years agoMerge "ART: Add a test checking TLS offsets and entrypoints"
Andreas Gampe [Thu, 5 Jun 2014 07:11:39 +0000 (07:11 +0000)]
Merge "ART: Add a test checking TLS offsets and entrypoints"

10 years agoMerge "Fix reflection_test failures."
Ian Rogers [Thu, 5 Jun 2014 06:23:08 +0000 (06:23 +0000)]
Merge "Fix reflection_test failures."

10 years agoMerge "ART: Allocate ostreams on the heap in Oatdump::DumpOatMethod"
Andreas Gampe [Thu, 5 Jun 2014 06:09:46 +0000 (06:09 +0000)]
Merge "ART: Allocate ostreams on the heap in Oatdump::DumpOatMethod"

10 years agoART: Allocate ostreams on the heap in Oatdump::DumpOatMethod
Andreas Gampe [Thu, 5 Jun 2014 05:42:28 +0000 (22:42 -0700)]
ART: Allocate ostreams on the heap in Oatdump::DumpOatMethod

The stack frame size for this method is above our limits. Allocate
ostreams on the heap instead of on the stack.

Bug: 15278350
Change-Id: Ia94a1f7190b7c2ac096e100682e747334f1bf6cc

10 years agoMerge "Do not force unwind info to debug_frame."
Christopher Ferris [Thu, 5 Jun 2014 03:24:08 +0000 (03:24 +0000)]
Merge "Do not force unwind info to debug_frame."

10 years agoART: Add a test checking TLS offsets and entrypoints
Andreas Gampe [Thu, 5 Jun 2014 01:59:01 +0000 (18:59 -0700)]
ART: Add a test checking TLS offsets and entrypoints

Add a test (runtime for now, as compile-time checks seem not
possible with current infrastructure) that checks the structure
of the thread tls and entrypoint structs. A failure of the test
indicates a structural change, which hints at a necessary oat
version bump.

Change-Id: I500b5cd940c916ebfc1580e9dd2c287c4d263956

10 years agoDo not force unwind info to debug_frame.
Christopher Ferris [Thu, 5 Jun 2014 00:21:11 +0000 (17:21 -0700)]
Do not force unwind info to debug_frame.

The .cfi_sections directive was forcing unwind information into the
debug_frame, which is stripped out. This causes any unwinds done by
libunwind/debuggerd through these art functions to terminate prematurely.

Bug: 15350524
Change-Id: Id6abe7c7106132083bc894a77564b652a08566cb

10 years agoMerge "Fix GetOutVROffset to use correct Method* size."
buzbee [Wed, 4 Jun 2014 23:02:08 +0000 (23:02 +0000)]
Merge "Fix GetOutVROffset to use correct Method* size."

10 years agoFix GetOutVROffset to use correct Method* size.
buzbee [Wed, 4 Jun 2014 22:35:41 +0000 (15:35 -0700)]
Fix GetOutVROffset to use correct Method* size.

[Tip 'o the hat to Mark Mendell for noticing this one]

Use StackReference to find Method* size in GetOutVROffset.

Change-Id: Ie1b25eb839c59305cadc5fdc7cbb5f41f1a85686

10 years agoMerge "Enable -Wframe-larger-than=1728 compilation error"
Andreas Gampe [Wed, 4 Jun 2014 22:57:01 +0000 (22:57 +0000)]
Merge "Enable -Wframe-larger-than=1728 compilation error"

10 years agoEnable -Wframe-larger-than=1728 compilation error
Sebastien Hertz [Tue, 27 May 2014 13:27:58 +0000 (15:27 +0200)]
Enable -Wframe-larger-than=1728 compilation error

Bug: 15278350
Change-Id: I142dc9de0312ac1f8aa55a4bce86b5bb6722535f

10 years agoVerify there's no mem map gap for immune region not to break.
Hiroshi Yamauchi [Wed, 4 Jun 2014 18:43:59 +0000 (11:43 -0700)]
Verify there's no mem map gap for immune region not to break.

This adds code that verifies that there's no memory map gap between
the image space and the main space so that the immune region
functionality won't silently break. For example, if there's a gap and
a large object is allocated in that gap, the large object is
incorrectly part of the immune region and the marking breaks.

Bug: 14059466
Change-Id: Ie6ed82988d74b6d0562ebbbaac96ee43c15b14a6

10 years agoMerge "ART: Heap-allocate buffer in space_bitmap when on 64b arch"
Andreas Gampe [Wed, 4 Jun 2014 22:47:48 +0000 (22:47 +0000)]
Merge "ART: Heap-allocate buffer in space_bitmap when on 64b arch"

10 years agoART: Heap-allocate buffer in space_bitmap when on 64b arch
Andreas Gampe [Wed, 4 Jun 2014 22:25:28 +0000 (15:25 -0700)]
ART: Heap-allocate buffer in space_bitmap when on 64b arch

The stack frame size will be above our limit if we stack-allocate
a buffer.

Bug: 15278350
Change-Id: Ie1a31370538410d47c177f0a6e51879a1fc0752c

10 years agoMerge "art: -Wsystem-header warning"
Mark Salyzyn [Wed, 4 Jun 2014 19:27:12 +0000 (19:27 +0000)]
Merge "art: -Wsystem-header warning"

10 years agoMerge "Print mutexes held in Thread::Dump."
Mathieu Chartier [Wed, 4 Jun 2014 19:07:57 +0000 (19:07 +0000)]
Merge "Print mutexes held in Thread::Dump."

10 years agoPrint mutexes held in Thread::Dump.
Mathieu Chartier [Wed, 4 Jun 2014 18:23:58 +0000 (11:23 -0700)]
Print mutexes held in Thread::Dump.

Should help finding and fixing thread suspend timeout issues.

Bug: 15328839
Change-Id: I30a10529cec0716c7571a0318e9f66be54734fd8

10 years agoMerge "Fix compiler warnings."
Mathieu Chartier [Wed, 4 Jun 2014 18:23:35 +0000 (18:23 +0000)]
Merge "Fix compiler warnings."

10 years agoMerge "ART: Fix forbidden thread state change in interpreter"
Andreas Gampe [Wed, 4 Jun 2014 18:02:34 +0000 (18:02 +0000)]
Merge "ART: Fix forbidden thread state change in interpreter"

10 years agoART: Fix forbidden thread state change in interpreter
Andreas Gampe [Tue, 3 Jun 2014 05:05:22 +0000 (22:05 -0700)]
ART: Fix forbidden thread state change in interpreter

While loading a type for assignability, it might happen that it's
not available yet locally and must be resolved. Formerly, we
disallowed a state change to ensure no GC taking place while a new
shadow frame has not been pushed on the stack yet.

As a fix, allow a "shadow frame under construction" in the thread,
which is visited during GC.

Change-Id: I973487a46b0e9e21fd6d49099d713b58f06d3b45

10 years agoMerge "Use sendfile when copying profile file."
Calin Juravle [Wed, 4 Jun 2014 17:37:43 +0000 (17:37 +0000)]
Merge "Use sendfile when copying profile file."

10 years agoFix compiler warnings.
Mathieu Chartier [Tue, 3 Jun 2014 22:37:03 +0000 (15:37 -0700)]
Fix compiler warnings.

Added GetReference, GetHandle to StackHandleScope to prevent the
compiler from optimizing away these loads/stores from inline
functions.

Change-Id: I4db02dd3194665d844292e74e3a7d7c80e730e06

10 years agoUse sendfile when copying profile file.
Calin Juravle [Wed, 4 Jun 2014 11:01:50 +0000 (12:01 +0100)]
Use sendfile when copying profile file.

This removes the 4k stack allocation and allow to activate
-Wframe-larger-than=1728 compiler opion.

Bug: 15278350
Change-Id: I389ffe06feb3c1c1bf620e20164cca04a0594788

10 years agoMerge "Add missing preamble in switch-based interpreter"
Sebastien Hertz [Wed, 4 Jun 2014 15:24:52 +0000 (15:24 +0000)]
Merge "Add missing preamble in switch-based interpreter"

10 years agoMerge "AArch64: Fix cmp-long and method with long arguments."
Bill Buzbee [Wed, 4 Jun 2014 15:18:13 +0000 (15:18 +0000)]
Merge "AArch64: Fix cmp-long and method with long arguments."

10 years agoMerge "ART: x86_64 disassembler improvements"
Ian Rogers [Wed, 4 Jun 2014 15:12:40 +0000 (15:12 +0000)]
Merge "ART: x86_64 disassembler improvements"

10 years agoMerge "ART: Fix stub_test inline assembly for ARM64"
Andreas Gampe [Wed, 4 Jun 2014 15:10:23 +0000 (15:10 +0000)]
Merge "ART: Fix stub_test inline assembly for ARM64"

10 years agoMerge "ART: Make LOCAL_CLANG architecture dependent for the target"
Andreas Gampe [Wed, 4 Jun 2014 15:05:22 +0000 (15:05 +0000)]
Merge "ART: Make LOCAL_CLANG architecture dependent for the target"

10 years agoART: Make LOCAL_CLANG architecture dependent for the target
Andreas Gampe [Thu, 29 May 2014 09:09:33 +0000 (02:09 -0700)]
ART: Make LOCAL_CLANG architecture dependent for the target

Be selective for which target we compile with Clang. Currently we
only want to compile with Clang for ARM64, which means we need to
be careful about ARM, which is the second architecture for that.

Bug: 15014252

(cherry picked from commit 9689e3768621130b2536564f4e00fcb6b3d25df4)

Change-Id: I312e1caea08f2f3a20304b27f979d3c7b72b0a04

10 years agoMerge "Fix a bug in SSA construction."
Nicolas Geoffray [Wed, 4 Jun 2014 12:50:44 +0000 (12:50 +0000)]
Merge "Fix a bug in SSA construction."

10 years agoFix a bug in SSA construction.
Nicolas Geoffray [Wed, 4 Jun 2014 11:12:08 +0000 (12:12 +0100)]
Fix a bug in SSA construction.

If a join block does not have an incoming value for a local
from a predecessor block, we should not create a phi. The
verifier has made sure the local is updated before any
following reads after this block.

Change-Id: Id2785efc73c9fb3224826fff2f4b4ad215905ff4

10 years agoMerge "Fix a possible file descriptor leakage"
Calin Juravle [Wed, 4 Jun 2014 12:27:44 +0000 (12:27 +0000)]
Merge "Fix a possible file descriptor leakage"