Skip to content

Commit

Permalink
ART: Replace base/logging with android-base/logging
Browse files Browse the repository at this point in the history
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
  • Loading branch information
agampe committed Dec 8, 2017
1 parent d515362 commit 5794381
Show file tree
Hide file tree
Showing 235 changed files with 471 additions and 286 deletions.
4 changes: 3 additions & 1 deletion compiler/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion compiler/debug/dwarf/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions compiler/dex/dex_to_dex_compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/dex/verification_results.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/dex/verified_method.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/driver/compiled_method_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion compiler/jni/quick/arm/calling_convention_arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion compiler/jni/quick/arm64/calling_convention_arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion compiler/jni/quick/calling_convention.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion compiler/jni/quick/jni_compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/jni/quick/mips/calling_convention_mips.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion compiler/jni/quick/mips64/calling_convention_mips64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion compiler/jni/quick/x86/calling_convention_x86.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion compiler/jni/quick/x86_64/calling_convention_x86_64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 3 additions & 1 deletion compiler/linker/error_delaying_output_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion compiler/linker/linker_patch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion compiler/linker/output_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion compiler/linker/vector_output_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "vector_output_stream.h"

#include "base/logging.h"
#include <android-base/logging.h>

namespace art {
namespace linker {
Expand Down
1 change: 1 addition & 0 deletions compiler/optimizing/block_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "block_builder.h"

#include "base/logging.h" // FOR VLOG.
#include "bytecode_utils.h"
#include "quicken_info.h"

Expand Down
5 changes: 3 additions & 2 deletions compiler/optimizing/code_generator_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
3 changes: 2 additions & 1 deletion compiler/optimizing/data_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

#include <iosfwd>

#include "base/logging.h"
#include <android-base/logging.h>

#include "base/bit_utils.h"

namespace art {
Expand Down
1 change: 1 addition & 0 deletions compiler/optimizing/optimizing_compiler_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <type_traits>

#include "atomic.h"
#include "base/logging.h" // For VLOG_IS_ON.
#include "globals.h"

namespace art {
Expand Down
4 changes: 3 additions & 1 deletion compiler/utils/arm/assembler_arm_vixl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/arm/constants_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion compiler/utils/arm/jni_macro_assembler_arm_vixl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/arm/managed_register_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion compiler/utils/arm64/assembler_arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion compiler/utils/arm64/assembler_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion compiler/utils/arm64/jni_macro_assembler_arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion compiler/utils/arm64/jni_macro_assembler_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/arm64/managed_register_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@

#include <vector>

#include <android-base/logging.h>

#include "arch/instruction_set.h"
#include "arch/instruction_set_features.h"
#include "arm/constants_arm.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 "debug/dwarf/debug_frame_opcode_writer.h"
#include "label.h"
Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/intrusive_forward_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/jni_macro_assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions compiler/utils/label.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
3 changes: 2 additions & 1 deletion compiler/utils/mips/constants_mips.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Loading

0 comments on commit 5794381

Please sign in to comment.