ART: Replace base/logging with android-base/logging
Replace wherever possible. ART's base/logging is now mainly VLOG
and initialization code that is unnecessary to pull in and makes
changes to verbose logging more painful than they have to be.
Test: m test-art-host
Change-Id: I3e3a4672ba5b621e57590a526c7d1c8b749e4f6e
diff --git a/runtime/arch/arm/context_arm.h b/runtime/arch/arm/context_arm.h
index fa9aa46..b980296 100644
--- a/runtime/arch/arm/context_arm.h
+++ b/runtime/arch/arm/context_arm.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_ARM_CONTEXT_ARM_H_
#define ART_RUNTIME_ARCH_ARM_CONTEXT_ARM_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_arm.h"
diff --git a/runtime/arch/arm/fault_handler_arm.cc b/runtime/arch/arm/fault_handler_arm.cc
index ef2b342..315bf95 100644
--- a/runtime/arch/arm/fault_handler_arm.cc
+++ b/runtime/arch/arm/fault_handler_arm.cc
@@ -21,7 +21,7 @@
#include "art_method.h"
#include "base/enums.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "globals.h"
#include "thread-current-inl.h"
diff --git a/runtime/arch/arm/instruction_set_features_arm.cc b/runtime/arch/arm/instruction_set_features_arm.cc
index b789fc7..801254f 100644
--- a/runtime/arch/arm/instruction_set_features_arm.cc
+++ b/runtime/arch/arm/instruction_set_features_arm.cc
@@ -25,10 +25,9 @@
#include <fstream>
-#include "android-base/stringprintf.h"
-#include "android-base/strings.h"
-
-#include "base/logging.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
+#include <android-base/strings.h>
#if defined(__arm__)
extern "C" bool artCheckForArmSdivInstruction();
diff --git a/runtime/arch/arm/thread_arm.cc b/runtime/arch/arm/thread_arm.cc
index ff4f81b..18585c7 100644
--- a/runtime/arch/arm/thread_arm.cc
+++ b/runtime/arch/arm/thread_arm.cc
@@ -16,9 +16,10 @@
#include "thread.h"
+#include <android-base/logging.h>
+
#include "asm_support_arm.h"
#include "base/enums.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/arch/arm64/context_arm64.h b/runtime/arch/arm64/context_arm64.h
index 36aded0..e64cfb8 100644
--- a/runtime/arch/arm64/context_arm64.h
+++ b/runtime/arch/arm64/context_arm64.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_ARM64_CONTEXT_ARM64_H_
#define ART_RUNTIME_ARCH_ARM64_CONTEXT_ARM64_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_arm64.h"
diff --git a/runtime/arch/arm64/fault_handler_arm64.cc b/runtime/arch/arm64/fault_handler_arm64.cc
index d535c7e..d282c8c 100644
--- a/runtime/arch/arm64/fault_handler_arm64.cc
+++ b/runtime/arch/arm64/fault_handler_arm64.cc
@@ -21,7 +21,7 @@
#include "art_method.h"
#include "base/enums.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "globals.h"
#include "registers_arm64.h"
diff --git a/runtime/arch/arm64/instruction_set_features_arm64.cc b/runtime/arch/arm64/instruction_set_features_arm64.cc
index d830ccf..9e9cb16 100644
--- a/runtime/arch/arm64/instruction_set_features_arm64.cc
+++ b/runtime/arch/arm64/instruction_set_features_arm64.cc
@@ -19,10 +19,10 @@
#include <fstream>
#include <sstream>
-#include "android-base/stringprintf.h"
-#include "android-base/strings.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
+#include <android-base/strings.h>
-#include "base/logging.h"
#include "base/stl_util.h"
namespace art {
diff --git a/runtime/arch/arm64/thread_arm64.cc b/runtime/arch/arm64/thread_arm64.cc
index 3483b70..19c4a6a 100644
--- a/runtime/arch/arm64/thread_arm64.cc
+++ b/runtime/arch/arm64/thread_arm64.cc
@@ -16,9 +16,10 @@
#include "thread.h"
+#include <android-base/logging.h>
+
#include "asm_support_arm64.h"
#include "base/enums.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/arch/code_offset.h b/runtime/arch/code_offset.h
index ab04b1e..8e8dde4 100644
--- a/runtime/arch/code_offset.h
+++ b/runtime/arch/code_offset.h
@@ -19,8 +19,10 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "instruction_set.h"
namespace art {
diff --git a/runtime/arch/instruction_set_features_test.cc b/runtime/arch/instruction_set_features_test.cc
index 67e2f35..1e3275c 100644
--- a/runtime/arch/instruction_set_features_test.cc
+++ b/runtime/arch/instruction_set_features_test.cc
@@ -19,12 +19,11 @@
#include <gtest/gtest.h>
#ifdef ART_TARGET_ANDROID
-#include "android-base/properties.h"
+#include <android-base/properties.h>
#endif
-#include "android-base/stringprintf.h"
-
-#include "base/logging.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
namespace art {
diff --git a/runtime/arch/mips/context_mips.h b/runtime/arch/mips/context_mips.h
index 7dcff63..7e073b2 100644
--- a/runtime/arch/mips/context_mips.h
+++ b/runtime/arch/mips/context_mips.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_MIPS_CONTEXT_MIPS_H_
#define ART_RUNTIME_ARCH_MIPS_CONTEXT_MIPS_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_mips.h"
diff --git a/runtime/arch/mips/fault_handler_mips.cc b/runtime/arch/mips/fault_handler_mips.cc
index 6dce54e..f82dc08 100644
--- a/runtime/arch/mips/fault_handler_mips.cc
+++ b/runtime/arch/mips/fault_handler_mips.cc
@@ -20,7 +20,7 @@
#include "art_method.h"
#include "base/callee_save_type.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "globals.h"
#include "quick_method_frame_info_mips.h"
diff --git a/runtime/arch/mips/instruction_set_features_mips.cc b/runtime/arch/mips/instruction_set_features_mips.cc
index 6d4145b..952ed25 100644
--- a/runtime/arch/mips/instruction_set_features_mips.cc
+++ b/runtime/arch/mips/instruction_set_features_mips.cc
@@ -19,10 +19,9 @@
#include <fstream>
#include <sstream>
-#include "android-base/stringprintf.h"
-#include "android-base/strings.h"
+#include <android-base/stringprintf.h>
+#include <android-base/strings.h>
-#include "base/logging.h"
#include "base/stl_util.h"
namespace art {
diff --git a/runtime/arch/mips/instruction_set_features_mips.h b/runtime/arch/mips/instruction_set_features_mips.h
index ee539ed..76bc639 100644
--- a/runtime/arch/mips/instruction_set_features_mips.h
+++ b/runtime/arch/mips/instruction_set_features_mips.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_MIPS_INSTRUCTION_SET_FEATURES_MIPS_H_
#define ART_RUNTIME_ARCH_MIPS_INSTRUCTION_SET_FEATURES_MIPS_H_
+#include <android-base/logging.h>
+
#include "arch/instruction_set_features.h"
-#include "base/logging.h"
#include "base/macros.h"
namespace art {
diff --git a/runtime/arch/mips/registers_mips.h b/runtime/arch/mips/registers_mips.h
index 57af150..f500b58 100644
--- a/runtime/arch/mips/registers_mips.h
+++ b/runtime/arch/mips/registers_mips.h
@@ -19,7 +19,8 @@
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/arch/mips/thread_mips.cc b/runtime/arch/mips/thread_mips.cc
index 0a9ab7a..0be7a7f 100644
--- a/runtime/arch/mips/thread_mips.cc
+++ b/runtime/arch/mips/thread_mips.cc
@@ -16,9 +16,10 @@
#include "thread.h"
+#include <android-base/logging.h>
+
#include "asm_support_mips.h"
#include "base/enums.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/arch/mips64/context_mips64.h b/runtime/arch/mips64/context_mips64.h
index 89fbf8f..b2a6138 100644
--- a/runtime/arch/mips64/context_mips64.h
+++ b/runtime/arch/mips64/context_mips64.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_MIPS64_CONTEXT_MIPS64_H_
#define ART_RUNTIME_ARCH_MIPS64_CONTEXT_MIPS64_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_mips64.h"
diff --git a/runtime/arch/mips64/fault_handler_mips64.cc b/runtime/arch/mips64/fault_handler_mips64.cc
index bdce520..ba6fff0 100644
--- a/runtime/arch/mips64/fault_handler_mips64.cc
+++ b/runtime/arch/mips64/fault_handler_mips64.cc
@@ -21,7 +21,7 @@
#include "art_method.h"
#include "base/callee_save_type.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "globals.h"
#include "quick_method_frame_info_mips64.h"
diff --git a/runtime/arch/mips64/registers_mips64.h b/runtime/arch/mips64/registers_mips64.h
index 30de2cc..bca260a 100644
--- a/runtime/arch/mips64/registers_mips64.h
+++ b/runtime/arch/mips64/registers_mips64.h
@@ -19,7 +19,8 @@
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/arch/mips64/thread_mips64.cc b/runtime/arch/mips64/thread_mips64.cc
index 3ce5e50..c1c390b 100644
--- a/runtime/arch/mips64/thread_mips64.cc
+++ b/runtime/arch/mips64/thread_mips64.cc
@@ -16,9 +16,10 @@
#include "thread.h"
+#include <android-base/logging.h>
+
#include "asm_support_mips64.h"
#include "base/enums.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/arch/x86/context_x86.h b/runtime/arch/x86/context_x86.h
index 303dfe3..0ebb22b 100644
--- a/runtime/arch/x86/context_x86.h
+++ b/runtime/arch/x86/context_x86.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_X86_CONTEXT_X86_H_
#define ART_RUNTIME_ARCH_X86_CONTEXT_X86_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_x86.h"
diff --git a/runtime/arch/x86/fault_handler_x86.cc b/runtime/arch/x86/fault_handler_x86.cc
index 527332f..e6a9124 100644
--- a/runtime/arch/x86/fault_handler_x86.cc
+++ b/runtime/arch/x86/fault_handler_x86.cc
@@ -21,7 +21,7 @@
#include "art_method.h"
#include "base/enums.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "base/safe_copy.h"
#include "globals.h"
diff --git a/runtime/arch/x86/instruction_set_features_x86.cc b/runtime/arch/x86/instruction_set_features_x86.cc
index ea5a90d..9846251 100644
--- a/runtime/arch/x86/instruction_set_features_x86.cc
+++ b/runtime/arch/x86/instruction_set_features_x86.cc
@@ -19,11 +19,11 @@
#include <fstream>
#include <sstream>
-#include "android-base/stringprintf.h"
-#include "android-base/strings.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
+#include <android-base/strings.h>
#include "arch/x86_64/instruction_set_features_x86_64.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/arch/x86/registers_x86.h b/runtime/arch/x86/registers_x86.h
index 23027ed..ded3520 100644
--- a/runtime/arch/x86/registers_x86.h
+++ b/runtime/arch/x86/registers_x86.h
@@ -19,7 +19,8 @@
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/arch/x86_64/context_x86_64.h b/runtime/arch/x86_64/context_x86_64.h
index f8e2845..d242693 100644
--- a/runtime/arch/x86_64/context_x86_64.h
+++ b/runtime/arch/x86_64/context_x86_64.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_ARCH_X86_64_CONTEXT_X86_64_H_
#define ART_RUNTIME_ARCH_X86_64_CONTEXT_X86_64_H_
+#include <android-base/logging.h>
+
#include "arch/context.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "registers_x86_64.h"
diff --git a/runtime/arch/x86_64/registers_x86_64.h b/runtime/arch/x86_64/registers_x86_64.h
index dda1d5f..4f22431 100644
--- a/runtime/arch/x86_64/registers_x86_64.h
+++ b/runtime/arch/x86_64/registers_x86_64.h
@@ -19,7 +19,8 @@
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/art_field-inl.h b/runtime/art_field-inl.h
index 4a328e8..48a89f1 100644
--- a/runtime/art_field-inl.h
+++ b/runtime/art_field-inl.h
@@ -19,7 +19,8 @@
#include "art_field.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "class_linker.h"
#include "dex_file-inl.h"
#include "gc/accounting/card_table-inl.h"
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index 31abf94..327081f 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -21,7 +21,6 @@
#include "art_field.h"
#include "base/callee_save_type.h"
-#include "base/logging.h"
#include "class_linker-inl.h"
#include "code_item_accessors-inl.h"
#include "common_throws.h"
diff --git a/runtime/art_method.h b/runtime/art_method.h
index 0a592e0..4718150 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -19,11 +19,14 @@
#include <cstddef>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
#include "base/casts.h"
#include "base/enums.h"
#include "base/iteration_range.h"
-#include "base/logging.h"
+#include "base/logging.h" // For RUNTIME_DEBUG_FLAG.
+#include "base/macros.h"
#include "dex_file.h"
#include "dex_instruction_iterator.h"
#include "gc_root.h"
diff --git a/runtime/atomic.h b/runtime/atomic.h
index d8621cc..ec3eb6d 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -22,8 +22,9 @@
#include <limits>
#include <vector>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
-#include "base/logging.h"
#include "base/macros.h"
namespace art {
diff --git a/runtime/barrier.cc b/runtime/barrier.cc
index 9bcda35..8d3bc0e 100644
--- a/runtime/barrier.cc
+++ b/runtime/barrier.cc
@@ -16,7 +16,7 @@
#include "barrier.h"
-#include "base/logging.h"
+#include "base/logging.h" // Required for gAborting.
#include "base/mutex.h"
#include "base/time_utils.h"
#include "thread.h"
diff --git a/runtime/base/allocator.cc b/runtime/base/allocator.cc
index bb00638..2da88c3 100644
--- a/runtime/base/allocator.cc
+++ b/runtime/base/allocator.cc
@@ -19,8 +19,9 @@
#include <inttypes.h>
#include <stdlib.h>
+#include <android-base/logging.h>
+
#include "atomic.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/base/arena_allocator.cc b/runtime/base/arena_allocator.cc
index 2e35f8a..cc413c5 100644
--- a/runtime/base/arena_allocator.cc
+++ b/runtime/base/arena_allocator.cc
@@ -23,7 +23,8 @@
#include <iomanip>
#include <numeric>
-#include "logging.h"
+#include <android-base/logging.h>
+
#include "mem_map.h"
#include "mutex.h"
#include "systrace.h"
diff --git a/runtime/base/arena_allocator.h b/runtime/base/arena_allocator.h
index a327cb0..9e03658 100644
--- a/runtime/base/arena_allocator.h
+++ b/runtime/base/arena_allocator.h
@@ -20,11 +20,11 @@
#include <stddef.h>
#include <stdint.h>
-#include "base/bit_utils.h"
-#include "base/dchecked_vector.h"
-#include "base/memory_tool.h"
+#include "bit_utils.h"
+#include "dchecked_vector.h"
#include "debug_stack.h"
#include "macros.h"
+#include "memory_tool.h"
#include "mutex.h"
namespace art {
diff --git a/runtime/base/arena_object.h b/runtime/base/arena_object.h
index ed00bab..06884c2 100644
--- a/runtime/base/arena_object.h
+++ b/runtime/base/arena_object.h
@@ -17,8 +17,10 @@
#ifndef ART_RUNTIME_BASE_ARENA_OBJECT_H_
#define ART_RUNTIME_BASE_ARENA_OBJECT_H_
-#include "base/arena_allocator.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "arena_allocator.h"
+#include "macros.h"
#include "scoped_arena_allocator.h"
namespace art {
diff --git a/runtime/base/array_ref.h b/runtime/base/array_ref.h
index 630a036..ef86512 100644
--- a/runtime/base/array_ref.h
+++ b/runtime/base/array_ref.h
@@ -20,7 +20,7 @@
#include <type_traits>
#include <vector>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/base/bit_field.h b/runtime/base/bit_field.h
index a80ca28..86007d6 100644
--- a/runtime/base/bit_field.h
+++ b/runtime/base/bit_field.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_BASE_BIT_FIELD_H_
#define ART_RUNTIME_BASE_BIT_FIELD_H_
+#include <android-base/logging.h>
+
#include "globals.h"
-#include "logging.h"
namespace art {
diff --git a/runtime/base/bit_utils.h b/runtime/base/bit_utils.h
index 5d83654..34cddbf 100644
--- a/runtime/base/bit_utils.h
+++ b/runtime/base/bit_utils.h
@@ -20,7 +20,8 @@
#include <limits>
#include <type_traits>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/stl_util_identity.h"
namespace art {
diff --git a/runtime/base/bit_utils_iterator.h b/runtime/base/bit_utils_iterator.h
index 8514de6..2d3d050 100644
--- a/runtime/base/bit_utils_iterator.h
+++ b/runtime/base/bit_utils_iterator.h
@@ -21,9 +21,10 @@
#include <limits>
#include <type_traits>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
#include "base/iteration_range.h"
-#include "base/logging.h"
#include "base/stl_util.h"
namespace art {
diff --git a/runtime/base/bit_vector-inl.h b/runtime/base/bit_vector-inl.h
index 0e67f77..e67d4e2 100644
--- a/runtime/base/bit_vector-inl.h
+++ b/runtime/base/bit_vector-inl.h
@@ -17,9 +17,11 @@
#ifndef ART_RUNTIME_BASE_BIT_VECTOR_INL_H_
#define ART_RUNTIME_BASE_BIT_VECTOR_INL_H_
-#include "base/bit_utils.h"
#include "bit_vector.h"
-#include "logging.h"
+
+#include <android-base/logging.h>
+
+#include "base/bit_utils.h"
namespace art {
diff --git a/runtime/base/bounded_fifo.h b/runtime/base/bounded_fifo.h
index 7bcd382..1520770 100644
--- a/runtime/base/bounded_fifo.h
+++ b/runtime/base/bounded_fifo.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_BASE_BOUNDED_FIFO_H_
#define ART_RUNTIME_BASE_BOUNDED_FIFO_H_
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/base/casts.h b/runtime/base/casts.h
index 92c493a..ac1a10c 100644
--- a/runtime/base/casts.h
+++ b/runtime/base/casts.h
@@ -24,8 +24,7 @@
#include <limits>
#include <type_traits>
-#include "base/logging.h"
-#include "base/macros.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/base/dchecked_vector.h b/runtime/base/dchecked_vector.h
index 77f0ea2..7236ac3 100644
--- a/runtime/base/dchecked_vector.h
+++ b/runtime/base/dchecked_vector.h
@@ -21,7 +21,7 @@
#include <type_traits>
#include <vector>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/base/debug_stack.h b/runtime/base/debug_stack.h
index 886065d..1331e10 100644
--- a/runtime/base/debug_stack.h
+++ b/runtime/base/debug_stack.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_BASE_DEBUG_STACK_H_
#define ART_RUNTIME_BASE_DEBUG_STACK_H_
-#include "base/logging.h"
-#include "base/macros.h"
+#include <android-base/logging.h>
+#include <android-base/macros.h>
+
#include "globals.h"
namespace art {
diff --git a/runtime/base/file_magic.cc b/runtime/base/file_magic.cc
index dffb9b4..ac2e184 100644
--- a/runtime/base/file_magic.cc
+++ b/runtime/base/file_magic.cc
@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
-#include "base/logging.h"
#include "base/unix_file/fd_file.h"
#include "dex_file.h"
diff --git a/runtime/base/file_utils.h b/runtime/base/file_utils.h
index 007f3b4..e4555ad 100644
--- a/runtime/base/file_utils.h
+++ b/runtime/base/file_utils.h
@@ -21,13 +21,14 @@
#include <string>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
-#include "base/logging.h"
namespace art {
bool ReadFileToString(const std::string& file_name, std::string* result);
-bool PrintFileToLog(const std::string& file_name, LogSeverity level);
+bool PrintFileToLog(const std::string& file_name, android::base::LogSeverity level);
// Find $ANDROID_ROOT, /system, or abort.
std::string GetAndroidRoot();
diff --git a/runtime/base/hash_set.h b/runtime/base/hash_set.h
index c743342..47e6d93 100644
--- a/runtime/base/hash_set.h
+++ b/runtime/base/hash_set.h
@@ -25,8 +25,10 @@
#include <type_traits>
#include <utility>
+#include <android-base/logging.h>
+
#include "bit_utils.h"
-#include "logging.h"
+#include "macros.h"
namespace art {
diff --git a/runtime/base/histogram-inl.h b/runtime/base/histogram-inl.h
index be20920..3ce0140 100644
--- a/runtime/base/histogram-inl.h
+++ b/runtime/base/histogram-inl.h
@@ -24,6 +24,8 @@
#include "histogram.h"
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
#include "base/time_utils.h"
#include "utils.h"
diff --git a/runtime/base/histogram.h b/runtime/base/histogram.h
index e0c921e..7544a9c 100644
--- a/runtime/base/histogram.h
+++ b/runtime/base/histogram.h
@@ -19,7 +19,7 @@
#include <string>
#include <vector>
-#include "base/logging.h"
+#include <android-base/macros.h>
namespace art {
diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h
index c0cf487..9a037b5 100644
--- a/runtime/base/mutex.h
+++ b/runtime/base/mutex.h
@@ -24,8 +24,10 @@
#include <iosfwd>
#include <string>
+#include <android-base/logging.h>
+
#include "atomic.h"
-#include "base/logging.h"
+#include "base/logging.h" // For gAborting.
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/base/scoped_arena_allocator.h b/runtime/base/scoped_arena_allocator.h
index 8f50fd4..35e337f 100644
--- a/runtime/base/scoped_arena_allocator.h
+++ b/runtime/base/scoped_arena_allocator.h
@@ -17,10 +17,11 @@
#ifndef ART_RUNTIME_BASE_SCOPED_ARENA_ALLOCATOR_H_
#define ART_RUNTIME_BASE_SCOPED_ARENA_ALLOCATOR_H_
+#include <android-base/logging.h>
+
#include "arena_allocator.h"
#include "debug_stack.h"
#include "globals.h"
-#include "logging.h"
#include "macros.h"
namespace art {
diff --git a/runtime/base/scoped_flock.cc b/runtime/base/scoped_flock.cc
index b8df689..514b97b 100644
--- a/runtime/base/scoped_flock.cc
+++ b/runtime/base/scoped_flock.cc
@@ -19,9 +19,9 @@
#include <sys/file.h>
#include <sys/stat.h>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
-#include "base/logging.h"
#include "base/unix_file/fd_file.h"
namespace art {
diff --git a/runtime/base/scoped_flock.h b/runtime/base/scoped_flock.h
index 1b933c0..db6c819 100644
--- a/runtime/base/scoped_flock.h
+++ b/runtime/base/scoped_flock.h
@@ -20,9 +20,8 @@
#include <memory>
#include <string>
-#include "android-base/unique_fd.h"
+#include <android-base/unique_fd.h>
-#include "base/logging.h"
#include "base/macros.h"
#include "base/unix_file/fd_file.h"
#include "os.h"
diff --git a/runtime/base/stl_util.h b/runtime/base/stl_util.h
index b272972..02f3765 100644
--- a/runtime/base/stl_util.h
+++ b/runtime/base/stl_util.h
@@ -21,7 +21,7 @@
#include <set>
#include <sstream>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/base/stringpiece.cc b/runtime/base/stringpiece.cc
index 2570bad..672431c 100644
--- a/runtime/base/stringpiece.cc
+++ b/runtime/base/stringpiece.cc
@@ -19,7 +19,7 @@
#include <ostream>
#include <utility>
-#include "logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/base/timing_logger.cc b/runtime/base/timing_logger.cc
index b8d6931..23ec3e1 100644
--- a/runtime/base/timing_logger.cc
+++ b/runtime/base/timing_logger.cc
@@ -18,8 +18,9 @@
#include "timing_logger.h"
+#include <android-base/logging.h>
+
#include "base/histogram-inl.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/systrace.h"
#include "base/time_utils.h"
diff --git a/runtime/base/unix_file/fd_file.cc b/runtime/base/unix_file/fd_file.cc
index 792c581..37f239d 100644
--- a/runtime/base/unix_file/fd_file.cc
+++ b/runtime/base/unix_file/fd_file.cc
@@ -23,7 +23,7 @@
#include <limits>
-#include "base/logging.h"
+#include <android-base/logging.h>
// Includes needed for FdFile::Copy().
#ifdef __linux__
diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc
index c3dd702..0b9bf22 100644
--- a/runtime/check_jni.cc
+++ b/runtime/check_jni.cc
@@ -21,11 +21,12 @@
#include <iomanip>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "art_field-inl.h"
#include "art_method-inl.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "base/to_str.h"
#include "class_linker-inl.h"
#include "class_linker.h"
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc
index cd52bb6..9b55ca5 100644
--- a/runtime/common_throws.cc
+++ b/runtime/common_throws.cc
@@ -18,11 +18,11 @@
#include <sstream>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "art_field-inl.h"
#include "art_method-inl.h"
-#include "base/logging.h"
#include "class_linker-inl.h"
#include "dex_file-inl.h"
#include "dex_instruction-inl.h"
diff --git a/runtime/dex_file-inl.h b/runtime/dex_file-inl.h
index 1880968..4025a1a 100644
--- a/runtime/dex_file-inl.h
+++ b/runtime/dex_file-inl.h
@@ -19,7 +19,6 @@
#include "base/bit_utils.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "base/stringpiece.h"
#include "cdex/compact_dex_file.h"
#include "dex_file.h"
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index af79207..2d02415 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -29,7 +29,6 @@
#include "android-base/stringprintf.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "dex_file-inl.h"
#include "leb128.h"
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 944a308..561b367 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -21,8 +21,10 @@
#include <string>
#include <vector>
+#include <android-base/logging.h>
+
#include "base/iteration_range.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "base/value_object.h"
#include "dex_file_types.h"
#include "dex_instruction_iterator.h"
diff --git a/runtime/dex_file_layout.h b/runtime/dex_file_layout.h
index 4c960c3..9fac5f8 100644
--- a/runtime/dex_file_layout.h
+++ b/runtime/dex_file_layout.h
@@ -21,7 +21,7 @@
#include <cstdint>
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/dex_file_tracking_registrar.cc b/runtime/dex_file_tracking_registrar.cc
index 874d8ea..4de4376 100644
--- a/runtime/dex_file_tracking_registrar.cc
+++ b/runtime/dex_file_tracking_registrar.cc
@@ -19,6 +19,8 @@
#include <deque>
#include <tuple>
+#include <android-base/logging.h>
+
// For dex tracking through poisoning. Note: Requires forcing sanitization. This is the reason for
// the ifdefs and early include.
#ifdef ART_DEX_FILE_ACCESS_TRACKING
@@ -28,7 +30,6 @@
#endif
#include "base/memory_tool.h"
-#include "base/logging.h"
#include "dex_file-inl.h"
namespace art {
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h
index 4041820..3ced692 100644
--- a/runtime/dex_instruction.h
+++ b/runtime/dex_instruction.h
@@ -17,7 +17,8 @@
#ifndef ART_RUNTIME_DEX_INSTRUCTION_H_
#define ART_RUNTIME_DEX_INSTRUCTION_H_
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "globals.h"
diff --git a/runtime/dex_instruction_iterator.h b/runtime/dex_instruction_iterator.h
index be583a2..eabe009 100644
--- a/runtime/dex_instruction_iterator.h
+++ b/runtime/dex_instruction_iterator.h
@@ -19,8 +19,10 @@
#include <iterator>
+#include <android-base/logging.h>
+
#include "dex_instruction.h"
-#include "base/logging.h"
+#include "base/macros.h"
namespace art {
diff --git a/runtime/dex_to_dex_decompiler.cc b/runtime/dex_to_dex_decompiler.cc
index a5ebade..a4e4fb5 100644
--- a/runtime/dex_to_dex_decompiler.cc
+++ b/runtime/dex_to_dex_decompiler.cc
@@ -16,7 +16,9 @@
#include "dex_to_dex_decompiler.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "base/mutex.h"
#include "bytecode_utils.h"
#include "dex_file-inl.h"
diff --git a/runtime/elf_file.cc b/runtime/elf_file.cc
index afe4eeb..d057ff3 100644
--- a/runtime/elf_file.cc
+++ b/runtime/elf_file.cc
@@ -25,7 +25,6 @@
#include "android-base/strings.h"
#include "arch/instruction_set.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/unix_file/fd_file.h"
#include "elf_file_impl.h"
diff --git a/runtime/elf_utils.h b/runtime/elf_utils.h
index 418d937..0cac8e8 100644
--- a/runtime/elf_utils.h
+++ b/runtime/elf_utils.h
@@ -19,11 +19,11 @@
#include <sys/cdefs.h>
+#include <android-base/logging.h>
+
// Explicitly include our own elf.h to avoid Linux and other dependencies.
#include "./elf.h"
-#include "base/logging.h"
-
namespace art {
// Architecture dependent flags for the ELF header.
diff --git a/runtime/entrypoints/jni/jni_entrypoints.cc b/runtime/entrypoints/jni/jni_entrypoints.cc
index 7ec360a..780e221 100644
--- a/runtime/entrypoints/jni/jni_entrypoints.cc
+++ b/runtime/entrypoints/jni/jni_entrypoints.cc
@@ -14,8 +14,9 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
+
#include "art_method-inl.h"
-#include "base/logging.h"
#include "entrypoints/entrypoint_utils.h"
#include "java_vm_ext.h"
#include "mirror/object-inl.h"
diff --git a/runtime/entrypoints/quick/quick_default_init_entrypoints.h b/runtime/entrypoints/quick/quick_default_init_entrypoints.h
index 8acaa90..8c90800 100644
--- a/runtime/entrypoints/quick/quick_default_init_entrypoints.h
+++ b/runtime/entrypoints/quick/quick_default_init_entrypoints.h
@@ -17,7 +17,7 @@
#ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_
#define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_
-#include "base/logging.h"
+#include "base/logging.h" // FOR VLOG_IS_ON.
#include "entrypoints/jni/jni_entrypoints.h"
#include "entrypoints/runtime_asm_entrypoints.h"
#include "quick_alloc_entrypoints.h"
diff --git a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
index 5f40711..c782c9c 100644
--- a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG_IS_ON.
#include "base/mutex.h"
#include "base/systrace.h"
#include "callee_save_frame.h"
diff --git a/runtime/entrypoints/quick/quick_jni_entrypoints.cc b/runtime/entrypoints/quick/quick_jni_entrypoints.cc
index 29a62c8..b13b6fb 100644
--- a/runtime/entrypoints/quick/quick_jni_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_jni_entrypoints.cc
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
+
#include "art_method-inl.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "entrypoints/entrypoint_utils-inl.h"
#include "indirect_reference_table.h"
#include "mirror/object-inl.h"
diff --git a/runtime/gc/accounting/atomic_stack.h b/runtime/gc/accounting/atomic_stack.h
index 3d0e817..e5b5694 100644
--- a/runtime/gc/accounting/atomic_stack.h
+++ b/runtime/gc/accounting/atomic_stack.h
@@ -23,8 +23,9 @@
#include <memory>
#include <string>
+#include <android-base/logging.h>
+
#include "atomic.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "mem_map.h"
#include "stack_reference.h"
diff --git a/runtime/gc/accounting/bitmap-inl.h b/runtime/gc/accounting/bitmap-inl.h
index cd3923a..ca6b479 100644
--- a/runtime/gc/accounting/bitmap-inl.h
+++ b/runtime/gc/accounting/bitmap-inl.h
@@ -21,9 +21,10 @@
#include <memory>
+#include <android-base/logging.h>
+
#include "atomic.h"
#include "base/bit_utils.h"
-#include "base/logging.h"
namespace art {
namespace gc {
diff --git a/runtime/gc/accounting/card_table-inl.h b/runtime/gc/accounting/card_table-inl.h
index 6ff5359..5f2f2dd 100644
--- a/runtime/gc/accounting/card_table-inl.h
+++ b/runtime/gc/accounting/card_table-inl.h
@@ -17,10 +17,12 @@
#ifndef ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_INL_H_
#define ART_RUNTIME_GC_ACCOUNTING_CARD_TABLE_INL_H_
+#include "card_table.h"
+
+#include <android-base/logging.h>
+
#include "atomic.h"
#include "base/bit_utils.h"
-#include "base/logging.h"
-#include "card_table.h"
#include "mem_map.h"
#include "space_bitmap.h"
diff --git a/runtime/gc/accounting/card_table.cc b/runtime/gc/accounting/card_table.cc
index 01b5896..934e57a 100644
--- a/runtime/gc/accounting/card_table.cc
+++ b/runtime/gc/accounting/card_table.cc
@@ -18,7 +18,6 @@
#include <sys/mman.h>
-#include "base/logging.h"
#include "base/systrace.h"
#include "card_table-inl.h"
#include "gc/heap.h"
diff --git a/runtime/gc/accounting/heap_bitmap.h b/runtime/gc/accounting/heap_bitmap.h
index 4237e7e..c997f8d 100644
--- a/runtime/gc/accounting/heap_bitmap.h
+++ b/runtime/gc/accounting/heap_bitmap.h
@@ -17,8 +17,11 @@
#ifndef ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_H_
#define ART_RUNTIME_GC_ACCOUNTING_HEAP_BITMAP_H_
+#include <android-base/logging.h>
+
#include "base/allocator.h"
-#include "base/logging.h"
+#include "base/macros.h"
+#include "base/mutex.h"
#include "space_bitmap.h"
namespace art {
diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h
index b37dd96..ba83369 100644
--- a/runtime/gc/accounting/space_bitmap-inl.h
+++ b/runtime/gc/accounting/space_bitmap-inl.h
@@ -21,9 +21,10 @@
#include <memory>
+#include <android-base/logging.h>
+
#include "atomic.h"
#include "base/bit_utils.h"
-#include "base/logging.h"
namespace art {
namespace gc {
diff --git a/runtime/gc/allocator/dlmalloc.cc b/runtime/gc/allocator/dlmalloc.cc
index ef916f8..6506220 100644
--- a/runtime/gc/allocator/dlmalloc.cc
+++ b/runtime/gc/allocator/dlmalloc.cc
@@ -16,8 +16,9 @@
#include "dlmalloc.h"
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
// ART specific morecore implementation defined in space.cc.
static void* art_heap_morecore(void* m, intptr_t increment);
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h
index 2c90773..6e5cf0e 100644
--- a/runtime/gc/allocator/rosalloc.h
+++ b/runtime/gc/allocator/rosalloc.h
@@ -26,9 +26,10 @@
#include <unordered_set>
#include <vector>
+#include <android-base/logging.h>
+
#include "base/allocator.h"
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "base/mutex.h"
#include "globals.h"
#include "thread.h"
diff --git a/runtime/gc/collector/garbage_collector.cc b/runtime/gc/collector/garbage_collector.cc
index c5a341f..fa34270 100644
--- a/runtime/gc/collector/garbage_collector.cc
+++ b/runtime/gc/collector/garbage_collector.cc
@@ -22,7 +22,7 @@
#include "base/dumpable.h"
#include "base/histogram-inl.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG_IS_ON.
#include "base/mutex-inl.h"
#include "base/systrace.h"
#include "base/time_utils.h"
diff --git a/runtime/gc/collector/immune_spaces.cc b/runtime/gc/collector/immune_spaces.cc
index 1024050..3b59618 100644
--- a/runtime/gc/collector/immune_spaces.cc
+++ b/runtime/gc/collector/immune_spaces.cc
@@ -19,6 +19,7 @@
#include <tuple>
#include <vector>
+#include "base/logging.h" // For VLOG.
#include "gc/space/space-inl.h"
#include "mirror/object.h"
#include "oat_file.h"
diff --git a/runtime/gc/collector/mark_compact.cc b/runtime/gc/collector/mark_compact.cc
index aef98de..34cc129 100644
--- a/runtime/gc/collector/mark_compact.cc
+++ b/runtime/gc/collector/mark_compact.cc
@@ -16,7 +16,9 @@
#include "mark_compact.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "base/mutex-inl.h"
#include "base/timing_logger.h"
#include "gc/accounting/heap_bitmap-inl.h"
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index c6caf4b..fdfe949 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -25,7 +25,7 @@
#include "base/bounded_fifo.h"
#include "base/enums.h"
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "base/mutex-inl.h"
#include "base/systrace.h"
diff --git a/runtime/gc/collector/semi_space.cc b/runtime/gc/collector/semi_space.cc
index 9fb37b6..3150781 100644
--- a/runtime/gc/collector/semi_space.cc
+++ b/runtime/gc/collector/semi_space.cc
@@ -22,7 +22,7 @@
#include <sstream>
#include <vector>
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "base/mutex-inl.h"
#include "base/timing_logger.h"
diff --git a/runtime/gc/gc_cause.cc b/runtime/gc/gc_cause.cc
index 8712080..d88fcdc 100644
--- a/runtime/gc/gc_cause.cc
+++ b/runtime/gc/gc_cause.cc
@@ -15,7 +15,10 @@
*/
#include "gc_cause.h"
-#include "base/logging.h"
+
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "globals.h"
#include <ostream>
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index ac0d82e..10bae71 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -22,10 +22,13 @@
#include <unordered_set>
#include <vector>
+#include <android-base/logging.h>
+
#include "allocator_type.h"
#include "arch/instruction_set.h"
#include "atomic.h"
-#include "base/logging.h"
+#include "base/logging.h" // For DECLARE_RUNTIME_DEBUG_FLAG.
+#include "base/macros.h"
#include "base/mutex.h"
#include "base/time_utils.h"
#include "gc/collector/gc_type.h"
diff --git a/runtime/gc/space/image_space_fs.h b/runtime/gc/space/image_space_fs.h
index a0ecb95..6ce81e9 100644
--- a/runtime/gc/space/image_space_fs.h
+++ b/runtime/gc/space/image_space_fs.h
@@ -23,7 +23,7 @@
#include "android-base/stringprintf.h"
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "base/unix_file/fd_file.h"
#include "globals.h"
diff --git a/runtime/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc
index 45f4f82..d2efb10 100644
--- a/runtime/gc/space/large_object_space.cc
+++ b/runtime/gc/space/large_object_space.cc
@@ -20,7 +20,9 @@
#include <memory>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "base/memory_tool.h"
#include "base/mutex-inl.h"
#include "base/stl_util.h"
diff --git a/runtime/gc/space/space.cc b/runtime/gc/space/space.cc
index 74ce273..2c6afa7 100644
--- a/runtime/gc/space/space.cc
+++ b/runtime/gc/space/space.cc
@@ -16,7 +16,9 @@
#include "space.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "gc/accounting/heap_bitmap.h"
#include "gc/accounting/space_bitmap-inl.h"
#include "gc/heap.h"
diff --git a/runtime/handle.h b/runtime/handle.h
index ccff575..18e503d 100644
--- a/runtime/handle.h
+++ b/runtime/handle.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_HANDLE_H_
#define ART_RUNTIME_HANDLE_H_
+#include <android-base/logging.h>
+
#include "base/casts.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "base/value_object.h"
diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h
index f248a11..28a2302 100644
--- a/runtime/handle_scope.h
+++ b/runtime/handle_scope.h
@@ -19,8 +19,9 @@
#include <stack>
+#include <android-base/logging.h>
+
#include "base/enums.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "handle.h"
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index 6a1a8c7..f4fc85b 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -36,11 +36,13 @@
#include <set>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "art_field-inl.h"
#include "art_method-inl.h"
-#include "base/logging.h"
+#include "base/macros.h"
+#include "base/mutex.h"
#include "base/time_utils.h"
#include "base/unix_file/fd_file.h"
#include "class_linker.h"
diff --git a/runtime/indenter.h b/runtime/indenter.h
index 69b9732..6361dd2 100644
--- a/runtime/indenter.h
+++ b/runtime/indenter.h
@@ -20,7 +20,8 @@
#include <ostream>
#include <streambuf>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
namespace art {
diff --git a/runtime/index_bss_mapping.h b/runtime/index_bss_mapping.h
index d9f4e66..dcbc05c 100644
--- a/runtime/index_bss_mapping.h
+++ b/runtime/index_bss_mapping.h
@@ -17,8 +17,9 @@
#ifndef ART_RUNTIME_INDEX_BSS_MAPPING_H_
#define ART_RUNTIME_INDEX_BSS_MAPPING_H_
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h
index 6675099..00184e2 100644
--- a/runtime/indirect_reference_table.h
+++ b/runtime/indirect_reference_table.h
@@ -23,8 +23,10 @@
#include <limits>
#include <string>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "base/mutex.h"
#include "gc_root.h"
#include "obj_ptr.h"
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index f097bc7..9a0877f 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -26,13 +26,14 @@
#include <iostream>
#include <sstream>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "base/macros.h"
+#include "base/mutex.h"
#include "class_linker-inl.h"
#include "common_dex_operations.h"
#include "common_throws.h"
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 31e7986..dece830 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -26,12 +26,12 @@
#include <locale>
#include <unordered_map>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "art_method-inl.h"
#include "base/casts.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "class_linker.h"
#include "common_throws.h"
diff --git a/runtime/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
index aeeda1e..d712b10 100644
--- a/runtime/jdwp/jdwp.h
+++ b/runtime/jdwp/jdwp.h
@@ -18,6 +18,7 @@
#define ART_RUNTIME_JDWP_JDWP_H_
#include "atomic.h"
+#include "base/logging.h" // For VLOG.
#include "base/mutex.h"
#include "jdwp/jdwp_bits.h"
#include "jdwp/jdwp_constants.h"
diff --git a/runtime/jdwp/jdwp_adb.cc b/runtime/jdwp/jdwp_adb.cc
index ede4f9e..d68430f 100644
--- a/runtime/jdwp/jdwp_adb.cc
+++ b/runtime/jdwp/jdwp_adb.cc
@@ -22,7 +22,7 @@
#include "android-base/stringprintf.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "jdwp/jdwp_priv.h"
#include "thread-current-inl.h"
diff --git a/runtime/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
index 41cb642..9409b76 100644
--- a/runtime/jdwp/jdwp_event.cc
+++ b/runtime/jdwp/jdwp_event.cc
@@ -25,7 +25,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "debugger.h"
#include "jdwp/jdwp_constants.h"
#include "jdwp/jdwp_expand_buf.h"
diff --git a/runtime/jdwp/jdwp_expand_buf.cc b/runtime/jdwp/jdwp_expand_buf.cc
index f0b8c91..4b4ca0e 100644
--- a/runtime/jdwp/jdwp_expand_buf.cc
+++ b/runtime/jdwp/jdwp_expand_buf.cc
@@ -23,7 +23,8 @@
#include <stdlib.h>
#include <string.h>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "jdwp/jdwp.h"
#include "jdwp/jdwp_bits.h"
diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
index 618332b..89eef88 100644
--- a/runtime/jdwp/jdwp_handler.cc
+++ b/runtime/jdwp/jdwp_handler.cc
@@ -24,7 +24,7 @@
#include "atomic.h"
#include "base/hex_dump.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "debugger.h"
#include "jdwp/jdwp_constants.h"
diff --git a/runtime/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
index e6c6068..e275554 100644
--- a/runtime/jdwp/jdwp_main.cc
+++ b/runtime/jdwp/jdwp_main.cc
@@ -23,7 +23,7 @@
#include "android-base/stringprintf.h"
#include "atomic.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/time_utils.h"
#include "debugger.h"
#include "jdwp/jdwp_priv.h"
diff --git a/runtime/jdwp/jdwp_socket.cc b/runtime/jdwp/jdwp_socket.cc
index 97662f0..673a942 100644
--- a/runtime/jdwp/jdwp_socket.cc
+++ b/runtime/jdwp/jdwp_socket.cc
@@ -28,7 +28,7 @@
#include "android-base/stringprintf.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "jdwp/jdwp_priv.h"
namespace art {
diff --git a/runtime/jit/debugger_interface.cc b/runtime/jit/debugger_interface.cc
index 135d9b1..4d1c85a 100644
--- a/runtime/jit/debugger_interface.cc
+++ b/runtime/jit/debugger_interface.cc
@@ -16,7 +16,8 @@
#include "debugger_interface.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/mutex.h"
#include "thread-current-inl.h"
#include "thread.h"
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 0d95bc6..a6aa916 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -20,7 +20,7 @@
#include "art_method-inl.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/memory_tool.h"
#include "debugger.h"
#include "entrypoints/runtime_asm_entrypoints.h"
diff --git a/runtime/jit/profile_compilation_info.cc b/runtime/jit/profile_compilation_info.cc
index bb0048d..7754777 100644
--- a/runtime/jit/profile_compilation_info.cc
+++ b/runtime/jit/profile_compilation_info.cc
@@ -35,6 +35,7 @@
#include "base/arena_allocator.h"
#include "base/dumpable.h"
#include "base/file_utils.h"
+#include "base/logging.h" // For VLOG.
#include "base/mutex.h"
#include "base/scoped_flock.h"
#include "base/stl_util.h"
diff --git a/runtime/jni_internal.cc b/runtime/jni_internal.cc
index 1e55158..48fc5f7 100644
--- a/runtime/jni_internal.cc
+++ b/runtime/jni_internal.cc
@@ -28,7 +28,7 @@
#include "atomic.h"
#include "base/allocator.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/mutex.h"
#include "base/stl_util.h"
#include "class_linker-inl.h"
diff --git a/runtime/leb128.h b/runtime/leb128.h
index 31459af..2bfed7f 100644
--- a/runtime/leb128.h
+++ b/runtime/leb128.h
@@ -19,8 +19,10 @@
#include <vector>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "globals.h"
namespace art {
diff --git a/runtime/lock_word.h b/runtime/lock_word.h
index b9aa0b7..fac1a75 100644
--- a/runtime/lock_word.h
+++ b/runtime/lock_word.h
@@ -20,8 +20,9 @@
#include <cstdint>
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "read_barrier.h"
namespace art {
diff --git a/runtime/managed_stack.h b/runtime/managed_stack.h
index 07078ec..d1c230f 100644
--- a/runtime/managed_stack.h
+++ b/runtime/managed_stack.h
@@ -21,7 +21,8 @@
#include <cstring>
#include <string>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "base/mutex.h"
#include "base/bit_utils.h"
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc
index f5d12d5..8abf8a6 100644
--- a/runtime/mem_map.cc
+++ b/runtime/mem_map.cc
@@ -35,6 +35,7 @@
#include "base/allocator.h"
#include "base/bit_utils.h"
#include "base/file_utils.h"
+#include "base/logging.h" // For VLOG_IS_ON.
#include "base/memory_tool.h"
#include "globals.h"
#include "utils.h"
diff --git a/runtime/memory_region.cc b/runtime/memory_region.cc
index 13cc5c9..862ff73 100644
--- a/runtime/memory_region.cc
+++ b/runtime/memory_region.cc
@@ -19,9 +19,6 @@
#include <stdint.h>
#include <string.h>
-#include "base/logging.h"
-#include "globals.h"
-
namespace art {
void MemoryRegion::CopyFrom(size_t offset, const MemoryRegion& from) const {
diff --git a/runtime/memory_region.h b/runtime/memory_region.h
index 7cf5d49..23e0aec 100644
--- a/runtime/memory_region.h
+++ b/runtime/memory_region.h
@@ -20,10 +20,11 @@
#include <stdint.h>
#include <type_traits>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
#include "base/bit_utils.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "base/value_object.h"
#include "globals.h"
diff --git a/runtime/method_info.h b/runtime/method_info.h
index 5a72125..6485af9 100644
--- a/runtime/method_info.h
+++ b/runtime/method_info.h
@@ -17,7 +17,9 @@
#ifndef ART_RUNTIME_METHOD_INFO_H_
#define ART_RUNTIME_METHOD_INFO_H_
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "leb128.h"
#include "memory_region.h"
diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h
index 2281245..636c84c 100644
--- a/runtime/mirror/array-inl.h
+++ b/runtime/mirror/array-inl.h
@@ -19,11 +19,11 @@
#include "array.h"
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "base/bit_utils.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "class.h"
#include "gc/heap-inl.h"
#include "obj_ptr-inl.h"
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index 8b11c12..8d4d44b 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -19,11 +19,12 @@
#include "dex_cache.h"
+#include <android-base/logging.h>
+
#include "art_field.h"
#include "art_method.h"
#include "base/casts.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "class_linker.h"
#include "dex_file.h"
#include "gc/heap-inl.h"
diff --git a/runtime/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
index 2f63dff..eb4db00 100644
--- a/runtime/mirror/dex_cache.cc
+++ b/runtime/mirror/dex_cache.cc
@@ -17,7 +17,6 @@
#include "dex_cache-inl.h"
#include "art_method-inl.h"
-#include "base/logging.h"
#include "class_linker.h"
#include "gc/accounting/card_table-inl.h"
#include "gc/heap.h"
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index f75786b..509db02 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -19,6 +19,7 @@
#include "array.h"
#include "base/bit_utils.h"
+#include "base/mutex.h"
#include "dex_file_types.h"
#include "object.h"
#include "object_array.h"
diff --git a/runtime/monitor_pool.cc b/runtime/monitor_pool.cc
index d00f979..cf5934b 100644
--- a/runtime/monitor_pool.cc
+++ b/runtime/monitor_pool.cc
@@ -16,7 +16,7 @@
#include "monitor_pool.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/mutex-inl.h"
#include "monitor.h"
#include "thread-current-inl.h"
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index a7bee39..bdbb80b 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -18,11 +18,13 @@
#include <stdlib.h>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "arch/instruction_set.h"
#include "art_method-inl.h"
-#include "base/logging.h"
+#include "base/macros.h"
+#include "base/mutex.h"
#include "debugger.h"
#include "java_vm_ext.h"
#include "jit/jit.h"
diff --git a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
index c79f51b..8f8fd71 100644
--- a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
+++ b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
@@ -16,8 +16,9 @@
#include "org_apache_harmony_dalvik_ddmc_DdmServer.h"
+#include <android-base/logging.h>
+
#include "base/array_ref.h"
-#include "base/logging.h"
#include "debugger.h"
#include "jni_internal.h"
#include "native_util.h"
diff --git a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
index f5057b0..7b73382 100644
--- a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
+++ b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
@@ -16,8 +16,9 @@
#include "org_apache_harmony_dalvik_ddmc_DdmVmInternal.h"
+#include <android-base/logging.h>
+
#include "base/file_utils.h"
-#include "base/logging.h"
#include "base/mutex.h"
#include "debugger.h"
#include "gc/heap.h"
diff --git a/runtime/native_bridge_art_interface.cc b/runtime/native_bridge_art_interface.cc
index cd8315c..10d1091 100644
--- a/runtime/native_bridge_art_interface.cc
+++ b/runtime/native_bridge_art_interface.cc
@@ -22,7 +22,7 @@
#include "art_method-inl.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "dex_file-inl.h"
#include "jni_internal.h"
diff --git a/runtime/non_debuggable_classes.cc b/runtime/non_debuggable_classes.cc
index 7db199c..8484e2c 100644
--- a/runtime/non_debuggable_classes.cc
+++ b/runtime/non_debuggable_classes.cc
@@ -16,7 +16,6 @@
#include "non_debuggable_classes.h"
-#include "base/logging.h"
#include "jni_internal.h"
#include "mirror/class-inl.h"
#include "nativehelper/scoped_local_ref.h"
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index cd18ce1..8707e73 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -24,7 +24,7 @@
#include "android-base/strings.h"
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/stl_util.h"
#include "class_linker.h"
#include "compiler_filter.h"
diff --git a/runtime/oat_file_manager.cc b/runtime/oat_file_manager.cc
index b86f479..91a138a 100644
--- a/runtime/oat_file_manager.cc
+++ b/runtime/oat_file_manager.cc
@@ -26,7 +26,7 @@
#include "art_field-inl.h"
#include "base/bit_vector-inl.h"
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/stl_util.h"
#include "base/systrace.h"
#include "class_linker.h"
diff --git a/runtime/os_linux.cc b/runtime/os_linux.cc
index a463f70..1b3e000 100644
--- a/runtime/os_linux.cc
+++ b/runtime/os_linux.cc
@@ -23,7 +23,8 @@
#include <cstddef>
#include <memory>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/unix_file/fd_file.h"
namespace art {
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 85af560..a3c0036 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -18,8 +18,10 @@
#include <sstream>
+#include <android-base/logging.h>
+
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "base/stringpiece.h"
#include "debugger.h"
#include "gc/heap.h"
diff --git a/runtime/plugin.cc b/runtime/plugin.cc
index 6aa0787..7d86f1d 100644
--- a/runtime/plugin.cc
+++ b/runtime/plugin.cc
@@ -20,8 +20,6 @@
#include "android-base/stringprintf.h"
-#include "base/logging.h"
-
namespace art {
using android::base::StringPrintf;
diff --git a/runtime/plugin.h b/runtime/plugin.h
index f077aaf..909c710 100644
--- a/runtime/plugin.h
+++ b/runtime/plugin.h
@@ -18,7 +18,8 @@
#define ART_RUNTIME_PLUGIN_H_
#include <string>
-#include "base/logging.h"
+
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/primitive.h b/runtime/primitive.h
index a429914..5b163d8 100644
--- a/runtime/primitive.h
+++ b/runtime/primitive.h
@@ -19,7 +19,8 @@
#include <sys/types.h>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
namespace art {
diff --git a/runtime/quick_exception_handler.h b/runtime/quick_exception_handler.h
index 12b63c9..1103dab 100644
--- a/runtime/quick_exception_handler.h
+++ b/runtime/quick_exception_handler.h
@@ -17,7 +17,8 @@
#ifndef ART_RUNTIME_QUICK_EXCEPTION_HANDLER_H_
#define ART_RUNTIME_QUICK_EXCEPTION_HANDLER_H_
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "base/mutex.h"
#include "deoptimization_kind.h"
diff --git a/runtime/read_barrier.h b/runtime/read_barrier.h
index d4b9f43..ce2cb0e 100644
--- a/runtime/read_barrier.h
+++ b/runtime/read_barrier.h
@@ -17,7 +17,9 @@
#ifndef ART_RUNTIME_READ_BARRIER_H_
#define ART_RUNTIME_READ_BARRIER_H_
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/logging.h" // For DECLARE_RUNTIME_DEBUG_FLAG.
#include "base/macros.h"
#include "base/mutex.h"
#include "gc_root.h"
diff --git a/runtime/runtime_common.cc b/runtime/runtime_common.cc
index eb69d91..b49bec6 100644
--- a/runtime/runtime_common.cc
+++ b/runtime/runtime_common.cc
@@ -23,10 +23,11 @@
#include <sstream>
#include <string>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "base/file_utils.h"
-#include "base/logging.h"
+#include "base/logging.h" // For gAborting.
#include "base/macros.h"
#include "base/mutex.h"
#include "native_stack_dump.h"
diff --git a/runtime/safe_map.h b/runtime/safe_map.h
index f298691..33e45bd 100644
--- a/runtime/safe_map.h
+++ b/runtime/safe_map.h
@@ -21,8 +21,9 @@
#include <memory>
#include <type_traits>
+#include <android-base/logging.h>
+
#include "base/allocator.h"
-#include "base/logging.h"
namespace art {
diff --git a/runtime/scoped_thread_state_change-inl.h b/runtime/scoped_thread_state_change-inl.h
index aa96871..a9702a7 100644
--- a/runtime/scoped_thread_state_change-inl.h
+++ b/runtime/scoped_thread_state_change-inl.h
@@ -19,6 +19,8 @@
#include "scoped_thread_state_change.h"
+#include <android-base/logging.h>
+
#include "base/casts.h"
#include "jni_env_ext-inl.h"
#include "obj_ptr-inl.h"
diff --git a/runtime/scoped_thread_state_change.cc b/runtime/scoped_thread_state_change.cc
index 94354fc..6a86cc6 100644
--- a/runtime/scoped_thread_state_change.cc
+++ b/runtime/scoped_thread_state_change.cc
@@ -19,7 +19,6 @@
#include <type_traits>
#include "base/casts.h"
-#include "base/logging.h"
#include "java_vm_ext.h"
#include "obj_ptr-inl.h"
#include "runtime-inl.h"
diff --git a/runtime/signal_set.h b/runtime/signal_set.h
index 6f88852..5361323 100644
--- a/runtime/signal_set.h
+++ b/runtime/signal_set.h
@@ -19,7 +19,7 @@
#include <signal.h>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/stride_iterator.h b/runtime/stride_iterator.h
index 0560c33..511c2c6 100644
--- a/runtime/stride_iterator.h
+++ b/runtime/stride_iterator.h
@@ -19,7 +19,7 @@
#include <iterator>
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
diff --git a/runtime/string_reference.h b/runtime/string_reference.h
index d0ab4e4..24a4253 100644
--- a/runtime/string_reference.h
+++ b/runtime/string_reference.h
@@ -19,7 +19,8 @@
#include <stdint.h>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "dex_file-inl.h"
#include "dex_file_reference.h"
#include "dex_file_types.h"
diff --git a/runtime/thread_linux.cc b/runtime/thread_linux.cc
index b922d94..9673eee 100644
--- a/runtime/thread_linux.cc
+++ b/runtime/thread_linux.cc
@@ -14,9 +14,11 @@
* limitations under the License.
*/
+#include "thread.h"
+
#include <signal.h>
-#include "thread.h"
+#include "base/logging.h" // For VLOG.
#include "utils.h"
namespace art {
diff --git a/runtime/thread_pool.cc b/runtime/thread_pool.cc
index cffaffc..386cdf0 100644
--- a/runtime/thread_pool.cc
+++ b/runtime/thread_pool.cc
@@ -22,11 +22,11 @@
#include <pthread.h>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
#include "base/bit_utils.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/time_utils.h"
#include "runtime.h"
diff --git a/runtime/transaction.cc b/runtime/transaction.cc
index e923aff..c9766bc 100644
--- a/runtime/transaction.cc
+++ b/runtime/transaction.cc
@@ -16,7 +16,8 @@
#include "transaction.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/stl_util.h"
#include "gc/accounting/card_table-inl.h"
#include "gc_root-inl.h"
diff --git a/runtime/type_reference.h b/runtime/type_reference.h
index f7daa2b..10a67b1 100644
--- a/runtime/type_reference.h
+++ b/runtime/type_reference.h
@@ -19,7 +19,8 @@
#include <stdint.h>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "dex_file_types.h"
#include "string_reference.h"
diff --git a/runtime/utf.cc b/runtime/utf.cc
index 7e06482..93fcb32 100644
--- a/runtime/utf.cc
+++ b/runtime/utf.cc
@@ -16,7 +16,8 @@
#include "utf.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "mirror/array.h"
#include "mirror/object-inl.h"
#include "utf-inl.h"
diff --git a/runtime/utils.h b/runtime/utils.h
index ede32dc..789498c 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -23,9 +23,10 @@
#include <random>
#include <string>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "base/stringpiece.h"
#include "globals.h"
#include "primitive.h"
diff --git a/runtime/utils/dex_cache_arrays_layout-inl.h b/runtime/utils/dex_cache_arrays_layout-inl.h
index 9d4e9fb..855b856 100644
--- a/runtime/utils/dex_cache_arrays_layout-inl.h
+++ b/runtime/utils/dex_cache_arrays_layout-inl.h
@@ -19,8 +19,9 @@
#include "dex_cache_arrays_layout.h"
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "gc_root.h"
#include "globals.h"
#include "mirror/dex_cache.h"
diff --git a/runtime/vdex_file.cc b/runtime/vdex_file.cc
index fb9d24f..fe768a1 100644
--- a/runtime/vdex_file.cc
+++ b/runtime/vdex_file.cc
@@ -20,8 +20,9 @@
#include <memory>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/unix_file/fd_file.h"
#include "dex_file.h"
diff --git a/runtime/verifier/method_verifier-inl.h b/runtime/verifier/method_verifier-inl.h
index a7fa9f3..445a6ff 100644
--- a/runtime/verifier/method_verifier-inl.h
+++ b/runtime/verifier/method_verifier-inl.h
@@ -19,7 +19,8 @@
#include "method_verifier.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "handle_scope-inl.h"
#include "mirror/class_loader.h"
#include "mirror/dex_cache.h"
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index f1af252..f10cd37 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -23,7 +23,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/mutex-inl.h"
#include "base/stl_util.h"
#include "base/systrace.h"
diff --git a/runtime/verifier/register_line-inl.h b/runtime/verifier/register_line-inl.h
index a9c9428..39d73f5 100644
--- a/runtime/verifier/register_line-inl.h
+++ b/runtime/verifier/register_line-inl.h
@@ -19,6 +19,7 @@
#include "register_line.h"
+#include "base/logging.h" // For VLOG.
#include "method_verifier.h"
#include "reg_type_cache-inl.h"
@@ -192,6 +193,27 @@
SetResultTypeToUnknown(verifier);
}
+inline void RegisterLine::ClearRegToLockDepth(size_t reg, size_t depth) {
+ CHECK_LT(depth, 32u);
+ DCHECK(IsSetLockDepth(reg, depth));
+ auto it = reg_to_lock_depths_.find(reg);
+ DCHECK(it != reg_to_lock_depths_.end());
+ uint32_t depths = it->second ^ (1 << depth);
+ if (depths != 0) {
+ it->second = depths;
+ } else {
+ reg_to_lock_depths_.erase(it);
+ }
+ // Need to unlock every register at the same lock depth. These are aliased locks.
+ uint32_t mask = 1 << depth;
+ for (auto& pair : reg_to_lock_depths_) {
+ if ((pair.second & mask) != 0) {
+ VLOG(verifier) << "Also unlocking " << pair.first;
+ pair.second ^= mask;
+ }
+ }
+}
+
inline void RegisterLineArenaDelete::operator()(RegisterLine* ptr) const {
if (ptr != nullptr) {
ptr->~RegisterLine();
diff --git a/runtime/verifier/register_line.h b/runtime/verifier/register_line.h
index 71eb4d6..82f63b2 100644
--- a/runtime/verifier/register_line.h
+++ b/runtime/verifier/register_line.h
@@ -20,6 +20,8 @@
#include <memory>
#include <vector>
+#include <android-base/logging.h>
+
#include "base/scoped_arena_containers.h"
#include "safe_map.h"
@@ -401,26 +403,7 @@
return true;
}
- void ClearRegToLockDepth(size_t reg, size_t depth) {
- CHECK_LT(depth, 32u);
- DCHECK(IsSetLockDepth(reg, depth));
- auto it = reg_to_lock_depths_.find(reg);
- DCHECK(it != reg_to_lock_depths_.end());
- uint32_t depths = it->second ^ (1 << depth);
- if (depths != 0) {
- it->second = depths;
- } else {
- reg_to_lock_depths_.erase(it);
- }
- // Need to unlock every register at the same lock depth. These are aliased locks.
- uint32_t mask = 1 << depth;
- for (auto& pair : reg_to_lock_depths_) {
- if ((pair.second & mask) != 0) {
- VLOG(verifier) << "Also unlocking " << pair.first;
- pair.second ^= mask;
- }
- }
- }
+ void ClearRegToLockDepth(size_t reg, size_t depth);
void ClearAllRegToLockDepths(size_t reg) {
reg_to_lock_depths_.erase(reg);
diff --git a/runtime/well_known_classes.cc b/runtime/well_known_classes.cc
index 9722db9..5a653fe 100644
--- a/runtime/well_known_classes.cc
+++ b/runtime/well_known_classes.cc
@@ -20,9 +20,9 @@
#include <sstream>
-#include "android-base/stringprintf.h"
+#include <android-base/logging.h>
+#include <android-base/stringprintf.h>
-#include "base/logging.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "jni_internal.h"
#include "mirror/class.h"
diff --git a/runtime/zip_archive.h b/runtime/zip_archive.h
index 821cc5c..75f8757 100644
--- a/runtime/zip_archive.h
+++ b/runtime/zip_archive.h
@@ -21,7 +21,8 @@
#include <memory>
#include <string>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/unix_file/random_access_file.h"
#include "globals.h"
#include "mem_map.h"