Clean up include paths
Remove runtime/globals.h and make clients point to the right globals.h
(libartbase/base/globals.h). Also make within-libartbase includes
relative rather than using base/, etc.
Bug: 22322814
Test: make -j 40 checkbuild
Change-Id: I99de63fc851d48946ab401e2369de944419041c7
diff --git a/runtime/arch/arm/fault_handler_arm.cc b/runtime/arch/arm/fault_handler_arm.cc
index 315bf95..bb33a27 100644
--- a/runtime/arch/arm/fault_handler_arm.cc
+++ b/runtime/arch/arm/fault_handler_arm.cc
@@ -20,10 +20,10 @@
#include "art_method.h"
#include "base/enums.h"
+#include "base/globals.h"
#include "base/hex_dump.h"
#include "base/logging.h" // For VLOG.
#include "base/macros.h"
-#include "globals.h"
#include "thread-current-inl.h"
//
diff --git a/runtime/arch/arm64/fault_handler_arm64.cc b/runtime/arch/arm64/fault_handler_arm64.cc
index d282c8c..e8b4627 100644
--- a/runtime/arch/arm64/fault_handler_arm64.cc
+++ b/runtime/arch/arm64/fault_handler_arm64.cc
@@ -20,10 +20,10 @@
#include "art_method.h"
#include "base/enums.h"
+#include "base/globals.h"
#include "base/hex_dump.h"
#include "base/logging.h" // For VLOG.
#include "base/macros.h"
-#include "globals.h"
#include "registers_arm64.h"
#include "thread-current-inl.h"
diff --git a/runtime/arch/arm64/quick_method_frame_info_arm64.h b/runtime/arch/arm64/quick_method_frame_info_arm64.h
index 3e6f6c6..2d2b500 100644
--- a/runtime/arch/arm64/quick_method_frame_info_arm64.h
+++ b/runtime/arch/arm64/quick_method_frame_info_arm64.h
@@ -21,7 +21,7 @@
#include "base/bit_utils.h"
#include "base/callee_save_type.h"
#include "base/enums.h"
-#include "globals.h"
+#include "base/globals.h"
#include "quick/quick_method_frame_info.h"
#include "registers_arm64.h"
diff --git a/runtime/arch/instruction_set.cc b/runtime/arch/instruction_set.cc
index ecccdcf..b848eb2 100644
--- a/runtime/arch/instruction_set.cc
+++ b/runtime/arch/instruction_set.cc
@@ -20,7 +20,7 @@
#include "../elf.h"
#include "android-base/logging.h"
#include "base/bit_utils.h"
-#include "globals.h"
+#include "base/globals.h"
namespace art {
diff --git a/runtime/arch/mips/fault_handler_mips.cc b/runtime/arch/mips/fault_handler_mips.cc
index f82dc08..d5a9b15 100644
--- a/runtime/arch/mips/fault_handler_mips.cc
+++ b/runtime/arch/mips/fault_handler_mips.cc
@@ -19,10 +19,10 @@
#include "art_method.h"
#include "base/callee_save_type.h"
+#include "base/globals.h"
#include "base/hex_dump.h"
#include "base/logging.h" // For VLOG.
#include "base/macros.h"
-#include "globals.h"
#include "quick_method_frame_info_mips.h"
#include "registers_mips.h"
#include "thread-current-inl.h"
diff --git a/runtime/arch/mips/registers_mips.h b/runtime/arch/mips/registers_mips.h
index c7f9a3e..34f2f96 100644
--- a/runtime/arch/mips/registers_mips.h
+++ b/runtime/arch/mips/registers_mips.h
@@ -21,8 +21,8 @@
#include <android-base/logging.h>
+#include "base/globals.h"
#include "base/macros.h"
-#include "globals.h"
namespace art {
namespace mips {
diff --git a/runtime/arch/mips64/fault_handler_mips64.cc b/runtime/arch/mips64/fault_handler_mips64.cc
index ba6fff0..695da47 100644
--- a/runtime/arch/mips64/fault_handler_mips64.cc
+++ b/runtime/arch/mips64/fault_handler_mips64.cc
@@ -20,10 +20,10 @@
#include "art_method.h"
#include "base/callee_save_type.h"
+#include "base/globals.h"
#include "base/hex_dump.h"
#include "base/logging.h" // For VLOG.
#include "base/macros.h"
-#include "globals.h"
#include "quick_method_frame_info_mips64.h"
#include "registers_mips64.h"
#include "thread-current-inl.h"
diff --git a/runtime/arch/mips64/registers_mips64.h b/runtime/arch/mips64/registers_mips64.h
index d3a24b6..a3fa2ac4 100644
--- a/runtime/arch/mips64/registers_mips64.h
+++ b/runtime/arch/mips64/registers_mips64.h
@@ -21,8 +21,8 @@
#include <android-base/logging.h>
+#include "base/globals.h"
#include "base/macros.h"
-#include "globals.h"
namespace art {
namespace mips64 {
diff --git a/runtime/arch/x86/fault_handler_x86.cc b/runtime/arch/x86/fault_handler_x86.cc
index e6a9124..8b24334 100644
--- a/runtime/arch/x86/fault_handler_x86.cc
+++ b/runtime/arch/x86/fault_handler_x86.cc
@@ -20,11 +20,11 @@
#include "art_method.h"
#include "base/enums.h"
+#include "base/globals.h"
#include "base/hex_dump.h"
#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "base/safe_copy.h"
-#include "globals.h"
#include "thread-current-inl.h"
#if defined(__APPLE__)
diff --git a/runtime/arch/x86/registers_x86.h b/runtime/arch/x86/registers_x86.h
index ded3520..5a5d226 100644
--- a/runtime/arch/x86/registers_x86.h
+++ b/runtime/arch/x86/registers_x86.h
@@ -21,8 +21,8 @@
#include <android-base/logging.h>
+#include "base/globals.h"
#include "base/macros.h"
-#include "globals.h"
namespace art {
namespace x86 {
diff --git a/runtime/arch/x86_64/registers_x86_64.h b/runtime/arch/x86_64/registers_x86_64.h
index 4f22431..66aea70 100644
--- a/runtime/arch/x86_64/registers_x86_64.h
+++ b/runtime/arch/x86_64/registers_x86_64.h
@@ -21,8 +21,8 @@
#include <android-base/logging.h>
+#include "base/globals.h"
#include "base/macros.h"
-#include "globals.h"
namespace art {
namespace x86_64 {
diff --git a/runtime/base/file_utils.cc b/runtime/base/file_utils.cc
index 7b0796c..7921985 100644
--- a/runtime/base/file_utils.cc
+++ b/runtime/base/file_utils.cc
@@ -43,11 +43,11 @@
#include "android-base/strings.h"
#include "base/bit_utils.h"
-#include "base/stl_util.h"
+#include "base/globals.h"
#include "base/os.h"
+#include "base/stl_util.h"
#include "base/unix_file/fd_file.h"
#include "dex/dex_file_loader.h"
-#include "globals.h"
#if defined(__APPLE__)
#include <crt_externs.h>
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h
index 83a1f9a..186b1cd 100644
--- a/runtime/common_runtime_test.h
+++ b/runtime/common_runtime_test.h
@@ -25,12 +25,12 @@
#include <android-base/logging.h>
#include "arch/instruction_set.h"
+#include "base/globals.h"
#include "base/mutex.h"
#include "base/os.h"
#include "base/unix_file/fd_file.h"
#include "dex/art_dex_file_loader.h"
#include "dex/compact_dex_level.h"
-#include "globals.h"
// TODO: Add inl file and avoid including inl.
#include "obj_ptr-inl.h"
#include "scoped_thread_state_change-inl.h"
diff --git a/runtime/gc/accounting/bitmap.h b/runtime/gc/accounting/bitmap.h
index d039d88..2d83a8a 100644
--- a/runtime/gc/accounting/bitmap.h
+++ b/runtime/gc/accounting/bitmap.h
@@ -23,8 +23,8 @@
#include <set>
#include <vector>
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
namespace art {
diff --git a/runtime/gc/accounting/card_table.h b/runtime/gc/accounting/card_table.h
index 766c976..f3548f7 100644
--- a/runtime/gc/accounting/card_table.h
+++ b/runtime/gc/accounting/card_table.h
@@ -19,8 +19,8 @@
#include <memory>
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
namespace art {
diff --git a/runtime/gc/accounting/mod_union_table.h b/runtime/gc/accounting/mod_union_table.h
index 766e0f5..7a3c06a 100644
--- a/runtime/gc/accounting/mod_union_table.h
+++ b/runtime/gc/accounting/mod_union_table.h
@@ -18,11 +18,11 @@
#define ART_RUNTIME_GC_ACCOUNTING_MOD_UNION_TABLE_H_
#include "base/allocator.h"
+#include "base/globals.h"
#include "base/safe_map.h"
#include "base/tracking_safe_map.h"
#include "bitmap.h"
#include "card_table.h"
-#include "globals.h"
#include "mirror/object_reference.h"
#include <set>
diff --git a/runtime/gc/accounting/read_barrier_table.h b/runtime/gc/accounting/read_barrier_table.h
index 57e4db9..4b5a8c6 100644
--- a/runtime/gc/accounting/read_barrier_table.h
+++ b/runtime/gc/accounting/read_barrier_table.h
@@ -20,10 +20,10 @@
#include <sys/mman.h> // For the PROT_* and MAP_* constants.
#include "base/bit_utils.h"
+#include "base/globals.h"
#include "base/mem_map.h"
#include "base/mutex.h"
#include "gc/space/space.h"
-#include "globals.h"
namespace art {
namespace gc {
diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h
index 437aecc..1237f6e 100644
--- a/runtime/gc/accounting/space_bitmap.h
+++ b/runtime/gc/accounting/space_bitmap.h
@@ -23,8 +23,8 @@
#include <set>
#include <vector>
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
namespace art {
diff --git a/runtime/gc/accounting/space_bitmap_test.cc b/runtime/gc/accounting/space_bitmap_test.cc
index 1ca3fd6..22529b8 100644
--- a/runtime/gc/accounting/space_bitmap_test.cc
+++ b/runtime/gc/accounting/space_bitmap_test.cc
@@ -19,9 +19,9 @@
#include <stdint.h>
#include <memory>
+#include "base/globals.h"
#include "base/mutex.h"
#include "common_runtime_test.h"
-#include "globals.h"
#include "space_bitmap-inl.h"
namespace art {
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index 6e5cf0e..150fe95 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -30,8 +30,8 @@
#include "base/allocator.h"
#include "base/bit_utils.h"
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
#include "thread.h"
namespace art {
diff --git a/runtime/gc/gc_cause.cc b/runtime/gc/gc_cause.cc
index 508d765..ee7ac7d 100644
--- a/runtime/gc/gc_cause.cc
+++ b/runtime/gc/gc_cause.cc
@@ -18,8 +18,8 @@
#include <android-base/logging.h>
+#include "base/globals.h"
#include "base/macros.h"
-#include "globals.h"
#include <ostream>
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 99ebab9..609d2ab 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -27,6 +27,7 @@
#include "allocator_type.h"
#include "arch/instruction_set.h"
#include "base/atomic.h"
+#include "base/globals.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "base/runtime_debug.h"
@@ -37,7 +38,6 @@
#include "gc/collector_type.h"
#include "gc/gc_cause.h"
#include "gc/space/large_object_space.h"
-#include "globals.h"
#include "handle.h"
#include "obj_ptr.h"
#include "offsets.h"
diff --git a/runtime/gc/reference_processor.h b/runtime/gc/reference_processor.h
index 1d984eb..c6c7836 100644
--- a/runtime/gc/reference_processor.h
+++ b/runtime/gc/reference_processor.h
@@ -17,8 +17,8 @@
#ifndef ART_RUNTIME_GC_REFERENCE_PROCESSOR_H_
#define ART_RUNTIME_GC_REFERENCE_PROCESSOR_H_
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
#include "jni.h"
#include "reference_queue.h"
diff --git a/runtime/gc/reference_queue.h b/runtime/gc/reference_queue.h
index af77881..09ab51a 100644
--- a/runtime/gc/reference_queue.h
+++ b/runtime/gc/reference_queue.h
@@ -22,9 +22,9 @@
#include <vector>
#include "base/atomic.h"
+#include "base/globals.h"
#include "base/mutex.h"
#include "base/timing_logger.h"
-#include "globals.h"
#include "jni.h"
#include "obj_ptr.h"
#include "offsets.h"
diff --git a/runtime/gc/space/space.h b/runtime/gc/space/space.h
index d888935..4f43d9f 100644
--- a/runtime/gc/space/space.h
+++ b/runtime/gc/space/space.h
@@ -21,12 +21,12 @@
#include <string>
#include "base/atomic.h"
+#include "base/globals.h"
#include "base/macros.h"
#include "base/mem_map.h"
#include "base/mutex.h"
#include "gc/accounting/space_bitmap.h"
#include "gc/collector/object_byte_pair.h"
-#include "globals.h"
namespace art {
namespace mirror {
diff --git a/runtime/gc/space/space_test.h b/runtime/gc/space/space_test.h
index 1fe3fb2..d5861ed 100644
--- a/runtime/gc/space/space_test.h
+++ b/runtime/gc/space/space_test.h
@@ -20,8 +20,8 @@
#include <stdint.h>
#include <memory>
+#include "base/globals.h"
#include "common_runtime_test.h"
-#include "globals.h"
#include "mirror/array-inl.h"
#include "mirror/class-inl.h"
#include "mirror/class_loader.h"
diff --git a/runtime/gc/task_processor.h b/runtime/gc/task_processor.h
index f6b5607..6db3c37 100644
--- a/runtime/gc/task_processor.h
+++ b/runtime/gc/task_processor.h
@@ -20,8 +20,8 @@
#include <memory>
#include <set>
+#include "base/globals.h"
#include "base/mutex.h"
-#include "globals.h"
#include "thread_pool.h"
namespace art {
diff --git a/runtime/globals.h b/runtime/globals.h
deleted file mode 100644
index bdc2177..0000000
--- a/runtime/globals.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ART_RUNTIME_GLOBALS_H_
-#define ART_RUNTIME_GLOBALS_H_
-
-// TODO: remove this file in favor of libartbase/base/globals.h
-#include "base/globals.h"
-
-#endif // ART_RUNTIME_GLOBALS_H_
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index aa716f1..3b64874 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -42,6 +42,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/array_ref.h"
+#include "base/globals.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "base/os.h"
@@ -59,7 +60,6 @@
#include "gc/scoped_gc_critical_section.h"
#include "gc/space/space.h"
#include "gc_root.h"
-#include "globals.h"
#include "jdwp/jdwp.h"
#include "jdwp/jdwp_priv.h"
#include "mirror/class-inl.h"
diff --git a/runtime/image.h b/runtime/image.h
index fe544cc..8acd5bc 100644
--- a/runtime/image.h
+++ b/runtime/image.h
@@ -20,7 +20,7 @@
#include <string.h>
#include "base/enums.h"
-#include "globals.h"
+#include "base/globals.h"
#include "mirror/object.h"
namespace art {
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index eb4db00..661f954 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -17,10 +17,10 @@
#include "dex_cache-inl.h"
#include "art_method-inl.h"
+#include "base/globals.h"
#include "class_linker.h"
#include "gc/accounting/card_table-inl.h"
#include "gc/heap.h"
-#include "globals.h"
#include "linear_alloc.h"
#include "oat_file.h"
#include "object-inl.h"
diff --git a/runtime/mirror/object.h b/runtime/mirror/object.h
index d00c90b..82045c7 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -20,7 +20,7 @@
#include "base/atomic.h"
#include "base/casts.h"
#include "base/enums.h"
-#include "globals.h"
+#include "base/globals.h"
#include "obj_ptr.h"
#include "object_reference.h"
#include "offsets.h"
diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h
index 356fef0..77154e2 100644
--- a/runtime/mirror/object_reference.h
+++ b/runtime/mirror/object_reference.h
@@ -18,8 +18,8 @@
#define ART_RUNTIME_MIRROR_OBJECT_REFERENCE_H_
#include "base/atomic.h"
+#include "base/globals.h"
#include "base/mutex.h" // For Locks::mutator_lock_.
-#include "globals.h"
#include "heap_poisoning.h"
#include "obj_ptr.h"
diff --git a/runtime/obj_ptr.h b/runtime/obj_ptr.h
index 14fdba3..e421d87 100644
--- a/runtime/obj_ptr.h
+++ b/runtime/obj_ptr.h
@@ -20,9 +20,9 @@
#include <ostream>
#include <type_traits>
+#include "base/globals.h"
#include "base/macros.h"
#include "base/mutex.h" // For Locks::mutator_lock_.
-#include "globals.h"
namespace art {
diff --git a/runtime/offsets.h b/runtime/offsets.h
index aaf5c0c..4df9b27 100644
--- a/runtime/offsets.h
+++ b/runtime/offsets.h
@@ -20,7 +20,7 @@
#include <ostream>
#include "base/enums.h"
-#include "globals.h"
+#include "base/globals.h"
namespace art {
diff --git a/runtime/parsed_options.h b/runtime/parsed_options.h
index 0f8555a..8c77d39 100644
--- a/runtime/parsed_options.h
+++ b/runtime/parsed_options.h
@@ -23,9 +23,9 @@
#include <jni.h>
#include "arch/instruction_set.h"
+#include "base/globals.h"
#include "gc/collector_type.h"
#include "gc/space/large_object_space.h"
-#include "globals.h"
// #include "jit/profile_saver_options.h"
#include "runtime_options.h"
diff --git a/runtime/thread.h b/runtime/thread.h
index 22b77ee..3ec050a 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -30,11 +30,11 @@
#include "arch/instruction_set.h"
#include "base/atomic.h"
#include "base/enums.h"
+#include "base/globals.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "entrypoints/jni/jni_entrypoints.h"
#include "entrypoints/quick/quick_entrypoints.h"
-#include "globals.h"
#include "handle_scope.h"
#include "instrumentation.h"
#include "jvalue.h"
diff --git a/runtime/trace.h b/runtime/trace.h
index b242d15..1fae250 100644
--- a/runtime/trace.h
+++ b/runtime/trace.h
@@ -27,10 +27,10 @@
#include <vector>
#include "base/atomic.h"
+#include "base/globals.h"
#include "base/macros.h"
#include "base/os.h"
#include "base/safe_map.h"
-#include "globals.h"
#include "instrumentation.h"
namespace unix_file {
diff --git a/runtime/utils/dex_cache_arrays_layout-inl.h b/runtime/utils/dex_cache_arrays_layout-inl.h
index 68a5760..c0ea6be 100644
--- a/runtime/utils/dex_cache_arrays_layout-inl.h
+++ b/runtime/utils/dex_cache_arrays_layout-inl.h
@@ -22,9 +22,9 @@
#include <android-base/logging.h>
#include "base/bit_utils.h"
+#include "base/globals.h"
#include "dex/primitive.h"
#include "gc_root.h"
-#include "globals.h"
#include "mirror/dex_cache.h"
namespace art {
diff --git a/runtime/verify_object.cc b/runtime/verify_object.cc
index a031a07..70ca13f 100644
--- a/runtime/verify_object.cc
+++ b/runtime/verify_object.cc
@@ -17,8 +17,8 @@
#include "verify_object-inl.h"
#include "base/bit_utils.h"
+#include "base/globals.h"
#include "gc/heap.h"
-#include "globals.h"
#include "mirror/object-inl.h"
#include "obj_ptr-inl.h"
#include "runtime.h"