Merge "Fix VerifyClassUsingOatFile to check preverified image classes" into dalvik-dev
diff --git a/Android.mk b/Android.mk
index 4ffa9ac..5a28723 100644
--- a/Android.mk
+++ b/Android.mk
@@ -78,8 +78,11 @@
adb shell rm system/app/*.odex
adb shell rm data/run-test/test-*/dalvik-cache/*@classes.dex
+########################################################################
+# darwin build
+
# we aren't building most of art on darwin right now, but we do need to build new dalvikvm
-ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
+ifeq ($(HOST_OS),darwin)
art_dont_bother := true
include $(art_path)/dalvikvm/Android.mk
endif
@@ -325,14 +328,21 @@
endif
########################################################################
-# cpplint target
+# cpplint targets to style check art source files
-# "mm cpplint-art" to style check art source files
+# "mm cpplint-art" to verify we aren't regressing
.PHONY: cpplint-art
cpplint-art:
./art/tools/cpplint.py \
- --filter=-whitespace/comments,-whitespace/line_length,-build/include,-build/header_guard,-readability/function,-readability/streams,-readability/todo,-runtime/references \
- $(ANDROID_BUILD_TOP)/art/src/*.h $(ANDROID_BUILD_TOP)/art/src/*.cc
+ --filter=-,+build/header_guard, \
+ $(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION))
+
+# "mm cpplint-art-aspirational" to see warnings we would like to fix
+.PHONY: cpplint-art-aspirational
+cpplint-art-aspirational:
+ ./art/tools/cpplint.py \
+ --filter=-whitespace/comments,-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references \
+ $(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION))
########################################################################
# targets to switch back and forth from libdvm to libart
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index 8a9b5dd..407cef9 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -106,14 +106,10 @@
LOCAL_SRC_FILES := $$(art_gtest_filename) runtime/common_test.cc
LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime art/compiler
LOCAL_SHARED_LIBRARIES := libartd-compiler libartd
- # dex2oatd is needed to go libartd-compilerd and libartd
- ifeq ($$(art_target_or_host),target)
- LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_EXECUTABLES)/dex2oatd
- else
- LOCAL_ADDITIONAL_DEPENDENCIES := $(HOST_OUT_EXECUTABLES)/dex2oatd
- endif
+ # dex2oatd is needed to go libartd-compiler and libartd
+ LOCAL_REQUIRED_MODULES := dex2oatd
- LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
+ LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk
# Mac OS linker doesn't understand --export-dynamic.
diff --git a/compiler/dex/arena_allocator.h b/compiler/dex/arena_allocator.h
index 78d4614..23d6b9f 100644
--- a/compiler/dex/arena_allocator.h
+++ b/compiler/dex/arena_allocator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILER_ARENA_ALLOCATOR_H_
-#define ART_SRC_COMPILER_DEX_COMPILER_ARENA_ALLOCATOR_H_
+#ifndef ART_COMPILER_DEX_ARENA_ALLOCATOR_H_
+#define ART_COMPILER_DEX_ARENA_ALLOCATOR_H_
#include <stdint.h>
#include <stddef.h>
@@ -93,4 +93,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_COMPILER_ARENA_ALLOCATOR_H_
+#endif // ART_COMPILER_DEX_ARENA_ALLOCATOR_H_
diff --git a/compiler/dex/arena_bit_vector.h b/compiler/dex/arena_bit_vector.h
index a950e82..0b7bbc5 100644
--- a/compiler/dex/arena_bit_vector.h
+++ b/compiler/dex/arena_bit_vector.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILER_ARENA_BIT_VECTOR_H_
-#define ART_SRC_COMPILER_DEX_COMPILER_ARENA_BIT_VECTOR_H_
+#ifndef ART_COMPILER_DEX_ARENA_BIT_VECTOR_H_
+#define ART_COMPILER_DEX_ARENA_BIT_VECTOR_H_
#include <stdint.h>
#include <stddef.h>
@@ -124,4 +124,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_COMPILER_ARENA_BIT_VECTOR_H_
+#endif // ART_COMPILER_DEX_ARENA_BIT_VECTOR_H_
diff --git a/compiler/dex/backend.h b/compiler/dex/backend.h
index 45a1531..6f5ba38 100644
--- a/compiler/dex/backend.h
+++ b/compiler/dex/backend.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_BACKEND_H_
-#define ART_SRC_COMPILER_DEX_BACKEND_H_
+#ifndef ART_COMPILER_DEX_BACKEND_H_
+#define ART_COMPILER_DEX_BACKEND_H_
#include "compiled_method.h"
#include "arena_allocator.h"
@@ -37,4 +37,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_BACKEND_H_
+#endif // ART_COMPILER_DEX_BACKEND_H_
diff --git a/compiler/dex/compiler_enums.h b/compiler/dex/compiler_enums.h
index bc456b2..88240e8 100644
--- a/compiler/dex/compiler_enums.h
+++ b/compiler/dex/compiler_enums.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILERENUMS_H_
-#define ART_SRC_COMPILER_DEX_COMPILERENUMS_H_
+#ifndef ART_COMPILER_DEX_COMPILER_ENUMS_H_
+#define ART_COMPILER_DEX_COMPILER_ENUMS_H_
#include "dex_instruction.h"
@@ -414,4 +414,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_COMPILERENUMS_H_
+#endif // ART_COMPILER_DEX_COMPILER_ENUMS_H_
diff --git a/compiler/dex/compiler_internals.h b/compiler/dex/compiler_internals.h
index a3fa25e..9dd0272 100644
--- a/compiler/dex/compiler_internals.h
+++ b/compiler/dex/compiler_internals.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILER_INTERNAL_H_
-#define ART_SRC_COMPILER_DEX_COMPILER_INTERNAL_H_
+#ifndef ART_COMPILER_DEX_COMPILER_INTERNALS_H_
+#define ART_COMPILER_DEX_COMPILER_INTERNALS_H_
#include <assert.h>
#include <stdbool.h>
@@ -33,4 +33,4 @@
#include "thread.h"
#include "utils.h"
-#endif // ART_SRC_COMPILER_DEX_COMPILER_INTERNAL_H_
+#endif // ART_COMPILER_DEX_COMPILER_INTERNALS_H_
diff --git a/compiler/dex/compiler_ir.h b/compiler/dex/compiler_ir.h
index c6f99f3..a9b5bf6 100644
--- a/compiler/dex/compiler_ir.h
+++ b/compiler/dex/compiler_ir.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILER_IR_H_
-#define ART_SRC_COMPILER_DEX_COMPILER_IR_H_
+#ifndef ART_COMPILER_DEX_COMPILER_IR_H_
+#define ART_COMPILER_DEX_COMPILER_IR_H_
#include <vector>
#include <llvm/IR/Module.h>
@@ -112,4 +112,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_COMPILER_IR_H_
+#endif // ART_COMPILER_DEX_COMPILER_IR_H_
diff --git a/compiler/dex/dataflow_iterator-inl.h b/compiler/dex/dataflow_iterator-inl.h
index b20004d..06cc505 100644
--- a/compiler/dex/dataflow_iterator-inl.h
+++ b/compiler/dex/dataflow_iterator-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
-#define ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
+#ifndef ART_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
+#define ART_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
#include "dataflow_iterator.h"
@@ -65,4 +65,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
+#endif // ART_COMPILER_DEX_DATAFLOW_ITERATOR_INL_H_
diff --git a/compiler/dex/dataflow_iterator.h b/compiler/dex/dataflow_iterator.h
index 12cbf9c..4c112f9 100644
--- a/compiler/dex/dataflow_iterator.h
+++ b/compiler/dex/dataflow_iterator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_H_
-#define ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_H_
+#ifndef ART_COMPILER_DEX_DATAFLOW_ITERATOR_H_
+#define ART_COMPILER_DEX_DATAFLOW_ITERATOR_H_
#include "compiler_ir.h"
#include "mir_graph.h"
@@ -155,4 +155,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_DATAFLOW_ITERATOR_H_
+#endif // ART_COMPILER_DEX_DATAFLOW_ITERATOR_H_
diff --git a/compiler/dex/frontend.h b/compiler/dex/frontend.h
index 69d7f77..a863389 100644
--- a/compiler/dex/frontend.h
+++ b/compiler/dex/frontend.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_COMPILER_H_
-#define ART_SRC_COMPILER_DEX_COMPILER_H_
+#ifndef ART_COMPILER_DEX_FRONTEND_H_
+#define ART_COMPILER_DEX_FRONTEND_H_
#include "dex_file.h"
#include "dex_instruction.h"
@@ -123,4 +123,4 @@
-#endif // ART_SRC_COMPILER_DEX_COMPILER_H_
+#endif // ART_COMPILER_DEX_FRONTEND_H_
diff --git a/compiler/dex/growable_array.h b/compiler/dex/growable_array.h
index c4684a7..6ab0f16 100644
--- a/compiler/dex/growable_array.h
+++ b/compiler/dex/growable_array.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_GROWABLE_LIST_H_
-#define ART_SRC_COMPILER_DEX_GROWABLE_LIST_H_
+#ifndef ART_COMPILER_DEX_GROWABLE_ARRAY_H_
+#define ART_COMPILER_DEX_GROWABLE_ARRAY_H_
#include <stdint.h>
#include <stddef.h>
@@ -168,4 +168,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_GROWABLE_LIST_H_
+#endif // ART_COMPILER_DEX_GROWABLE_ARRAY_H_
diff --git a/compiler/dex/local_value_numbering.h b/compiler/dex/local_value_numbering.h
index beb4cea..f2b2291 100644
--- a/compiler/dex/local_value_numbering.h
+++ b/compiler/dex/local_value_numbering.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
-#define ART_SRC_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
+#ifndef ART_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
+#define ART_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
#include "compiler_internals.h"
@@ -140,4 +140,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
+#endif // ART_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_
diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
index 2b1c21f..a40fa97 100644
--- a/compiler/dex/mir_graph.h
+++ b/compiler/dex/mir_graph.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_MIRGRAPH_H_
-#define ART_SRC_COMPILER_DEX_MIRGRAPH_H_
+#ifndef ART_COMPILER_DEX_MIR_GRAPH_H_
+#define ART_COMPILER_DEX_MIR_GRAPH_H_
#include "dex_file.h"
#include "dex_instruction.h"
@@ -667,4 +667,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_MIRGRAPH_H_
+#endif // ART_COMPILER_DEX_MIR_GRAPH_H_
diff --git a/compiler/dex/portable/mir_to_gbc.h b/compiler/dex/portable/mir_to_gbc.h
index 8aa0271..2786314 100644
--- a/compiler/dex/portable/mir_to_gbc.h
+++ b/compiler/dex/portable/mir_to_gbc.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_PORTABLE_MIRTOGBC_H_
-#define ART_SRC_COMPILER_DEX_PORTABLE_MIRTOGBC_H_
+#ifndef ART_COMPILER_DEX_PORTABLE_MIR_TO_GBC_H_
+#define ART_COMPILER_DEX_PORTABLE_MIR_TO_GBC_H_
#include "invoke_type.h"
#include "compiled_method.h"
@@ -192,4 +192,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_PORTABLE_MIRTOGBC_H_
+#endif // ART_COMPILER_DEX_PORTABLE_MIR_TO_GBC_H_
diff --git a/compiler/dex/quick/arm/arm_lir.h b/compiler/dex/quick/arm/arm_lir.h
index 9dd7daf..fca17a1 100644
--- a/compiler/dex/quick/arm/arm_lir.h
+++ b/compiler/dex/quick/arm/arm_lir.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_ARM_ARMLIR_H_
-#define ART_SRC_COMPILER_DEX_QUICK_ARM_ARMLIR_H_
+#ifndef ART_COMPILER_DEX_QUICK_ARM_ARM_LIR_H_
+#define ART_COMPILER_DEX_QUICK_ARM_ARM_LIR_H_
#include "dex/compiler_internals.h"
@@ -496,4 +496,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_ARM_ARMLIR_H_
+#endif // ART_COMPILER_DEX_QUICK_ARM_ARM_LIR_H_
diff --git a/compiler/dex/quick/arm/codegen_arm.h b/compiler/dex/quick/arm/codegen_arm.h
index a9199df..1599941 100644
--- a/compiler/dex/quick/arm/codegen_arm.h
+++ b/compiler/dex/quick/arm/codegen_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_ARM_CODEGENARM_H_
-#define ART_SRC_COMPILER_DEX_QUICK_ARM_CODEGENARM_H_
+#ifndef ART_COMPILER_DEX_QUICK_ARM_CODEGEN_ARM_H_
+#define ART_COMPILER_DEX_QUICK_ARM_CODEGEN_ARM_H_
#include "dex/compiler_internals.h"
@@ -192,4 +192,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_ARM_CODEGENARM_H_
+#endif // ART_COMPILER_DEX_QUICK_ARM_CODEGEN_ARM_H_
diff --git a/compiler/dex/quick/mips/codegen_mips.h b/compiler/dex/quick/mips/codegen_mips.h
index 9723b899..376ad7f 100644
--- a/compiler/dex/quick/mips/codegen_mips.h
+++ b/compiler/dex/quick/mips/codegen_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_QUICK_CODEGEN_MIPS_CODEGENMIPS_H_
-#define ART_SRC_DEX_QUICK_CODEGEN_MIPS_CODEGENMIPS_H_
+#ifndef ART_COMPILER_DEX_QUICK_MIPS_CODEGEN_MIPS_H_
+#define ART_COMPILER_DEX_QUICK_MIPS_CODEGEN_MIPS_H_
#include "dex/compiler_internals.h"
#include "mips_lir.h"
@@ -180,4 +180,4 @@
} // namespace art
-#endif // ART_SRC_DEX_QUICK_CODEGEN_MIPS_CODEGENMIPS_H_
+#endif // ART_COMPILER_DEX_QUICK_MIPS_CODEGEN_MIPS_H_
diff --git a/compiler/dex/quick/mips/mips_lir.h b/compiler/dex/quick/mips/mips_lir.h
index ceab9ab..8a99e93 100644
--- a/compiler/dex/quick/mips/mips_lir.h
+++ b/compiler/dex/quick/mips/mips_lir.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_MIPS_MIPSLIR_H_
-#define ART_SRC_COMPILER_DEX_QUICK_MIPS_MIPSLIR_H_
+#ifndef ART_COMPILER_DEX_QUICK_MIPS_MIPS_LIR_H_
+#define ART_COMPILER_DEX_QUICK_MIPS_MIPS_LIR_H_
#include "dex/compiler_internals.h"
@@ -429,4 +429,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_MIPS_MIPSLIR_H_
+#endif // ART_COMPILER_DEX_QUICK_MIPS_MIPS_LIR_H_
diff --git a/compiler/dex/quick/mir_to_lir-inl.h b/compiler/dex/quick/mir_to_lir-inl.h
index 4eef264..d9aef5d 100644
--- a/compiler/dex/quick/mir_to_lir-inl.h
+++ b/compiler/dex/quick/mir_to_lir-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
-#define ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
+#ifndef ART_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
+#define ART_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
#include "mir_to_lir.h"
@@ -198,4 +198,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
+#endif // ART_COMPILER_DEX_QUICK_MIR_TO_LIR_INL_H_
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
index 47514f7..bec86c1 100644
--- a/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
-#define ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
+#ifndef ART_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
+#define ART_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
#include "invoke_type.h"
#include "compiled_method.h"
@@ -776,4 +776,4 @@
} // namespace art
-#endif //ART_SRC_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
+#endif // ART_COMPILER_DEX_QUICK_MIR_TO_LIR_H_
diff --git a/compiler/dex/quick/x86/codegen_x86.h b/compiler/dex/quick/x86/codegen_x86.h
index 3e30141..4fa9dfb 100644
--- a/compiler/dex/quick/x86/codegen_x86.h
+++ b/compiler/dex/quick/x86/codegen_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_X86_CODEGENX86_H_
-#define ART_SRC_COMPILER_DEX_QUICK_X86_CODEGENX86_H_
+#ifndef ART_COMPILER_DEX_QUICK_X86_CODEGEN_X86_H_
+#define ART_COMPILER_DEX_QUICK_X86_CODEGEN_X86_H_
#include "dex/compiler_internals.h"
#include "x86_lir.h"
@@ -202,4 +202,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_X86_CODEGENX86_H_
+#endif // ART_COMPILER_DEX_QUICK_X86_CODEGEN_X86_H_
diff --git a/compiler/dex/quick/x86/x86_lir.h b/compiler/dex/quick/x86/x86_lir.h
index 600bd03..a39231b 100644
--- a/compiler/dex/quick/x86/x86_lir.h
+++ b/compiler/dex/quick/x86/x86_lir.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_QUICK_X86_X86LIR_H_
-#define ART_SRC_COMPILER_DEX_QUICK_X86_X86LIR_H_
+#ifndef ART_COMPILER_DEX_QUICK_X86_X86_LIR_H_
+#define ART_COMPILER_DEX_QUICK_X86_X86_LIR_H_
#include "dex/compiler_internals.h"
@@ -439,4 +439,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_QUICK_X86_X86LIR_H_
+#endif // ART_COMPILER_DEX_QUICK_X86_X86_LIR_H_
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 8388cfb..89f57b1 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -26,7 +26,6 @@
#include "dex_compilation_unit.h"
#include "dex_file-inl.h"
#include "jni_internal.h"
-#include "oat_file.h"
#include "object_utils.h"
#include "runtime.h"
#include "gc/accounting/card_table-inl.h"
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index d37f494..80cc89b 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DRIVER_COMPILER_DRIVER_H_
-#define ART_SRC_COMPILER_DRIVER_COMPILER_DRIVER_H_
+#ifndef ART_COMPILER_DRIVER_COMPILER_DRIVER_H_
+#define ART_COMPILER_DRIVER_COMPILER_DRIVER_H_
#include <set>
#include <string>
@@ -29,7 +29,7 @@
#include "instruction_set.h"
#include "invoke_type.h"
#include "method_reference.h"
-#include "oat_file.h"
+#include "os.h"
#include "runtime.h"
#include "safe_map.h"
#include "thread_pool.h"
@@ -410,4 +410,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DRIVER_COMPILER_DRIVER_H_
+#endif // ART_COMPILER_DRIVER_COMPILER_DRIVER_H_
diff --git a/compiler/driver/dex_compilation_unit.h b/compiler/driver/dex_compilation_unit.h
index 3c6129d..53efd12 100644
--- a/compiler/driver/dex_compilation_unit.h
+++ b/compiler/driver/dex_compilation_unit.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_DEX_DEX_COMPILATION_UNIT_H_
-#define ART_SRC_COMPILER_DEX_DEX_COMPILATION_UNIT_H_
+#ifndef ART_COMPILER_DRIVER_DEX_COMPILATION_UNIT_H_
+#define ART_COMPILER_DRIVER_DEX_COMPILATION_UNIT_H_
#include <stdint.h>
@@ -113,4 +113,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_DEX_DEX_COMPILATION_UNIT_H_
+#endif // ART_COMPILER_DRIVER_DEX_COMPILATION_UNIT_H_
diff --git a/compiler/elf_fixup.h b/compiler/elf_fixup.h
index 79c45c1..1abf06b 100644
--- a/compiler/elf_fixup.h
+++ b/compiler/elf_fixup.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_FIXUP_H_
-#define ART_SRC_ELF_FIXUP_H_
+#ifndef ART_COMPILER_ELF_FIXUP_H_
+#define ART_COMPILER_ELF_FIXUP_H_
#include <stdint.h>
@@ -53,4 +53,4 @@
} // namespace art
-#endif // ART_SRC_ELF_FIXUP_H_
+#endif // ART_COMPILER_ELF_FIXUP_H_
diff --git a/compiler/elf_stripper.h b/compiler/elf_stripper.h
index b202e6e..6015b30 100644
--- a/compiler/elf_stripper.h
+++ b/compiler/elf_stripper.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_STRIPPER_H_
-#define ART_SRC_ELF_STRIPPER_H_
+#ifndef ART_COMPILER_ELF_STRIPPER_H_
+#define ART_COMPILER_ELF_STRIPPER_H_
#include "base/macros.h"
#include "os.h"
@@ -34,4 +34,4 @@
} // namespace art
-#endif // ART_SRC_ELF_STRIPPER_H_
+#endif // ART_COMPILER_ELF_STRIPPER_H_
diff --git a/compiler/elf_writer.cc b/compiler/elf_writer.cc
index 0823a53..70d17de 100644
--- a/compiler/elf_writer.cc
+++ b/compiler/elf_writer.cc
@@ -27,7 +27,6 @@
#include "mirror/abstract_method-inl.h"
#include "mirror/object-inl.h"
#include "oat.h"
-#include "oat_file.h"
#include "scoped_thread_state_change.h"
namespace art {
diff --git a/compiler/elf_writer.h b/compiler/elf_writer.h
index 7392e67..ab436e4 100644
--- a/compiler/elf_writer.h
+++ b/compiler/elf_writer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_WRITER_H_
-#define ART_SRC_ELF_WRITER_H_
+#ifndef ART_COMPILER_ELF_WRITER_H_
+#define ART_COMPILER_ELF_WRITER_H_
#include <stdint.h>
@@ -62,4 +62,4 @@
} // namespace art
-#endif // ART_SRC_ELF_WRITER_H_
+#endif // ART_COMPILER_ELF_WRITER_H_
diff --git a/compiler/elf_writer_mclinker.h b/compiler/elf_writer_mclinker.h
index 21f23e1..468fa9a 100644
--- a/compiler/elf_writer_mclinker.h
+++ b/compiler/elf_writer_mclinker.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_WRITER_MCLINKER_H_
-#define ART_SRC_ELF_WRITER_MCLINKER_H_
+#ifndef ART_COMPILER_ELF_WRITER_MCLINKER_H_
+#define ART_COMPILER_ELF_WRITER_MCLINKER_H_
#include "elf_writer.h"
@@ -96,4 +96,4 @@
} // namespace art
-#endif // ART_SRC_ELF_WRITER_MCLINKER_H_
+#endif // ART_COMPILER_ELF_WRITER_MCLINKER_H_
diff --git a/compiler/elf_writer_quick.h b/compiler/elf_writer_quick.h
index a1a386b..a15c239 100644
--- a/compiler/elf_writer_quick.h
+++ b/compiler/elf_writer_quick.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_WRITER_MCLINKER_H_
-#define ART_SRC_ELF_WRITER_MCLINKER_H_
+#ifndef ART_COMPILER_ELF_WRITER_QUICK_H_
+#define ART_COMPILER_ELF_WRITER_QUICK_H_
#include "elf_writer.h"
@@ -48,4 +48,4 @@
} // namespace art
-#endif // ART_SRC_ELF_WRITER_MCLINKER_H_
+#endif // ART_COMPILER_ELF_WRITER_QUICK_H_
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index 9b0d671..e43ec63 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_IMAGE_WRITER_H_
-#define ART_SRC_IMAGE_WRITER_H_
+#ifndef ART_COMPILER_IMAGE_WRITER_H_
+#define ART_COMPILER_IMAGE_WRITER_H_
#include <stdint.h>
@@ -207,4 +207,4 @@
} // namespace art
-#endif // ART_SRC_IMAGE_WRITER_H_
+#endif // ART_COMPILER_IMAGE_WRITER_H_
diff --git a/compiler/jni/portable/jni_compiler.h b/compiler/jni/portable/jni_compiler.h
index a04277c..9bdf35e 100644
--- a/compiler/jni/portable/jni_compiler.h
+++ b/compiler/jni/portable/jni_compiler.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
-#define ART_SRC_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
+#ifndef ART_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
+#define ART_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
#include <stdint.h>
@@ -84,4 +84,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
+#endif // ART_COMPILER_JNI_PORTABLE_JNI_COMPILER_H_
diff --git a/compiler/jni/quick/arm/calling_convention_arm.h b/compiler/jni/quick/arm/calling_convention_arm.h
index 3787d45..f188700 100644
--- a/compiler/jni/quick/arm/calling_convention_arm.h
+++ b/compiler/jni/quick/arm/calling_convention_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_JNI_ARM_CALLING_CONVENTION_ARM_H_
-#define ART_SRC_OAT_JNI_ARM_CALLING_CONVENTION_ARM_H_
+#ifndef ART_COMPILER_JNI_QUICK_ARM_CALLING_CONVENTION_ARM_H_
+#define ART_COMPILER_JNI_QUICK_ARM_CALLING_CONVENTION_ARM_H_
#include "jni/quick/calling_convention.h"
@@ -85,4 +85,4 @@
} // namespace arm
} // namespace art
-#endif // ART_SRC_OAT_JNI_ARM_CALLING_CONVENTION_ARM_H_
+#endif // ART_COMPILER_JNI_QUICK_ARM_CALLING_CONVENTION_ARM_H_
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index 121d1f8..d492b42 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_JNI_CALLING_CONVENTION_H_
-#define ART_SRC_OAT_JNI_CALLING_CONVENTION_H_
+#ifndef ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
+#define ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
#include <vector>
#include "oat/utils/managed_register.h"
@@ -286,4 +286,4 @@
} // namespace art
-#endif // ART_SRC_OAT_JNI_CALLING_CONVENTION_H_
+#endif // ART_COMPILER_JNI_QUICK_CALLING_CONVENTION_H_
diff --git a/compiler/jni/quick/mips/calling_convention_mips.h b/compiler/jni/quick/mips/calling_convention_mips.h
index 9068136..8412898 100644
--- a/compiler/jni/quick/mips/calling_convention_mips.h
+++ b/compiler/jni/quick/mips/calling_convention_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_JNI_MIPS_CALLING_CONVENTION_MIPS_H_
-#define ART_SRC_OAT_JNI_MIPS_CALLING_CONVENTION_MIPS_H_
+#ifndef ART_COMPILER_JNI_QUICK_MIPS_CALLING_CONVENTION_MIPS_H_
+#define ART_COMPILER_JNI_QUICK_MIPS_CALLING_CONVENTION_MIPS_H_
#include "jni/quick/calling_convention.h"
@@ -83,4 +83,4 @@
} // namespace mips
} // namespace art
-#endif // ART_SRC_OAT_JNI_MIPS_CALLING_CONVENTION_MIPS_H_
+#endif // ART_COMPILER_JNI_QUICK_MIPS_CALLING_CONVENTION_MIPS_H_
diff --git a/compiler/jni/quick/x86/calling_convention_x86.h b/compiler/jni/quick/x86/calling_convention_x86.h
index ea8a26e..082c1c8 100644
--- a/compiler/jni/quick/x86/calling_convention_x86.h
+++ b/compiler/jni/quick/x86/calling_convention_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_JNI_X86_CALLING_CONVENTION_X86_H_
-#define ART_SRC_OAT_JNI_X86_CALLING_CONVENTION_X86_H_
+#ifndef ART_COMPILER_JNI_QUICK_X86_CALLING_CONVENTION_X86_H_
+#define ART_COMPILER_JNI_QUICK_X86_CALLING_CONVENTION_X86_H_
#include "jni/quick/calling_convention.h"
@@ -80,4 +80,4 @@
} // namespace x86
} // namespace art
-#endif // ART_SRC_OAT_JNI_X86_CALLING_CONVENTION_X86_H_
+#endif // ART_COMPILER_JNI_QUICK_X86_CALLING_CONVENTION_X86_H_
diff --git a/compiler/llvm/backend_options.h b/compiler/llvm/backend_options.h
index 924a346..2a08bda 100644
--- a/compiler/llvm/backend_options.h
+++ b/compiler/llvm/backend_options.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_BACKEND_OPTIONS_H_
-#define ART_SRC_COMPILER_LLVM_BACKEND_OPTIONS_H_
+#ifndef ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
+#define ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
#include <llvm/Support/CommandLine.h>
@@ -47,4 +47,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_BACKEND_OPTIONS_H_
+#endif // ART_COMPILER_LLVM_BACKEND_OPTIONS_H_
diff --git a/compiler/llvm/backend_types.h b/compiler/llvm/backend_types.h
index c89504a..095040e 100644
--- a/compiler/llvm/backend_types.h
+++ b/compiler/llvm/backend_types.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_BACKEND_TYPES_H_
-#define ART_SRC_COMPILER_LLVM_BACKEND_TYPES_H_
+#ifndef ART_COMPILER_LLVM_BACKEND_TYPES_H_
+#define ART_COMPILER_LLVM_BACKEND_TYPES_H_
#include "base/logging.h"
@@ -101,4 +101,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_BACKEND_TYPES_H_
+#endif // ART_COMPILER_LLVM_BACKEND_TYPES_H_
diff --git a/compiler/llvm/compiler_llvm.cc b/compiler/llvm/compiler_llvm.cc
index afca223..4475b25 100644
--- a/compiler/llvm/compiler_llvm.cc
+++ b/compiler/llvm/compiler_llvm.cc
@@ -26,7 +26,6 @@
#include "ir_builder.h"
#include "jni/portable/jni_compiler.h"
#include "llvm_compilation_unit.h"
-#include "oat_file.h"
#include "utils_llvm.h"
#include "verifier/method_verifier.h"
diff --git a/compiler/llvm/compiler_llvm.h b/compiler/llvm/compiler_llvm.h
index b70ddc5..77841d8 100644
--- a/compiler/llvm/compiler_llvm.h
+++ b/compiler/llvm/compiler_llvm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_COMPILER_LLVM_H_
-#define ART_SRC_COMPILER_LLVM_COMPILER_LLVM_H_
+#ifndef ART_COMPILER_LLVM_COMPILER_LLVM_H_
+#define ART_COMPILER_LLVM_COMPILER_LLVM_H_
#include "base/macros.h"
#include "dex_file.h"
@@ -100,4 +100,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_COMPILER_LLVM_H_
+#endif // ART_COMPILER_LLVM_COMPILER_LLVM_H_
diff --git a/compiler/llvm/intrinsic_helper.h b/compiler/llvm/intrinsic_helper.h
index 49b8a95..bb123fd 100644
--- a/compiler/llvm/intrinsic_helper.h
+++ b/compiler/llvm/intrinsic_helper.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GREENLAND_INTRINSIC_HELPER_H_
-#define ART_SRC_GREENLAND_INTRINSIC_HELPER_H_
+#ifndef ART_COMPILER_LLVM_INTRINSIC_HELPER_H_
+#define ART_COMPILER_LLVM_INTRINSIC_HELPER_H_
#include "base/logging.h"
@@ -154,4 +154,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_GREENLAND_INTRINSIC_HELPER_H_
+#endif // ART_COMPILER_LLVM_INTRINSIC_HELPER_H_
diff --git a/compiler/llvm/ir_builder.h b/compiler/llvm/ir_builder.h
index 734b22f..65da005 100644
--- a/compiler/llvm/ir_builder.h
+++ b/compiler/llvm/ir_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_IR_BUILDER_H_
-#define ART_SRC_COMPILER_LLVM_IR_BUILDER_H_
+#ifndef ART_COMPILER_LLVM_IR_BUILDER_H_
+#define ART_COMPILER_LLVM_IR_BUILDER_H_
#include "backend_types.h"
#include "dex/compiler_enums.h"
@@ -487,4 +487,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_IR_BUILDER_H_
+#endif // ART_COMPILER_LLVM_IR_BUILDER_H_
diff --git a/compiler/llvm/llvm_compilation_unit.h b/compiler/llvm/llvm_compilation_unit.h
index a4f0adb..9de1323 100644
--- a/compiler/llvm/llvm_compilation_unit.h
+++ b/compiler/llvm/llvm_compilation_unit.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
-#define ART_SRC_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
+#ifndef ART_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
+#define ART_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
#include "base/logging.h"
#include "base/mutex.h"
@@ -135,4 +135,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
+#endif // ART_COMPILER_LLVM_LLVM_COMPILATION_UNIT_H_
diff --git a/compiler/llvm/md_builder.h b/compiler/llvm/md_builder.h
index 79a7caa..cc169a3 100644
--- a/compiler/llvm/md_builder.h
+++ b/compiler/llvm/md_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_MD_BUILDER_H_
-#define ART_SRC_COMPILER_LLVM_MD_BUILDER_H_
+#ifndef ART_COMPILER_LLVM_MD_BUILDER_H_
+#define ART_COMPILER_LLVM_MD_BUILDER_H_
#include "backend_types.h"
@@ -68,4 +68,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_MD_BUILDER_H_
+#endif // ART_COMPILER_LLVM_MD_BUILDER_H_
diff --git a/compiler/llvm/runtime_support_builder.h b/compiler/llvm/runtime_support_builder.h
index 267b406..c3c0856 100644
--- a/compiler/llvm/runtime_support_builder.h
+++ b/compiler/llvm/runtime_support_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
#include "backend_types.h"
#include "base/logging.h"
@@ -95,4 +95,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
+#endif // ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_H_
diff --git a/compiler/llvm/runtime_support_builder_arm.h b/compiler/llvm/runtime_support_builder_arm.h
index 3c5972f..6aa23b2 100644
--- a/compiler/llvm/runtime_support_builder_arm.h
+++ b/compiler/llvm/runtime_support_builder_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
#include "runtime_support_builder.h"
@@ -43,4 +43,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
+#endif // ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_ARM_H_
diff --git a/compiler/llvm/runtime_support_builder_thumb2.h b/compiler/llvm/runtime_support_builder_thumb2.h
index 4762a26..941bd6b 100644
--- a/compiler/llvm/runtime_support_builder_thumb2.h
+++ b/compiler/llvm/runtime_support_builder_thumb2.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
#include "runtime_support_builder_arm.h"
@@ -34,4 +34,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
+#endif // ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_THUMB2_H_
diff --git a/compiler/llvm/runtime_support_builder_x86.h b/compiler/llvm/runtime_support_builder_x86.h
index e5fdbc2..831d022 100644
--- a/compiler/llvm/runtime_support_builder_x86.h
+++ b/compiler/llvm/runtime_support_builder_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
#include "runtime_support_builder.h"
@@ -39,4 +39,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
+#endif // ART_COMPILER_LLVM_RUNTIME_SUPPORT_BUILDER_X86_H_
diff --git a/compiler/llvm/runtime_support_llvm_func.h b/compiler/llvm/runtime_support_llvm_func.h
index ac6f3b8..c0e76ad 100644
--- a/compiler/llvm/runtime_support_llvm_func.h
+++ b/compiler/llvm/runtime_support_llvm_func.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_FUNC_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_FUNC_H_
+#ifndef ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_H_
+#define ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_H_
namespace art {
namespace llvm {
@@ -35,4 +35,4 @@
} // namespace llvm
} // namespace art
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_FUNC_H_
+#endif // ART_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_FUNC_H_
diff --git a/compiler/llvm/utils_llvm.h b/compiler/llvm/utils_llvm.h
index 2e273f4..a606b91 100644
--- a/compiler/llvm/utils_llvm.h
+++ b/compiler/llvm/utils_llvm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_UTILS_LLVM_H_
-#define ART_SRC_UTILS_LLVM_H_
+#ifndef ART_COMPILER_LLVM_UTILS_LLVM_H_
+#define ART_COMPILER_LLVM_UTILS_LLVM_H_
#include <llvm/Analysis/Verifier.h>
@@ -29,4 +29,4 @@
} // namespace art
-#endif // ART_SRC_UTILS_LLVM_H_
+#endif // ART_COMPILER_LLVM_UTILS_LLVM_H_
diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h
index 1f97bf8..ea7156e 100644
--- a/compiler/oat_writer.h
+++ b/compiler/oat_writer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_WRITER_H_
-#define ART_SRC_OAT_WRITER_H_
+#ifndef ART_COMPILER_OAT_WRITER_H_
+#define ART_COMPILER_OAT_WRITER_H_
#include <stdint.h>
@@ -224,4 +224,4 @@
} // namespace art
-#endif // ART_SRC_OAT_WRITER_H_
+#endif // ART_COMPILER_OAT_WRITER_H_
diff --git a/compiler/sea_ir/instruction_tools.h b/compiler/sea_ir/instruction_tools.h
index f68cdd0..b0bbc27 100644
--- a/compiler/sea_ir/instruction_tools.h
+++ b/compiler/sea_ir/instruction_tools.h
@@ -17,8 +17,8 @@
#include "dex_instruction.h"
-#ifndef INSTRUCTION_TOOLS_H_
-#define INSTRUCTION_TOOLS_H_
+#ifndef ART_COMPILER_SEA_IR_INSTRUCTION_TOOLS_H_
+#define ART_COMPILER_SEA_IR_INSTRUCTION_TOOLS_H_
// Note: This file has content cannibalized for SEA_IR from the MIR implementation,
// to avoid having a dependence on MIR.
@@ -121,4 +121,4 @@
static const int instruction_attributes_[];
};
} // end namespace sea_ir
-#endif // INSTRUCTION_TOOLS_H_
+#endif // ART_COMPILER_SEA_IR_INSTRUCTION_TOOLS_H_
diff --git a/compiler/sea_ir/sea.h b/compiler/sea_ir/sea.h
index a133678..7491d21 100644
--- a/compiler/sea_ir/sea.h
+++ b/compiler/sea_ir/sea.h
@@ -15,8 +15,8 @@
*/
-#ifndef SEA_IR_H_
-#define SEA_IR_H_
+#ifndef ART_COMPILER_SEA_IR_SEA_H_
+#define ART_COMPILER_SEA_IR_SEA_H_
#include <set>
#include <map>
@@ -333,4 +333,4 @@
std::vector<Region*> regions_;
};
} // end namespace sea_ir
-#endif
+#endif // ART_COMPILER_SEA_IR_SEA_H_
diff --git a/compiler/stubs/stubs.h b/compiler/stubs/stubs.h
index ebe761d..d85eae8 100644
--- a/compiler/stubs/stubs.h
+++ b/compiler/stubs/stubs.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_STUBS_STUBS_H_
-#define ART_SRC_COMPILER_STUBS_STUBS_H_
+#ifndef ART_COMPILER_STUBS_STUBS_H_
+#define ART_COMPILER_STUBS_STUBS_H_
#include "runtime.h"
@@ -56,4 +56,4 @@
} // namespace art
-#endif // ART_SRC_COMPILER_STUBS_STUBS_H_
+#endif // ART_COMPILER_STUBS_STUBS_H_
diff --git a/jdwpspy/Common.h b/jdwpspy/Common.h
index 0bd3056..33f1a67 100644
--- a/jdwpspy/Common.h
+++ b/jdwpspy/Common.h
@@ -3,8 +3,8 @@
*
* jdwpspy common stuff.
*/
-#ifndef _JDWPSPY_COMMON
-#define _JDWPSPY_COMMON
+#ifndef ART_JDWPSPY_COMMON_H_
+#define ART_JDWPSPY_COMMON_H_
#include <stdint.h>
#include <stdio.h>
@@ -99,4 +99,4 @@
void printHexDumpEx(FILE* fp, const void* vaddr, size_t length,
HexDumpMode mode, const char* prefix);
-#endif /*_JDWPSPY_COMMON*/
+#endif // ART_JDWPSPY_COMMON_H_
diff --git a/runtime/asm_support.h b/runtime/asm_support.h
index 8ea4adf..7b20c7a 100644
--- a/runtime/asm_support.h
+++ b/runtime/asm_support.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ASM_SUPPORT_H_
-#define ART_SRC_ASM_SUPPORT_H_
+#ifndef ART_RUNTIME_ASM_SUPPORT_H_
+#define ART_RUNTIME_ASM_SUPPORT_H_
// Value loaded into rSUSPEND for quick. When this value is counted down to zero we do a suspend
// check.
@@ -55,4 +55,4 @@
#define THREAD_EXCEPTION_OFFSET 12
#endif
-#endif // ART_SRC_ASM_SUPPORT_H_
+#endif // ART_RUNTIME_ASM_SUPPORT_H_
diff --git a/runtime/atomic.h b/runtime/atomic.h
index d340dc5..cb6f86b 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ATOMIC_H_
-#define ART_SRC_ATOMIC_H_
+#ifndef ART_RUNTIME_ATOMIC_H_
+#define ART_RUNTIME_ATOMIC_H_
#include <stdint.h>
@@ -54,4 +54,4 @@
} // namespace art
-#endif // ART_SRC_ATOMIC_H_
+#endif // ART_RUNTIME_ATOMIC_H_
diff --git a/runtime/atomic_integer.h b/runtime/atomic_integer.h
index 324d08b..ce00454 100644
--- a/runtime/atomic_integer.h
+++ b/runtime/atomic_integer.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ATOMIC_INTEGER_H_
-#define ART_SRC_ATOMIC_INTEGER_H_
+#ifndef ART_RUNTIME_ATOMIC_INTEGER_H_
+#define ART_RUNTIME_ATOMIC_INTEGER_H_
#include "cutils/atomic.h"
#include "cutils/atomic-inline.h"
@@ -80,4 +80,4 @@
}
-#endif // ART_SRC_ATOMIC_INTEGER_H_
+#endif // ART_RUNTIME_ATOMIC_INTEGER_H_
diff --git a/runtime/barrier.h b/runtime/barrier.h
index 2b0429a..e0ad239 100644
--- a/runtime/barrier.h
+++ b/runtime/barrier.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BARRIER_H_
-#define ART_SRC_BARRIER_H_
+#ifndef ART_RUNTIME_BARRIER_H_
+#define ART_RUNTIME_BARRIER_H_
#include "base/mutex.h"
#include "locks.h"
@@ -52,4 +52,4 @@
};
} // namespace art
-#endif // ART_SRC_GC_BARRIER_H_
+#endif // ART_RUNTIME_BARRIER_H_
diff --git a/runtime/base/casts.h b/runtime/base/casts.h
index 34c05af..be94c2e 100644
--- a/runtime/base/casts.h
+++ b/runtime/base/casts.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_CASTS_H_
-#define ART_SRC_BASE_CASTS_H_
+#ifndef ART_RUNTIME_BASE_CASTS_H_
+#define ART_RUNTIME_BASE_CASTS_H_
#include <assert.h>
#include <string.h>
@@ -90,4 +90,4 @@
} // namespace art
-#endif // ART_SRC_BASE_CASTS_H_
+#endif // ART_RUNTIME_BASE_CASTS_H_
diff --git a/runtime/base/histogram-inl.h b/runtime/base/histogram-inl.h
index 9514209..bbca603 100644
--- a/runtime/base/histogram-inl.h
+++ b/runtime/base/histogram-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_BASE_HISTOGRAM_INL_H_
-#define SRC_BASE_HISTOGRAM_INL_H_
+#ifndef ART_RUNTIME_BASE_HISTOGRAM_INL_H_
+#define ART_RUNTIME_BASE_HISTOGRAM_INL_H_
#include "histogram.h"
@@ -251,5 +251,5 @@
}
} // namespace art
-#endif // SRC_BASE_HISTOGRAM_INL_H_
+#endif // ART_RUNTIME_BASE_HISTOGRAM_INL_H_
diff --git a/runtime/base/histogram.h b/runtime/base/histogram.h
index 6878e71..8724d2c 100644
--- a/runtime/base/histogram.h
+++ b/runtime/base/histogram.h
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_HISTOGRAM_H_
-#define ART_SRC_BASE_HISTOGRAM_H_
+#ifndef ART_RUNTIME_BASE_HISTOGRAM_H_
+#define ART_RUNTIME_BASE_HISTOGRAM_H_
#include <vector>
#include <string>
@@ -117,4 +117,4 @@
};
}
-#endif // ART_SRC_BASE_HISTOGRAM_H_
+#endif // ART_RUNTIME_BASE_HISTOGRAM_H_
diff --git a/runtime/base/logging.h b/runtime/base/logging.h
index 8d89e4d..f02a39a 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_LOGGING_H_
-#define ART_SRC_BASE_LOGGING_H_
+#ifndef ART_RUNTIME_BASE_LOGGING_H_
+#define ART_RUNTIME_BASE_LOGGING_H_
#include <cerrno>
#include <cstring>
@@ -334,4 +334,4 @@
} // namespace art
-#endif // ART_SRC_BASE_LOGGING_H_
+#endif // ART_RUNTIME_BASE_LOGGING_H_
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index 847105d..4a196f2 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_MACROS_H_
-#define ART_SRC_BASE_MACROS_H_
+#ifndef ART_RUNTIME_BASE_MACROS_H_
+#define ART_RUNTIME_BASE_MACROS_H_
#include <stddef.h> // for size_t
@@ -198,4 +198,4 @@
#endif // defined(__SUPPORT_TS_ANNOTATION__)
-#endif // ART_SRC_BASE_MACROS_H_
+#endif // ART_RUNTIME_BASE_MACROS_H_
diff --git a/runtime/base/mutex-inl.h b/runtime/base/mutex-inl.h
index f911054..07157da 100644
--- a/runtime/base/mutex-inl.h
+++ b/runtime/base/mutex-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_MUTEX_INL_H_
-#define ART_SRC_BASE_MUTEX_INL_H_
+#ifndef ART_RUNTIME_BASE_MUTEX_INL_H_
+#define ART_RUNTIME_BASE_MUTEX_INL_H_
#include "mutex.h"
@@ -184,4 +184,4 @@
} // namespace art
-#endif // ART_SRC_BASE_MUTEX_INL_H_
+#endif // ART_RUNTIME_BASE_MUTEX_INL_H_
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index 24df572..b924798 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_MUTEX_H_
-#define ART_SRC_BASE_MUTEX_H_
+#ifndef ART_RUNTIME_BASE_MUTEX_H_
+#define ART_RUNTIME_BASE_MUTEX_H_
#include <pthread.h>
#include <stdint.h>
@@ -398,4 +398,4 @@
} // namespace art
-#endif // ART_SRC_BASE_MUTEX_H_
+#endif // ART_RUNTIME_BASE_MUTEX_H_
diff --git a/runtime/base/stl_util.h b/runtime/base/stl_util.h
index eb8be42..ff9f40c 100644
--- a/runtime/base/stl_util.h
+++ b/runtime/base/stl_util.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_STL_UTIL_H_
-#define ART_SRC_BASE_STL_UTIL_H_
+#ifndef ART_RUNTIME_BASE_STL_UTIL_H_
+#define ART_RUNTIME_BASE_STL_UTIL_H_
#include <algorithm>
#include <sstream>
@@ -94,4 +94,4 @@
} // namespace art
-#endif // ART_SRC_BASE_STL_UTIL_H_
+#endif // ART_RUNTIME_BASE_STL_UTIL_H_
diff --git a/runtime/base/stringpiece.h b/runtime/base/stringpiece.h
index 3664218..62088cc 100644
--- a/runtime/base/stringpiece.h
+++ b/runtime/base/stringpiece.h
@@ -25,8 +25,8 @@
// Systematic usage of StringPiece is encouraged as it will reduce unnecessary
// conversions from "const char*" to "string" and back again.
-#ifndef ART_SRC_BASE_STRINGPIECE_H_
-#define ART_SRC_BASE_STRINGPIECE_H_
+#ifndef ART_RUNTIME_BASE_STRINGPIECE_H_
+#define ART_RUNTIME_BASE_STRINGPIECE_H_
#include <string.h>
#include <algorithm>
@@ -223,4 +223,4 @@
} // namespace art
-#endif // ART_SRC_BASE_STRINGPIECE_H_
+#endif // ART_RUNTIME_BASE_STRINGPIECE_H_
diff --git a/runtime/base/stringprintf.h b/runtime/base/stringprintf.h
index d707cc0..4767a75 100644
--- a/runtime/base/stringprintf.h
+++ b/runtime/base/stringprintf.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_BASE_STRINGPRINTF_H_
-#define ART_SRC_BASE_STRINGPRINTF_H_
+#ifndef ART_RUNTIME_BASE_STRINGPRINTF_H_
+#define ART_RUNTIME_BASE_STRINGPRINTF_H_
#include <stdarg.h>
#include <string>
@@ -35,4 +35,4 @@
} // namespace art
-#endif // ART_SRC_BASE_STRINGPRINTF_H_
+#endif // ART_RUNTIME_BASE_STRINGPRINTF_H_
diff --git a/runtime/base/timing_logger.h b/runtime/base/timing_logger.h
index 65732b1..816cbea 100644
--- a/runtime/base/timing_logger.h
+++ b/runtime/base/timing_logger.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_TIMING_LOGGER_H_
-#define ART_SRC_TIMING_LOGGER_H_
+#ifndef ART_RUNTIME_BASE_TIMING_LOGGER_H_
+#define ART_RUNTIME_BASE_TIMING_LOGGER_H_
#include "base/histogram.h"
#include "base/macros.h"
@@ -139,4 +139,4 @@
} // namespace base
} // namespace art
-#endif // ART_SRC_TIMING_LOGGER_H_
+#endif // ART_RUNTIME_BASE_TIMING_LOGGER_H_
diff --git a/runtime/base/unix_file/fd_file.h b/runtime/base/unix_file/fd_file.h
index 2b33961..79a0db9 100644
--- a/runtime/base/unix_file/fd_file.h
+++ b/runtime/base/unix_file/fd_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_FD_FILE_H_
-#define BASE_UNIX_FILE_FD_FILE_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_FD_FILE_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_FD_FILE_H_
#include <fcntl.h>
#include <string>
@@ -72,4 +72,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_FD_FILE_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_FD_FILE_H_
diff --git a/runtime/base/unix_file/mapped_file.h b/runtime/base/unix_file/mapped_file.h
index 161100b..28cc551 100644
--- a/runtime/base/unix_file/mapped_file.h
+++ b/runtime/base/unix_file/mapped_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_MAPPED_FILE_H_
-#define BASE_UNIX_FILE_MAPPED_FILE_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_MAPPED_FILE_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_MAPPED_FILE_H_
#include <fcntl.h>
#include <string>
@@ -94,4 +94,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_MAPPED_FILE_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_MAPPED_FILE_H_
diff --git a/runtime/base/unix_file/null_file.h b/runtime/base/unix_file/null_file.h
index e716603..3394731 100644
--- a/runtime/base/unix_file/null_file.h
+++ b/runtime/base/unix_file/null_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_NULL_FILE_H_
-#define BASE_UNIX_FILE_NULL_FILE_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_NULL_FILE_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_NULL_FILE_H_
#include "base/unix_file/random_access_file.h"
#include "base/macros.h"
@@ -47,4 +47,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_NULL_FILE_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_NULL_FILE_H_
diff --git a/runtime/base/unix_file/random_access_file.h b/runtime/base/unix_file/random_access_file.h
index 22da37f..31a6dbe 100644
--- a/runtime/base/unix_file/random_access_file.h
+++ b/runtime/base/unix_file/random_access_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
-#define BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
#include <stdint.h>
@@ -65,4 +65,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_H_
diff --git a/runtime/base/unix_file/random_access_file_test.h b/runtime/base/unix_file/random_access_file_test.h
index 3baaeae..9d8550d 100644
--- a/runtime/base/unix_file/random_access_file_test.h
+++ b/runtime/base/unix_file/random_access_file_test.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
-#define BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
#include <errno.h>
@@ -169,4 +169,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_TEST_H_
diff --git a/runtime/base/unix_file/random_access_file_utils.h b/runtime/base/unix_file/random_access_file_utils.h
index 0535ead..30c81c0 100644
--- a/runtime/base/unix_file/random_access_file_utils.h
+++ b/runtime/base/unix_file/random_access_file_utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
-#define BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
namespace unix_file {
@@ -27,4 +27,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_RANDOM_ACCESS_FILE_UTILS_H_
diff --git a/runtime/base/unix_file/string_file.h b/runtime/base/unix_file/string_file.h
index 8944373..26904f8 100644
--- a/runtime/base/unix_file/string_file.h
+++ b/runtime/base/unix_file/string_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef BASE_UNIX_FILE_STRING_FILE_H_
-#define BASE_UNIX_FILE_STRING_FILE_H_
+#ifndef ART_RUNTIME_BASE_UNIX_FILE_STRING_FILE_H_
+#define ART_RUNTIME_BASE_UNIX_FILE_STRING_FILE_H_
#include <stdint.h>
@@ -56,4 +56,4 @@
} // namespace unix_file
-#endif // BASE_UNIX_FILE_STRING_FILE_H_
+#endif // ART_RUNTIME_BASE_UNIX_FILE_STRING_FILE_H_
diff --git a/runtime/class_linker-inl.h b/runtime/class_linker-inl.h
index 6cf4991..4d01b66 100644
--- a/runtime/class_linker-inl.h
+++ b/runtime/class_linker-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CLASS_LINKER_INL_H_
-#define ART_SRC_CLASS_LINKER_INL_H_
+#ifndef ART_RUNTIME_CLASS_LINKER_INL_H_
+#define ART_RUNTIME_CLASS_LINKER_INL_H_
#include "class_linker.h"
@@ -143,4 +143,4 @@
} // namespace art
-#endif // ART_SRC_CLASS_LINKER_INL_H_
+#endif // ART_RUNTIME_CLASS_LINKER_INL_H_
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 6c1db70..7cf6cd9 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -680,35 +680,12 @@
oat_files_.push_back(&oat_file);
}
-OatFile* ClassLinker::OpenOat(const gc::space::ImageSpace* space) {
+OatFile& ClassLinker::GetImageOatFile(gc::space::ImageSpace* space) {
+ VLOG(startup) << "ClassLinker::GetImageOatFile entering";
+ OatFile& oat_file = space->ReleaseOatFile();
WriterMutexLock mu(Thread::Current(), dex_lock_);
- const Runtime* runtime = Runtime::Current();
- const ImageHeader& image_header = space->GetImageHeader();
- // Grab location but don't use Object::AsString as we haven't yet initialized the roots to
- // check the down cast
- mirror::String* oat_location =
- down_cast<mirror::String*>(image_header.GetImageRoot(ImageHeader::kOatLocation));
- std::string oat_filename;
- oat_filename += runtime->GetHostPrefix();
- oat_filename += oat_location->ToModifiedUtf8();
- runtime->GetHeap()->UnReserveOatFileAddressRange();
- OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(),
- !Runtime::Current()->IsCompiler());
- VLOG(startup) << "ClassLinker::OpenOat entering oat_filename=" << oat_filename;
- if (oat_file == NULL) {
- LOG(ERROR) << "Failed to open oat file " << oat_filename << " referenced from image.";
- return NULL;
- }
- uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum();
- uint32_t image_oat_checksum = image_header.GetOatChecksum();
- if (oat_checksum != image_oat_checksum) {
- LOG(ERROR) << "Failed to match oat file checksum " << std::hex << oat_checksum
- << " to expected oat checksum " << std::hex << image_oat_checksum
- << " in image";
- return NULL;
- }
- RegisterOatFileLocked(*oat_file);
- VLOG(startup) << "ClassLinker::OpenOat exiting";
+ RegisterOatFileLocked(oat_file);
+ VLOG(startup) << "ClassLinker::GetImageOatFile exiting";
return oat_file;
}
@@ -952,13 +929,13 @@
gc::Heap* heap = Runtime::Current()->GetHeap();
gc::space::ImageSpace* space = heap->GetImageSpace();
- OatFile* oat_file = OpenOat(space);
- CHECK(oat_file != NULL) << "Failed to open oat file for image";
- CHECK_EQ(oat_file->GetOatHeader().GetImageFileLocationOatChecksum(), 0U);
- CHECK_EQ(oat_file->GetOatHeader().GetImageFileLocationOatDataBegin(), 0U);
- CHECK(oat_file->GetOatHeader().GetImageFileLocation().empty());
- portable_resolution_trampoline_ = oat_file->GetOatHeader().GetPortableResolutionTrampoline();
- quick_resolution_trampoline_ = oat_file->GetOatHeader().GetQuickResolutionTrampoline();
+ CHECK(space != NULL);
+ OatFile& oat_file = GetImageOatFile(space);
+ CHECK_EQ(oat_file.GetOatHeader().GetImageFileLocationOatChecksum(), 0U);
+ CHECK_EQ(oat_file.GetOatHeader().GetImageFileLocationOatDataBegin(), 0U);
+ CHECK(oat_file.GetOatHeader().GetImageFileLocation().empty());
+ portable_resolution_trampoline_ = oat_file.GetOatHeader().GetPortableResolutionTrampoline();
+ quick_resolution_trampoline_ = oat_file.GetOatHeader().GetQuickResolutionTrampoline();
mirror::Object* dex_caches_object = space->GetImageHeader().GetImageRoot(ImageHeader::kDexCaches);
mirror::ObjectArray<mirror::DexCache>* dex_caches =
dex_caches_object->AsObjectArray<mirror::DexCache>();
@@ -971,18 +948,18 @@
// as being Strings or not
mirror::String::SetClass(GetClassRoot(kJavaLangString));
- CHECK_EQ(oat_file->GetOatHeader().GetDexFileCount(),
+ CHECK_EQ(oat_file.GetOatHeader().GetDexFileCount(),
static_cast<uint32_t>(dex_caches->GetLength()));
Thread* self = Thread::Current();
for (int i = 0; i < dex_caches->GetLength(); i++) {
SirtRef<mirror::DexCache> dex_cache(self, dex_caches->Get(i));
const std::string& dex_file_location(dex_cache->GetLocation()->ToModifiedUtf8());
- const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file_location);
- CHECK(oat_dex_file != NULL) << oat_file->GetLocation() << " " << dex_file_location;
+ const OatFile::OatDexFile* oat_dex_file = oat_file.GetOatDexFile(dex_file_location);
+ CHECK(oat_dex_file != NULL) << oat_file.GetLocation() << " " << dex_file_location;
const DexFile* dex_file = oat_dex_file->OpenDexFile();
if (dex_file == NULL) {
LOG(FATAL) << "Failed to open dex file " << dex_file_location
- << " from within oat file " << oat_file->GetLocation();
+ << " from within oat file " << oat_file.GetLocation();
}
CHECK_EQ(dex_file->GetLocationChecksum(), oat_dex_file->GetDexFileLocationChecksum());
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index df33672..3993cb2 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CLASS_LINKER_H_
-#define ART_SRC_CLASS_LINKER_H_
+#ifndef ART_RUNTIME_CLASS_LINKER_H_
+#define ART_RUNTIME_CLASS_LINKER_H_
#include <string>
#include <utility>
@@ -359,7 +359,7 @@
// Initialize class linker from one or more images.
void InitFromImage() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- OatFile* OpenOat(const gc::space::ImageSpace* space)
+ OatFile& GetImageOatFile(gc::space::ImageSpace* space)
LOCKS_EXCLUDED(dex_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static void InitFromImageCallback(mirror::Object* obj, void* arg)
@@ -627,4 +627,4 @@
} // namespace art
-#endif // ART_SRC_CLASS_LINKER_H_
+#endif // ART_RUNTIME_CLASS_LINKER_H_
diff --git a/runtime/class_reference.h b/runtime/class_reference.h
index c3be720..77c296f 100644
--- a/runtime/class_reference.h
+++ b/runtime/class_reference.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CLASS_REFERENCE_H_
-#define ART_SRC_CLASS_REFERENCE_H_
+#ifndef ART_RUNTIME_CLASS_REFERENCE_H_
+#define ART_RUNTIME_CLASS_REFERENCE_H_
#include <stdint.h>
@@ -38,4 +38,4 @@
} // namespace art
-#endif // ART_SRC_CLASS_REFERENCE_H_
+#endif // ART_RUNTIME_CLASS_REFERENCE_H_
diff --git a/runtime/closure.h b/runtime/closure.h
index 17f2b84..9bea28f 100644
--- a/runtime/closure.h
+++ b/runtime/closure.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CLOSURE_H_
-#define ART_SRC_CLOSURE_H_
+#ifndef ART_RUNTIME_CLOSURE_H_
+#define ART_RUNTIME_CLOSURE_H_
namespace art {
@@ -29,4 +29,4 @@
} // namespace art
-#endif // ART_SRC_CLOSURE_H_
+#endif // ART_RUNTIME_CLOSURE_H_
diff --git a/runtime/common_test.h b/runtime/common_test.h
index f03b1f9..73c47b5 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#ifndef ART_RUNTIME_COMMON_TEST_H_
+#define ART_RUNTIME_COMMON_TEST_H_
+
#include <dirent.h>
#include <dlfcn.h>
#include <sys/mman.h>
@@ -586,3 +589,5 @@
}
} // namespace std
+
+#endif // ART_RUNTIME_COMMON_TEST_H_
diff --git a/runtime/common_throws.h b/runtime/common_throws.h
index 4bf12c0..b7f2754 100644
--- a/runtime/common_throws.h
+++ b/runtime/common_throws.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMMON_THROWS__H_
-#define ART_SRC_COMMON_THROWS_H_
+#ifndef ART_RUNTIME_COMMON_THROWS_H_
+#define ART_RUNTIME_COMMON_THROWS_H_
#include "base/mutex.h"
#include "invoke_type.h"
@@ -183,4 +183,4 @@
} // namespace art
-#endif // ART_SRC_COMMON_THROWS_H_
+#endif // ART_RUNTIME_COMMON_THROWS_H_
diff --git a/runtime/compiled_class.h b/runtime/compiled_class.h
index f050ee6..c53d500 100644
--- a/runtime/compiled_class.h
+++ b/runtime/compiled_class.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILED_CLASS_H_
-#define ART_SRC_COMPILED_CLASS_H_
+#ifndef ART_RUNTIME_COMPILED_CLASS_H_
+#define ART_RUNTIME_COMPILED_CLASS_H_
#include "mirror/class.h"
@@ -34,4 +34,4 @@
} // namespace art
-#endif // ART_SRC_COMPILED_CLASS_H_
+#endif // ART_RUNTIME_COMPILED_CLASS_H_
diff --git a/runtime/compiled_method.h b/runtime/compiled_method.h
index fb0172c..800dde2 100644
--- a/runtime/compiled_method.h
+++ b/runtime/compiled_method.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILED_METHOD_H_
-#define ART_SRC_COMPILED_METHOD_H_
+#ifndef ART_RUNTIME_COMPILED_METHOD_H_
+#define ART_RUNTIME_COMPILED_METHOD_H_
#include <string>
#include <vector>
@@ -177,4 +177,4 @@
} // namespace art
-#endif // ART_SRC_COMPILED_METHOD_H_
+#endif // ART_RUNTIME_COMPILED_METHOD_H_
diff --git a/runtime/constants_arm.h b/runtime/constants_arm.h
index 601c572..bbb9242 100644
--- a/runtime/constants_arm.h
+++ b/runtime/constants_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CONSTANTS_ARM_H_
-#define ART_SRC_CONSTANTS_ARM_H_
+#ifndef ART_RUNTIME_CONSTANTS_ARM_H_
+#define ART_RUNTIME_CONSTANTS_ARM_H_
#include <stdint.h>
@@ -516,4 +516,4 @@
} // namespace arm
} // namespace art
-#endif // ART_SRC_CONSTANTS_ARM_H_
+#endif // ART_RUNTIME_CONSTANTS_ARM_H_
diff --git a/runtime/constants_mips.h b/runtime/constants_mips.h
index 87a1355..fb56493 100644
--- a/runtime/constants_mips.h
+++ b/runtime/constants_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CONSTANTS_MIPS_H_
-#define ART_SRC_CONSTANTS_MIPS_H_
+#ifndef ART_RUNTIME_CONSTANTS_MIPS_H_
+#define ART_RUNTIME_CONSTANTS_MIPS_H_
#include <iosfwd>
@@ -183,4 +183,4 @@
} // namespace mips
} // namespace art
-#endif // ART_SRC_CONSTANTS_MIPS_H_
+#endif // ART_RUNTIME_CONSTANTS_MIPS_H_
diff --git a/runtime/constants_x86.h b/runtime/constants_x86.h
index e48b281..bb18b6b 100644
--- a/runtime/constants_x86.h
+++ b/runtime/constants_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CONSTANTS_X86_H_
-#define ART_SRC_CONSTANTS_X86_H_
+#ifndef ART_RUNTIME_CONSTANTS_X86_H_
+#define ART_RUNTIME_CONSTANTS_X86_H_
#include <iosfwd>
@@ -137,4 +137,4 @@
} // namespace x86
} // namespace art
-#endif // ART_SRC_CONSTANTS_X86_H_
+#endif // ART_RUNTIME_CONSTANTS_X86_H_
diff --git a/runtime/debugger.h b/runtime/debugger.h
index eb17695..94f3cbe 100644
--- a/runtime/debugger.h
+++ b/runtime/debugger.h
@@ -18,8 +18,8 @@
* Dalvik-specific side of debugger support. (The JDWP code is intended to
* be relatively generic.)
*/
-#ifndef ART_DEBUGGER_H_
-#define ART_DEBUGGER_H_
+#ifndef ART_RUNTIME_DEBUGGER_H_
+#define ART_RUNTIME_DEBUGGER_H_
#include <pthread.h>
@@ -429,4 +429,4 @@
} // namespace art
-#endif // ART_DEBUGGER_H_
+#endif // ART_RUNTIME_DEBUGGER_H_
diff --git a/runtime/dex_file-inl.h b/runtime/dex_file-inl.h
index 5d8216e..dee8026 100644
--- a/runtime/dex_file-inl.h
+++ b/runtime/dex_file-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_FILE_INL_H_
-#define ART_SRC_DEX_FILE_INL_H_
+#ifndef ART_RUNTIME_DEX_FILE_INL_H_
+#define ART_RUNTIME_DEX_FILE_INL_H_
#include "base/logging.h"
#include "dex_file.h"
@@ -44,4 +44,4 @@
} // namespace art
-#endif // ART_SRC_DEX_FILE_INL_H_
+#endif // ART_RUNTIME_DEX_FILE_INL_H_
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index e09270e..28e06cc 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_FILE_H_
-#define ART_SRC_DEX_FILE_H_
+#ifndef ART_RUNTIME_DEX_FILE_H_
+#define ART_RUNTIME_DEX_FILE_H_
#include <string>
#include <vector>
@@ -1220,4 +1220,4 @@
} // namespace art
-#endif // ART_SRC_DEX_FILE_H_
+#endif // ART_RUNTIME_DEX_FILE_H_
diff --git a/runtime/dex_file_verifier.h b/runtime/dex_file_verifier.h
index 5538d4a..3797dc7 100644
--- a/runtime/dex_file_verifier.h
+++ b/runtime/dex_file_verifier.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_FILE_VERIFIER_H_
-#define ART_SRC_DEX_FILE_VERIFIER_H_
+#ifndef ART_RUNTIME_DEX_FILE_VERIFIER_H_
+#define ART_RUNTIME_DEX_FILE_VERIFIER_H_
#include "dex_file.h"
#include "safe_map.h"
@@ -94,4 +94,4 @@
} // namespace art
-#endif // ART_SRC_DEX_FILE_VERIFIER_H_
+#endif // ART_RUNTIME_DEX_FILE_VERIFIER_H_
diff --git a/runtime/dex_instruction-inl.h b/runtime/dex_instruction-inl.h
index b426e66..2cb5235 100644
--- a/runtime/dex_instruction-inl.h
+++ b/runtime/dex_instruction-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_INSTRUCTION_INL_H_
-#define ART_SRC_DEX_INSTRUCTION_INL_H_
+#ifndef ART_RUNTIME_DEX_INSTRUCTION_INL_H_
+#define ART_RUNTIME_DEX_INSTRUCTION_INL_H_
#include "dex_instruction.h"
@@ -319,4 +319,4 @@
} // namespace art
-#endif // ART_SRC_DEX_INSTRUCTION_INL_H_
+#endif // ART_RUNTIME_DEX_INSTRUCTION_INL_H_
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h
index ff81659..4bc0e94 100644
--- a/runtime/dex_instruction.h
+++ b/runtime/dex_instruction.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_INSTRUCTION_H_
-#define ART_SRC_DEX_INSTRUCTION_H_
+#ifndef ART_RUNTIME_DEX_INSTRUCTION_H_
+#define ART_RUNTIME_DEX_INSTRUCTION_H_
#include "base/logging.h"
#include "base/macros.h"
@@ -452,4 +452,4 @@
} // namespace art
-#endif // ART_SRC_DEX_INSTRUCTION_H_
+#endif // ART_RUNTIME_DEX_INSTRUCTION_H_
diff --git a/runtime/dex_instruction_list.h b/runtime/dex_instruction_list.h
index 8257c78..31d51c9 100644
--- a/runtime/dex_instruction_list.h
+++ b/runtime/dex_instruction_list.h
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#ifndef ART_RUNTIME_DEX_INSTRUCTION_LIST_H_
+#define ART_RUNTIME_DEX_INSTRUCTION_LIST_H_
+
#define DEX_INSTRUCTION_LIST(V) \
V(0x00, NOP, "nop", k10x, false, kNone, kContinue, kVerifyNone) \
V(0x01, MOVE, "move", k12x, true, kNone, kContinue, kVerifyRegA | kVerifyRegB) \
@@ -297,3 +300,6 @@
V(k35c) \
V(k3rc) \
V(k51l)
+
+#endif // ART_RUNTIME_DEX_INSTRUCTION_LIST_H_
+#undef ART_RUNTIME_DEX_INSTRUCTION_LIST_H_ // the guard in this file is just for cpplint
diff --git a/runtime/dex_instruction_visitor.h b/runtime/dex_instruction_visitor.h
index ff4620f..795b95b 100644
--- a/runtime/dex_instruction_visitor.h
+++ b/runtime/dex_instruction_visitor.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_INSTRUCTION_VISITOR_H_
-#define ART_SRC_DEX_INSTRUCTION_VISITOR_H_
+#ifndef ART_RUNTIME_DEX_INSTRUCTION_VISITOR_H_
+#define ART_RUNTIME_DEX_INSTRUCTION_VISITOR_H_
#include "base/macros.h"
#include "dex_instruction.h"
@@ -69,4 +69,4 @@
} // namespace art
-#endif // ART_SRC_DEX_INSTRUCTION_VISITOR_H_
+#endif // ART_RUNTIME_DEX_INSTRUCTION_VISITOR_H_
diff --git a/runtime/dex_method_iterator.h b/runtime/dex_method_iterator.h
index dc2e712..cb71cb5 100644
--- a/runtime/dex_method_iterator.h
+++ b/runtime/dex_method_iterator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DEX_METHOD_ITERATOR_H_
-#define ART_SRC_DEX_METHOD_ITERATOR_H_
+#ifndef ART_RUNTIME_DEX_METHOD_ITERATOR_H_
+#define ART_RUNTIME_DEX_METHOD_ITERATOR_H_
#include <vector>
@@ -147,4 +147,4 @@
} // namespace art
-#endif // ART_SRC_DEX_METHOD_ITERATOR_H_
+#endif // ART_RUNTIME_DEX_METHOD_ITERATOR_H_
diff --git a/runtime/disassembler.h b/runtime/disassembler.h
index 1f50bfc..805ff4d 100644
--- a/runtime/disassembler.h
+++ b/runtime/disassembler.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DISASSEMBLER_H_
-#define ART_SRC_DISASSEMBLER_H_
+#ifndef ART_RUNTIME_DISASSEMBLER_H_
+#define ART_RUNTIME_DISASSEMBLER_H_
#include <stdint.h>
@@ -45,4 +45,4 @@
} // namespace art
-#endif // ART_SRC_DISASSEMBLER_H_
+#endif // ART_RUNTIME_DISASSEMBLER_H_
diff --git a/runtime/disassembler_arm.h b/runtime/disassembler_arm.h
index 103876f..cab9150 100644
--- a/runtime/disassembler_arm.h
+++ b/runtime/disassembler_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DISASSEMBLER_ARM_H_
-#define ART_SRC_DISASSEMBLER_ARM_H_
+#ifndef ART_RUNTIME_DISASSEMBLER_ARM_H_
+#define ART_RUNTIME_DISASSEMBLER_ARM_H_
#include <vector>
@@ -48,4 +48,4 @@
} // namespace arm
} // namespace art
-#endif // ART_SRC_DISASSEMBLER_ARM_H_
+#endif // ART_RUNTIME_DISASSEMBLER_ARM_H_
diff --git a/runtime/disassembler_mips.h b/runtime/disassembler_mips.h
index ed45113..e248503 100644
--- a/runtime/disassembler_mips.h
+++ b/runtime/disassembler_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DISASSEMBLER_MIPS_H_
-#define ART_SRC_DISASSEMBLER_MIPS_H_
+#ifndef ART_RUNTIME_DISASSEMBLER_MIPS_H_
+#define ART_RUNTIME_DISASSEMBLER_MIPS_H_
#include <vector>
@@ -37,4 +37,4 @@
} // namespace mips
} // namespace art
-#endif // ART_SRC_DISASSEMBLER_MIPS_H_
+#endif // ART_RUNTIME_DISASSEMBLER_MIPS_H_
diff --git a/runtime/disassembler_x86.h b/runtime/disassembler_x86.h
index 13f8503..ff4322c 100644
--- a/runtime/disassembler_x86.h
+++ b/runtime/disassembler_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_DISASSEMBLER_X86_H_
-#define ART_SRC_DISASSEMBLER_X86_H_
+#ifndef ART_RUNTIME_DISASSEMBLER_X86_H_
+#define ART_RUNTIME_DISASSEMBLER_X86_H_
#include "disassembler.h"
@@ -35,4 +35,4 @@
} // namespace x86
} // namespace art
-#endif // ART_SRC_DISASSEMBLER_X86_H_
+#endif // ART_RUNTIME_DISASSEMBLER_X86_H_
diff --git a/runtime/elf_file.h b/runtime/elf_file.h
index cb95cb0..33b5fc3 100644
--- a/runtime/elf_file.h
+++ b/runtime/elf_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ELF_FILE_H_
-#define ART_SRC_ELF_FILE_H_
+#ifndef ART_RUNTIME_ELF_FILE_H_
+#define ART_RUNTIME_ELF_FILE_H_
#include <map>
#include <vector>
@@ -172,4 +172,4 @@
} // namespace art
-#endif // ART_SRC_ELF_FILE_H_
+#endif // ART_RUNTIME_ELF_FILE_H_
diff --git a/runtime/file_output_stream.h b/runtime/file_output_stream.h
index b5eb4f8..10405ef 100644
--- a/runtime/file_output_stream.h
+++ b/runtime/file_output_stream.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_FILE_OUTPUT_STREAM_H_
-#define ART_SRC_FILE_OUTPUT_STREAM_H_
+#ifndef ART_RUNTIME_FILE_OUTPUT_STREAM_H_
+#define ART_RUNTIME_FILE_OUTPUT_STREAM_H_
#include "output_stream.h"
@@ -41,4 +41,4 @@
} // namespace art
-#endif // ART_SRC_FILE_OUTPUT_STREAM_H_
+#endif // ART_RUNTIME_FILE_OUTPUT_STREAM_H_
diff --git a/runtime/gc/accounting/atomic_stack.h b/runtime/gc/accounting/atomic_stack.h
index 054dced..d677ade 100644
--- a/runtime/gc/accounting/atomic_stack.h
+++ b/runtime/gc/accounting/atomic_stack.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_ATOMIC_STACK_H_
-#define ART_SRC_GC_ACCOUNTING_ATOMIC_STACK_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_ATOMIC_STACK_H_
+#define ART_RUNTIME_GC_ACCOUNTING_ATOMIC_STACK_H_
#include <string>
@@ -189,4 +189,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_ATOMIC_STACK_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_ATOMIC_STACK_H_
diff --git a/runtime/gc/accounting/card_table-inl.h b/runtime/gc/accounting/card_table-inl.h
index 1e75290..f8f2773 100644
--- a/runtime/gc/accounting/card_table-inl.h
+++ b/runtime/gc/accounting/card_table-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_CARDTABLE_INL_H_
-#define ART_SRC_GC_CARDTABLE_INL_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_INL_H_
+#define ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_INL_H_
#include "base/logging.h"
#include "card_table.h"
@@ -210,4 +210,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_CARDTABLE_INL_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_INL_H_
diff --git a/runtime/gc/accounting/card_table.h b/runtime/gc/accounting/card_table.h
index cf85d15..1acaf5b 100644
--- a/runtime/gc/accounting/card_table.h
+++ b/runtime/gc/accounting/card_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_CARDTABLE_H_
-#define ART_SRC_GC_CARDTABLE_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_H_
+#define ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_H_
#include "globals.h"
#include "locks.h"
@@ -153,4 +153,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_CARDTABLE_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_H_
diff --git a/runtime/gc/accounting/heap_bitmap-inl.h b/runtime/gc/accounting/heap_bitmap-inl.h
index 8e3123b..7622604 100644
--- a/runtime/gc/accounting/heap_bitmap-inl.h
+++ b/runtime/gc/accounting/heap_bitmap-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
-#define ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
+#define ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
#include "heap_bitmap.h"
@@ -47,4 +47,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_INL_H_
diff --git a/runtime/gc/accounting/heap_bitmap.h b/runtime/gc/accounting/heap_bitmap.h
index 5ff40c6..a12809e 100644
--- a/runtime/gc/accounting/heap_bitmap.h
+++ b/runtime/gc/accounting/heap_bitmap.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_H_
-#define ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_H_
+#define ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_H_
#include "base/logging.h"
#include "locks.h"
@@ -126,4 +126,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_HEAP_BITMAP_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_H_
diff --git a/runtime/gc/accounting/mod_union_table-inl.h b/runtime/gc/accounting/mod_union_table-inl.h
index 656af94..32ac95f 100644
--- a/runtime/gc/accounting/mod_union_table-inl.h
+++ b/runtime/gc/accounting/mod_union_table-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_MOD_UNION_TABLE_INL_H_
-#define ART_SRC_GC_MOD_UNION_TABLE_INL_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_INL_H_
+#define ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_INL_H_
#include "mod_union_table.h"
@@ -72,4 +72,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_MOD_UNION_TABLE_INL_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_INL_H_
diff --git a/runtime/gc/accounting/mod_union_table.h b/runtime/gc/accounting/mod_union_table.h
index 5d25e05..5435625 100644
--- a/runtime/gc/accounting/mod_union_table.h
+++ b/runtime/gc/accounting/mod_union_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_MOD_UNION_TABLE_H_
-#define ART_SRC_GC_ACCOUNTING_MOD_UNION_TABLE_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_H_
+#define ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_H_
#include "globals.h"
#include "safe_map.h"
@@ -150,4 +150,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_MOD_UNION_TABLE_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_H_
diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h
index a4fd330..d074a0f 100644
--- a/runtime/gc/accounting/space_bitmap-inl.h
+++ b/runtime/gc/accounting/space_bitmap-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
-#define ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
+#define ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
#include "base/logging.h"
#include "cutils/atomic-inline.h"
@@ -144,4 +144,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_INL_H_
diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h
index bb487d8..32ab440 100644
--- a/runtime/gc/accounting/space_bitmap.h
+++ b/runtime/gc/accounting/space_bitmap.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_H_
-#define ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_H_
+#ifndef ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_H_
+#define ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_H_
#include "locks.h"
#include "globals.h"
@@ -262,4 +262,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_ACCOUNTING_SPACE_BITMAP_H_
+#endif // ART_RUNTIME_GC_ACCOUNTING_SPACE_BITMAP_H_
diff --git a/runtime/gc/allocator/dlmalloc.h b/runtime/gc/allocator/dlmalloc.h
index 6b02a44..07ebd1c 100644
--- a/runtime/gc/allocator/dlmalloc.h
+++ b/runtime/gc/allocator/dlmalloc.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_ALLOCATOR_DLMALLOC_H_
-#define ART_SRC_GC_ALLOCATOR_DLMALLOC_H_
+#ifndef ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_
+#define ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_
// Configure dlmalloc for mspaces.
#define HAVE_MMAP 0
@@ -37,4 +37,4 @@
// pages back to the kernel.
extern "C" void DlmallocMadviseCallback(void* start, void* end, size_t used_bytes, void* /*arg*/);
-#endif // ART_SRC_GC_ALLOCATOR_DLMALLOC_H_
+#endif // ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_
diff --git a/runtime/gc/collector/garbage_collector.h b/runtime/gc/collector/garbage_collector.h
index 1ab3957..a22faac 100644
--- a/runtime/gc/collector/garbage_collector.h
+++ b/runtime/gc/collector/garbage_collector.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_GARBAGE_COLLECTOR_H_
-#define ART_SRC_GC_GARBAGE_COLLECTOR_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_GARBAGE_COLLECTOR_H_
+#define ART_RUNTIME_GC_COLLECTOR_GARBAGE_COLLECTOR_H_
#include "gc_type.h"
#include "locks.h"
@@ -119,4 +119,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_GARBAGE_COLLECTOR_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_GARBAGE_COLLECTOR_H_
diff --git a/runtime/gc/collector/gc_type.h b/runtime/gc/collector/gc_type.h
index bb25bb9..f18e40f 100644
--- a/runtime/gc/collector/gc_type.h
+++ b/runtime/gc/collector/gc_type.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_COLLECTOR_GC_TYPE_H_
-#define ART_SRC_GC_COLLECTOR_GC_TYPE_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_
+#define ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_
#include <ostream>
@@ -43,4 +43,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_COLLECTOR_GC_TYPE_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_
diff --git a/runtime/gc/collector/mark_sweep-inl.h b/runtime/gc/collector/mark_sweep-inl.h
index ea9fced..6b1b617 100644
--- a/runtime/gc/collector/mark_sweep-inl.h
+++ b/runtime/gc/collector/mark_sweep-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_MARK_SWEEP_INL_H_
-#define ART_SRC_GC_MARK_SWEEP_INL_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_INL_H_
+#define ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_INL_H_
#include "gc/collector/mark_sweep.h"
@@ -162,4 +162,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_MARK_SWEEP_INL_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_INL_H_
diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h
index 9df3c19..34136d4 100644
--- a/runtime/gc/collector/mark_sweep.h
+++ b/runtime/gc/collector/mark_sweep.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_MARK_SWEEP_H_
-#define ART_SRC_GC_MARK_SWEEP_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_H_
+#define ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_H_
#include "atomic_integer.h"
#include "barrier.h"
@@ -450,4 +450,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_MARK_SWEEP_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_MARK_SWEEP_H_
diff --git a/runtime/gc/collector/partial_mark_sweep.h b/runtime/gc/collector/partial_mark_sweep.h
index bd4a580..718c62e 100644
--- a/runtime/gc/collector/partial_mark_sweep.h
+++ b/runtime/gc/collector/partial_mark_sweep.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
-#define ART_SRC_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
+#define ART_RUNTIME_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
#include "locks.h"
#include "mark_sweep.h"
@@ -45,4 +45,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_PARTIAL_MARK_SWEEP_H_
diff --git a/runtime/gc/collector/sticky_mark_sweep.h b/runtime/gc/collector/sticky_mark_sweep.h
index b16cfc1..8cd4aed 100644
--- a/runtime/gc/collector/sticky_mark_sweep.h
+++ b/runtime/gc/collector/sticky_mark_sweep.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_STICKY_MARK_SWEEP_H_
-#define ART_SRC_GC_STICKY_MARK_SWEEP_H_
+#ifndef ART_RUNTIME_GC_COLLECTOR_STICKY_MARK_SWEEP_H_
+#define ART_RUNTIME_GC_COLLECTOR_STICKY_MARK_SWEEP_H_
#include "base/macros.h"
#include "locks.h"
@@ -52,4 +52,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_STICKY_MARK_SWEEP_H_
+#endif // ART_RUNTIME_GC_COLLECTOR_STICKY_MARK_SWEEP_H_
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index fe0b740..7f68713 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -18,8 +18,6 @@
#define ATRACE_TAG ATRACE_TAG_DALVIK
#include <cutils/trace.h>
-#include <sys/types.h>
-#include <sys/wait.h>
#include <limits>
#include <vector>
@@ -67,96 +65,6 @@
static const size_t kMinConcurrentRemainingBytes = 128 * KB;
const double Heap::kDefaultTargetUtilization = 0.5;
-static bool GenerateImage(const std::string& image_file_name) {
- const std::string boot_class_path_string(Runtime::Current()->GetBootClassPathString());
- std::vector<std::string> boot_class_path;
- Split(boot_class_path_string, ':', boot_class_path);
- if (boot_class_path.empty()) {
- LOG(FATAL) << "Failed to generate image because no boot class path specified";
- }
-
- std::vector<char*> arg_vector;
-
- std::string dex2oat_string(GetAndroidRoot());
- dex2oat_string += (kIsDebugBuild ? "/bin/dex2oatd" : "/bin/dex2oat");
- const char* dex2oat = dex2oat_string.c_str();
- arg_vector.push_back(strdup(dex2oat));
-
- std::string image_option_string("--image=");
- image_option_string += image_file_name;
- const char* image_option = image_option_string.c_str();
- arg_vector.push_back(strdup(image_option));
-
- arg_vector.push_back(strdup("--runtime-arg"));
- arg_vector.push_back(strdup("-Xms64m"));
-
- arg_vector.push_back(strdup("--runtime-arg"));
- arg_vector.push_back(strdup("-Xmx64m"));
-
- for (size_t i = 0; i < boot_class_path.size(); i++) {
- std::string dex_file_option_string("--dex-file=");
- dex_file_option_string += boot_class_path[i];
- const char* dex_file_option = dex_file_option_string.c_str();
- arg_vector.push_back(strdup(dex_file_option));
- }
-
- std::string oat_file_option_string("--oat-file=");
- oat_file_option_string += image_file_name;
- oat_file_option_string.erase(oat_file_option_string.size() - 3);
- oat_file_option_string += "oat";
- const char* oat_file_option = oat_file_option_string.c_str();
- arg_vector.push_back(strdup(oat_file_option));
-
- std::string base_option_string(StringPrintf("--base=0x%x", ART_BASE_ADDRESS));
- arg_vector.push_back(strdup(base_option_string.c_str()));
-
- if (kIsTargetBuild) {
- arg_vector.push_back(strdup("--image-classes-zip=/system/framework/framework.jar"));
- arg_vector.push_back(strdup("--image-classes=preloaded-classes"));
- } else {
- arg_vector.push_back(strdup("--host"));
- }
-
- std::string command_line(Join(arg_vector, ' '));
- LOG(INFO) << command_line;
-
- arg_vector.push_back(NULL);
- char** argv = &arg_vector[0];
-
- // fork and exec dex2oat
- pid_t pid = fork();
- if (pid == 0) {
- // no allocation allowed between fork and exec
-
- // change process groups, so we don't get reaped by ProcessManager
- setpgid(0, 0);
-
- execv(dex2oat, argv);
-
- PLOG(FATAL) << "execv(" << dex2oat << ") failed";
- return false;
- } else {
- STLDeleteElements(&arg_vector);
-
- // wait for dex2oat to finish
- int status;
- pid_t got_pid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
- if (got_pid != pid) {
- PLOG(ERROR) << "waitpid failed: wanted " << pid << ", got " << got_pid;
- return false;
- }
- if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
- LOG(ERROR) << dex2oat << " failed: " << command_line;
- return false;
- }
- }
- return true;
-}
-
-void Heap::UnReserveOatFileAddressRange() {
- oat_file_map_.reset(NULL);
-}
-
Heap::Heap(size_t initial_size, size_t growth_limit, size_t min_free, size_t max_free,
double target_utilization, size_t capacity,
const std::string& original_image_file_name, bool concurrent_gc)
@@ -210,45 +118,20 @@
mark_bitmap_.reset(new accounting::HeapBitmap(this));
// Requested begin for the alloc space, to follow the mapped image and oat files
- byte* requested_begin = NULL;
+ byte* requested_alloc_space_begin = NULL;
std::string image_file_name(original_image_file_name);
if (!image_file_name.empty()) {
- space::ImageSpace* image_space = NULL;
-
- if (OS::FileExists(image_file_name.c_str())) {
- // If the /system file exists, it should be up-to-date, don't try to generate
- image_space = space::ImageSpace::Create(image_file_name);
- } else {
- // If the /system file didn't exist, we need to use one from the dalvik-cache.
- // If the cache file exists, try to open, but if it fails, regenerate.
- // If it does not exist, generate.
- image_file_name = GetDalvikCacheFilenameOrDie(image_file_name);
- if (OS::FileExists(image_file_name.c_str())) {
- image_space = space::ImageSpace::Create(image_file_name);
- }
- if (image_space == NULL) {
- CHECK(GenerateImage(image_file_name)) << "Failed to generate image: " << image_file_name;
- image_space = space::ImageSpace::Create(image_file_name);
- }
- }
-
- CHECK(image_space != NULL) << "Failed to create space from " << image_file_name;
+ space::ImageSpace* image_space = space::ImageSpace::Create(image_file_name);
+ CHECK(image_space != NULL) << "Failed to create space for " << image_file_name;
AddContinuousSpace(image_space);
// Oat files referenced by image files immediately follow them in memory, ensure alloc space
// isn't going to get in the middle
byte* oat_file_end_addr = image_space->GetImageHeader().GetOatFileEnd();
CHECK_GT(oat_file_end_addr, image_space->End());
-
- // Reserve address range from image_space->End() to image_space->GetImageHeader().GetOatEnd()
- uintptr_t reserve_begin = RoundUp(reinterpret_cast<uintptr_t>(image_space->End()), kPageSize);
- uintptr_t reserve_end = RoundUp(reinterpret_cast<uintptr_t>(oat_file_end_addr), kPageSize);
- oat_file_map_.reset(MemMap::MapAnonymous("oat file reserve",
- reinterpret_cast<byte*>(reserve_begin),
- reserve_end - reserve_begin, PROT_NONE));
-
- if (oat_file_end_addr > requested_begin) {
- requested_begin = reinterpret_cast<byte*>(RoundUp(reinterpret_cast<uintptr_t>(oat_file_end_addr),
- kPageSize));
+ if (oat_file_end_addr > requested_alloc_space_begin) {
+ requested_alloc_space_begin =
+ reinterpret_cast<byte*>(RoundUp(reinterpret_cast<uintptr_t>(oat_file_end_addr),
+ kPageSize));
}
}
@@ -265,7 +148,7 @@
alloc_space_ = space::DlMallocSpace::Create("alloc space",
initial_size,
growth_limit, capacity,
- requested_begin);
+ requested_alloc_space_begin);
CHECK(alloc_space_ != NULL) << "Failed to create alloc space";
alloc_space_->SetFootprintLimit(alloc_space_->Capacity());
AddContinuousSpace(alloc_space_);
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 980f3bc..aaf449b 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_HEAP_H_
-#define ART_SRC_GC_HEAP_H_
+#ifndef ART_RUNTIME_GC_HEAP_H_
+#define ART_RUNTIME_GC_HEAP_H_
#include <iosfwd>
#include <string>
@@ -377,9 +377,6 @@
void DumpSpaces();
- // UnReserve the address range where the oat file will be placed.
- void UnReserveOatFileAddressRange();
-
// GC performance measuring
void DumpGcPerformanceInfo(std::ostream& os);
@@ -615,9 +612,6 @@
std::vector<collector::MarkSweep*> mark_sweep_collectors_;
- // A map that we use to temporarily reserve address range for the oat file.
- UniquePtr<MemMap> oat_file_map_;
-
friend class collector::MarkSweep;
friend class VerifyReferenceCardVisitor;
friend class VerifyReferenceVisitor;
@@ -631,4 +625,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_HEAP_H_
+#endif // ART_RUNTIME_GC_HEAP_H_
diff --git a/runtime/gc/space/dlmalloc_space.h b/runtime/gc/space/dlmalloc_space.h
index 00df0e6..8a4314c 100644
--- a/runtime/gc/space/dlmalloc_space.h
+++ b/runtime/gc/space/dlmalloc_space.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_SPACE_DLMALLOC_SPACE_H_
-#define ART_SRC_GC_SPACE_DLMALLOC_SPACE_H_
+#ifndef ART_RUNTIME_GC_SPACE_DLMALLOC_SPACE_H_
+#define ART_RUNTIME_GC_SPACE_DLMALLOC_SPACE_H_
#include "gc/allocator/dlmalloc.h"
#include "space.h"
@@ -182,4 +182,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_SPACE_DLMALLOC_SPACE_H_
+#endif // ART_RUNTIME_GC_SPACE_DLMALLOC_SPACE_H_
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 46c3937..c279ecf 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -16,11 +16,16 @@
#include "image_space.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "base/stl_util.h"
#include "base/unix_file/fd_file.h"
#include "gc/accounting/space_bitmap-inl.h"
#include "mirror/abstract_method.h"
#include "mirror/class-inl.h"
#include "mirror/object-inl.h"
+#include "oat_file.h"
#include "os.h"
#include "runtime.h"
#include "space-inl.h"
@@ -41,13 +46,118 @@
DCHECK(live_bitmap_.get() != NULL) << "could not create imagespace live bitmap #" << bitmap_index;
}
-ImageSpace* ImageSpace::Create(const std::string& image_file_name) {
+static bool GenerateImage(const std::string& image_file_name) {
+ const std::string boot_class_path_string(Runtime::Current()->GetBootClassPathString());
+ std::vector<std::string> boot_class_path;
+ Split(boot_class_path_string, ':', boot_class_path);
+ if (boot_class_path.empty()) {
+ LOG(FATAL) << "Failed to generate image because no boot class path specified";
+ }
+
+ std::vector<char*> arg_vector;
+
+ std::string dex2oat_string(GetAndroidRoot());
+ dex2oat_string += (kIsDebugBuild ? "/bin/dex2oatd" : "/bin/dex2oat");
+ const char* dex2oat = dex2oat_string.c_str();
+ arg_vector.push_back(strdup(dex2oat));
+
+ std::string image_option_string("--image=");
+ image_option_string += image_file_name;
+ const char* image_option = image_option_string.c_str();
+ arg_vector.push_back(strdup(image_option));
+
+ arg_vector.push_back(strdup("--runtime-arg"));
+ arg_vector.push_back(strdup("-Xms64m"));
+
+ arg_vector.push_back(strdup("--runtime-arg"));
+ arg_vector.push_back(strdup("-Xmx64m"));
+
+ for (size_t i = 0; i < boot_class_path.size(); i++) {
+ std::string dex_file_option_string("--dex-file=");
+ dex_file_option_string += boot_class_path[i];
+ const char* dex_file_option = dex_file_option_string.c_str();
+ arg_vector.push_back(strdup(dex_file_option));
+ }
+
+ std::string oat_file_option_string("--oat-file=");
+ oat_file_option_string += image_file_name;
+ oat_file_option_string.erase(oat_file_option_string.size() - 3);
+ oat_file_option_string += "oat";
+ const char* oat_file_option = oat_file_option_string.c_str();
+ arg_vector.push_back(strdup(oat_file_option));
+
+ std::string base_option_string(StringPrintf("--base=0x%x", ART_BASE_ADDRESS));
+ arg_vector.push_back(strdup(base_option_string.c_str()));
+
+ if (kIsTargetBuild) {
+ arg_vector.push_back(strdup("--image-classes-zip=/system/framework/framework.jar"));
+ arg_vector.push_back(strdup("--image-classes=preloaded-classes"));
+ } else {
+ arg_vector.push_back(strdup("--host"));
+ }
+
+ std::string command_line(Join(arg_vector, ' '));
+ LOG(INFO) << "GenerateImage: " << command_line;
+
+ arg_vector.push_back(NULL);
+ char** argv = &arg_vector[0];
+
+ // fork and exec dex2oat
+ pid_t pid = fork();
+ if (pid == 0) {
+ // no allocation allowed between fork and exec
+
+ // change process groups, so we don't get reaped by ProcessManager
+ setpgid(0, 0);
+
+ execv(dex2oat, argv);
+
+ PLOG(FATAL) << "execv(" << dex2oat << ") failed";
+ return false;
+ } else {
+ STLDeleteElements(&arg_vector);
+
+ // wait for dex2oat to finish
+ int status;
+ pid_t got_pid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
+ if (got_pid != pid) {
+ PLOG(ERROR) << "waitpid failed: wanted " << pid << ", got " << got_pid;
+ return false;
+ }
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+ LOG(ERROR) << dex2oat << " failed: " << command_line;
+ return false;
+ }
+ }
+ return true;
+}
+
+ImageSpace* ImageSpace::Create(const std::string& original_image_file_name) {
+ if (OS::FileExists(original_image_file_name.c_str())) {
+ // If the /system file exists, it should be up-to-date, don't try to generate
+ return space::ImageSpace::Init(original_image_file_name, false);
+ }
+ // If the /system file didn't exist, we need to use one from the dalvik-cache.
+ // If the cache file exists, try to open, but if it fails, regenerate.
+ // If it does not exist, generate.
+ std::string image_file_name(GetDalvikCacheFilenameOrDie(original_image_file_name));
+ if (OS::FileExists(image_file_name.c_str())) {
+ space::ImageSpace* image_space = space::ImageSpace::Init(image_file_name, true);
+ if (image_space != NULL) {
+ return image_space;
+ }
+ }
+ CHECK(GenerateImage(image_file_name)) << "Failed to generate image: " << image_file_name;
+ return space::ImageSpace::Init(image_file_name, true);
+}
+
+ImageSpace* ImageSpace::Init(const std::string& image_file_name, bool validate_oat_file) {
CHECK(!image_file_name.empty());
uint64_t start_time = 0;
if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
start_time = NanoTime();
- LOG(INFO) << "Space::CreateImageSpace entering" << " image_file_name=" << image_file_name;
+ LOG(INFO) << "ImageSpace::Init entering image_file_name=" << image_file_name;
}
UniquePtr<File> file(OS::OpenFile(image_file_name.c_str(), false));
@@ -86,12 +196,78 @@
callee_save_method = image_header.GetImageRoot(ImageHeader::kRefsAndArgsSaveMethod);
runtime->SetCalleeSaveMethod(down_cast<mirror::AbstractMethod*>(callee_save_method), Runtime::kRefsAndArgs);
- ImageSpace* space = new ImageSpace(image_file_name, map.release());
- if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
- LOG(INFO) << "Space::CreateImageSpace exiting (" << PrettyDuration(NanoTime() - start_time)
- << ") " << *space;
+ UniquePtr<ImageSpace> space(new ImageSpace(image_file_name, map.release()));
+
+ space->oat_file_.reset(space->OpenOatFile());
+ if (space->oat_file_.get() == NULL) {
+ LOG(ERROR) << "Failed to open oat file for image: " << image_file_name;
+ return NULL;
}
- return space;
+
+ if (validate_oat_file && !space->ValidateOatFile()) {
+ LOG(WARNING) << "Failed to validate oat file for image: " << image_file_name;
+ return NULL;
+ }
+
+ if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) {
+ LOG(INFO) << "ImageSpace::Init exiting (" << PrettyDuration(NanoTime() - start_time)
+ << ") " << *space.get();
+ }
+ return space.release();
+}
+
+OatFile* ImageSpace::OpenOatFile() const {
+ const Runtime* runtime = Runtime::Current();
+ const ImageHeader& image_header = GetImageHeader();
+ // Grab location but don't use Object::AsString as we haven't yet initialized the roots to
+ // check the down cast
+ mirror::String* oat_location =
+ down_cast<mirror::String*>(image_header.GetImageRoot(ImageHeader::kOatLocation));
+ std::string oat_filename;
+ oat_filename += runtime->GetHostPrefix();
+ oat_filename += oat_location->ToModifiedUtf8();
+ OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(),
+ !Runtime::Current()->IsCompiler());
+ if (oat_file == NULL) {
+ LOG(ERROR) << "Failed to open oat file " << oat_filename << " referenced from image.";
+ return NULL;
+ }
+ uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum();
+ uint32_t image_oat_checksum = image_header.GetOatChecksum();
+ if (oat_checksum != image_oat_checksum) {
+ LOG(ERROR) << "Failed to match oat file checksum " << std::hex << oat_checksum
+ << " to expected oat checksum " << std::hex << image_oat_checksum
+ << " in image";
+ return NULL;
+ }
+ return oat_file;
+}
+
+bool ImageSpace::ValidateOatFile() const {
+ CHECK(oat_file_.get() != NULL);
+ std::vector<const OatFile::OatDexFile*> oat_dex_files = oat_file_->GetOatDexFiles();
+ for (size_t i = 0; i < oat_dex_files.size(); i++) {
+ const OatFile::OatDexFile* oat_dex_file = oat_dex_files[i];
+ const std::string& dex_file_location = oat_dex_file->GetDexFileLocation();
+ uint32_t dex_file_location_checksum;
+ if (!DexFile::GetChecksum(dex_file_location.c_str(), dex_file_location_checksum)) {
+ LOG(WARNING) << "ValidateOatFile could not find checksum for " << dex_file_location;
+ return false;
+ }
+ if (dex_file_location_checksum != oat_dex_file->GetDexFileLocationChecksum()) {
+ LOG(WARNING) << "ValidateOatFile found checksum mismatch between oat file "
+ << oat_file_->GetLocation() << " and dex file " << dex_file_location
+ << " (" << oat_dex_file->GetDexFileLocationChecksum() << " != "
+ << dex_file_location_checksum << ")";
+ return false;
+ }
+ }
+ return true;
+}
+
+OatFile& ImageSpace::ReleaseOatFile() {
+ CHECK(oat_file_.get() != NULL);
+ return *oat_file_.release();
}
void ImageSpace::RecordImageAllocations(accounting::SpaceBitmap* live_bitmap) const {
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index afec5b7..fde2b41 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_SPACE_IMAGE_SPACE_H_
-#define ART_SRC_GC_SPACE_IMAGE_SPACE_H_
+#ifndef ART_RUNTIME_GC_SPACE_IMAGE_SPACE_H_
+#define ART_RUNTIME_GC_SPACE_IMAGE_SPACE_H_
#include "space.h"
namespace art {
+
+class OatFile;
+
namespace gc {
namespace space {
@@ -34,10 +37,22 @@
return kSpaceTypeImageSpace;
}
- // create a Space from an image file. cannot be used for future allocation or collected.
+ // Create a Space from an image file. Cannot be used for future
+ // allocation or collected.
+ //
+ // Create also opens the OatFile associated with the image file so
+ // that it be contiguously allocated with the image before the
+ // creation of the alloc space. The ReleaseOatFile will later be
+ // used to transfer ownership of the OatFile to the ClassLinker when
+ // it is initialized.
static ImageSpace* Create(const std::string& image)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ // Releases the OatFile from the ImageSpace so it can be transfer to
+ // the caller, presumably the ClassLinker.
+ OatFile& ReleaseOatFile()
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
const ImageHeader& GetImageHeader() const {
return *reinterpret_cast<ImageHeader*>(Begin());
}
@@ -63,6 +78,23 @@
void Dump(std::ostream& os) const;
private:
+
+ // Tries to initialize an ImageSpace from the given image path,
+ // returning NULL on error.
+ //
+ // If validate_oat_file is false (for /system), do not verify that
+ // image's OatFile is up-to-date relative to its DexFile
+ // inputs. Otherwise (for /data), validate the inputs and generate
+ // the OatFile in /data/dalvik-cache if necessary.
+ static ImageSpace* Init(const std::string& image, bool validate_oat_file)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ OatFile* OpenOatFile() const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ bool ValidateOatFile() const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
friend class Space;
static size_t bitmap_index_;
@@ -71,6 +103,11 @@
ImageSpace(const std::string& name, MemMap* mem_map);
+ // The OatFile associated with the image during early startup to
+ // reserve space contiguous to the image. It is later released to
+ // the ClassLinker during it's initialization.
+ UniquePtr<OatFile> oat_file_;
+
DISALLOW_COPY_AND_ASSIGN(ImageSpace);
};
@@ -78,4 +115,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_SPACE_IMAGE_SPACE_H_
+#endif // ART_RUNTIME_GC_SPACE_IMAGE_SPACE_H_
diff --git a/runtime/gc/space/large_object_space.h b/runtime/gc/space/large_object_space.h
index 197fad3..74d9cca 100644
--- a/runtime/gc/space/large_object_space.h
+++ b/runtime/gc/space/large_object_space.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_SPACE_LARGE_OBJECT_SPACE_H_
-#define ART_SRC_GC_SPACE_LARGE_OBJECT_SPACE_H_
+#ifndef ART_RUNTIME_GC_SPACE_LARGE_OBJECT_SPACE_H_
+#define ART_RUNTIME_GC_SPACE_LARGE_OBJECT_SPACE_H_
#include "dlmalloc_space.h"
@@ -190,4 +190,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_SPACE_LARGE_OBJECT_SPACE_H_
+#endif // ART_RUNTIME_GC_SPACE_LARGE_OBJECT_SPACE_H_
diff --git a/runtime/gc/space/space-inl.h b/runtime/gc/space/space-inl.h
index 54bf604..2c3b93c 100644
--- a/runtime/gc/space/space-inl.h
+++ b/runtime/gc/space/space-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_SPACE_SPACE_INL_H_
-#define ART_SRC_GC_SPACE_SPACE_INL_H_
+#ifndef ART_RUNTIME_GC_SPACE_SPACE_INL_H_
+#define ART_RUNTIME_GC_SPACE_SPACE_INL_H_
#include "space.h"
@@ -45,4 +45,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_SPACE_SPACE_INL_H_
+#endif // ART_RUNTIME_GC_SPACE_SPACE_INL_H_
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index ca01c55..011e155 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_SPACE_SPACE_H_
-#define ART_SRC_GC_SPACE_SPACE_H_
+#ifndef ART_RUNTIME_GC_SPACE_SPACE_H_
+#define ART_RUNTIME_GC_SPACE_SPACE_H_
#include <string>
@@ -112,7 +112,6 @@
bool IsZygoteSpace() const {
return GetType() == kSpaceTypeZygoteSpace;
}
- DlMallocSpace* AsZygoteSpace();
// Does this space hold large objects and implement the large object space abstraction?
bool IsLargeObjectSpace() const {
@@ -292,4 +291,4 @@
} // namespace gc
} // namespace art
-#endif // ART_SRC_GC_SPACE_SPACE_H_
+#endif // ART_RUNTIME_GC_SPACE_SPACE_H_
diff --git a/runtime/gc_map.h b/runtime/gc_map.h
index 473b39a..33d09f2 100644
--- a/runtime/gc_map.h
+++ b/runtime/gc_map.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GC_MAP_H_
-#define ART_SRC_GC_MAP_H_
+#ifndef ART_RUNTIME_GC_MAP_H_
+#define ART_RUNTIME_GC_MAP_H_
#include <stdint.h>
@@ -108,4 +108,4 @@
} // namespace art
-#endif // ART_SRC_GC_MAP_H_
+#endif // ART_RUNTIME_GC_MAP_H_
diff --git a/runtime/globals.h b/runtime/globals.h
index dc9341a..c397494 100644
--- a/runtime/globals.h
+++ b/runtime/globals.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_GLOBALS_H_
-#define ART_SRC_GLOBALS_H_
+#ifndef ART_RUNTIME_GLOBALS_H_
+#define ART_RUNTIME_GLOBALS_H_
#include <stddef.h>
#include <stdint.h>
@@ -75,4 +75,4 @@
} // namespace art
-#endif // ART_SRC_GLOBALS_H_
+#endif // ART_RUNTIME_GLOBALS_H_
diff --git a/runtime/hprof/hprof.h b/runtime/hprof/hprof.h
index c6222dc..9168464 100644
--- a/runtime/hprof/hprof.h
+++ b/runtime/hprof/hprof.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef HPROF_HPROF_H_
-#define HPROF_HPROF_H_
+#ifndef ART_RUNTIME_HPROF_HPROF_H_
+#define ART_RUNTIME_HPROF_HPROF_H_
namespace art {
@@ -27,4 +27,4 @@
} // namespace art
-#endif // HPROF_HPROF_H_
+#endif // ART_RUNTIME_HPROF_HPROF_H_
diff --git a/runtime/image.h b/runtime/image.h
index f14d7d1..35e4c5c 100644
--- a/runtime/image.h
+++ b/runtime/image.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_IMAGE_H_
-#define ART_SRC_IMAGE_H_
+#ifndef ART_RUNTIME_IMAGE_H_
+#define ART_RUNTIME_IMAGE_H_
#include <string.h>
@@ -131,4 +131,4 @@
} // namespace art
-#endif // ART_SRC_IMAGE_H_
+#endif // ART_RUNTIME_IMAGE_H_
diff --git a/runtime/indenter.h b/runtime/indenter.h
index 4ac0c01..c432e1b 100644
--- a/runtime/indenter.h
+++ b/runtime/indenter.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INDENTER_H_
-#define ART_SRC_INDENTER_H_
+#ifndef ART_RUNTIME_INDENTER_H_
+#define ART_RUNTIME_INDENTER_H_
#include "base/macros.h"
#include <streambuf>
@@ -60,4 +60,4 @@
DISALLOW_COPY_AND_ASSIGN(Indenter);
};
-#endif // ART_SRC_INDENTER_H_
+#endif // ART_RUNTIME_INDENTER_H_
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h
index e09043d..34b0f3a 100644
--- a/runtime/indirect_reference_table.h
+++ b/runtime/indirect_reference_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INDIRECT_REFERENCE_TABLE_H_
-#define ART_SRC_INDIRECT_REFERENCE_TABLE_H_
+#ifndef ART_RUNTIME_INDIRECT_REFERENCE_TABLE_H_
+#define ART_RUNTIME_INDIRECT_REFERENCE_TABLE_H_
#include <stdint.h>
@@ -378,4 +378,4 @@
} // namespace art
-#endif // ART_SRC_INDIRECT_REFERENCE_TABLE_H_
+#endif // ART_RUNTIME_INDIRECT_REFERENCE_TABLE_H_
diff --git a/runtime/instruction_set.h b/runtime/instruction_set.h
index c4dae4d..2217f7f 100644
--- a/runtime/instruction_set.h
+++ b/runtime/instruction_set.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INSTRUCTION_SET_H_
-#define ART_SRC_INSTRUCTION_SET_H_
+#ifndef ART_RUNTIME_INSTRUCTION_SET_H_
+#define ART_RUNTIME_INSTRUCTION_SET_H_
#include <iosfwd>
@@ -33,4 +33,4 @@
} // namespace art
-#endif // ART_SRC_INSTRUCTION_SET_H_
+#endif // ART_RUNTIME_INSTRUCTION_SET_H_
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 8598d6d..091f66a 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -59,7 +59,9 @@
if (!method->IsAbstract()) {
const void* new_code;
if (uninstall) {
- if (is_initialized || !method->IsStatic() || method->IsConstructor()) {
+ if (forced_interpret_only_ && !method->IsNative() && !method->IsProxyMethod()) {
+ new_code = GetInterpreterEntryPoint();
+ } else if (is_initialized || !method->IsStatic() || method->IsConstructor()) {
new_code = class_linker->GetOatCodeFor(method);
} else {
new_code = GetResolutionTrampoline(class_linker);
@@ -79,7 +81,11 @@
if (!method->IsAbstract()) {
const void* new_code;
if (uninstall) {
- new_code = class_linker->GetOatCodeFor(method);
+ if (forced_interpret_only_ && !method->IsNative() && !method->IsProxyMethod()) {
+ new_code = GetInterpreterEntryPoint();
+ } else {
+ new_code = class_linker->GetOatCodeFor(method);
+ }
} else { // !uninstall
if (!interpreter_stubs_installed_ || method->IsNative()) {
new_code = GetInstrumentationEntryPoint();
@@ -376,6 +382,12 @@
void Instrumentation::UpdateMethodsCode(mirror::AbstractMethod* method, const void* code) const {
if (LIKELY(!instrumentation_stubs_installed_)) {
method->SetEntryPointFromCompiledCode(code);
+ } else {
+ if (!interpreter_stubs_installed_ || method->IsNative()) {
+ method->SetEntryPointFromCompiledCode(GetInstrumentationEntryPoint());
+ } else {
+ method->SetEntryPointFromCompiledCode(GetInterpreterEntryPoint());
+ }
}
}
@@ -396,9 +408,14 @@
const mirror::AbstractMethod* method,
uint32_t dex_pc) const {
typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
- for (It it = method_entry_listeners_.begin(), end = method_entry_listeners_.end(); it != end;
- ++it) {
- (*it)->MethodEntered(thread, this_object, method, dex_pc);
+ It it = method_entry_listeners_.begin();
+ bool is_end = (it == method_entry_listeners_.end());
+ // Implemented this way to prevent problems caused by modification of the list while iterating.
+ while (!is_end) {
+ InstrumentationListener* cur = *it;
+ ++it;
+ is_end = (it == method_entry_listeners_.end());
+ cur->MethodEntered(thread, this_object, method, dex_pc);
}
}
@@ -406,9 +423,14 @@
const mirror::AbstractMethod* method,
uint32_t dex_pc, const JValue& return_value) const {
typedef std::list<InstrumentationListener*>::const_iterator It; // TODO: C++0x auto
- for (It it = method_exit_listeners_.begin(), end = method_exit_listeners_.end(); it != end;
- ++it) {
- (*it)->MethodExited(thread, this_object, method, dex_pc, return_value);
+ It it = method_exit_listeners_.begin();
+ bool is_end = (it == method_exit_listeners_.end());
+ // Implemented this way to prevent problems caused by modification of the list while iterating.
+ while (!is_end) {
+ InstrumentationListener* cur = *it;
+ ++it;
+ is_end = (it == method_exit_listeners_.end());
+ cur->MethodExited(thread, this_object, method, dex_pc, return_value);
}
}
diff --git a/runtime/instrumentation.h b/runtime/instrumentation.h
index 5fea34f..798b7ab 100644
--- a/runtime/instrumentation.h
+++ b/runtime/instrumentation.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INSTRUMENTATION_H_
-#define ART_SRC_INSTRUMENTATION_H_
+#ifndef ART_RUNTIME_INSTRUMENTATION_H_
+#define ART_RUNTIME_INSTRUMENTATION_H_
#include "base/macros.h"
#include "locks.h"
@@ -284,10 +284,10 @@
mirror::AbstractMethod* method_;
const uintptr_t return_pc_;
const size_t frame_id_;
- bool interpreter_entry_;
+ const bool interpreter_entry_;
};
} // namespace instrumentation
} // namespace art
-#endif // ART_SRC_INSTRUMENTATION_H_
+#endif // ART_RUNTIME_INSTRUMENTATION_H_
diff --git a/runtime/intern_table.h b/runtime/intern_table.h
index 1ff4f6d..5031ce3 100644
--- a/runtime/intern_table.h
+++ b/runtime/intern_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INTERN_TABLE_H_
-#define ART_SRC_INTERN_TABLE_H_
+#ifndef ART_RUNTIME_INTERN_TABLE_H_
+#define ART_RUNTIME_INTERN_TABLE_H_
#include "base/mutex.h"
#include "root_visitor.h"
@@ -95,4 +95,4 @@
} // namespace art
-#endif // ART_SRC_CLASS_LINKER_H_
+#endif // ART_RUNTIME_INTERN_TABLE_H_
diff --git a/runtime/interpreter/interpreter.h b/runtime/interpreter/interpreter.h
index 20166ac..17884b9 100644
--- a/runtime/interpreter/interpreter.h
+++ b/runtime/interpreter/interpreter.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INTERPRETER_INTERPRETER_H_
-#define ART_SRC_INTERPRETER_INTERPRETER_H_
+#ifndef ART_RUNTIME_INTERPRETER_INTERPRETER_H_
+#define ART_RUNTIME_INTERPRETER_INTERPRETER_H_
#include "dex_file.h"
#include "locks.h"
@@ -55,4 +55,4 @@
} // namespace interpreter
} // namespace art
-#endif // ART_SRC_INTERPRETER_INTERPRETER_H_
+#endif // ART_RUNTIME_INTERPRETER_INTERPRETER_H_
diff --git a/runtime/invoke_arg_array_builder.h b/runtime/invoke_arg_array_builder.h
index b57d60a..c1d8249 100644
--- a/runtime/invoke_arg_array_builder.h
+++ b/runtime/invoke_arg_array_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INVOKE_ARG_ARRAY_BUILDER_H_
-#define ART_SRC_INVOKE_ARG_ARRAY_BUILDER_H_
+#ifndef ART_RUNTIME_INVOKE_ARG_ARRAY_BUILDER_H_
+#define ART_RUNTIME_INVOKE_ARG_ARRAY_BUILDER_H_
#include "mirror/object.h"
#include "scoped_thread_state_change.h"
@@ -180,4 +180,4 @@
} // namespace art
-#endif // ART_SRC_INVOKE_ARG_ARRAY_BUILDER_H_
+#endif // ART_RUNTIME_INVOKE_ARG_ARRAY_BUILDER_H_
diff --git a/runtime/invoke_type.h b/runtime/invoke_type.h
index d724fdb..cdf9be8 100644
--- a/runtime/invoke_type.h
+++ b/runtime/invoke_type.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_INVOKE_TYPE_H_
-#define ART_SRC_INVOKE_TYPE_H_
+#ifndef ART_RUNTIME_INVOKE_TYPE_H_
+#define ART_RUNTIME_INVOKE_TYPE_H_
#include <iosfwd>
@@ -34,4 +34,4 @@
} // namespace art
-#endif // ART_SRC_INVOKE_TYPE_H_
+#endif // ART_RUNTIME_INVOKE_TYPE_H_
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index ef07393..40ec431 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_JDWP_JDWP_H_
-#define ART_JDWP_JDWP_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_H_
+#define ART_RUNTIME_JDWP_JDWP_H_
#include "atomic_integer.h"
#include "base/mutex.h"
@@ -429,4 +429,4 @@
} // namespace art
-#endif // ART_JDWP_JDWP_H_
+#endif // ART_RUNTIME_JDWP_JDWP_H_
diff --git a/runtime/jdwp/jdwp_bits.h b/runtime/jdwp/jdwp_bits.h
index 2a3c775..9f80cbe 100644
--- a/runtime/jdwp/jdwp_bits.h
+++ b/runtime/jdwp/jdwp_bits.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_JDWP_BITS_H_
-#define ART_JDWP_BITS_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_BITS_H_
+#define ART_RUNTIME_JDWP_JDWP_BITS_H_
#include <stddef.h>
#include <stdint.h>
@@ -121,4 +121,4 @@
} // namespace art
-#endif // ART_JDWP_BITS_H_
+#endif // ART_RUNTIME_JDWP_JDWP_BITS_H_
diff --git a/runtime/jdwp/jdwp_constants.h b/runtime/jdwp/jdwp_constants.h
index ebc575b..a8db325 100644
--- a/runtime/jdwp/jdwp_constants.h
+++ b/runtime/jdwp/jdwp_constants.h
@@ -16,8 +16,8 @@
/*
* These come out of the JDWP documentation.
*/
-#ifndef ART_JDWP_JDWPCONSTANTS_H_
-#define ART_JDWP_JDWPCONSTANTS_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_CONSTANTS_H_
+#define ART_RUNTIME_JDWP_JDWP_CONSTANTS_H_
#include <iosfwd>
@@ -246,4 +246,4 @@
} // namespace art
-#endif // ART_JDWP_JDWPCONSTANTS_H_
+#endif // ART_RUNTIME_JDWP_JDWP_CONSTANTS_H_
diff --git a/runtime/jdwp/jdwp_event.h b/runtime/jdwp/jdwp_event.h
index a6eabb1..d269761 100644
--- a/runtime/jdwp/jdwp_event.h
+++ b/runtime/jdwp/jdwp_event.h
@@ -16,8 +16,8 @@
/*
* Handle registration of events, and debugger event notification.
*/
-#ifndef ART_JDWP_JDWPEVENT_H_
-#define ART_JDWP_JDWPEVENT_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_EVENT_H_
+#define ART_RUNTIME_JDWP_JDWP_EVENT_H_
#include "jdwp/jdwp.h"
#include "jdwp/jdwp_constants.h"
@@ -110,4 +110,4 @@
} // namespace art
-#endif // ART_JDWP_JDWPEVENT_H_
+#endif // ART_RUNTIME_JDWP_JDWP_EVENT_H_
diff --git a/runtime/jdwp/jdwp_expand_buf.h b/runtime/jdwp/jdwp_expand_buf.h
index 820f62d..81e01e2 100644
--- a/runtime/jdwp/jdwp_expand_buf.h
+++ b/runtime/jdwp/jdwp_expand_buf.h
@@ -16,8 +16,8 @@
/*
* Expanding byte buffer, with primitives for appending basic data types.
*/
-#ifndef ART_JDWP_EXPANDBUF_H_
-#define ART_JDWP_EXPANDBUF_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_EXPAND_BUF_H_
+#define ART_RUNTIME_JDWP_JDWP_EXPAND_BUF_H_
#include <string>
@@ -67,4 +67,4 @@
} // namespace art
-#endif // ART_JDWP_EXPANDBUF_H_
+#endif // ART_RUNTIME_JDWP_JDWP_EXPAND_BUF_H_
diff --git a/runtime/jdwp/jdwp_priv.h b/runtime/jdwp/jdwp_priv.h
index c8a7b26..ab89339 100644
--- a/runtime/jdwp/jdwp_priv.h
+++ b/runtime/jdwp/jdwp_priv.h
@@ -16,8 +16,8 @@
/*
* JDWP internal interfaces.
*/
-#ifndef ART_JDWP_JDWPPRIV_H_
-#define ART_JDWP_JDWPPRIV_H_
+#ifndef ART_RUNTIME_JDWP_JDWP_PRIV_H_
+#define ART_RUNTIME_JDWP_JDWP_PRIV_H_
#include "debugger.h"
#include "jdwp/jdwp.h"
@@ -101,4 +101,4 @@
} // namespace art
-#endif // ART_JDWP_JDWPPRIV_H_
+#endif // ART_RUNTIME_JDWP_JDWP_PRIV_H_
diff --git a/runtime/jdwp/object_registry.h b/runtime/jdwp/object_registry.h
index d0ea59d..345f0ad 100644
--- a/runtime/jdwp/object_registry.h
+++ b/runtime/jdwp/object_registry.h
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#ifndef ART_RUNTIME_JDWP_OBJECT_REGISTRY_H_
+#define ART_RUNTIME_JDWP_OBJECT_REGISTRY_H_
+
#include <stdint.h>
#include <map>
@@ -98,3 +101,5 @@
};
} // namespace art
+
+#endif // ART_RUNTIME_JDWP_OBJECT_REGISTRY_H_
diff --git a/runtime/jni_internal.h b/runtime/jni_internal.h
index 7b43f95..ad66ada 100644
--- a/runtime/jni_internal.h
+++ b/runtime/jni_internal.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_JNI_INTERNAL_H_
-#define ART_SRC_JNI_INTERNAL_H_
+#ifndef ART_RUNTIME_JNI_INTERNAL_H_
+#define ART_RUNTIME_JNI_INTERNAL_H_
#include "jni.h"
@@ -198,4 +198,4 @@
std::ostream& operator<<(std::ostream& os, const jobjectRefType& rhs);
-#endif // ART_SRC_JNI_INTERNAL_H_
+#endif // ART_RUNTIME_JNI_INTERNAL_H_
diff --git a/runtime/jobject_comparator.h b/runtime/jobject_comparator.h
index 17098aa..698d667 100644
--- a/runtime/jobject_comparator.h
+++ b/runtime/jobject_comparator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_JOBJECT_COMPARATOR_H_
-#define ART_SRC_JOBJECT_COMPARATOR_H_
+#ifndef ART_RUNTIME_JOBJECT_COMPARATOR_H_
+#define ART_RUNTIME_JOBJECT_COMPARATOR_H_
#include <jni.h>
@@ -27,4 +27,4 @@
} // namespace art
-#endif // ART_SRC_JOBJECT_COMPARATOR_H_
+#endif // ART_RUNTIME_JOBJECT_COMPARATOR_H_
diff --git a/runtime/jvalue.h b/runtime/jvalue.h
index 66cd93e..0c1aadb 100644
--- a/runtime/jvalue.h
+++ b/runtime/jvalue.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_JVALUE_H_
-#define ART_SRC_JVALUE_H_
+#ifndef ART_RUNTIME_JVALUE_H_
+#define ART_RUNTIME_JVALUE_H_
#include "base/macros.h"
@@ -75,4 +75,4 @@
} // namespace art
-#endif // ART_SRC_JVALUE_H_
+#endif // ART_RUNTIME_JVALUE_H_
diff --git a/runtime/leb128.h b/runtime/leb128.h
index a5a6683..ca955b0 100644
--- a/runtime/leb128.h
+++ b/runtime/leb128.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_LEB128_H_
-#define ART_SRC_LEB128_H_
+#ifndef ART_RUNTIME_LEB128_H_
+#define ART_RUNTIME_LEB128_H_
#include "globals.h"
@@ -121,4 +121,4 @@
} // namespace art
-#endif // ART_SRC_LEB128_H_
+#endif // ART_RUNTIME_LEB128_H_
diff --git a/runtime/locks.h b/runtime/locks.h
index 8cc39ea..df3f27b 100644
--- a/runtime/locks.h
+++ b/runtime/locks.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_LOCKS_H_
-#define ART_SRC_LOCKS_H_
+#ifndef ART_RUNTIME_LOCKS_H_
+#define ART_RUNTIME_LOCKS_H_
#include <ostream>
@@ -165,4 +165,4 @@
} // namespace art
-#endif // ART_SRC_LOCKS_H_
+#endif // ART_RUNTIME_LOCKS_H_
diff --git a/runtime/log_severity.h b/runtime/log_severity.h
index 126019b..bb7679d 100644
--- a/runtime/log_severity.h
+++ b/runtime/log_severity.h
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#ifndef BASE_LOG_SEVERITY_H_
-#define BASE_LOG_SEVERITY_H_
+#ifndef ART_RUNTIME_LOG_SEVERITY_H_
+#define ART_RUNTIME_LOG_SEVERITY_H_
typedef int LogSeverity;
const int VERBOSE = 0, DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, FATAL = 5;
const int INTERNAL_FATAL = 6; // For Runtime::Abort.
-#endif // BASE_LOG_SEVERITY_H_
+#endif // ART_RUNTIME_LOG_SEVERITY_H_
diff --git a/runtime/mem_map.h b/runtime/mem_map.h
index 2eb7772..7d418a5 100644
--- a/runtime/mem_map.h
+++ b/runtime/mem_map.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MEM_MAP_H_
-#define ART_SRC_MEM_MAP_H_
+#ifndef ART_RUNTIME_MEM_MAP_H_
+#define ART_RUNTIME_MEM_MAP_H_
#include <string>
@@ -101,4 +101,4 @@
} // namespace art
-#endif // ART_SRC_MEM_MAP_H_
+#endif // ART_RUNTIME_MEM_MAP_H_
diff --git a/runtime/memory_region.h b/runtime/memory_region.h
index cfbe42d..849ab1c 100644
--- a/runtime/memory_region.h
+++ b/runtime/memory_region.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MEMORY_REGION_H_
-#define ART_SRC_MEMORY_REGION_H_
+#ifndef ART_RUNTIME_MEMORY_REGION_H_
+#define ART_RUNTIME_MEMORY_REGION_H_
#include <stdint.h>
@@ -96,4 +96,4 @@
} // namespace art
-#endif // ART_MEMORY_REGION_H_
+#endif // ART_RUNTIME_MEMORY_REGION_H_
diff --git a/runtime/method_reference.h b/runtime/method_reference.h
index ff8bf31..1ff4ea0 100644
--- a/runtime/method_reference.h
+++ b/runtime/method_reference.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_METHOD_REFERENCE_H_
-#define ART_SRC_METHOD_REFERENCE_H_
+#ifndef ART_RUNTIME_METHOD_REFERENCE_H_
+#define ART_RUNTIME_METHOD_REFERENCE_H_
namespace art {
@@ -44,4 +44,4 @@
} // namespace art
-#endif // ART_SRC_METHOD_REFERENCE_H_
+#endif // ART_RUNTIME_METHOD_REFERENCE_H_
diff --git a/runtime/mirror/abstract_method-inl.h b/runtime/mirror/abstract_method-inl.h
index a823886..2df1367 100644
--- a/runtime/mirror/abstract_method-inl.h
+++ b/runtime/mirror/abstract_method-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_METHOD_INL_H_
-#define ART_SRC_MIRROR_METHOD_INL_H_
+#ifndef ART_RUNTIME_MIRROR_ABSTRACT_METHOD_INL_H_
+#define ART_RUNTIME_MIRROR_ABSTRACT_METHOD_INL_H_
#include "abstract_method.h"
@@ -114,17 +114,21 @@
if (IsNative() || IsRuntimeMethod() || IsProxyMethod()) {
return;
}
- if (GetEntryPointFromCompiledCode() == GetInterpreterEntryPoint()) {
+ if (pc == GetInstrumentationExitPc()) {
+ return;
+ }
+ const void* code = GetEntryPointFromCompiledCode();
+ if (code == GetInterpreterEntryPoint() || code == GetInstrumentationEntryPoint()) {
return;
}
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- if (GetEntryPointFromCompiledCode() == GetResolutionTrampoline(class_linker)) {
- return;
+ if (code == GetResolutionTrampoline(class_linker)) {
+ return;
}
DCHECK(IsWithinCode(pc))
<< PrettyMethod(this)
<< " pc=" << std::hex << pc
- << " code=" << GetEntryPointFromCompiledCode()
+ << " code=" << code
<< " size=" << GetCodeSize();
}
@@ -196,4 +200,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_METHOD_INL_H_
+#endif // ART_RUNTIME_MIRROR_ABSTRACT_METHOD_INL_H_
diff --git a/runtime/mirror/abstract_method.h b/runtime/mirror/abstract_method.h
index 339471d..d909058 100644
--- a/runtime/mirror/abstract_method.h
+++ b/runtime/mirror/abstract_method.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_METHOD_H_
-#define ART_SRC_MIRROR_METHOD_H_
+#ifndef ART_RUNTIME_MIRROR_ABSTRACT_METHOD_H_
+#define ART_RUNTIME_MIRROR_ABSTRACT_METHOD_H_
#include "class.h"
#include "dex_file.h"
@@ -515,4 +515,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_METHOD_H_
+#endif // ART_RUNTIME_MIRROR_ABSTRACT_METHOD_H_
diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h
index b7f212f..eb73c7d 100644
--- a/runtime/mirror/array-inl.h
+++ b/runtime/mirror/array-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_ARRAY_INL_H_
-#define ART_SRC_MIRROR_ARRAY_INL_H_
+#ifndef ART_RUNTIME_MIRROR_ARRAY_INL_H_
+#define ART_RUNTIME_MIRROR_ARRAY_INL_H_
#include "array.h"
@@ -36,4 +36,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_ARRAY_INL_H_
+#endif // ART_RUNTIME_MIRROR_ARRAY_INL_H_
diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h
index 98b8ea0..b195a87 100644
--- a/runtime/mirror/array.h
+++ b/runtime/mirror/array.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_ARRAY_H_
-#define ART_SRC_MIRROR_ARRAY_H_
+#ifndef ART_RUNTIME_MIRROR_ARRAY_H_
+#define ART_RUNTIME_MIRROR_ARRAY_H_
#include "object.h"
@@ -145,4 +145,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_ARRAY_H_
+#endif // ART_RUNTIME_MIRROR_ARRAY_H_
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h
index 6819fb2..d323c33 100644
--- a/runtime/mirror/class-inl.h
+++ b/runtime/mirror/class-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_CLASS_INL_H_
-#define ART_SRC_MIRROR_CLASS_INL_H_
+#ifndef ART_RUNTIME_MIRROR_CLASS_INL_H_
+#define ART_RUNTIME_MIRROR_CLASS_INL_H_
#include "class.h"
@@ -346,4 +346,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_CLASS_INL_H_
+#endif // ART_RUNTIME_MIRROR_CLASS_INL_H_
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 084aa24..9a506c2 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_CLASS_H_
-#define ART_SRC_MIRROR_CLASS_H_
+#ifndef ART_RUNTIME_MIRROR_CLASS_H_
+#define ART_RUNTIME_MIRROR_CLASS_H_
#include "modifiers.h"
#include "object.h"
@@ -882,4 +882,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_CLASS_H_
+#endif // ART_RUNTIME_MIRROR_CLASS_H_
diff --git a/runtime/mirror/class_loader.h b/runtime/mirror/class_loader.h
index 0d635f1..415cb67 100644
--- a/runtime/mirror/class_loader.h
+++ b/runtime/mirror/class_loader.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_CLASS_LOADER_H_
-#define ART_SRC_CLASS_LOADER_H_
+#ifndef ART_RUNTIME_MIRROR_CLASS_LOADER_H_
+#define ART_RUNTIME_MIRROR_CLASS_LOADER_H_
#include <vector>
@@ -43,4 +43,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_CLASS_LOADER_H_
+#endif // ART_RUNTIME_MIRROR_CLASS_LOADER_H_
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index 3b17c42..369dc49 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_DEX_CACHE_INL_H_
-#define ART_SRC_MIRROR_DEX_CACHE_INL_H_
+#ifndef ART_RUNTIME_MIRROR_DEX_CACHE_INL_H_
+#define ART_RUNTIME_MIRROR_DEX_CACHE_INL_H_
#include "dex_cache.h"
@@ -37,4 +37,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_DEX_CACHE_INL_H_
+#endif // ART_RUNTIME_MIRROR_DEX_CACHE_INL_H_
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index 307588b..fd3f5f4 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_DEX_CACHE_H_
-#define ART_SRC_MIRROR_DEX_CACHE_H_
+#ifndef ART_RUNTIME_MIRROR_DEX_CACHE_H_
+#define ART_RUNTIME_MIRROR_DEX_CACHE_H_
#include "abstract_method.h"
#include "class.h"
@@ -179,4 +179,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_DEX_CACHE_H_
+#endif // ART_RUNTIME_MIRROR_DEX_CACHE_H_
diff --git a/runtime/mirror/field-inl.h b/runtime/mirror/field-inl.h
index be5dcab..3e3d6db 100644
--- a/runtime/mirror/field-inl.h
+++ b/runtime/mirror/field-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_FIELD_INL_H_
-#define ART_SRC_MIRROR_FIELD_INL_H_
+#ifndef ART_RUNTIME_MIRROR_FIELD_INL_H_
+#define ART_RUNTIME_MIRROR_FIELD_INL_H_
#include "field.h"
@@ -218,4 +218,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_FIELD_INL_H_
+#endif // ART_RUNTIME_MIRROR_FIELD_INL_H_
diff --git a/runtime/mirror/field.h b/runtime/mirror/field.h
index 4e7abe8..6e508a3 100644
--- a/runtime/mirror/field.h
+++ b/runtime/mirror/field.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_FIELD_H_
-#define ART_SRC_MIRROR_FIELD_H_
+#ifndef ART_RUNTIME_MIRROR_FIELD_H_
+#define ART_RUNTIME_MIRROR_FIELD_H_
#include "class.h"
#include "modifiers.h"
@@ -165,4 +165,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_FIELD_H_
+#endif // ART_RUNTIME_MIRROR_FIELD_H_
diff --git a/runtime/mirror/iftable-inl.h b/runtime/mirror/iftable-inl.h
index 72803b8..9d5fa74 100644
--- a/runtime/mirror/iftable-inl.h
+++ b/runtime/mirror/iftable-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_IFTABLE_INL_H_
-#define ART_SRC_MIRROR_IFTABLE_INL_H_
+#ifndef ART_RUNTIME_MIRROR_IFTABLE_INL_H_
+#define ART_RUNTIME_MIRROR_IFTABLE_INL_H_
#include "iftable.h"
@@ -32,4 +32,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_IFTABLE_INL_H_
+#endif // ART_RUNTIME_MIRROR_IFTABLE_INL_H_
diff --git a/runtime/mirror/iftable.h b/runtime/mirror/iftable.h
index ffb2e51..aea8fdd 100644
--- a/runtime/mirror/iftable.h
+++ b/runtime/mirror/iftable.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_IFTABLE_H_
-#define ART_SRC_MIRROR_IFTABLE_H_
+#ifndef ART_RUNTIME_MIRROR_IFTABLE_H_
+#define ART_RUNTIME_MIRROR_IFTABLE_H_
#include "object_array.h"
@@ -76,4 +76,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_IFTABLE_H_
+#endif // ART_RUNTIME_MIRROR_IFTABLE_H_
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index 1a91dd3..5818a80 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_OBJECT_INL_H_
-#define ART_SRC_MIRROR_OBJECT_INL_H_
+#ifndef ART_RUNTIME_MIRROR_OBJECT_INL_H_
+#define ART_RUNTIME_MIRROR_OBJECT_INL_H_
#include "object.h"
@@ -272,4 +272,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_OBJECT_INL_H_
+#endif // ART_RUNTIME_MIRROR_OBJECT_INL_H_
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index 71b628d..a40c906 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_OBJECT_H_
-#define ART_SRC_MIRROR_OBJECT_H_
+#ifndef ART_RUNTIME_MIRROR_OBJECT_H_
+#define ART_RUNTIME_MIRROR_OBJECT_H_
#include "base/casts.h"
#include "base/logging.h"
@@ -260,4 +260,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_OBJECT_H_
+#endif // ART_RUNTIME_MIRROR_OBJECT_H_
diff --git a/runtime/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h
index b130dac..8675c31 100644
--- a/runtime/mirror/object_array-inl.h
+++ b/runtime/mirror/object_array-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_OBJECT_ARRAY_INL_H_
-#define ART_SRC_MIRROR_OBJECT_ARRAY_INL_H_
+#ifndef ART_RUNTIME_MIRROR_OBJECT_ARRAY_INL_H_
+#define ART_RUNTIME_MIRROR_OBJECT_ARRAY_INL_H_
#include "object_array.h"
@@ -142,4 +142,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_OBJET_ARRAY_INL_H_
+#endif // ART_RUNTIME_MIRROR_OBJECT_ARRAY_INL_H_
diff --git a/runtime/mirror/object_array.h b/runtime/mirror/object_array.h
index 08a8d62..09ff519 100644
--- a/runtime/mirror/object_array.h
+++ b/runtime/mirror/object_array.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_OBJECT_ARRAY_H_
-#define ART_SRC_MIRROR_OBJECT_ARRAY_H_
+#ifndef ART_RUNTIME_MIRROR_OBJECT_ARRAY_H_
+#define ART_RUNTIME_MIRROR_OBJECT_ARRAY_H_
#include "array.h"
@@ -61,4 +61,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_OBJECT_ARRAY_H_
+#endif // ART_RUNTIME_MIRROR_OBJECT_ARRAY_H_
diff --git a/runtime/mirror/proxy.h b/runtime/mirror/proxy.h
index cac028a..7c5bc39 100644
--- a/runtime/mirror/proxy.h
+++ b/runtime/mirror/proxy.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_PROXY_H_
-#define ART_SRC_MIRROR_PROXY_H_
+#ifndef ART_RUNTIME_MIRROR_PROXY_H_
+#define ART_RUNTIME_MIRROR_PROXY_H_
#include "mirror/object.h"
@@ -52,4 +52,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_PROXY_H_
+#endif // ART_RUNTIME_MIRROR_PROXY_H_
diff --git a/runtime/mirror/stack_trace_element.h b/runtime/mirror/stack_trace_element.h
index d53c860..a9751f9 100644
--- a/runtime/mirror/stack_trace_element.h
+++ b/runtime/mirror/stack_trace_element.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_STACK_TRACE_ELEMENT_H_
-#define ART_SRC_MIRROR_STACK_TRACE_ELEMENT_H_
+#ifndef ART_RUNTIME_MIRROR_STACK_TRACE_ELEMENT_H_
+#define ART_RUNTIME_MIRROR_STACK_TRACE_ELEMENT_H_
#include "object.h"
@@ -80,4 +80,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_STACK_TRACE_ELEMENT_H_
+#endif // ART_RUNTIME_MIRROR_STACK_TRACE_ELEMENT_H_
diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h
index 8109dcb..bf545ea 100644
--- a/runtime/mirror/string.h
+++ b/runtime/mirror/string.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_STRING_H_
-#define ART_SRC_MIRROR_STRING_H_
+#ifndef ART_RUNTIME_MIRROR_STRING_H_
+#define ART_RUNTIME_MIRROR_STRING_H_
#include "class.h"
#include "gtest/gtest.h"
@@ -164,4 +164,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_STRING_H_
+#endif // ART_RUNTIME_MIRROR_STRING_H_
diff --git a/runtime/mirror/throwable.h b/runtime/mirror/throwable.h
index aafcc07..909228e 100644
--- a/runtime/mirror/throwable.h
+++ b/runtime/mirror/throwable.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MIRROR_THROWABLE_H_
-#define ART_SRC_MIRROR_THROWABLE_H_
+#ifndef ART_RUNTIME_MIRROR_THROWABLE_H_
+#define ART_RUNTIME_MIRROR_THROWABLE_H_
#include "object.h"
#include "string.h"
@@ -72,4 +72,4 @@
} // namespace mirror
} // namespace art
-#endif // ART_SRC_MIRROR_THROWABLE_H_
+#endif // ART_RUNTIME_MIRROR_THROWABLE_H_
diff --git a/runtime/modifiers.h b/runtime/modifiers.h
index 85bc06d..9b61ee0 100644
--- a/runtime/modifiers.h
+++ b/runtime/modifiers.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MODIFIERS_H_
-#define ART_SRC_MODIFIERS_H_
+#ifndef ART_RUNTIME_MODIFIERS_H_
+#define ART_RUNTIME_MODIFIERS_H_
#include <stdint.h>
@@ -63,5 +63,5 @@
| kAccClassIsFinalizerReference
| kAccClassIsPhantomReference);
-#endif // ART_SRC_MODIFIERS_H_
+#endif // ART_RUNTIME_MODIFIERS_H_
diff --git a/runtime/monitor.h b/runtime/monitor.h
index 9194c08..9206131 100644
--- a/runtime/monitor.h
+++ b/runtime/monitor.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_MONITOR_H_
-#define ART_SRC_MONITOR_H_
+#ifndef ART_RUNTIME_MONITOR_H_
+#define ART_RUNTIME_MONITOR_H_
#include <pthread.h>
#include <stdint.h>
@@ -208,4 +208,4 @@
} // namespace art
-#endif // ART_SRC_MONITOR_H_
+#endif // ART_RUNTIME_MONITOR_H_
diff --git a/runtime/nth_caller_visitor.h b/runtime/nth_caller_visitor.h
index c32a46a..e3593d8 100644
--- a/runtime/nth_caller_visitor.h
+++ b/runtime/nth_caller_visitor.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_NTH_CALLER_VISITOR_H_
-#define ART_SRC_NTH_CALLER_VISITOR_H_
+#ifndef ART_RUNTIME_NTH_CALLER_VISITOR_H_
+#define ART_RUNTIME_NTH_CALLER_VISITOR_H_
#include "mirror/abstract_method.h"
#include "locks.h"
@@ -58,4 +58,4 @@
} // namespace art
-#endif // ART_SRC_NTH_CALLER_VISITOR_H_
+#endif // ART_RUNTIME_NTH_CALLER_VISITOR_H_
diff --git a/runtime/oat.h b/runtime/oat.h
index c67a1a6..fb28962 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_H_
-#define ART_SRC_OAT_H_
+#ifndef ART_RUNTIME_OAT_H_
+#define ART_RUNTIME_OAT_H_
#include <vector>
@@ -113,4 +113,4 @@
} // namespace art
-#endif // ART_SRC_OAT_H_
+#endif // ART_RUNTIME_OAT_H_
diff --git a/runtime/oat/runtime/argument_visitor.h b/runtime/oat/runtime/argument_visitor.h
index 4ab05b9..d92ff19 100644
--- a/runtime/oat/runtime/argument_visitor.h
+++ b/runtime/oat/runtime/argument_visitor.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_ARGUMENT_VISITOR_H_
-#define ART_SRC_OAT_RUNTIME_ARGUMENT_VISITOR_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
+#define ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
#include "object_utils.h"
@@ -246,4 +246,4 @@
}
-#endif // ART_SRC_OAT_RUNTIME_ARGUMENT_VISITOR_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_ARGUMENT_VISITOR_H_
diff --git a/runtime/oat/runtime/arm/context_arm.h b/runtime/oat/runtime/arm/context_arm.h
index ec1d4cb..0be85e3 100644
--- a/runtime/oat/runtime/arm/context_arm.h
+++ b/runtime/oat/runtime/arm/context_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
-#define ART_SRC_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
+#define ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
#include "locks.h"
#include "constants_arm.h"
@@ -64,4 +64,4 @@
} // namespace arm
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_ARM_CONTEXT_ARM_H_
diff --git a/runtime/oat/runtime/callee_save_frame.h b/runtime/oat/runtime/callee_save_frame.h
index dd2f3fa..59f46ac 100644
--- a/runtime/oat/runtime/callee_save_frame.h
+++ b/runtime/oat/runtime/callee_save_frame.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
-#define ART_SRC_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
+#define ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
#include "base/mutex.h"
#include "thread-inl.h"
@@ -38,4 +38,4 @@
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_CALLEE_SAVE_FRAME_H_
diff --git a/runtime/oat/runtime/context.h b/runtime/oat/runtime/context.h
index 895abf9..ac43e9a 100644
--- a/runtime/oat/runtime/context.h
+++ b/runtime/oat/runtime/context.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_CONTEXT_H_
-#define ART_SRC_OAT_RUNTIME_CONTEXT_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
+#define ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
#include <stddef.h>
#include <stdint.h>
@@ -67,4 +67,4 @@
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_CONTEXT_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_CONTEXT_H_
diff --git a/runtime/oat/runtime/mips/context_mips.h b/runtime/oat/runtime/mips/context_mips.h
index fc8ef96..f27124c 100644
--- a/runtime/oat/runtime/mips/context_mips.h
+++ b/runtime/oat/runtime/mips/context_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
-#define ART_SRC_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
+#define ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
#include "constants_mips.h"
#include "oat/runtime/context.h"
@@ -61,4 +61,4 @@
} // namespace mips
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_MIPS_CONTEXT_MIPS_H_
diff --git a/runtime/oat/runtime/oat_support_entrypoints.h b/runtime/oat/runtime/oat_support_entrypoints.h
index c1a2587..546ee01 100644
--- a/runtime/oat/runtime/oat_support_entrypoints.h
+++ b/runtime/oat/runtime/oat_support_entrypoints.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
-#define ART_SRC_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
+#define ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
#include "dex_file-inl.h"
#include "runtime.h"
@@ -174,4 +174,4 @@
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_OAT_SUPPORT_ENTRYPOINTS_H_
diff --git a/runtime/oat/runtime/x86/context_x86.h b/runtime/oat/runtime/x86/context_x86.h
index 7928fd8..4ecfc51 100644
--- a/runtime/oat/runtime/x86/context_x86.h
+++ b/runtime/oat/runtime/x86/context_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_RUNTIME_X86_CONTEXT_X86_H_
-#define ART_SRC_OAT_RUNTIME_X86_CONTEXT_X86_H_
+#ifndef ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
+#define ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
#include "constants_x86.h"
#include "oat/runtime/context.h"
@@ -64,4 +64,4 @@
} // namespace x86
} // namespace art
-#endif // ART_SRC_OAT_RUNTIME_X86_CONTEXT_X86_H_
+#endif // ART_RUNTIME_OAT_RUNTIME_X86_CONTEXT_X86_H_
diff --git a/runtime/oat/utils/arm/assembler_arm.h b/runtime/oat/utils/arm/assembler_arm.h
index 06e0a55..b8c79d21 100644
--- a/runtime/oat/utils/arm/assembler_arm.h
+++ b/runtime/oat/utils/arm/assembler_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
-#define ART_SRC_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
+#ifndef ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
+#define ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
#include <vector>
@@ -656,4 +656,4 @@
} // namespace arm
} // namespace art
-#endif // ART_SRC_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
+#endif // ART_RUNTIME_OAT_UTILS_ARM_ASSEMBLER_ARM_H_
diff --git a/runtime/oat/utils/arm/managed_register_arm.h b/runtime/oat/utils/arm/managed_register_arm.h
index b069f6d..01596bb 100644
--- a/runtime/oat/utils/arm/managed_register_arm.h
+++ b/runtime/oat/utils/arm/managed_register_arm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
-#define ART_SRC_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#ifndef ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#define ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
#include "base/logging.h"
#include "constants_arm.h"
@@ -271,4 +271,4 @@
} // namespace art
-#endif // ART_SRC_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
+#endif // ART_RUNTIME_OAT_UTILS_ARM_MANAGED_REGISTER_ARM_H_
diff --git a/runtime/oat/utils/assembler.h b/runtime/oat/utils/assembler.h
index cbf145b..05e2732 100644
--- a/runtime/oat/utils/assembler.h
+++ b/runtime/oat/utils/assembler.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_ASSEMBLER_H_
-#define ART_SRC_OAT_UTILS_ASSEMBLER_H_
+#ifndef ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
+#define ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
#include <vector>
@@ -456,4 +456,4 @@
} // namespace art
-#endif // ART_SRC_OAT_UTILS_ASSEMBLER_H_
+#endif // ART_RUNTIME_OAT_UTILS_ASSEMBLER_H_
diff --git a/runtime/oat/utils/managed_register.h b/runtime/oat/utils/managed_register.h
index a3d5795..4dd2acd 100644
--- a/runtime/oat/utils/managed_register.h
+++ b/runtime/oat/utils/managed_register.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_MANAGED_REGISTER_H_
-#define ART_SRC_OAT_UTILS_MANAGED_REGISTER_H_
+#ifndef ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
+#define ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
namespace art {
@@ -69,4 +69,4 @@
} // namespace art
-#endif // ART_SRC_OAT_UTILS_MANAGED_REGISTER_H_
+#endif // ART_RUNTIME_OAT_UTILS_MANAGED_REGISTER_H_
diff --git a/runtime/oat/utils/mips/assembler_mips.h b/runtime/oat/utils/mips/assembler_mips.h
index 02759e4..eeb4a57 100644
--- a/runtime/oat/utils/mips/assembler_mips.h
+++ b/runtime/oat/utils/mips/assembler_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
-#define ART_SRC_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#ifndef ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#define ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
#include <vector>
@@ -510,4 +510,4 @@
} // namespace mips
} // namespace art
-#endif // ART_SRC_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
+#endif // ART_RUNTIME_OAT_UTILS_MIPS_ASSEMBLER_MIPS_H_
diff --git a/runtime/oat/utils/mips/managed_register_mips.h b/runtime/oat/utils/mips/managed_register_mips.h
index aaaabfc..b335ff9 100644
--- a/runtime/oat/utils/mips/managed_register_mips.h
+++ b/runtime/oat/utils/mips/managed_register_mips.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
-#define ART_SRC_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#ifndef ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#define ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
#include "constants_mips.h"
#include "oat/utils/managed_register.h"
@@ -225,4 +225,4 @@
} // namespace art
-#endif // ART_SRC_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
+#endif // ART_RUNTIME_OAT_UTILS_MIPS_MANAGED_REGISTER_MIPS_H_
diff --git a/runtime/oat/utils/x86/assembler_x86.h b/runtime/oat/utils/x86/assembler_x86.h
index dddb9b1..390f7aa 100644
--- a/runtime/oat/utils/x86/assembler_x86.h
+++ b/runtime/oat/utils/x86/assembler_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_X86_ASSEMBLER_X86_H_
-#define ART_SRC_OAT_UTILS_X86_ASSEMBLER_X86_H_
+#ifndef ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
+#define ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
#include <vector>
#include "base/macros.h"
@@ -652,4 +652,4 @@
} // namespace x86
} // namespace art
-#endif // ART_SRC_OAT_UTILS_X86_ASSEMBLER_X86_H_
+#endif // ART_RUNTIME_OAT_UTILS_X86_ASSEMBLER_X86_H_
diff --git a/runtime/oat/utils/x86/managed_register_x86.h b/runtime/oat/utils/x86/managed_register_x86.h
index 4481456..b564a83 100644
--- a/runtime/oat/utils/x86/managed_register_x86.h
+++ b/runtime/oat/utils/x86/managed_register_x86.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
-#define ART_SRC_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
+#ifndef ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
+#define ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
#include "constants_x86.h"
#include "oat/utils/managed_register.h"
@@ -215,4 +215,4 @@
} // namespace art
-#endif // ART_SRC_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
+#endif // ART_RUNTIME_OAT_UTILS_X86_MANAGED_REGISTER_X86_H_
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index e3fd002..fff6c8a 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OAT_FILE_H_
-#define ART_SRC_OAT_FILE_H_
+#ifndef ART_RUNTIME_OAT_FILE_H_
+#define ART_RUNTIME_OAT_FILE_H_
#include <string>
#include <vector>
@@ -166,18 +166,25 @@
class OatDexFile {
public:
+ // Opens the DexFile referred to by this OatDexFile from within the containing OatFile.
const DexFile* OpenDexFile() const;
- const OatClass* GetOatClass(uint32_t class_def_index) const;
+
+ // Returns the size of the DexFile refered to by this OatDexFile.
size_t FileSize() const;
+ // Returns original path of DexFile that was the source of this OatDexFile.
const std::string& GetDexFileLocation() const {
return dex_file_location_;
}
+ // Returns checksum of original DexFile that was the source of this OatDexFile;
uint32_t GetDexFileLocationChecksum() const {
return dex_file_location_checksum_;
}
+ // Returns the OatClass for the class specified by the given DexFile class_def_index.
+ const OatClass* GetOatClass(uint32_t class_def_index) const;
+
~OatDexFile();
private:
@@ -258,4 +265,4 @@
} // namespace art
-#endif // ART_SRC_OAT_WRITER_H_
+#endif // ART_RUNTIME_OAT_FILE_H_
diff --git a/runtime/object_utils.h b/runtime/object_utils.h
index 4af5d4c..fa7763e 100644
--- a/runtime/object_utils.h
+++ b/runtime/object_utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OBJECT_UTILS_H_
-#define ART_SRC_OBJECT_UTILS_H_
+#ifndef ART_RUNTIME_OBJECT_UTILS_H_
+#define ART_RUNTIME_OBJECT_UTILS_H_
#include "class_linker-inl.h"
#include "dex_file.h"
@@ -684,4 +684,4 @@
} // namespace art
-#endif // ART_SRC_OBJECT_UTILS_H_
+#endif // ART_RUNTIME_OBJECT_UTILS_H_
diff --git a/runtime/offsets.h b/runtime/offsets.h
index f37dbd4..94ae805 100644
--- a/runtime/offsets.h
+++ b/runtime/offsets.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OFFSETS_H_
-#define ART_SRC_OFFSETS_H_
+#ifndef ART_RUNTIME_OFFSETS_H_
+#define ART_RUNTIME_OFFSETS_H_
#include <iostream> // NOLINT
#include "globals.h"
@@ -59,4 +59,4 @@
} // namespace art
-#endif // ART_SRC_OFFSETS_H_
+#endif // ART_RUNTIME_OFFSETS_H_
diff --git a/runtime/os.h b/runtime/os.h
index 3428b6a..6767566 100644
--- a/runtime/os.h
+++ b/runtime/os.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OS_H_
-#define ART_SRC_OS_H_
+#ifndef ART_RUNTIME_OS_H_
+#define ART_RUNTIME_OS_H_
namespace unix_file {
class FdFile;
@@ -41,4 +41,4 @@
} // namespace art
-#endif // ART_SRC_OS_H_
+#endif // ART_RUNTIME_OS_H_
diff --git a/runtime/output_stream.h b/runtime/output_stream.h
index b03092d..d2a77d8 100644
--- a/runtime/output_stream.h
+++ b/runtime/output_stream.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_OUTPUT_STREAM_H_
-#define ART_SRC_OUTPUT_STREAM_H_
+#ifndef ART_RUNTIME_OUTPUT_STREAM_H_
+#define ART_RUNTIME_OUTPUT_STREAM_H_
#include <stdint.h>
@@ -53,4 +53,4 @@
} // namespace art
-#endif // ART_SRC_OUTPUT_STREAM_H_
+#endif // ART_RUNTIME_OUTPUT_STREAM_H_
diff --git a/runtime/primitive.h b/runtime/primitive.h
index eaa04cd..5e07311 100644
--- a/runtime/primitive.h
+++ b/runtime/primitive.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_PRIMITIVE_H_
-#define ART_SRC_PRIMITIVE_H_
+#ifndef ART_RUNTIME_PRIMITIVE_H_
+#define ART_RUNTIME_PRIMITIVE_H_
#include <sys/types.h>
@@ -123,4 +123,4 @@
} // namespace art
-#endif // ART_SRC_PRIMITIVE_H_
+#endif // ART_RUNTIME_PRIMITIVE_H_
diff --git a/runtime/reference_table.h b/runtime/reference_table.h
index 5abb5c7..4b6b50e 100644
--- a/runtime/reference_table.h
+++ b/runtime/reference_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_REFERENCE_TABLE_H_
-#define ART_SRC_REFERENCE_TABLE_H_
+#ifndef ART_RUNTIME_REFERENCE_TABLE_H_
+#define ART_RUNTIME_REFERENCE_TABLE_H_
#include <cstddef>
#include <iosfwd>
@@ -62,4 +62,4 @@
} // namespace art
-#endif // ART_SRC_REFERENCE_TABLE_H_
+#endif // ART_RUNTIME_REFERENCE_TABLE_H_
diff --git a/runtime/reflection.h b/runtime/reflection.h
index e9f4e08..56ab471 100644
--- a/runtime/reflection.h
+++ b/runtime/reflection.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_REFLECTION_H_
-#define ART_SRC_REFLECTION_H_
+#ifndef ART_RUNTIME_REFLECTION_H_
+#define ART_RUNTIME_REFLECTION_H_
#include "jni.h"
#include "primitive.h"
@@ -56,4 +56,4 @@
} // namespace art
-#endif // ART_SRC_REFLECTION_H_
+#endif // ART_RUNTIME_REFLECTION_H_
diff --git a/runtime/root_visitor.h b/runtime/root_visitor.h
index d53acd3..3aa9b4b 100644
--- a/runtime/root_visitor.h
+++ b/runtime/root_visitor.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ROOT_VISITOR_H_
-#define ART_SRC_ROOT_VISITOR_H_
+#ifndef ART_RUNTIME_ROOT_VISITOR_H_
+#define ART_RUNTIME_ROOT_VISITOR_H_
namespace art {
namespace mirror {
@@ -30,4 +30,4 @@
} // namespace art
-#endif // ART_SRC_ROOT_VISITOR_H_
+#endif // ART_RUNTIME_ROOT_VISITOR_H_
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 97b7c25..58f985f 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_RUNTIME_H_
-#define ART_SRC_RUNTIME_H_
+#ifndef ART_RUNTIME_RUNTIME_H_
+#define ART_RUNTIME_RUNTIME_H_
#include <jni.h>
#include <stdio.h>
@@ -476,4 +476,4 @@
} // namespace art
-#endif // ART_SRC_RUNTIME_H_
+#endif // ART_RUNTIME_RUNTIME_H_
diff --git a/runtime/runtime_stats.h b/runtime/runtime_stats.h
index 55e57ec..05d3fbb 100644
--- a/runtime/runtime_stats.h
+++ b/runtime/runtime_stats.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_RUNTIME_STATS_H_
-#define ART_SRC_RUNTIME_STATS_H_
+#ifndef ART_RUNTIME_RUNTIME_STATS_H_
+#define ART_RUNTIME_RUNTIME_STATS_H_
#include <stdint.h>
@@ -111,4 +111,4 @@
} // namespace art
-#endif // ART_SRC_HEAP_H_
+#endif // ART_RUNTIME_RUNTIME_STATS_H_
diff --git a/runtime/runtime_support.h b/runtime/runtime_support.h
index 0cb82a5..051981f 100644
--- a/runtime/runtime_support.h
+++ b/runtime/runtime_support.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_RUNTIME_SUPPORT_H_
-#define ART_SRC_RUNTIME_SUPPORT_H_
+#ifndef ART_RUNTIME_RUNTIME_SUPPORT_H_
+#define ART_RUNTIME_RUNTIME_SUPPORT_H_
#include "class_linker.h"
#include "common_throws.h"
@@ -412,4 +412,4 @@
} // namespace art
-#endif // ART_SRC_RUNTIME_SUPPORT_H_
+#endif // ART_RUNTIME_RUNTIME_SUPPORT_H_
diff --git a/runtime/runtime_support_llvm.h b/runtime/runtime_support_llvm.h
index af99842..566f7bc 100644
--- a/runtime/runtime_support_llvm.h
+++ b/runtime/runtime_support_llvm.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_
-#define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_
+#ifndef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_H_
+#define ART_RUNTIME_RUNTIME_SUPPORT_LLVM_H_
extern "C" {
@@ -27,4 +27,4 @@
} // extern "C"
-#endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_
+#endif // ART_RUNTIME_RUNTIME_SUPPORT_LLVM_H_
diff --git a/runtime/runtime_support_llvm_func_list.h b/runtime/runtime_support_llvm_func_list.h
index a58b061..d371421 100644
--- a/runtime/runtime_support_llvm_func_list.h
+++ b/runtime/runtime_support_llvm_func_list.h
@@ -14,6 +14,9 @@
* limitations under the License.
*/
+#ifndef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
+#define ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
+
#define RUNTIME_SUPPORT_FUNC_LIST(V) \
V(LockObject, art_portable_lock_object_from_code) \
V(UnlockObject, art_portable_unlock_object_from_code) \
@@ -74,3 +77,6 @@
V(JniMethodEndSynchronized, art_portable_jni_method_end_synchronized) \
V(JniMethodEndWithReference, art_portable_jni_method_end_with_reference) \
V(JniMethodEndWithReferenceSynchronized, art_portable_jni_method_end_with_reference_synchronized)
+
+#endif // ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_
+#undef ART_RUNTIME_RUNTIME_SUPPORT_LLVM_FUNC_LIST_H_ // the guard in this file is just for cpplint
diff --git a/runtime/safe_map.h b/runtime/safe_map.h
index b9a6ecf..dcc172d 100644
--- a/runtime/safe_map.h
+++ b/runtime/safe_map.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_SAFE_MAP_H_
-#define ART_SRC_SAFE_MAP_H_
+#ifndef ART_RUNTIME_SAFE_MAP_H_
+#define ART_RUNTIME_SAFE_MAP_H_
#include <map>
@@ -102,4 +102,4 @@
} // namespace art
-#endif // ART_SRC_SAFE_MAP_H_
+#endif // ART_RUNTIME_SAFE_MAP_H_
diff --git a/runtime/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h
index 81db2ec..2643f66 100644
--- a/runtime/scoped_thread_state_change.h
+++ b/runtime/scoped_thread_state_change.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_SCOPED_THREAD_STATE_CHANGE_H_
-#define ART_SRC_SCOPED_THREAD_STATE_CHANGE_H_
+#ifndef ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_
+#define ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_
#include "base/casts.h"
#include "jni_internal.h"
@@ -306,4 +306,4 @@
} // namespace art
-#endif // ART_SRC_SCOPED_THREAD_STATE_CHANGE_H_
+#endif // ART_RUNTIME_SCOPED_THREAD_STATE_CHANGE_H_
diff --git a/runtime/signal_catcher.h b/runtime/signal_catcher.h
index de0220b..43bbef4 100644
--- a/runtime/signal_catcher.h
+++ b/runtime/signal_catcher.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_SIGNAL_CATCHER_H_
-#define ART_SRC_SIGNAL_CATCHER_H_
+#ifndef ART_RUNTIME_SIGNAL_CATCHER_H_
+#define ART_RUNTIME_SIGNAL_CATCHER_H_
#include "base/mutex.h"
@@ -60,4 +60,4 @@
} // namespace art
-#endif // ART_SRC_SIGNAL_CATCHER_H_
+#endif // ART_RUNTIME_SIGNAL_CATCHER_H_
diff --git a/runtime/signal_set.h b/runtime/signal_set.h
index d4aec86..3b89e6e 100644
--- a/runtime/signal_set.h
+++ b/runtime/signal_set.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_SIGNAL_SET_H_
-#define ART_SRC_SIGNAL_SET_H_
+#ifndef ART_RUNTIME_SIGNAL_SET_H_
+#define ART_RUNTIME_SIGNAL_SET_H_
#include <signal.h>
@@ -59,4 +59,4 @@
} // namespace art
-#endif // ART_SRC_SIGNAL_SET_H_
+#endif // ART_RUNTIME_SIGNAL_SET_H_
diff --git a/runtime/sirt_ref.h b/runtime/sirt_ref.h
index 12f8326..81f0dff 100644
--- a/runtime/sirt_ref.h
+++ b/runtime/sirt_ref.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_SIRT_REF_H_
-#define ART_SRC_SIRT_REF_H_
+#ifndef ART_RUNTIME_SIRT_REF_H_
+#define ART_RUNTIME_SIRT_REF_H_
#include "base/logging.h"
#include "base/macros.h"
@@ -52,4 +52,4 @@
} // namespace art
-#endif // ART_SRC_SIRT_REF_H_
+#endif // ART_RUNTIME_SIRT_REF_H_
diff --git a/runtime/stack.cc b/runtime/stack.cc
index fcd0f2d..f4ae81d 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -289,7 +289,6 @@
DCHECK(current_fragment->GetTopShadowFrame() == NULL);
mirror::AbstractMethod* method = *cur_quick_frame_;
while (method != NULL) {
- DCHECK(cur_quick_frame_pc_ != GetInstrumentationExitPc());
SanityCheckFrame();
bool should_continue = VisitFrame();
if (UNLIKELY(!should_continue)) {
@@ -312,9 +311,7 @@
instrumentation_stack_depth++;
if (instrumentation_frame.interpreter_entry_) {
mirror::AbstractMethod* callee = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs);
- if (GetMethod() != callee) {
- LOG(FATAL) << "Expected: " << callee << " Found: " << PrettyMethod(GetMethod());
- }
+ CHECK_EQ(GetMethod(), callee);
} else if (instrumentation_frame.method_ != GetMethod()) {
LOG(FATAL) << "Expected: " << PrettyMethod(instrumentation_frame.method_)
<< " Found: " << PrettyMethod(GetMethod());
diff --git a/runtime/stack.h b/runtime/stack.h
index fbfacb1..0e2c4c5 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_STACK_H_
-#define ART_SRC_STACK_H_
+#ifndef ART_RUNTIME_STACK_H_
+#define ART_RUNTIME_STACK_H_
#include "dex_file.h"
#include "instrumentation.h"
@@ -644,4 +644,4 @@
} // namespace art
-#endif // ART_SRC_STACK_H_
+#endif // ART_RUNTIME_STACK_H_
diff --git a/runtime/stack_indirect_reference_table.h b/runtime/stack_indirect_reference_table.h
index dd10634..4c9b038 100644
--- a/runtime/stack_indirect_reference_table.h
+++ b/runtime/stack_indirect_reference_table.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_STACK_INDIRECT_REFERENCE_TABLE_H_
-#define ART_SRC_STACK_INDIRECT_REFERENCE_TABLE_H_
+#ifndef ART_RUNTIME_STACK_INDIRECT_REFERENCE_TABLE_H_
+#define ART_RUNTIME_STACK_INDIRECT_REFERENCE_TABLE_H_
#include "base/logging.h"
#include "base/macros.h"
@@ -96,4 +96,4 @@
} // namespace art
-#endif // ART_SRC_STACK_INDIRECT_REFERENCE_TABLE_H_
+#endif // ART_RUNTIME_STACK_INDIRECT_REFERENCE_TABLE_H_
diff --git a/runtime/strutil.h b/runtime/strutil.h
index b876918..c8d39e2 100644
--- a/runtime/strutil.h
+++ b/runtime/strutil.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_STRUTIL_H_
-#define ART_SRC_STRUTIL_H_
+#ifndef ART_RUNTIME_STRUTIL_H_
+#define ART_RUNTIME_STRUTIL_H_
#include <string.h>
@@ -37,4 +37,4 @@
} // namespace art
-#endif // ART_SRC_STRUTIL_H_
+#endif // ART_RUNTIME_STRUTIL_H_
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h
index 2fc5987..c22f2cd 100644
--- a/runtime/thread-inl.h
+++ b/runtime/thread-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THREAD_INL_H_
-#define ART_SRC_THREAD_INL_H_
+#ifndef ART_RUNTIME_THREAD_INL_H_
+#define ART_RUNTIME_THREAD_INL_H_
#include "thread.h"
@@ -133,4 +133,4 @@
} // namespace art
-#endif // ART_SRC_THREAD_INL_H_
+#endif // ART_RUNTIME_THREAD_INL_H_
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 645c12c..56c5960 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -884,7 +884,13 @@
CHECK(!is_started_);
is_started_ = true;
{
- MutexLock mu(Thread::Current(), *Locks::thread_suspend_count_lock_); // Keep GCC happy.
+ // MutexLock to keep annotalysis happy.
+ //
+ // Note we use NULL for the thread because Thread::Current can
+ // return garbage since (is_started_ == true) and
+ // Thread::pthread_key_self_ is not yet initialized.
+ // This was seen on glibc.
+ MutexLock mu(NULL, *Locks::thread_suspend_count_lock_);
resume_cond_ = new ConditionVariable("Thread resumption condition variable",
*Locks::thread_suspend_count_lock_);
}
diff --git a/runtime/thread.h b/runtime/thread.h
index e496cfc..3b66943 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THREAD_H_
-#define ART_SRC_THREAD_H_
+#ifndef ART_RUNTIME_THREAD_H_
+#define ART_RUNTIME_THREAD_H_
#include <pthread.h>
@@ -791,4 +791,4 @@
} // namespace art
-#endif // ART_SRC_THREAD_H_
+#endif // ART_RUNTIME_THREAD_H_
diff --git a/runtime/thread_list.h b/runtime/thread_list.h
index 0470cfc..87abbda 100644
--- a/runtime/thread_list.h
+++ b/runtime/thread_list.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THREAD_LIST_H_
-#define ART_SRC_THREAD_LIST_H_
+#ifndef ART_RUNTIME_THREAD_LIST_H_
+#define ART_RUNTIME_THREAD_LIST_H_
#include "base/mutex.h"
#include "root_visitor.h"
@@ -144,4 +144,4 @@
} // namespace art
-#endif // ART_SRC_THREAD_LIST_H_
+#endif // ART_RUNTIME_THREAD_LIST_H_
diff --git a/runtime/thread_pool.h b/runtime/thread_pool.h
index 814e654..3462d5e 100644
--- a/runtime/thread_pool.h
+++ b/runtime/thread_pool.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THREAD_POOL_H_
-#define ART_SRC_THREAD_POOL_H_
+#ifndef ART_RUNTIME_THREAD_POOL_H_
+#define ART_RUNTIME_THREAD_POOL_H_
#include <deque>
#include <vector>
@@ -177,4 +177,4 @@
} // namespace art
-#endif // ART_SRC_THREAD_POOL_H_
+#endif // ART_RUNTIME_THREAD_POOL_H_
diff --git a/runtime/thread_state.h b/runtime/thread_state.h
index 52f092e..fc4812a 100644
--- a/runtime/thread_state.h
+++ b/runtime/thread_state.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THREAD_STATE_H_
-#define ART_SRC_THREAD_STATE_H_
+#ifndef ART_RUNTIME_THREAD_STATE_H_
+#define ART_RUNTIME_THREAD_STATE_H_
namespace art {
@@ -44,4 +44,4 @@
} // namespace art
-#endif // ART_SRC_THREAD_STATE_H_
+#endif // ART_RUNTIME_THREAD_STATE_H_
diff --git a/runtime/throw_location.h b/runtime/throw_location.h
index 8c1b941..b2cd4d5 100644
--- a/runtime/throw_location.h
+++ b/runtime/throw_location.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_THROW_LOCATION_H_
-#define ART_SRC_THROW_LOCATION_H_
+#ifndef ART_RUNTIME_THROW_LOCATION_H_
+#define ART_RUNTIME_THROW_LOCATION_H_
#include "base/macros.h"
#include "root_visitor.h"
@@ -75,4 +75,4 @@
} // namespace art
-#endif // ART_SRC_THROW_LOCATION_H_
+#endif // ART_RUNTIME_THROW_LOCATION_H_
diff --git a/runtime/trace.h b/runtime/trace.h
index 9432e71..5bd6a8d 100644
--- a/runtime/trace.h
+++ b/runtime/trace.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_TRACE_H_
-#define ART_SRC_TRACE_H_
+#ifndef ART_RUNTIME_TRACE_H_
+#define ART_RUNTIME_TRACE_H_
#include <ostream>
#include <set>
@@ -129,4 +129,4 @@
} // namespace art
-#endif // ART_SRC_TRACE_H_
+#endif // ART_RUNTIME_TRACE_H_
diff --git a/runtime/utf.h b/runtime/utf.h
index 57c811f..4c9a1d9 100644
--- a/runtime/utf.h
+++ b/runtime/utf.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_UTF_H_
-#define ART_SRC_UTF_H_
+#ifndef ART_RUNTIME_UTF_H_
+#define ART_RUNTIME_UTF_H_
#include "base/macros.h"
@@ -94,4 +94,4 @@
} // namespace art
-#endif // ART_SRC_UTF_H_
+#endif // ART_RUNTIME_UTF_H_
diff --git a/runtime/utils.h b/runtime/utils.h
index e5028ba..a08e465 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_UTILS_H_
-#define ART_SRC_UTILS_H_
+#ifndef ART_RUNTIME_UTILS_H_
+#define ART_RUNTIME_UTILS_H_
#include <pthread.h>
@@ -372,4 +372,4 @@
} // namespace art
-#endif // ART_SRC_UTILS_H_
+#endif // ART_RUNTIME_UTILS_H_
diff --git a/runtime/vector_output_stream.h b/runtime/vector_output_stream.h
index 3546c8d..7daa39f 100644
--- a/runtime/vector_output_stream.h
+++ b/runtime/vector_output_stream.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VECTOR_OUTPUT_STREAM_H_
-#define ART_SRC_VECTOR_OUTPUT_STREAM_H_
+#ifndef ART_RUNTIME_VECTOR_OUTPUT_STREAM_H_
+#define ART_RUNTIME_VECTOR_OUTPUT_STREAM_H_
#include "output_stream.h"
@@ -62,4 +62,4 @@
} // namespace art
-#endif // ART_SRC_VECTOR_OUTPUT_STREAM_H_
+#endif // ART_RUNTIME_VECTOR_OUTPUT_STREAM_H_
diff --git a/runtime/verifier/dex_gc_map.h b/runtime/verifier/dex_gc_map.h
index 673112b..be7415e 100644
--- a/runtime/verifier/dex_gc_map.h
+++ b/runtime/verifier/dex_gc_map.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_DEX_GC_MAP_H_
-#define ART_SRC_VERIFIER_DEX_GC_MAP_H_
+#ifndef ART_RUNTIME_VERIFIER_DEX_GC_MAP_H_
+#define ART_RUNTIME_VERIFIER_DEX_GC_MAP_H_
#include <stdint.h>
@@ -119,4 +119,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_DEX_GC_MAP_H_
+#endif // ART_RUNTIME_VERIFIER_DEX_GC_MAP_H_
diff --git a/runtime/verifier/instruction_flags.h b/runtime/verifier/instruction_flags.h
index 9dc3ea7..df89bee 100644
--- a/runtime/verifier/instruction_flags.h
+++ b/runtime/verifier/instruction_flags.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_METHOD_INSTRUCTION_FLAGS_H_
-#define ART_SRC_VERIFIER_METHOD_INSTRUCTION_FLAGS_H_
+#ifndef ART_RUNTIME_VERIFIER_INSTRUCTION_FLAGS_H_
+#define ART_RUNTIME_VERIFIER_INSTRUCTION_FLAGS_H_
#include "base/logging.h"
@@ -113,4 +113,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_METHOD_INSTRUCTION_FLAGS_H_
+#endif // ART_RUNTIME_VERIFIER_INSTRUCTION_FLAGS_H_
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h
index ac0de9e..57d630d 100644
--- a/runtime/verifier/method_verifier.h
+++ b/runtime/verifier/method_verifier.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_METHOD_VERIFIER_H_
-#define ART_SRC_VERIFIER_METHOD_VERIFIER_H_
+#ifndef ART_RUNTIME_VERIFIER_METHOD_VERIFIER_H_
+#define ART_RUNTIME_VERIFIER_METHOD_VERIFIER_H_
#include <set>
#include <vector>
@@ -723,4 +723,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_METHOD_VERIFIER_H_
+#endif // ART_RUNTIME_VERIFIER_METHOD_VERIFIER_H_
diff --git a/runtime/verifier/reg_type.h b/runtime/verifier/reg_type.h
index 9ac0eca..1553f1e 100644
--- a/runtime/verifier/reg_type.h
+++ b/runtime/verifier/reg_type.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_REG_TYPE_H_
-#define ART_SRC_VERIFIER_REG_TYPE_H_
+#ifndef ART_RUNTIME_VERIFIER_REG_TYPE_H_
+#define ART_RUNTIME_VERIFIER_REG_TYPE_H_
#include "base/macros.h"
#include "globals.h"
@@ -922,4 +922,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_REG_TYPE_H_
+#endif // ART_RUNTIME_VERIFIER_REG_TYPE_H_
diff --git a/runtime/verifier/reg_type_cache-inl.h b/runtime/verifier/reg_type_cache-inl.h
index 42474d1..295e271 100644
--- a/runtime/verifier/reg_type_cache-inl.h
+++ b/runtime/verifier/reg_type_cache-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_REG_TYPE_CACHE_INL_H_
-#define ART_SRC_VERIFIER_REG_TYPE_CACHE_INL_H_
+#ifndef ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_INL_H_
+#define ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_INL_H_
#include "reg_type.h"
#include "reg_type_cache.h"
@@ -43,4 +43,4 @@
}
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_REG_TYPE_CACHE_INL_H_
+#endif // ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_INL_H_
diff --git a/runtime/verifier/reg_type_cache.h b/runtime/verifier/reg_type_cache.h
index d70123c..814dff7 100644
--- a/runtime/verifier/reg_type_cache.h
+++ b/runtime/verifier/reg_type_cache.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_REG_TYPE_CACHE_H_
-#define ART_SRC_VERIFIER_REG_TYPE_CACHE_H_
+#ifndef ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_H_
+#define ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_H_
#include "base/casts.h"
#include "base/macros.h"
@@ -163,4 +163,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_REG_TYPE_CACHE_H_
+#endif // ART_RUNTIME_VERIFIER_REG_TYPE_CACHE_H_
diff --git a/runtime/verifier/register_line-inl.h b/runtime/verifier/register_line-inl.h
index 157e136..b3a2847 100644
--- a/runtime/verifier/register_line-inl.h
+++ b/runtime/verifier/register_line-inl.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_REGISTER_LINE_INL_H_
-#define ART_SRC_VERIFIER_REGISTER_LINE_INL_H_
+#ifndef ART_RUNTIME_VERIFIER_REGISTER_LINE_INL_H_
+#define ART_RUNTIME_VERIFIER_REGISTER_LINE_INL_H_
#include "register_line.h"
#include "method_verifier.h"
@@ -32,4 +32,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_REGISTER_LINE_INL_H_
+#endif // ART_RUNTIME_VERIFIER_REGISTER_LINE_INL_H_
diff --git a/runtime/verifier/register_line.h b/runtime/verifier/register_line.h
index 5f17049..cde7b9b 100644
--- a/runtime/verifier/register_line.h
+++ b/runtime/verifier/register_line.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_VERIFIER_REGISTER_LINE_H_
-#define ART_SRC_VERIFIER_REGISTER_LINE_H_
+#ifndef ART_RUNTIME_VERIFIER_REGISTER_LINE_H_
+#define ART_RUNTIME_VERIFIER_REGISTER_LINE_H_
#include <deque>
#include <vector>
@@ -355,4 +355,4 @@
} // namespace verifier
} // namespace art
-#endif // ART_SRC_VERIFIER_REGISTER_LINE_H_
+#endif // ART_RUNTIME_VERIFIER_REGISTER_LINE_H_
diff --git a/runtime/well_known_classes.h b/runtime/well_known_classes.h
index 6e19f86..fc2bffb 100644
--- a/runtime/well_known_classes.h
+++ b/runtime/well_known_classes.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_WELL_KNOWN_CLASSES_H_
-#define ART_SRC_WELL_KNOWN_CLASSES_H_
+#ifndef ART_RUNTIME_WELL_KNOWN_CLASSES_H_
+#define ART_RUNTIME_WELL_KNOWN_CLASSES_H_
#include "base/mutex.h"
#include "jni.h"
@@ -108,4 +108,4 @@
} // namespace art
-#endif // ART_SRC_WELL_KNOWN_CLASSES_H_
+#endif // ART_RUNTIME_WELL_KNOWN_CLASSES_H_
diff --git a/runtime/zip_archive.h b/runtime/zip_archive.h
index ef31486..d648517 100644
--- a/runtime/zip_archive.h
+++ b/runtime/zip_archive.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_SRC_ZIP_ARCHIVE_H_
-#define ART_SRC_ZIP_ARCHIVE_H_
+#ifndef ART_RUNTIME_ZIP_ARCHIVE_H_
+#define ART_RUNTIME_ZIP_ARCHIVE_H_
#include <stdint.h>
#include <zlib.h>
@@ -129,4 +129,4 @@
} // namespace art
-#endif // ART_SRC_ZIP_ARCHIVE_H_
+#endif // ART_RUNTIME_ZIP_ARCHIVE_H_
diff --git a/tools/cpplint.py b/tools/cpplint.py
index ff92d70..30c7128 100755
--- a/tools/cpplint.py
+++ b/tools/cpplint.py
@@ -726,7 +726,11 @@
os.path.exists(os.path.join(root_dir, ".hg")) or
os.path.exists(os.path.join(root_dir, ".svn"))):
prefix = os.path.commonprefix([root_dir, project_dir])
- return fullname[len(prefix) + 1:]
+ # BEGIN android-changed
+ # return fullname[len(prefix) + 1:]
+ return "art/" + fullname[len(prefix) + 1:]
+ # END android-changed
+
# Don't know what to do; header guard warnings may be wrong...
return fullname
@@ -1032,7 +1036,6 @@
# Restores original filename in case that cpplint is invoked from Emacs's
# flymake.
filename = re.sub(r'_flymake\.h$', '.h', filename)
-
fileinfo = FileInfo(filename)
return re.sub(r'[-./\s]', '_', fileinfo.RepositoryName()).upper() + '_'