diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/dex/dex_to_dex_compiler.cc | 4 | ||||
| -rw-r--r-- | compiler/driver/dex_compilation_unit.cc | 1 | ||||
| -rw-r--r-- | compiler/elf_writer_test.cc | 1 | ||||
| -rw-r--r-- | compiler/image_test.cc | 5 | ||||
| -rw-r--r-- | compiler/jit/jit_compiler.cc | 4 | ||||
| -rw-r--r-- | compiler/oat_test.cc | 4 | ||||
| -rw-r--r-- | compiler/optimizing/graph_checker.cc | 5 | ||||
| -rw-r--r-- | compiler/optimizing/graph_test.cc | 1 | ||||
| -rw-r--r-- | compiler/optimizing/linearize_test.cc | 1 | ||||
| -rw-r--r-- | compiler/optimizing/pretty_printer.h | 5 | ||||
| -rw-r--r-- | compiler/optimizing/pretty_printer_test.cc | 1 | ||||
| -rw-r--r-- | compiler/optimizing/ssa_test.cc | 5 | ||||
| -rw-r--r-- | compiler/utils/arm/assembler_thumb2_test.cc | 5 | ||||
| -rw-r--r-- | compiler/utils/dedupe_set-inl.h | 17 |
14 files changed, 37 insertions, 22 deletions
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc index cf69f469a0..d4f6545c59 100644 --- a/compiler/dex/dex_to_dex_compiler.cc +++ b/compiler/dex/dex_to_dex_compiler.cc @@ -16,6 +16,8 @@ #include "dex_to_dex_compiler.h" +#include "android-base/stringprintf.h" + #include "art_field-inl.h" #include "art_method-inl.h" #include "base/logging.h" @@ -32,6 +34,8 @@ namespace art { namespace optimizer { +using android::base::StringPrintf; + // Controls quickening activation. const bool kEnableQuickening = true; // Control check-cast elision. diff --git a/compiler/driver/dex_compilation_unit.cc b/compiler/driver/dex_compilation_unit.cc index 64fd9e7f0f..47b19297e5 100644 --- a/compiler/driver/dex_compilation_unit.cc +++ b/compiler/driver/dex_compilation_unit.cc @@ -16,7 +16,6 @@ #include "dex_compilation_unit.h" -#include "base/stringprintf.h" #include "mirror/dex_cache.h" #include "utils.h" diff --git a/compiler/elf_writer_test.cc b/compiler/elf_writer_test.cc index 6f48779258..9669c4a9d3 100644 --- a/compiler/elf_writer_test.cc +++ b/compiler/elf_writer_test.cc @@ -16,7 +16,6 @@ #include "elf_file.h" -#include "base/stringprintf.h" #include "base/unix_file/fd_file.h" #include "common_compiler_test.h" #include "elf_file.h" diff --git a/compiler/image_test.cc b/compiler/image_test.cc index 9bbe595fa9..1290379569 100644 --- a/compiler/image_test.cc +++ b/compiler/image_test.cc @@ -20,6 +20,8 @@ #include <string> #include <vector> +#include "android-base/stringprintf.h" + #include "base/unix_file/fd_file.h" #include "class_linker-inl.h" #include "common_compiler_test.h" @@ -134,7 +136,8 @@ void CompilationHelper::Compile(CompilerDriver* driver, // Create a generic tmp file, to be the base of the .art and .oat temporary files. ScratchFile location; for (int i = 0; i < static_cast<int>(class_path.size()); ++i) { - std::string cur_location(StringPrintf("%s-%d.art", location.GetFilename().c_str(), i)); + std::string cur_location = + android::base::StringPrintf("%s-%d.art", location.GetFilename().c_str(), i); image_locations.push_back(ScratchFile(cur_location)); } } diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc index 9dfb434b10..148ce4f9ee 100644 --- a/compiler/jit/jit_compiler.cc +++ b/compiler/jit/jit_compiler.cc @@ -16,6 +16,8 @@ #include "jit_compiler.h" +#include "android-base/stringprintf.h" + #include "arch/instruction_set.h" #include "arch/instruction_set_features.h" #include "art_method-inl.h" @@ -81,7 +83,7 @@ NO_RETURN static void Usage(const char* fmt, ...) { va_list ap; va_start(ap, fmt); std::string error; - StringAppendV(&error, fmt, ap); + android::base::StringAppendV(&error, fmt, ap); LOG(FATAL) << error; va_end(ap); exit(EXIT_FAILURE); diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index 0a778b0954..edc93ab0c4 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -14,6 +14,8 @@ * limitations under the License. */ +#include "android-base/stringprintf.h" + #include "arch/instruction_set_features.h" #include "art_method-inl.h" #include "base/enums.h" @@ -48,7 +50,7 @@ NO_RETURN static void Usage(const char* fmt, ...) { va_list ap; va_start(ap, fmt); std::string error; - StringAppendV(&error, fmt, ap); + android::base::StringAppendV(&error, fmt, ap); LOG(FATAL) << error; va_end(ap); UNREACHABLE(); diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index 188ee3a8d1..34b52a87b5 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -20,12 +20,15 @@ #include <string> #include <sstream> +#include "android-base/stringprintf.h" + #include "base/arena_containers.h" #include "base/bit_vector-inl.h" -#include "base/stringprintf.h" namespace art { +using android::base::StringPrintf; + static bool IsAllowedToJumpToExitBlock(HInstruction* instruction) { return instruction->IsThrow() || instruction->IsReturn() || instruction->IsReturnVoid(); } diff --git a/compiler/optimizing/graph_test.cc b/compiler/optimizing/graph_test.cc index d5305646a8..28ee3a5e8b 100644 --- a/compiler/optimizing/graph_test.cc +++ b/compiler/optimizing/graph_test.cc @@ -15,7 +15,6 @@ */ #include "base/arena_allocator.h" -#include "base/stringprintf.h" #include "builder.h" #include "nodes.h" #include "optimizing_unit_test.h" diff --git a/compiler/optimizing/linearize_test.cc b/compiler/optimizing/linearize_test.cc index 13e14c53b5..3831aa6c91 100644 --- a/compiler/optimizing/linearize_test.cc +++ b/compiler/optimizing/linearize_test.cc @@ -18,7 +18,6 @@ #include "arch/x86/instruction_set_features_x86.h" #include "base/arena_allocator.h" -#include "base/stringprintf.h" #include "builder.h" #include "code_generator.h" #include "code_generator_x86.h" diff --git a/compiler/optimizing/pretty_printer.h b/compiler/optimizing/pretty_printer.h index 5891350894..c6579dc5e0 100644 --- a/compiler/optimizing/pretty_printer.h +++ b/compiler/optimizing/pretty_printer.h @@ -17,7 +17,8 @@ #ifndef ART_COMPILER_OPTIMIZING_PRETTY_PRINTER_H_ #define ART_COMPILER_OPTIMIZING_PRETTY_PRINTER_H_ -#include "base/stringprintf.h" +#include "android-base/stringprintf.h" + #include "nodes.h" namespace art { @@ -108,7 +109,7 @@ class StringPrettyPrinter : public HPrettyPrinter { : HPrettyPrinter(graph), str_(""), current_block_(nullptr) { } void PrintInt(int value) OVERRIDE { - str_ += StringPrintf("%d", value); + str_ += android::base::StringPrintf("%d", value); } void PrintString(const char* value) OVERRIDE { diff --git a/compiler/optimizing/pretty_printer_test.cc b/compiler/optimizing/pretty_printer_test.cc index 951cdfbd8b..1af94f3445 100644 --- a/compiler/optimizing/pretty_printer_test.cc +++ b/compiler/optimizing/pretty_printer_test.cc @@ -15,7 +15,6 @@ */ #include "base/arena_allocator.h" -#include "base/stringprintf.h" #include "builder.h" #include "dex_file.h" #include "dex_instruction.h" diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index 429763423c..f69f417efc 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -14,8 +14,9 @@ * limitations under the License. */ +#include "android-base/stringprintf.h" + #include "base/arena_allocator.h" -#include "base/stringprintf.h" #include "builder.h" #include "dex_file.h" #include "dex_instruction.h" @@ -35,7 +36,7 @@ class SsaPrettyPrinter : public HPrettyPrinter { explicit SsaPrettyPrinter(HGraph* graph) : HPrettyPrinter(graph), str_("") {} void PrintInt(int value) OVERRIDE { - str_ += StringPrintf("%d", value); + str_ += android::base::StringPrintf("%d", value); } void PrintString(const char* value) OVERRIDE { diff --git a/compiler/utils/arm/assembler_thumb2_test.cc b/compiler/utils/arm/assembler_thumb2_test.cc index 30e8f4e604..0147a76744 100644 --- a/compiler/utils/arm/assembler_thumb2_test.cc +++ b/compiler/utils/arm/assembler_thumb2_test.cc @@ -16,12 +16,15 @@ #include "assembler_thumb2.h" +#include "android-base/stringprintf.h" + #include "base/stl_util.h" -#include "base/stringprintf.h" #include "utils/assembler_test.h" namespace art { +using android::base::StringPrintf; + class AssemblerThumb2Test : public AssemblerTest<arm::Thumb2Assembler, arm::Register, arm::SRegister, uint32_t> { diff --git a/compiler/utils/dedupe_set-inl.h b/compiler/utils/dedupe_set-inl.h index ac5481336b..c06e9cadcc 100644 --- a/compiler/utils/dedupe_set-inl.h +++ b/compiler/utils/dedupe_set-inl.h @@ -23,10 +23,11 @@ #include <inttypes.h> #include <unordered_map> +#include "android-base/stringprintf.h" + #include "base/mutex.h" #include "base/hash_set.h" #include "base/stl_util.h" -#include "base/stringprintf.h" #include "base/time_utils.h" namespace art { @@ -238,13 +239,13 @@ std::string DedupeSet<InKey, StoreKey, Alloc, HashType, HashFunc, kShard>::DumpS for (HashType shard = 0; shard < kShard; ++shard) { shards_[shard]->UpdateStats(self, &stats); } - return StringPrintf("%zu collisions, %zu max hash collisions, " - "%zu/%zu probe distance, %" PRIu64 " ns hash time", - stats.collision_sum, - stats.collision_max, - stats.total_probe_distance, - stats.total_size, - hash_time_); + return android::base::StringPrintf("%zu collisions, %zu max hash collisions, " + "%zu/%zu probe distance, %" PRIu64 " ns hash time", + stats.collision_sum, + stats.collision_max, + stats.total_probe_distance, + stats.total_size, + hash_time_); } |