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/compiler/compiler.cc b/compiler/compiler.cc
index c500921..bb614ae 100644
--- a/compiler/compiler.cc
+++ b/compiler/compiler.cc
@@ -16,7 +16,9 @@
#include "compiler.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "driver/compiler_driver.h"
#include "optimizing/optimizing_compiler.h"
#include "utils.h"
diff --git a/compiler/debug/dwarf/writer.h b/compiler/debug/dwarf/writer.h
index 95912ad..afeb980 100644
--- a/compiler/debug/dwarf/writer.h
+++ b/compiler/debug/dwarf/writer.h
@@ -19,8 +19,10 @@
#include <type_traits>
#include <vector>
+
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "leb128.h"
namespace art {
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
index cc452fc..eddc8ed 100644
--- a/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -16,11 +16,12 @@
#include "dex_to_dex_compiler.h"
-#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 "bytecode_utils.h"
#include "compiled_method.h"
diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc
index 03c90d8..1e0b94d 100644
--- a/compiler/dex/verification_results.cc
+++ b/compiler/dex/verification_results.cc
@@ -16,7 +16,8 @@
#include "verification_results.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/mutex-inl.h"
#include "base/stl_util.h"
#include "driver/compiler_driver.h"
diff --git a/compiler/dex/verified_method.cc b/compiler/dex/verified_method.cc
index 524b0a6..8934201 100644
--- a/compiler/dex/verified_method.cc
+++ b/compiler/dex/verified_method.cc
@@ -19,7 +19,8 @@
#include <algorithm>
#include <memory>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "code_item_accessors-inl.h"
#include "dex_file.h"
#include "dex_instruction-inl.h"
diff --git a/compiler/driver/compiled_method_storage.cc b/compiler/driver/compiled_method_storage.cc
index c739333..c8c2b69 100644
--- a/compiler/driver/compiled_method_storage.cc
+++ b/compiler/driver/compiled_method_storage.cc
@@ -19,7 +19,8 @@
#include "compiled_method_storage.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "compiled_method.h"
#include "linker/linker_patch.h"
#include "thread-current-inl.h"
diff --git a/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc
index 3e637bc..54f193b 100644
--- a/compiler/jni/quick/arm/calling_convention_arm.cc
+++ b/compiler/jni/quick/arm/calling_convention_arm.cc
@@ -16,7 +16,9 @@
#include "calling_convention_arm.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "handle_scope-inl.h"
#include "utils/arm/managed_register_arm.h"
diff --git a/compiler/jni/quick/arm64/calling_convention_arm64.cc b/compiler/jni/quick/arm64/calling_convention_arm64.cc
index 3afd701..328ecbb 100644
--- a/compiler/jni/quick/arm64/calling_convention_arm64.cc
+++ b/compiler/jni/quick/arm64/calling_convention_arm64.cc
@@ -16,7 +16,8 @@
#include "calling_convention_arm64.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "handle_scope-inl.h"
#include "utils/arm64/managed_register_arm64.h"
diff --git a/compiler/jni/quick/calling_convention.cc b/compiler/jni/quick/calling_convention.cc
index 55c27d1..ff814c8 100644
--- a/compiler/jni/quick/calling_convention.cc
+++ b/compiler/jni/quick/calling_convention.cc
@@ -16,7 +16,7 @@
#include "calling_convention.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
#ifdef ART_ENABLE_CODEGEN_arm
#include "jni/quick/arm/calling_convention_arm.h"
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index 37f7d63..136e3db 100644
--- a/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -25,7 +25,7 @@
#include "art_method.h"
#include "base/arena_allocator.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/logging.h" // For VLOG.
#include "base/macros.h"
#include "calling_convention.h"
#include "class_linker.h"
diff --git a/compiler/jni/quick/mips/calling_convention_mips.cc b/compiler/jni/quick/mips/calling_convention_mips.cc
index 0e0716e..5ec1add 100644
--- a/compiler/jni/quick/mips/calling_convention_mips.cc
+++ b/compiler/jni/quick/mips/calling_convention_mips.cc
@@ -16,7 +16,8 @@
#include "calling_convention_mips.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "handle_scope-inl.h"
#include "utils/mips/managed_register_mips.h"
diff --git a/compiler/jni/quick/mips64/calling_convention_mips64.cc b/compiler/jni/quick/mips64/calling_convention_mips64.cc
index afe6a76..a7012ae 100644
--- a/compiler/jni/quick/mips64/calling_convention_mips64.cc
+++ b/compiler/jni/quick/mips64/calling_convention_mips64.cc
@@ -16,7 +16,8 @@
#include "calling_convention_mips64.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "handle_scope-inl.h"
#include "utils/mips64/managed_register_mips64.h"
diff --git a/compiler/jni/quick/x86/calling_convention_x86.cc b/compiler/jni/quick/x86/calling_convention_x86.cc
index 0bfcc3f..ad58e38 100644
--- a/compiler/jni/quick/x86/calling_convention_x86.cc
+++ b/compiler/jni/quick/x86/calling_convention_x86.cc
@@ -16,7 +16,8 @@
#include "calling_convention_x86.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "handle_scope-inl.h"
#include "utils/x86/managed_register_x86.h"
diff --git a/compiler/jni/quick/x86_64/calling_convention_x86_64.cc b/compiler/jni/quick/x86_64/calling_convention_x86_64.cc
index ba654f4..e5e96d0 100644
--- a/compiler/jni/quick/x86_64/calling_convention_x86_64.cc
+++ b/compiler/jni/quick/x86_64/calling_convention_x86_64.cc
@@ -16,8 +16,9 @@
#include "calling_convention_x86_64.h"
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "handle_scope-inl.h"
#include "utils/x86_64/managed_register_x86_64.h"
diff --git a/compiler/linker/error_delaying_output_stream.h b/compiler/linker/error_delaying_output_stream.h
index 33e6b5a..659f1dc 100644
--- a/compiler/linker/error_delaying_output_stream.h
+++ b/compiler/linker/error_delaying_output_stream.h
@@ -19,7 +19,9 @@
#include "output_stream.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
namespace art {
namespace linker {
diff --git a/compiler/linker/linker_patch.h b/compiler/linker/linker_patch.h
index 0ac1490..6f4e774 100644
--- a/compiler/linker/linker_patch.h
+++ b/compiler/linker/linker_patch.h
@@ -20,8 +20,9 @@
#include <iosfwd>
#include <stdint.h>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "method_reference.h"
namespace art {
diff --git a/compiler/linker/output_stream_test.cc b/compiler/linker/output_stream_test.cc
index ad29840..f93ea7a 100644
--- a/compiler/linker/output_stream_test.cc
+++ b/compiler/linker/output_stream_test.cc
@@ -17,7 +17,9 @@
#include "file_output_stream.h"
#include "vector_output_stream.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "base/macros.h"
#include "base/unix_file/fd_file.h"
#include "buffered_output_stream.h"
#include "common_runtime_test.h"
diff --git a/compiler/linker/vector_output_stream.cc b/compiler/linker/vector_output_stream.cc
index 75f90e5..f2cae5b 100644
--- a/compiler/linker/vector_output_stream.cc
+++ b/compiler/linker/vector_output_stream.cc
@@ -16,7 +16,7 @@
#include "vector_output_stream.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
namespace art {
namespace linker {
diff --git a/compiler/optimizing/block_builder.cc b/compiler/optimizing/block_builder.cc
index ed00032..58f591b 100644
--- a/compiler/optimizing/block_builder.cc
+++ b/compiler/optimizing/block_builder.cc
@@ -16,6 +16,7 @@
#include "block_builder.h"
+#include "base/logging.h" // FOR VLOG.
#include "bytecode_utils.h"
#include "quicken_info.h"
diff --git a/compiler/optimizing/code_generator_utils.cc b/compiler/optimizing/code_generator_utils.cc
index 96fe2a1..dd47a1f 100644
--- a/compiler/optimizing/code_generator_utils.cc
+++ b/compiler/optimizing/code_generator_utils.cc
@@ -15,9 +15,10 @@
*/
#include "code_generator_utils.h"
-#include "nodes.h"
-#include "base/logging.h"
+#include <android-base/logging.h>
+
+#include "nodes.h"
namespace art {
diff --git a/compiler/optimizing/data_type.h b/compiler/optimizing/data_type.h
index d253036..548fe28 100644
--- a/compiler/optimizing/data_type.h
+++ b/compiler/optimizing/data_type.h
@@ -19,7 +19,8 @@
#include <iosfwd>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
namespace art {
diff --git a/compiler/optimizing/optimizing_compiler_stats.h b/compiler/optimizing/optimizing_compiler_stats.h
index a2e92d2..32a94ab 100644
--- a/compiler/optimizing/optimizing_compiler_stats.h
+++ b/compiler/optimizing/optimizing_compiler_stats.h
@@ -23,6 +23,7 @@
#include <type_traits>
#include "atomic.h"
+#include "base/logging.h" // For VLOG_IS_ON.
#include "globals.h"
namespace art {
diff --git a/compiler/utils/arm/assembler_arm_vixl.h b/compiler/utils/arm/assembler_arm_vixl.h
index 0e73e6b..1377e64 100644
--- a/compiler/utils/arm/assembler_arm_vixl.h
+++ b/compiler/utils/arm/assembler_arm_vixl.h
@@ -17,8 +17,10 @@
#ifndef ART_COMPILER_UTILS_ARM_ASSEMBLER_ARM_VIXL_H_
#define ART_COMPILER_UTILS_ARM_ASSEMBLER_ARM_VIXL_H_
+#include <android-base/logging.h>
+
#include "base/arena_containers.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "constants_arm.h"
#include "offsets.h"
#include "utils/arm/assembler_arm_shared.h"
diff --git a/compiler/utils/arm/constants_arm.h b/compiler/utils/arm/constants_arm.h
index 5b87e3e..66252be 100644
--- a/compiler/utils/arm/constants_arm.h
+++ b/compiler/utils/arm/constants_arm.h
@@ -21,9 +21,10 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "arch/arm/registers_arm.h"
#include "base/casts.h"
-#include "base/logging.h"
#include "globals.h"
namespace art {
diff --git a/compiler/utils/arm/jni_macro_assembler_arm_vixl.h b/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
index c13c9af..4bc5d69 100644
--- a/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
+++ b/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
@@ -17,8 +17,10 @@
#ifndef ART_COMPILER_UTILS_ARM_JNI_MACRO_ASSEMBLER_ARM_VIXL_H_
#define ART_COMPILER_UTILS_ARM_JNI_MACRO_ASSEMBLER_ARM_VIXL_H_
+#include <android-base/logging.h>
+
#include "base/arena_containers.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "constants_arm.h"
#include "offsets.h"
#include "utils/arm/assembler_arm_shared.h"
diff --git a/compiler/utils/arm/managed_register_arm.h b/compiler/utils/arm/managed_register_arm.h
index 2be2d56..26f23b2 100644
--- a/compiler/utils/arm/managed_register_arm.h
+++ b/compiler/utils/arm/managed_register_arm.h
@@ -17,7 +17,8 @@
#ifndef ART_COMPILER_UTILS_ARM_MANAGED_REGISTER_ARM_H_
#define ART_COMPILER_UTILS_ARM_MANAGED_REGISTER_ARM_H_
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "constants_arm.h"
#include "debug/dwarf/register.h"
#include "utils/managed_register.h"
diff --git a/compiler/utils/arm64/assembler_arm64.cc b/compiler/utils/arm64/assembler_arm64.cc
index bb98958..c83fd44 100644
--- a/compiler/utils/arm64/assembler_arm64.cc
+++ b/compiler/utils/arm64/assembler_arm64.cc
@@ -15,7 +15,6 @@
*/
#include "assembler_arm64.h"
-#include "base/logging.h"
#include "entrypoints/quick/quick_entrypoints.h"
#include "heap_poisoning.h"
#include "offsets.h"
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h
index e5ec24a..8983af2 100644
--- a/compiler/utils/arm64/assembler_arm64.h
+++ b/compiler/utils/arm64/assembler_arm64.h
@@ -21,8 +21,10 @@
#include <memory>
#include <vector>
+#include <android-base/logging.h>
+
#include "base/arena_containers.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "offsets.h"
#include "utils/arm64/managed_register_arm64.h"
#include "utils/assembler.h"
diff --git a/compiler/utils/arm64/jni_macro_assembler_arm64.cc b/compiler/utils/arm64/jni_macro_assembler_arm64.cc
index 573bb6d..a5aa1c1 100644
--- a/compiler/utils/arm64/jni_macro_assembler_arm64.cc
+++ b/compiler/utils/arm64/jni_macro_assembler_arm64.cc
@@ -16,7 +16,6 @@
#include "jni_macro_assembler_arm64.h"
-#include "base/logging.h"
#include "entrypoints/quick/quick_entrypoints.h"
#include "managed_register_arm64.h"
#include "offsets.h"
diff --git a/compiler/utils/arm64/jni_macro_assembler_arm64.h b/compiler/utils/arm64/jni_macro_assembler_arm64.h
index ce39a13..f531b2a 100644
--- a/compiler/utils/arm64/jni_macro_assembler_arm64.h
+++ b/compiler/utils/arm64/jni_macro_assembler_arm64.h
@@ -21,10 +21,12 @@
#include <memory>
#include <vector>
+#include <android-base/logging.h>
+
#include "assembler_arm64.h"
#include "base/arena_containers.h"
#include "base/enums.h"
-#include "base/logging.h"
+#include "base/macros.h"
#include "offsets.h"
#include "utils/assembler.h"
#include "utils/jni_macro_assembler.h"
diff --git a/compiler/utils/arm64/managed_register_arm64.h b/compiler/utils/arm64/managed_register_arm64.h
index 7378a0a..9ce7ec9 100644
--- a/compiler/utils/arm64/managed_register_arm64.h
+++ b/compiler/utils/arm64/managed_register_arm64.h
@@ -17,8 +17,9 @@
#ifndef ART_COMPILER_UTILS_ARM64_MANAGED_REGISTER_ARM64_H_
#define ART_COMPILER_UTILS_ARM64_MANAGED_REGISTER_ARM64_H_
+#include <android-base/logging.h>
+
#include "arch/arm64/registers_arm64.h"
-#include "base/logging.h"
#include "debug/dwarf/register.h"
#include "utils/managed_register.h"
diff --git a/compiler/utils/assembler.h b/compiler/utils/assembler.h
index e0cef85..5b0cd6b 100644
--- a/compiler/utils/assembler.h
+++ b/compiler/utils/assembler.h
@@ -19,6 +19,8 @@
#include <vector>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
#include "arch/instruction_set_features.h"
#include "arm/constants_arm.h"
@@ -26,7 +28,6 @@
#include "base/arena_object.h"
#include "base/array_ref.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "debug/dwarf/debug_frame_opcode_writer.h"
#include "label.h"
diff --git a/compiler/utils/intrusive_forward_list.h b/compiler/utils/intrusive_forward_list.h
index 5a358ac..ccdd32a 100644
--- a/compiler/utils/intrusive_forward_list.h
+++ b/compiler/utils/intrusive_forward_list.h
@@ -23,8 +23,9 @@
#include <memory>
#include <type_traits>
+#include <android-base/logging.h>
+
#include "base/casts.h"
-#include "base/logging.h"
#include "base/macros.h"
namespace art {
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h
index 0fc1353..f5df926 100644
--- a/compiler/utils/jni_macro_assembler.h
+++ b/compiler/utils/jni_macro_assembler.h
@@ -19,12 +19,13 @@
#include <vector>
+#include <android-base/logging.h>
+
#include "arch/instruction_set.h"
#include "base/arena_allocator.h"
#include "base/arena_object.h"
#include "base/array_ref.h"
#include "base/enums.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "managed_register.h"
#include "offsets.h"
diff --git a/compiler/utils/label.h b/compiler/utils/label.h
index b9d4e9c..3c91b2f 100644
--- a/compiler/utils/label.h
+++ b/compiler/utils/label.h
@@ -17,8 +17,8 @@
#ifndef ART_COMPILER_UTILS_LABEL_H_
#define ART_COMPILER_UTILS_LABEL_H_
-#include "base/logging.h"
-#include "base/macros.h"
+#include <android-base/logging.h>
+#include <android-base/macros.h>
namespace art {
diff --git a/compiler/utils/mips/constants_mips.h b/compiler/utils/mips/constants_mips.h
index b4dfdbd..016c0db 100644
--- a/compiler/utils/mips/constants_mips.h
+++ b/compiler/utils/mips/constants_mips.h
@@ -19,8 +19,9 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "arch/mips/registers_mips.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "globals.h"
diff --git a/compiler/utils/mips64/constants_mips64.h b/compiler/utils/mips64/constants_mips64.h
index bc8e40b..310f23c 100644
--- a/compiler/utils/mips64/constants_mips64.h
+++ b/compiler/utils/mips64/constants_mips64.h
@@ -19,8 +19,9 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "arch/mips64/registers_mips64.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "globals.h"
diff --git a/compiler/utils/swap_space.cc b/compiler/utils/swap_space.cc
index 12d113d..1f9ad42 100644
--- a/compiler/utils/swap_space.cc
+++ b/compiler/utils/swap_space.cc
@@ -22,7 +22,6 @@
#include <numeric>
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "base/mutex.h"
#include "thread-current-inl.h"
diff --git a/compiler/utils/swap_space.h b/compiler/utils/swap_space.h
index 2280f8b..76df527 100644
--- a/compiler/utils/swap_space.h
+++ b/compiler/utils/swap_space.h
@@ -24,7 +24,8 @@
#include <set>
#include <vector>
-#include "base/logging.h"
+#include <android-base/logging.h>
+
#include "base/macros.h"
#include "base/mutex.h"
diff --git a/compiler/utils/test_dex_file_builder.h b/compiler/utils/test_dex_file_builder.h
index 0da30fe..441ef8e 100644
--- a/compiler/utils/test_dex_file_builder.h
+++ b/compiler/utils/test_dex_file_builder.h
@@ -24,8 +24,9 @@
#include <set>
#include <vector>
+#include <android-base/logging.h>
+
#include "base/bit_utils.h"
-#include "base/logging.h"
#include "dex_file_loader.h"
#include "standard_dex_file.h"
diff --git a/compiler/utils/x86/constants_x86.h b/compiler/utils/x86/constants_x86.h
index 0bc1560..2e03b9f 100644
--- a/compiler/utils/x86/constants_x86.h
+++ b/compiler/utils/x86/constants_x86.h
@@ -19,8 +19,9 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "arch/x86/registers_x86.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "globals.h"
diff --git a/compiler/utils/x86_64/constants_x86_64.h b/compiler/utils/x86_64/constants_x86_64.h
index cc508a1..2af3e7b 100644
--- a/compiler/utils/x86_64/constants_x86_64.h
+++ b/compiler/utils/x86_64/constants_x86_64.h
@@ -19,8 +19,9 @@
#include <iosfwd>
+#include <android-base/logging.h>
+
#include "arch/x86_64/registers_x86_64.h"
-#include "base/logging.h"
#include "base/macros.h"
#include "globals.h"