Move files related to compiled code into oat/ directory

Test: art/test.py -b --host
Change-Id: Icedd3a82c6bca5147c3bc9dc50de5a729003d66f
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 631b0df..aee87ba 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -231,9 +231,7 @@
     defaults: ["libart_common_defaults"],
     srcs: [
         "app_info.cc",
-        "aot_class_linker.cc",
         "art_field.cc",
-        "sdk_checker.cc",
         "art_method.cc",
         "backtrace_helper.cc",
         "barrier.cc",
@@ -254,18 +252,17 @@
         "debugger.cc",
         "dex/dex_file_annotations.cc",
         "dex_register_location.cc",
-        "elf_file.cc",
         "exec_utils.cc",
         "fault_handler.cc",
-        "gc/allocation_record.cc",
-        "gc/allocator/art-dlmalloc.cc",
-        "gc/allocator/rosalloc.cc",
         "gc/accounting/bitmap.cc",
         "gc/accounting/card_table.cc",
         "gc/accounting/heap_bitmap.cc",
         "gc/accounting/mod_union_table.cc",
         "gc/accounting/remembered_set.cc",
         "gc/accounting/space_bitmap.cc",
+        "gc/allocation_record.cc",
+        "gc/allocator/art-dlmalloc.cc",
+        "gc/allocator/rosalloc.cc",
         "gc/collector/concurrent_copying.cc",
         "gc/collector/garbage_collector.cc",
         "gc/collector/immune_region.cc",
@@ -294,8 +291,6 @@
         "handle.cc",
         "hidden_api.cc",
         "hprof/hprof.cc",
-        "image.cc",
-        "index_bss_mapping.cc",
         "indirect_reference_table.cc",
         "instrumentation.cc",
         "intern_table.cc",
@@ -313,8 +308,8 @@
         "jit/jit.cc",
         "jit/jit_code_cache.cc",
         "jit/jit_memory_region.cc",
-        "jit/profiling_info.cc",
         "jit/profile_saver.cc",
+        "jit/profiling_info.cc",
         "jit/small_pattern_matcher.cc",
         "jni/check_jni.cc",
         "jni/java_vm_ext.cc",
@@ -343,10 +338,8 @@
         "mirror/var_handle.cc",
         "monitor.cc",
         "monitor_objects_stack_visitor.cc",
-        "native_bridge_art_interface.cc",
-        "native_stack_dump.cc",
-        "native/dalvik_system_DexFile.cc",
         "native/dalvik_system_BaseDexClassLoader.cc",
+        "native/dalvik_system_DexFile.cc",
         "native/dalvik_system_VMDebug.cc",
         "native/dalvik_system_VMRuntime.cc",
         "native/dalvik_system_VMStack.cc",
@@ -372,20 +365,27 @@
         "native/java_lang_reflect_Parameter.cc",
         "native/java_lang_reflect_Proxy.cc",
         "native/java_util_concurrent_atomic_AtomicLong.cc",
+        "native/jdk_internal_misc_Unsafe.cc",
         "native/libcore_io_Memory.cc",
         "native/libcore_util_CharsetUtils.cc",
         "native/org_apache_harmony_dalvik_ddmc_DdmServer.cc",
         "native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc",
         "native/sun_misc_Unsafe.cc",
-        "native/jdk_internal_misc_Unsafe.cc",
+        "native_bridge_art_interface.cc",
+        "native_stack_dump.cc",
         "non_debuggable_classes.cc",
         "nterp_helpers.cc",
-        "oat.cc",
-        "oat_file.cc",
-        "oat_file_assistant.cc",
-        "oat_file_assistant_context.cc",
-        "oat_file_manager.cc",
-        "oat_quick_method_header.cc",
+        "oat/aot_class_linker.cc",
+        "oat/elf_file.cc",
+        "oat/image.cc",
+        "oat/index_bss_mapping.cc",
+        "oat/oat.cc",
+        "oat/oat_file.cc",
+        "oat/oat_file_assistant.cc",
+        "oat/oat_file_assistant_context.cc",
+        "oat/oat_file_manager.cc",
+        "oat/oat_quick_method_header.cc",
+        "oat/stack_map.cc",
         "object_lock.cc",
         "offsets.cc",
         "parsed_options.cc",
@@ -403,9 +403,9 @@
         "runtime_intrinsics.cc",
         "runtime_options.cc",
         "scoped_thread_state_change.cc",
+        "sdk_checker.cc",
         "signal_catcher.cc",
         "stack.cc",
-        "stack_map.cc",
         "startup_completed_task.cc",
         "string_builder_append.cc",
         "thread.cc",
@@ -728,24 +728,24 @@
         "base/locks.h",
         "class_status.h",
         "compilation_kind.h",
-        "gc_root.h",
-        "gc/allocator_type.h",
         "gc/allocator/rosalloc.h",
-        "gc/collector_type.h",
+        "gc/allocator_type.h",
         "gc/collector/gc_type.h",
         "gc/collector/mark_compact.h",
+        "gc/collector_type.h",
         "gc/space/region_space.h",
         "gc/space/space.h",
         "gc/weak_root_state.h",
-        "image.h",
-        "instrumentation.h",
+        "gc_root.h",
         "indirect_reference_table.h",
+        "instrumentation.h",
         "jdwp_provider.h",
         "jni_id_type.h",
         "linear_alloc.h",
         "lock_word.h",
-        "oat.h",
-        "oat_file.h",
+        "oat/image.h",
+        "oat/oat.h",
+        "oat/oat_file.h",
         "process_state.h",
         "reflective_value_visitor.h",
         "stack.h",
@@ -1001,7 +1001,7 @@
         "method_handles_test.cc",
         "mirror/object_test.cc",
         "mirror/var_handle_test.cc",
-        "oat_file_assistant_test.cc",
+        "oat/oat_file_assistant_test.cc",
         "runtime_callbacks_test.cc",
         "subtype_check_test.cc",
         "transaction_test.cc",
@@ -1071,8 +1071,8 @@
         "monitor_pool_test.cc",
         "monitor_test.cc",
         "native_stack_dump_test.cc",
-        "oat_file_assistant_test.cc",
-        "oat_file_test.cc",
+        "oat/oat_file_assistant_test.cc",
+        "oat/oat_file_test.cc",
         "parsed_options_test.cc",
         "prebuilt_tools_test.cc",
         "proxy_test.cc",
diff --git a/runtime/arch/x86/fault_handler_x86.cc b/runtime/arch/x86/fault_handler_x86.cc
index 3737491..8321466 100644
--- a/runtime/arch/x86/fault_handler_x86.cc
+++ b/runtime/arch/x86/fault_handler_x86.cc
@@ -24,7 +24,7 @@
 #include "base/hex_dump.h"
 #include "base/logging.h"  // For VLOG.
 #include "base/macros.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 #include "runtime_globals.h"
 #include "thread-current-inl.h"
 
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index dee6265..8ceda01 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -48,7 +48,7 @@
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "mirror/string.h"
-#include "oat_file-inl.h"
+#include "oat/oat_file-inl.h"
 #include "runtime_callbacks.h"
 #include "scoped_thread_state_change-inl.h"
 #include "vdex_file.h"
diff --git a/runtime/cha.h b/runtime/cha.h
index 5a403ec..8d4c3c5 100644
--- a/runtime/cha.h
+++ b/runtime/cha.h
@@ -24,7 +24,7 @@
 #include "base/locks.h"
 #include "handle.h"
 #include "mirror/class.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 
 namespace art {
 
diff --git a/runtime/check_reference_map_visitor.h b/runtime/check_reference_map_visitor.h
index d03139b..de4986c 100644
--- a/runtime/check_reference_map_visitor.h
+++ b/runtime/check_reference_map_visitor.h
@@ -20,10 +20,10 @@
 #include "art_method-inl.h"
 #include "dex/code_item_accessors-inl.h"
 #include "dex/dex_file_types.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
+#include "oat/stack_map.h"
 #include "scoped_thread_state_change-inl.h"
 #include "stack.h"
-#include "stack_map.h"
 
 namespace art {
 
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 8639291..0e8bfb0 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -90,7 +90,6 @@
 #include "gc_root-inl.h"
 #include "handle_scope-inl.h"
 #include "hidden_api.h"
-#include "image-inl.h"
 #include "imt_conflict_table.h"
 #include "imtable-inl.h"
 #include "intern_table-inl.h"
@@ -137,11 +136,12 @@
 #include "nativehelper/scoped_local_ref.h"
 #include "nterp_helpers-inl.h"
 #include "nterp_helpers.h"
-#include "oat.h"
-#include "oat_file-inl.h"
-#include "oat_file.h"
-#include "oat_file_assistant.h"
-#include "oat_file_manager.h"
+#include "oat/image-inl.h"
+#include "oat/oat.h"
+#include "oat/oat_file-inl.h"
+#include "oat/oat_file.h"
+#include "oat/oat_file_assistant.h"
+#include "oat/oat_file_manager.h"
 #include "object_lock.h"
 #include "profile/profile_compilation_info.h"
 #include "runtime.h"
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index f1cede1..9fc937f 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -41,7 +41,7 @@
 #include "jni.h"
 #include "mirror/class.h"
 #include "mirror/object.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "verifier/verifier_enums.h"
 
 namespace art {
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc
index e6cb6d6..81eb11c 100644
--- a/runtime/class_loader_context.cc
+++ b/runtime/class_loader_context.cc
@@ -40,7 +40,7 @@
 #include "mirror/object.h"
 #include "mirror/object_array-alloc-inl.h"
 #include "nativehelper/scoped_local_ref.h"
-#include "oat_file_assistant.h"
+#include "oat/oat_file_assistant.h"
 #include "obj_ptr-inl.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
diff --git a/runtime/class_loader_context.h b/runtime/class_loader_context.h
index 806ab5e..cfb0457 100644
--- a/runtime/class_loader_context.h
+++ b/runtime/class_loader_context.h
@@ -26,7 +26,7 @@
 #include "dex/dex_file.h"
 #include "handle_scope.h"
 #include "mirror/class_loader.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "scoped_thread_state_change.h"
 
 namespace art {
diff --git a/runtime/class_loader_context_test.cc b/runtime/class_loader_context_test.cc
index 2a6d877..1744e4e 100644
--- a/runtime/class_loader_context_test.cc
+++ b/runtime/class_loader_context_test.cc
@@ -40,7 +40,7 @@
 #include "mirror/class_loader-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-alloc-inl.h"
-#include "oat_file_assistant.h"
+#include "oat/oat_file_assistant.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
 #include "thread.h"
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h
index 4ee59a7..55ecb78 100644
--- a/runtime/class_table-inl.h
+++ b/runtime/class_table-inl.h
@@ -23,7 +23,7 @@
 #include "dex/utf.h"
 #include "gc_root-inl.h"
 #include "mirror/class.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "obj_ptr-inl.h"
 
 namespace art {
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index 429f926..12d0697 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -19,7 +19,7 @@
 #include "base/stl_util.h"
 #include "mirror/class-inl.h"
 #include "mirror/string-inl.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 
 namespace art {
 
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 3a30cb8..673379c 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -68,7 +68,7 @@
 #include "mirror/throwable.h"
 #include "nativehelper/scoped_local_ref.h"
 #include "nativehelper/scoped_primitive_array.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "obj_ptr-inl.h"
 #include "reflection.h"
 #include "reflective_handle.h"
diff --git a/runtime/dex/dex_file_annotations.cc b/runtime/dex/dex_file_annotations.cc
index 76cea99..ab2384e 100644
--- a/runtime/dex/dex_file_annotations.cc
+++ b/runtime/dex/dex_file_annotations.cc
@@ -35,7 +35,7 @@
 #include "mirror/method.h"
 #include "mirror/object_array-alloc-inl.h"
 #include "mirror/object_array-inl.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "obj_ptr-inl.h"
 #include "reflection.h"
 #include "thread.h"
diff --git a/runtime/dex2oat_environment_test.h b/runtime/dex2oat_environment_test.h
index 202f8cf..08b36bb 100644
--- a/runtime/dex2oat_environment_test.h
+++ b/runtime/dex2oat_environment_test.h
@@ -35,7 +35,7 @@
 #include "gc/heap.h"
 #include "gc/space/image_space.h"
 #include "gtest/gtest.h"
-#include "oat_file_assistant.h"
+#include "oat/oat_file_assistant.h"
 #include "runtime.h"
 #include "ziparchive/zip_writer.h"
 
diff --git a/runtime/dexopt_test.cc b/runtime/dexopt_test.cc
index 970590f..edb2882 100644
--- a/runtime/dexopt_test.cc
+++ b/runtime/dexopt_test.cc
@@ -34,8 +34,8 @@
 #include "dex2oat_environment_test.h"
 #include "gc/space/image_space.h"
 #include "hidden_api.h"
-#include "oat.h"
-#include "oat_file_assistant.h"
+#include "oat/oat.h"
+#include "oat/oat_file_assistant.h"
 #include "profile/profile_compilation_info.h"
 
 namespace art HIDDEN {
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index a854e0c..c87aa76 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -40,10 +40,10 @@
 #include "mirror/object-inl.h"
 #include "mirror/throwable.h"
 #include "nth_caller_visitor.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
+#include "oat/stack_map.h"
 #include "reflective_handle_scope-inl.h"
 #include "runtime.h"
-#include "stack_map.h"
 #include "thread.h"
 #include "well_known_classes.h"
 
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 96a2231..fb29a66 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -29,16 +29,15 @@
 #include "entrypoints/quick/callee_save_frame.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
 #include "gc/accounting/card_table-inl.h"
-#include "index_bss_mapping.h"
 #include "jni/java_vm_ext.h"
 #include "mirror/class-inl.h"
 #include "mirror/method.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-alloc-inl.h"
 #include "nth_caller_visitor.h"
-#include "oat_file.h"
-#include "oat_file-inl.h"
-#include "oat_quick_method_header.h"
+#include "oat/index_bss_mapping.h"
+#include "oat/oat_file-inl.h"
+#include "oat/oat_quick_method_header.h"
 #include "reflection.h"
 #include "scoped_thread_state_change-inl.h"
 #include "well_known_classes-inl.h"
diff --git a/runtime/entrypoints/jni/jni_entrypoints.cc b/runtime/entrypoints/jni/jni_entrypoints.cc
index 885764f..6e6763b 100644
--- a/runtime/entrypoints/jni/jni_entrypoints.cc
+++ b/runtime/entrypoints/jni/jni_entrypoints.cc
@@ -28,9 +28,9 @@
 #include "entrypoints/entrypoint_utils-inl.h"
 #include "jni/java_vm_ext.h"
 #include "mirror/object-inl.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
+#include "oat/stack_map.h"
 #include "scoped_thread_state_change-inl.h"
-#include "stack_map.h"
 #include "thread.h"
 
 namespace art HIDDEN {
diff --git a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
index f29143f..32c709c 100644
--- a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
@@ -28,8 +28,8 @@
 #include "mirror/class_loader.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
-#include "oat_file.h"
-#include "oat_file-inl.h"
+#include "oat/oat_file.h"
+#include "oat/oat_file-inl.h"
 #include "runtime.h"
 
 namespace art HIDDEN {
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 33bc3b2..cf09256 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -47,9 +47,9 @@
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "mirror/var_handle.h"
-#include "oat.h"
-#include "oat_file.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat.h"
+#include "oat/oat_file.h"
+#include "oat/oat_quick_method_header.h"
 #include "quick_exception_handler.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc
index 43dee0e..ccf6fbd 100644
--- a/runtime/fault_handler.cc
+++ b/runtime/fault_handler.cc
@@ -32,8 +32,8 @@
 #include "jit/jit_code_cache.h"
 #include "mirror/class.h"
 #include "mirror/object_reference.h"
-#include "oat_file.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_file.h"
+#include "oat/oat_quick_method_header.h"
 #include "sigchain.h"
 #include "thread-current-inl.h"
 #include "verify_object-inl.h"
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index 4987ed0..32a13f0 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -36,12 +36,12 @@
 #include "gc/space/image_space.h"
 #include "gc/space/space-inl.h"
 #include "gc/verification.h"
-#include "image-inl.h"
 #include "intern_table.h"
 #include "mirror/class-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object-refvisitor-inl.h"
 #include "mirror/object_reference.h"
+#include "oat/image-inl.h"
 #include "scoped_thread_state_change-inl.h"
 #include "thread-inl.h"
 #include "thread_list.h"
diff --git a/runtime/gc/collector/immune_spaces.cc b/runtime/gc/collector/immune_spaces.cc
index 28704af..4128242c 100644
--- a/runtime/gc/collector/immune_spaces.cc
+++ b/runtime/gc/collector/immune_spaces.cc
@@ -22,7 +22,7 @@
 #include "base/logging.h"  // For VLOG.
 #include "gc/space/space-inl.h"
 #include "mirror/object.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 
 namespace art HIDDEN {
 namespace gc {
diff --git a/runtime/gc/collector/immune_spaces_test.cc b/runtime/gc/collector/immune_spaces_test.cc
index cee3d24..6cc7e30 100644
--- a/runtime/gc/collector/immune_spaces_test.cc
+++ b/runtime/gc/collector/immune_spaces_test.cc
@@ -21,7 +21,7 @@
 #include "gc/collector/immune_spaces.h"
 #include "gc/space/image_space.h"
 #include "gc/space/space-inl.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "thread-current-inl.h"
 
 namespace art HIDDEN {
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index b7821a3..9c23423 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -80,7 +80,6 @@
 #include "handle_scope-inl.h"
 #include "heap-inl.h"
 #include "heap-visit-objects-inl.h"
-#include "image.h"
 #include "intern_table.h"
 #include "jit/jit.h"
 #include "jit/jit_code_cache.h"
@@ -95,6 +94,7 @@
 #include "mirror/reference-inl.h"
 #include "mirror/var_handle.h"
 #include "nativehelper/scoped_local_ref.h"
+#include "oat/image.h"
 #include "obj_ptr-inl.h"
 #ifdef ART_TARGET_ANDROID
 #include "perfetto/heap_profile.h"
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 3314c14..e3e14ca 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -55,16 +55,16 @@
 #include "exec_utils.h"
 #include "gc/accounting/space_bitmap-inl.h"
 #include "gc/task_processor.h"
-#include "image-inl.h"
-#include "image.h"
 #include "intern_table-inl.h"
 #include "mirror/class-inl.h"
 #include "mirror/executable-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object-refvisitor-inl.h"
 #include "mirror/var_handle.h"
-#include "oat.h"
-#include "oat_file.h"
+#include "oat/image-inl.h"
+#include "oat/image.h"
+#include "oat/oat.h"
+#include "oat/oat_file.h"
 #include "profile/profile_compilation_info.h"
 #include "runtime.h"
 #include "space-inl.h"
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index 63a47c8..3b59ffd 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -20,7 +20,7 @@
 #include "android-base/unique_fd.h"
 #include "base/array_ref.h"
 #include "gc/accounting/space_bitmap.h"
-#include "image.h"
+#include "oat/image.h"
 #include "runtime.h"
 #include "space.h"
 
diff --git a/runtime/gc/space/image_space_test.cc b/runtime/gc/space/image_space_test.cc
index e6b758f..4f6c4e9 100644
--- a/runtime/gc/space/image_space_test.cc
+++ b/runtime/gc/space/image_space_test.cc
@@ -26,7 +26,7 @@
 #include "dexopt_test.h"
 #include "intern_table-inl.h"
 #include "noop_compiler_callbacks.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 
 namespace art HIDDEN {
 namespace gc {
diff --git a/runtime/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc
index 3d9fd5a..a4b9d24 100644
--- a/runtime/gc/space/large_object_space.cc
+++ b/runtime/gc/space/large_object_space.cc
@@ -30,8 +30,8 @@
 #include "gc/accounting/heap_bitmap-inl.h"
 #include "gc/accounting/space_bitmap-inl.h"
 #include "gc/heap.h"
-#include "image.h"
 #include "mirror/object-readbarrier-inl.h"
+#include "oat/image.h"
 #include "scoped_thread_state_change-inl.h"
 #include "space-inl.h"
 #include "thread-current-inl.h"
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index b6cca33..c2884d6 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -29,7 +29,7 @@
 #include "mirror/class_ext.h"
 #include "mirror/proxy.h"
 #include "nativehelper/scoped_local_ref.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "scoped_thread_state_change.h"
 #include "stack.h"
 #include "thread-inl.h"
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 8bd83d9..77436fc 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -48,8 +48,8 @@
 #include "mirror/object_array-inl.h"
 #include "nterp_helpers.h"
 #include "nth_caller_visitor.h"
-#include "oat_file_manager.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_file_manager.h"
+#include "oat/oat_quick_method_header.h"
 #include "runtime-inl.h"
 #include "thread.h"
 #include "thread_list.h"
diff --git a/runtime/intern_table-inl.h b/runtime/intern_table-inl.h
index 84b730e..b9aee25 100644
--- a/runtime/intern_table-inl.h
+++ b/runtime/intern_table-inl.h
@@ -22,8 +22,8 @@
 #include "dex/utf.h"
 #include "gc/space/image_space.h"
 #include "gc_root-inl.h"
-#include "image.h"
 #include "mirror/string-inl.h"
+#include "oat/image.h"
 #include "thread-current-inl.h"
 
 namespace art {
diff --git a/runtime/intern_table.cc b/runtime/intern_table.cc
index 10b2d65..debb019 100644
--- a/runtime/intern_table.cc
+++ b/runtime/intern_table.cc
@@ -24,11 +24,11 @@
 #include "gc/weak_root_state.h"
 #include "gc_root-inl.h"
 #include "handle_scope-inl.h"
-#include "image-inl.h"
 #include "mirror/dex_cache-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "mirror/string-inl.h"
+#include "oat/image-inl.h"
 #include "object_callbacks.h"
 #include "scoped_thread_state_change-inl.h"
 #include "thread.h"
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 4d4a1ed..ecbab70 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -31,28 +31,28 @@
 #include "compilation_kind.h"
 #include "debugger.h"
 #include "dex/type_lookup_table.h"
-#include "gc/space/image_space.h"
 #include "entrypoints/entrypoint_utils-inl.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
-#include "image-inl.h"
+#include "gc/space/image_space.h"
 #include "interpreter/interpreter.h"
 #include "jit-inl.h"
 #include "jit_code_cache.h"
 #include "jit_create.h"
-#include "small_pattern_matcher.h"
 #include "jni/java_vm_ext.h"
 #include "mirror/method_handle_impl.h"
 #include "mirror/var_handle.h"
-#include "oat_file.h"
-#include "oat_file_manager.h"
-#include "oat_quick_method_header.h"
+#include "oat/image-inl.h"
+#include "oat/oat_file.h"
+#include "oat/oat_file_manager.h"
+#include "oat/oat_quick_method_header.h"
+#include "oat/stack_map.h"
 #include "profile/profile_boot_info.h"
 #include "profile/profile_compilation_info.h"
 #include "profile_saver.h"
 #include "runtime.h"
 #include "runtime_options.h"
+#include "small_pattern_matcher.h"
 #include "stack.h"
-#include "stack_map.h"
 #include "thread-inl.h"
 #include "thread_list.h"
 
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index f44b822..7bfbe15 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -50,8 +50,8 @@
 #include "jit/profiling_info.h"
 #include "jit/jit_scoped_code_cache_write.h"
 #include "linear_alloc.h"
-#include "oat_file-inl.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_file-inl.h"
+#include "oat/oat_quick_method_header.h"
 #include "object_callbacks.h"
 #include "profile/profile_compilation_info.h"
 #include "scoped_thread_state_change-inl.h"
diff --git a/runtime/jit/jit_memory_region.cc b/runtime/jit/jit_memory_region.cc
index 3a4ef97..e3a97ef 100644
--- a/runtime/jit/jit_memory_region.cc
+++ b/runtime/jit/jit_memory_region.cc
@@ -29,7 +29,7 @@
 #include "base/systrace.h"
 #include "gc/allocator/art-dlmalloc.h"
 #include "jit/jit_scoped_code_cache_write.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 #include "palette/palette.h"
 
 using android::base::unique_fd;
diff --git a/runtime/jit/profile_saver.cc b/runtime/jit/profile_saver.cc
index 91b011b..759e946 100644
--- a/runtime/jit/profile_saver.cc
+++ b/runtime/jit/profile_saver.cc
@@ -39,7 +39,7 @@
 #include "gc/gc_cause.h"
 #include "jit/jit.h"
 #include "jit/profiling_info.h"
-#include "oat_file_manager.h"
+#include "oat/oat_file_manager.h"
 #include "profile/profile_compilation_info.h"
 #include "scoped_thread_state_change-inl.h"
 
diff --git a/runtime/metrics/reporter.cc b/runtime/metrics/reporter.cc
index 1c706af..d8cb69a 100644
--- a/runtime/metrics/reporter.cc
+++ b/runtime/metrics/reporter.cc
@@ -22,7 +22,7 @@
 
 #include "base/flags.h"
 #include "base/stl_util.h"
-#include "oat_file_manager.h"
+#include "oat/oat_file_manager.h"
 #include "runtime.h"
 #include "runtime_options.h"
 #include "statsd.h"
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index d3f474e..3b88766 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -22,7 +22,7 @@
 #include "gc/heap.h"
 #include "jit/profile_saver.h"
 #include "linear_alloc.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "object-inl.h"
 #include "object.h"
 #include "object_array-inl.h"
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index f1c5d54..f7f4465 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -49,9 +49,9 @@
 #include "nativehelper/jni_macros.h"
 #include "nativehelper/scoped_local_ref.h"
 #include "nativehelper/scoped_utf_chars.h"
-#include "oat_file.h"
-#include "oat_file_assistant.h"
-#include "oat_file_manager.h"
+#include "oat/oat_file.h"
+#include "oat/oat_file_assistant.h"
+#include "oat/oat_file_manager.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
 #include "string_array_utils.h"
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index cc47032..3af1978 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -36,8 +36,8 @@
 #include "nativehelper/jni_macros.h"
 #include "nativehelper/scoped_utf_chars.h"
 #include "non_debuggable_classes.h"
-#include "oat_file.h"
-#include "oat_file_manager.h"
+#include "oat/oat_file.h"
+#include "oat/oat_file_manager.h"
 #include "scoped_thread_state_change-inl.h"
 #include "stack.h"
 #include "startup_completed_task.h"
diff --git a/runtime/native_stack_dump.cc b/runtime/native_stack_dump.cc
index bda912e..d8ff871 100644
--- a/runtime/native_stack_dump.cc
+++ b/runtime/native_stack_dump.cc
@@ -53,7 +53,7 @@
 #include "base/utils.h"
 #include "class_linker.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 #include "runtime.h"
 #include "thread-current-inl.h"
 
diff --git a/runtime/nterp_helpers.cc b/runtime/nterp_helpers.cc
index 28c0003..b39cbef 100644
--- a/runtime/nterp_helpers.cc
+++ b/runtime/nterp_helpers.cc
@@ -20,7 +20,7 @@
 #include "entrypoints/quick/callee_save_frame.h"
 #include "interpreter/mterp/nterp.h"
 #include "nterp_helpers.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 #include "quick/quick_method_frame_info.h"
 
 namespace art {
diff --git a/runtime/aot_class_linker.cc b/runtime/oat/aot_class_linker.cc
similarity index 100%
rename from runtime/aot_class_linker.cc
rename to runtime/oat/aot_class_linker.cc
diff --git a/runtime/aot_class_linker.h b/runtime/oat/aot_class_linker.h
similarity index 94%
rename from runtime/aot_class_linker.h
rename to runtime/oat/aot_class_linker.h
index 1cf9163..16290de 100644
--- a/runtime/aot_class_linker.h
+++ b/runtime/oat/aot_class_linker.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_AOT_CLASS_LINKER_H_
-#define ART_RUNTIME_AOT_CLASS_LINKER_H_
+#ifndef ART_RUNTIME_OAT_AOT_CLASS_LINKER_H_
+#define ART_RUNTIME_OAT_AOT_CLASS_LINKER_H_
 
 #include "base/macros.h"
 #include "sdk_checker.h"
@@ -27,6 +27,7 @@
 class Heap;
 }  // namespace gc
 
+// TODO: move to dex2oat/.
 // AotClassLinker is only used for AOT compiler, which includes some logic for class initialization
 // which will only be used in pre-compilation.
 class AotClassLinker : public ClassLinker {
@@ -79,4 +80,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_AOT_CLASS_LINKER_H_
+#endif  // ART_RUNTIME_OAT_AOT_CLASS_LINKER_H_
diff --git a/runtime/elf_file.cc b/runtime/oat/elf_file.cc
similarity index 100%
rename from runtime/elf_file.cc
rename to runtime/oat/elf_file.cc
diff --git a/runtime/elf_file.h b/runtime/oat/elf_file.h
similarity index 96%
rename from runtime/elf_file.h
rename to runtime/oat/elf_file.h
index 4e45f13..a921810 100644
--- a/runtime/elf_file.h
+++ b/runtime/oat/elf_file.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_ELF_FILE_H_
-#define ART_RUNTIME_ELF_FILE_H_
+#ifndef ART_RUNTIME_OAT_ELF_FILE_H_
+#define ART_RUNTIME_OAT_ELF_FILE_H_
 
 #include <memory>
 #include <string>
@@ -110,4 +110,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_ELF_FILE_H_
+#endif  // ART_RUNTIME_OAT_ELF_FILE_H_
diff --git a/runtime/elf_file_impl.h b/runtime/oat/elf_file_impl.h
similarity index 98%
rename from runtime/elf_file_impl.h
rename to runtime/oat/elf_file_impl.h
index b2152c7..ffc6a2c 100644
--- a/runtime/elf_file_impl.h
+++ b/runtime/oat/elf_file_impl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_ELF_FILE_IMPL_H_
-#define ART_RUNTIME_ELF_FILE_IMPL_H_
+#ifndef ART_RUNTIME_OAT_ELF_FILE_IMPL_H_
+#define ART_RUNTIME_OAT_ELF_FILE_IMPL_H_
 
 #include <map>
 #include <memory>
@@ -222,4 +222,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_ELF_FILE_IMPL_H_
+#endif  // ART_RUNTIME_OAT_ELF_FILE_IMPL_H_
diff --git a/runtime/image-inl.h b/runtime/oat/image-inl.h
similarity index 97%
rename from runtime/image-inl.h
rename to runtime/oat/image-inl.h
index 0404e99..b8664da 100644
--- a/runtime/image-inl.h
+++ b/runtime/oat/image-inl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_IMAGE_INL_H_
-#define ART_RUNTIME_IMAGE_INL_H_
+#ifndef ART_RUNTIME_OAT_IMAGE_INL_H_
+#define ART_RUNTIME_OAT_IMAGE_INL_H_
 
 #include "image.h"
 
@@ -117,4 +117,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_IMAGE_INL_H_
+#endif  // ART_RUNTIME_OAT_IMAGE_INL_H_
diff --git a/runtime/image.cc b/runtime/oat/image.cc
similarity index 100%
rename from runtime/image.cc
rename to runtime/oat/image.cc
diff --git a/runtime/image.h b/runtime/oat/image.h
similarity index 99%
rename from runtime/image.h
rename to runtime/oat/image.h
index 5580e27..3bcbdd9 100644
--- a/runtime/image.h
+++ b/runtime/oat/image.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_IMAGE_H_
-#define ART_RUNTIME_IMAGE_H_
+#ifndef ART_RUNTIME_OAT_IMAGE_H_
+#define ART_RUNTIME_OAT_IMAGE_H_
 
 #include <string.h>
 
@@ -606,4 +606,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_IMAGE_H_
+#endif  // ART_RUNTIME_OAT_IMAGE_H_
diff --git a/runtime/index_bss_mapping.cc b/runtime/oat/index_bss_mapping.cc
similarity index 100%
rename from runtime/index_bss_mapping.cc
rename to runtime/oat/index_bss_mapping.cc
diff --git a/runtime/index_bss_mapping.h b/runtime/oat/index_bss_mapping.h
similarity index 95%
rename from runtime/index_bss_mapping.h
rename to runtime/oat/index_bss_mapping.h
index dcbc05c..bc8db33 100644
--- a/runtime/index_bss_mapping.h
+++ b/runtime/oat/index_bss_mapping.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_INDEX_BSS_MAPPING_H_
-#define ART_RUNTIME_INDEX_BSS_MAPPING_H_
+#ifndef ART_RUNTIME_OAT_INDEX_BSS_MAPPING_H_
+#define ART_RUNTIME_OAT_INDEX_BSS_MAPPING_H_
 
 #include <android-base/logging.h>
 
@@ -79,4 +79,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_INDEX_BSS_MAPPING_H_
+#endif  // ART_RUNTIME_OAT_INDEX_BSS_MAPPING_H_
diff --git a/runtime/oat.cc b/runtime/oat/oat.cc
similarity index 100%
rename from runtime/oat.cc
rename to runtime/oat/oat.cc
diff --git a/runtime/oat.h b/runtime/oat/oat.h
similarity index 98%
rename from runtime/oat.h
rename to runtime/oat/oat.h
index 7ea97fd..6db50e3 100644
--- a/runtime/oat.h
+++ b/runtime/oat/oat.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_H_
-#define ART_RUNTIME_OAT_H_
+#ifndef ART_RUNTIME_OAT_OAT_H_
+#define ART_RUNTIME_OAT_OAT_H_
 
 #include <array>
 #include <vector>
@@ -164,4 +164,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_H_
+#endif  // ART_RUNTIME_OAT_OAT_H_
diff --git a/runtime/oat_file-inl.h b/runtime/oat/oat_file-inl.h
similarity index 96%
rename from runtime/oat_file-inl.h
rename to runtime/oat/oat_file-inl.h
index fd42e45..eeb94d7 100644
--- a/runtime/oat_file-inl.h
+++ b/runtime/oat/oat_file-inl.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_FILE_INL_H_
-#define ART_RUNTIME_OAT_FILE_INL_H_
+#ifndef ART_RUNTIME_OAT_OAT_FILE_INL_H_
+#define ART_RUNTIME_OAT_OAT_FILE_INL_H_
 
 #include "oat_file.h"
 
@@ -114,4 +114,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_FILE_INL_H_
+#endif  // ART_RUNTIME_OAT_OAT_FILE_INL_H_
diff --git a/runtime/oat_file.cc b/runtime/oat/oat_file.cc
similarity index 100%
rename from runtime/oat_file.cc
rename to runtime/oat/oat_file.cc
diff --git a/runtime/oat_file.h b/runtime/oat/oat_file.h
similarity index 99%
rename from runtime/oat_file.h
rename to runtime/oat/oat_file.h
index 2af1921..9ce6547 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat/oat_file.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_FILE_H_
-#define ART_RUNTIME_OAT_FILE_H_
+#ifndef ART_RUNTIME_OAT_OAT_FILE_H_
+#define ART_RUNTIME_OAT_OAT_FILE_H_
 
 #include <list>
 #include <memory>
@@ -662,4 +662,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_FILE_H_
+#endif  // ART_RUNTIME_OAT_OAT_FILE_H_
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat/oat_file_assistant.cc
similarity index 100%
rename from runtime/oat_file_assistant.cc
rename to runtime/oat/oat_file_assistant.cc
diff --git a/runtime/oat_file_assistant.h b/runtime/oat/oat_file_assistant.h
similarity index 99%
rename from runtime/oat_file_assistant.h
rename to runtime/oat/oat_file_assistant.h
index c8337f8..01fe7c5 100644
--- a/runtime/oat_file_assistant.h
+++ b/runtime/oat/oat_file_assistant.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_FILE_ASSISTANT_H_
-#define ART_RUNTIME_OAT_FILE_ASSISTANT_H_
+#ifndef ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_H_
+#define ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_H_
 
 #include <cstdint>
 #include <memory>
@@ -591,4 +591,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_FILE_ASSISTANT_H_
+#endif  // ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_H_
diff --git a/runtime/oat_file_assistant_context.cc b/runtime/oat/oat_file_assistant_context.cc
similarity index 100%
rename from runtime/oat_file_assistant_context.cc
rename to runtime/oat/oat_file_assistant_context.cc
diff --git a/runtime/oat_file_assistant_context.h b/runtime/oat/oat_file_assistant_context.h
similarity index 95%
rename from runtime/oat_file_assistant_context.h
rename to runtime/oat/oat_file_assistant_context.h
index d1dd920..3029bbd 100644
--- a/runtime/oat_file_assistant_context.h
+++ b/runtime/oat/oat_file_assistant_context.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_FILE_ASSISTANT_CONTEXT_H_
-#define ART_RUNTIME_OAT_FILE_ASSISTANT_CONTEXT_H_
+#ifndef ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_CONTEXT_H_
+#define ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_CONTEXT_H_
 
 #include <optional>
 #include <string>
@@ -86,4 +86,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_FILE_ASSISTANT_CONTEXT_H_
+#endif  // ART_RUNTIME_OAT_OAT_FILE_ASSISTANT_CONTEXT_H_
diff --git a/runtime/oat_file_assistant_test.cc b/runtime/oat/oat_file_assistant_test.cc
similarity index 100%
rename from runtime/oat_file_assistant_test.cc
rename to runtime/oat/oat_file_assistant_test.cc
diff --git a/runtime/oat_file_manager.cc b/runtime/oat/oat_file_manager.cc
similarity index 100%
rename from runtime/oat_file_manager.cc
rename to runtime/oat/oat_file_manager.cc
diff --git a/runtime/oat_file_manager.h b/runtime/oat/oat_file_manager.h
similarity index 97%
rename from runtime/oat_file_manager.h
rename to runtime/oat/oat_file_manager.h
index d812829..ecf285b 100644
--- a/runtime/oat_file_manager.h
+++ b/runtime/oat/oat_file_manager.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_FILE_MANAGER_H_
-#define ART_RUNTIME_OAT_FILE_MANAGER_H_
+#ifndef ART_RUNTIME_OAT_OAT_FILE_MANAGER_H_
+#define ART_RUNTIME_OAT_OAT_FILE_MANAGER_H_
 
 #include <memory>
 #include <set>
@@ -174,4 +174,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_FILE_MANAGER_H_
+#endif  // ART_RUNTIME_OAT_OAT_FILE_MANAGER_H_
diff --git a/runtime/oat_file_test.cc b/runtime/oat/oat_file_test.cc
similarity index 100%
rename from runtime/oat_file_test.cc
rename to runtime/oat/oat_file_test.cc
diff --git a/runtime/oat_quick_method_header.cc b/runtime/oat/oat_quick_method_header.cc
similarity index 100%
rename from runtime/oat_quick_method_header.cc
rename to runtime/oat/oat_quick_method_header.cc
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat/oat_quick_method_header.h
similarity index 97%
rename from runtime/oat_quick_method_header.h
rename to runtime/oat/oat_quick_method_header.h
index c596a93..07b320f 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat/oat_quick_method_header.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_OAT_QUICK_METHOD_HEADER_H_
-#define ART_RUNTIME_OAT_QUICK_METHOD_HEADER_H_
+#ifndef ART_RUNTIME_OAT_OAT_QUICK_METHOD_HEADER_H_
+#define ART_RUNTIME_OAT_OAT_QUICK_METHOD_HEADER_H_
 
 #include <optional>
 
@@ -202,4 +202,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_OAT_QUICK_METHOD_HEADER_H_
+#endif  // ART_RUNTIME_OAT_OAT_QUICK_METHOD_HEADER_H_
diff --git a/runtime/stack_map.cc b/runtime/oat/stack_map.cc
similarity index 100%
rename from runtime/stack_map.cc
rename to runtime/oat/stack_map.cc
diff --git a/runtime/stack_map.h b/runtime/oat/stack_map.h
similarity index 99%
rename from runtime/stack_map.h
rename to runtime/oat/stack_map.h
index 0f25243..be7c11d 100644
--- a/runtime/stack_map.h
+++ b/runtime/oat/stack_map.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef ART_RUNTIME_STACK_MAP_H_
-#define ART_RUNTIME_STACK_MAP_H_
+#ifndef ART_RUNTIME_OAT_STACK_MAP_H_
+#define ART_RUNTIME_OAT_STACK_MAP_H_
 
 #include <limits>
 
@@ -601,4 +601,4 @@
 
 }  // namespace art
 
-#endif  // ART_RUNTIME_STACK_MAP_H_
+#endif  // ART_RUNTIME_OAT_STACK_MAP_H_
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 590a596..05a1048 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -41,9 +41,9 @@
 #include "mirror/class_loader.h"
 #include "mirror/throwable.h"
 #include "nterp_helpers.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
+#include "oat/stack_map.h"
 #include "stack.h"
-#include "stack_map.h"
 
 namespace art {
 
diff --git a/runtime/quick_exception_handler.h b/runtime/quick_exception_handler.h
index 39462e5..9a5f66f 100644
--- a/runtime/quick_exception_handler.h
+++ b/runtime/quick_exception_handler.h
@@ -25,7 +25,7 @@
 #include "base/macros.h"
 #include "base/mutex.h"
 #include "deoptimization_kind.h"
-#include "stack_map.h"
+#include "oat/stack_map.h"
 #include "stack_reference.h"
 
 namespace art {
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 4875c75..8cd192f 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -42,7 +42,6 @@
 
 #include "android-base/strings.h"
 
-#include "aot_class_linker.h"
 #include "arch/arm/registers_arm.h"
 #include "arch/arm64/registers_arm64.h"
 #include "arch/context.h"
@@ -76,7 +75,6 @@
 #include "debugger.h"
 #include "dex/art_dex_file_loader.h"
 #include "dex/dex_file_loader.h"
-#include "elf_file.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
 #include "entrypoints/entrypoint_utils-inl.h"
 #include "experimental_flags.h"
@@ -90,7 +88,6 @@
 #include "gc/task_processor.h"
 #include "handle_scope-inl.h"
 #include "hidden_api.h"
-#include "image-inl.h"
 #include "indirect_reference_table.h"
 #include "instrumentation.h"
 #include "intern_table-inl.h"
@@ -156,9 +153,12 @@
 #include "native_stack_dump.h"
 #include "nativehelper/scoped_local_ref.h"
 #include "nterp_helpers.h"
-#include "oat.h"
-#include "oat_file_manager.h"
-#include "oat_quick_method_header.h"
+#include "oat/aot_class_linker.h"
+#include "oat/elf_file.h"
+#include "oat/image-inl.h"
+#include "oat/oat.h"
+#include "oat/oat_file_manager.h"
+#include "oat/oat_quick_method_header.h"
 #include "object_callbacks.h"
 #include "odr_statslog/odr_statslog.h"
 #include "parsed_options.h"
diff --git a/runtime/runtime_image.cc b/runtime/runtime_image.cc
index 73bb956..cae4ef8 100644
--- a/runtime/runtime_image.cc
+++ b/runtime/runtime_image.cc
@@ -38,7 +38,6 @@
 #include "class_root-inl.h"
 #include "dex/class_accessor-inl.h"
 #include "gc/space/image_space.h"
-#include "image.h"
 #include "mirror/object-inl.h"
 #include "mirror/object-refvisitor-inl.h"
 #include "mirror/object_array-alloc-inl.h"
@@ -46,7 +45,8 @@
 #include "mirror/object_array.h"
 #include "mirror/string-inl.h"
 #include "nterp_helpers.h"
-#include "oat.h"
+#include "oat/image.h"
+#include "oat/oat.h"
 #include "profile/profile_compilation_info.h"
 #include "scoped_thread_state_change-inl.h"
 #include "vdex_file.h"
diff --git a/runtime/stack.cc b/runtime/stack.cc
index bf844b4..4bd2719 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -40,7 +40,7 @@
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "nterp_helpers.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
 #include "obj_ptr-inl.h"
 #include "quick/quick_method_frame_info.h"
 #include "runtime.h"
diff --git a/runtime/stack.h b/runtime/stack.h
index a4bcf17..46f0d08 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -25,9 +25,9 @@
 #include "base/locks.h"
 #include "base/macros.h"
 #include "deoptimization_kind.h"
+#include "oat/stack_map.h"
 #include "obj_ptr.h"
 #include "quick/quick_method_frame_info.h"
-#include "stack_map.h"
 
 namespace art {
 
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 46856e3..ee79281 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -91,7 +91,8 @@
 #include "nativehelper/scoped_utf_chars.h"
 #include "nterp_helpers.h"
 #include "nth_caller_visitor.h"
-#include "oat_quick_method_header.h"
+#include "oat/oat_quick_method_header.h"
+#include "oat/stack_map.h"
 #include "obj_ptr-inl.h"
 #include "object_lock.h"
 #include "palette/palette.h"
@@ -106,7 +107,6 @@
 #include "scoped_thread_state_change-inl.h"
 #include "scoped_disable_public_sdk_checker.h"
 #include "stack.h"
-#include "stack_map.h"
 #include "thread-inl.h"
 #include "thread_list.h"
 #include "trace.h"
diff --git a/runtime/transaction.cc b/runtime/transaction.cc
index 08452bd..f22d71f 100644
--- a/runtime/transaction.cc
+++ b/runtime/transaction.cc
@@ -18,7 +18,6 @@
 
 #include <android-base/logging.h>
 
-#include "aot_class_linker.h"
 #include "base/mutex-inl.h"
 #include "base/stl_util.h"
 #include "dex/descriptors_names.h"
@@ -30,6 +29,7 @@
 #include "mirror/dex_cache-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
+#include "oat/aot_class_linker.h"
 #include "obj_ptr-inl.h"
 #include "runtime.h"
 
diff --git a/runtime/verifier/verifier_deps.cc b/runtime/verifier/verifier_deps.cc
index 6740446..ffd5206 100644
--- a/runtime/verifier/verifier_deps.cc
+++ b/runtime/verifier/verifier_deps.cc
@@ -29,7 +29,7 @@
 #include "dex/dex_file-inl.h"
 #include "mirror/class-inl.h"
 #include "mirror/class_loader.h"
-#include "oat_file.h"
+#include "oat/oat_file.h"
 #include "obj_ptr-inl.h"
 #include "reg_type.h"
 #include "reg_type_cache-inl.h"