/art/compiler/utils/ |
D | assembler_test_base.h | 37 static std::string tmpnam_; 42 AssemblerTestInfrastructure(std::string architecture, in AssemblerTestInfrastructure() 43 std::string as, in AssemblerTestInfrastructure() 44 std::string as_params, in AssemblerTestInfrastructure() 45 std::string objdump, in AssemblerTestInfrastructure() 46 std::string objdump_params, in AssemblerTestInfrastructure() 47 std::string disasm, in AssemblerTestInfrastructure() 48 std::string disasm_params, in AssemblerTestInfrastructure() 81 std::string disassembler = GetDisassembleCommand(); in CheckTools() 97 void Driver(const std::vector<uint8_t>& data, std::string assembly_text, std::string test_name) { in Driver() [all …]
|
D | assembler_test.h | 52 typedef std::string (*TestFn)(AssemblerTest* assembler_test, Ass* assembler); 54 void DriverFn(TestFn f, std::string test_name) { in DriverFn() 59 void DriverStr(std::string assembly_string, std::string test_name) { in DriverStr() 63 std::string RepeatR(void (Ass::*f)(Reg), std::string fmt) { in RepeatR() 70 std::string Repeatr(void (Ass::*f)(Reg), std::string fmt) { in Repeatr() 77 std::string RepeatRR(void (Ass::*f)(Reg, Reg), std::string fmt) { in RepeatRR() 86 std::string Repeatrr(void (Ass::*f)(Reg, Reg), std::string fmt) { in Repeatrr() 95 std::string Repeatrb(void (Ass::*f)(Reg, Reg), std::string fmt) { in Repeatrb() 104 std::string RepeatRr(void (Ass::*f)(Reg, Reg), std::string fmt) { in RepeatRr() 113 std::string RepeatRI(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, std::string fmt) { in RepeatRI() [all …]
|
/art/compiler/utils/arm/ |
D | assembler_arm_test.h | 36 virtual void FillImmediates(std::vector<Imm>& immediates, int64_t imm_min, int64_t imm_max) { in FillImmediates() 60 std::string RepeatRRIIC(void (Ass::*f)(Reg, Reg, Imm, Imm, Cond), in RepeatRRIIC() 63 std::string fmt) { in RepeatRRIIC() 72 std::string RepeatTemplatedRRIIC(void (Ass::*f)(Reg1, Reg2, Imm, Imm, Cond), in RepeatTemplatedRRIIC() 73 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRRIIC() 74 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRRIIC() 75 std::string (AssemblerArmTest::*GetName1)(const Reg1&), in RepeatTemplatedRRIIC() 76 std::string (AssemblerArmTest::*GetName2)(const Reg2&), in RepeatTemplatedRRIIC() 79 std::string fmt) { in RepeatTemplatedRRIIC() 80 std::vector<Imm> immediates1; in RepeatTemplatedRRIIC() [all …]
|
/art/runtime/ |
D | common_runtime_test.h | 37 typedef std::vector<std::pair<std::string, const void*>> RuntimeOptions; 49 const std::string& GetFilename() const { in GetFilename() 63 std::string filename_; 64 std::unique_ptr<File> file_; 73 static void SetUpAndroidData(std::string& android_data); 75 static void TearDownAndroidData(const std::string& android_data, bool fail_on_error); 81 static std::string GetLibCoreDexFileName(); 84 static std::string GetAndroidHostToolsDir(); 87 static std::string GetAndroidTargetToolsDir(InstructionSet isa); 95 static std::string GetCoreArtLocation(); [all …]
|
D | utils.h | 53 if (std::numeric_limits<T>::max() < result) { in ParseUint() 67 if (result < std::numeric_limits<T>::min() || std::numeric_limits<T>::max() < result) { in ParseInt() 96 std::string PrintableChar(uint16_t ch); 100 std::string PrintableString(const char* utf8); 103 bool StartsWith(const std::string& s, const char* prefix); 106 bool EndsWith(const std::string& s, const char* suffix); 113 std::string PrettyDescriptor(mirror::String* descriptor) 115 std::string PrettyDescriptor(const char* descriptor); 116 std::string PrettyDescriptor(mirror::Class* klass) 118 std::string PrettyDescriptor(Primitive::Type type); [all …]
|
D | oat_file_test.cc | 32 EXPECT_EQ(std::string("/data/app/foo/base.apk"), in TEST_F() 36 EXPECT_EQ(std::string("/system/framework/base.apk"), in TEST_F() 40 EXPECT_EQ(std::string("/data/app/foo/base.apk"), in TEST_F() 44 EXPECT_EQ(std::string("/data/app/foo/base.apk"), in TEST_F() 48 EXPECT_EQ(std::string("/data/app/foo/base.apk:classes2.dex"), in TEST_F() 52 EXPECT_EQ(std::string("/data/app/foo/base.apk:classes11.dex"), in TEST_F() 56 EXPECT_EQ(std::string("base.apk"), in TEST_F() 60 EXPECT_EQ(std::string("o/base.apk"), in TEST_F() 65 static std::vector<const DexFile*> ToConstDexFiles( in ToConstDexFiles() 66 const std::vector<std::unique_ptr<const DexFile>>& in) { in ToConstDexFiles() [all …]
|
D | oat_file_assistant.h | 144 bool Lock(std::string* error_msg); 156 bool MakeUpToDate(std::string* error_msg); 164 std::unique_ptr<OatFile> GetBestOatFile(); 174 static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles( 194 const std::string* OdexFileName(); 210 const std::string* OatFileName(); 254 bool RelocateOatFile(const std::string* input_file, std::string* error_msg); 264 bool GenerateOatFile(std::string* error_msg); 276 static bool Dex2Oat(const std::vector<std::string>& args, std::string* error_msg); 283 static bool DexFilenameToOdexFilename(const std::string& location, [all …]
|
D | oat_file.h | 48 static OatFile* OpenWithElfFile(ElfFile* elf_file, const std::string& location, 50 std::string* error_msg); 55 static OatFile* Open(const std::string& filename, 56 const std::string& location, 61 std::string* error_msg); 68 static OatFile* OpenWritable(File* file, const std::string& location, 70 std::string* error_msg); 72 static OatFile* OpenReadable(File* file, const std::string& location, 74 std::string* error_msg); 93 const std::string& GetLocation() const { in GetLocation() [all …]
|
D | oat_file_assistant_test.cc | 55 odex_dir_ = odex_oat_dir_ + "/" + std::string(GetInstructionSetString(kRuntimeISA)); in SetUp() 61 std::string error_msg; in SetUp() 75 std::vector<std::unique_ptr<const DexFile>> multi1; in SetUp() 80 std::vector<std::unique_ptr<const DexFile>> multi2; in SetUp() 93 options->push_back(std::make_pair("-Ximage:" + GetImageLocation(), in SetUpRuntimeOptions() 121 void Copy(std::string src, std::string dst) { in Copy() 122 std::ifstream src_stream(src, std::ios::binary); in Copy() 123 std::ofstream dst_stream(dst, std::ios::binary); in Copy() 132 std::string GetImageDirectory() { in GetImageDirectory() 136 return std::string(host_dir) + "/framework"; in GetImageDirectory() [all …]
|
D | oat_file_assistant.cc | 79 cached_oat_file_name_ = std::string(oat_location); in OatFileAssistant() 113 if (boot_class_path[i]->GetLocation() == std::string(dex_location_)) { in IsInBootClassPath() 121 bool OatFileAssistant::Lock(std::string* error_msg) { in Lock() 129 std::string lock_file_name = *OatFileName() + ".flock"; in Lock() 157 bool OatFileAssistant::MakeUpToDate(std::string* error_msg) { in MakeUpToDate() 167 std::unique_ptr<OatFile> OatFileAssistant::GetBestOatFile() { in GetBestOatFile() 170 return std::move(cached_oat_file_); in GetBestOatFile() 175 return std::move(cached_odex_file_); in GetBestOatFile() 187 return std::move(cached_oat_file_); in GetBestOatFile() 196 return std::move(cached_odex_file_); in GetBestOatFile() [all …]
|
D | atomic.h | 158 std::atomic_thread_fence(std::memory_order_acquire); in ThreadFenceAcquire() 162 std::atomic_thread_fence(std::memory_order_release); in ThreadFenceRelease() 169 std::atomic_thread_fence(std::memory_order_release); in ThreadFenceForConstructor() 174 std::atomic_thread_fence(std::memory_order_seq_cst); in ThreadFenceSequentiallyConsistent() 185 static std::vector<Mutex*>* gSwapMutexes; 191 class PACKED(sizeof(T)) Atomic : public std::atomic<T> { in PACKED() 193 Atomic<T>() : std::atomic<T>(0) { } in PACKED() 195 explicit Atomic<T>(T value) : std::atomic<T>(value) { } in PACKED() 199 return this->load(std::memory_order_relaxed); in PACKED() 207 return this->load(std::memory_order_relaxed); in PACKED() [all …]
|
D | utils.cc | 71 std::string GetThreadName(pid_t tid) { in GetThreadName() 72 std::string result; in GetThreadName() 134 bool ReadFileToString(const std::string& file_name, std::string* result) { in ReadFileToString() 140 std::vector<char> buf(8 * KB); in ReadFileToString() 153 bool PrintFileToLog(const std::string& file_name, LogSeverity level) { in PrintFileToLog() 206 std::string PrettyDescriptor(mirror::String* java_descriptor) { in PrettyDescriptor() 213 std::string PrettyDescriptor(mirror::Class* klass) { in PrettyDescriptor() 217 std::string temp; in PrettyDescriptor() 221 std::string PrettyDescriptor(const char* descriptor) { in PrettyDescriptor() 254 std::string result; in PrettyDescriptor() [all …]
|
/art/runtime/interpreter/ |
D | safe_math_test.cc | 28 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max(), 1), in TEST() 29 std::numeric_limits<int32_t>::min()); in TEST() 30 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max(), 1), in TEST() 31 std::numeric_limits<int64_t>::min()); in TEST() 34 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max() - 1, 1), in TEST() 35 std::numeric_limits<int32_t>::max()); in TEST() 36 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max() - 1, 1), in TEST() 37 std::numeric_limits<int64_t>::max()); in TEST() 39 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::min() + 1, -1), in TEST() 40 std::numeric_limits<int32_t>::min()); in TEST() [all …]
|
/art/compiler/ |
D | cfi_test.h | 38 const std::vector<uint8_t>& actual_asm, in GenerateExpected() 39 const std::vector<uint8_t>& actual_cfi) { in GenerateExpected() 40 std::vector<std::string> lines; in GenerateExpected() 53 std::vector<uintptr_t> debug_frame_patches; in GenerateExpected() 59 std::unique_ptr<Disassembler> disasm(Disassembler::Create(isa, opts)); in GenerateExpected() 60 std::stringstream stream; in GenerateExpected() 65 std::stable_sort(lines.begin(), lines.end(), CompareByAddress); in GenerateExpected() 66 for (const std::string& line : lines) { in GenerateExpected() 74 static size_t FindEndOf(const std::string& str, const char* substr) { in FindEndOf() 76 CHECK_NE(std::string::npos, pos); in FindEndOf() [all …]
|
/art/cmdline/ |
D | cmdline_parser.h | 89 return std::move(*variant_map_); in ReleaseMap() 109 std::shared_ptr<TVariantMap> variant_map_; 134 ArgumentBuilder<TArg>& WithValues(std::initializer_list<TArg> value_list) { in WithValues() 151 std::initializer_list<std::pair<const char*, TArg>> key_value_list) { in WithValueMap() 180 << detail::ToStringAny(value) << "'" << std::endl; in IntoKey() 186 << std::endl; in IntoKey() 205 CMDLINE_DEBUG_LOG << "Ignored value '" << detail::ToStringAny(value) << "'" << std::endl; in IntoIgnore() 219 void SetValuesInternal(const std::vector<TArg>&& value_list) { in SetValuesInternal() 226 void SetNames(std::vector<const char*>&& names) { in SetNames() 230 void SetNames(std::initializer_list<const char*> names) { in SetNames() [all …]
|
D | token_range.h | 37 using TokenList = std::vector<std::string>; 76 : token_list_(new TokenList(std::forward<TokenList>(token_list))), in TokenRange() 82 TokenRange(std::shared_ptr<TokenList> token_list, in TokenRange() 99 explicit TokenRange(std::shared_ptr<TokenList> token_list) in TokenRange() 114 static TokenRange Split(const std::string& string, std::initializer_list<char> separators) { in Split() 117 std::string tok; in Split() 128 new_token_list.push_back(std::string() + sep); in Split() 140 return TokenRange(std::move(new_token_list)); in Split() 155 return std::distance(begin_, end_); in Size() 164 const std::string& GetToken(size_t offset) const { in GetToken() [all …]
|
D | cmdline_types.h | 50 Result Parse(const std::string& args) { 77 Result Parse(const std::string& options) { 86 const std::string s; 88 std::vector<std::string> pairs; 93 for (const std::string& jdwp_option : pairs) { 94 std::string::size_type equals_pos = jdwp_option.find('='); 95 if (equals_pos == std::string::npos) { 116 return Result::Success(std::move(jdwp_options)); 119 Result ParseJdwpOption(const std::string& name, const std::string& value, 147 std::string port_string; [all …]
|
/art/cmdline/detail/ |
D | cmdline_parser_detail.h | 28 typename std::remove_reference<T>::type& FakeReference(); 33 template <typename T2, typename TStream2 = std::ostream> 37 static std::true_type InsertionOperatorTest(TStream& os, const T& value, 38 … std::remove_reference<decltype(os << value)>* = 0); // NOLINT [whitespace/operators] [3] 41 static std::false_type InsertionOperatorTest(TStream& os, const T& ... args); 45 decltype(InsertionOperatorTest(FakeReference<TStream2>(), std::declval<T2>()))::value; 55 static std::true_type EqualityOperatorTest(const TL& left, const TR& right, 56 … std::remove_reference<decltype(left == right)>* = 0); // NOLINT [whitespace/operators] [3] 59 static std::false_type EqualityOperatorTest(const TL& left, const T& ... args); 63 decltype(EqualityOperatorTest(std::declval<TLeft>(), std::declval<TRight>()))::value; [all …]
|
D | cmdline_parse_argument_detail.h | 63 virtual std::pair<size_t, size_t> GetNumTokens() const = 0; 81 using EnableIfNumeric = std::enable_if<std::is_arithmetic<T>::value>; 84 using DisableIfNumeric = std::enable_if<!std::is_arithmetic<T>::value>; 121 std::pair<const TokenRange*, size_t> FindClosestMatch(TokenRange token_list) const { in FindClosestMatch() 126 size_t this_match = token_range.MaybeMatches(token_list, std::string("_")); in FindClosestMatch() 134 return std::make_pair(best_match_ptr, best_match); in FindClosestMatch() 153 std::string s(name); in CompleteArgument() 155 size_t local_blank_count = std::count(s.begin(), s.end(), '_'); in CompleteArgument() 156 size_t local_token_count = std::count(s.begin(), s.end(), ' '); in CompleteArgument() 213 std::accumulate(tokenized_names_.begin(), tokenized_names_.end(), ~(0u), in CompleteArgument() [all …]
|
/art/runtime/jdwp/ |
D | jdwp_constants.h | 90 std::ostream& operator<<(std::ostream& os, const JdwpError& value); 102 std::ostream& operator<<(std::ostream& os, const JdwpClassStatus& value); 132 std::ostream& operator<<(std::ostream& os, const JdwpEventKind& value); 151 std::ostream& operator<<(std::ostream& os, const JdwpModKind& value); 160 std::ostream& operator<<(std::ostream& os, const JdwpInvokeOptions& value); 170 std::ostream& operator<<(std::ostream& os, const JdwpStepDepth& value); 179 std::ostream& operator<<(std::ostream& os, const JdwpStepSize& value); 189 std::ostream& operator<<(std::ostream& os, const JdwpSuspendPolicy& value); 198 std::ostream& operator<<(std::ostream& os, const JdwpSuspendStatus& value); 210 std::ostream& operator<<(std::ostream& os, const JdwpThreadStatus& value); [all …]
|
/art/compiler/dex/ |
D | compiler_enums.h | 31 std::ostream& operator<<(std::ostream& os, const RegisterClass& rhs); 41 std::ostream& operator<<(std::ostream& os, const BitsUsed& rhs); 80 std::ostream& operator<<(std::ostream& os, const SpecialTargetRegister& code); 88 std::ostream& operator<<(std::ostream& os, const RegLocationType& rhs); 98 std::ostream& operator<<(std::ostream& os, const BBType& code); 121 std::ostream& operator<<(std::ostream& os, const LIRPseudoOpcode& rhs); 372 std::ostream& operator<<(std::ostream& os, const BlockListType& rhs); 378 std::ostream& operator<<(std::ostream& os, const AssemblerStatus& rhs); 392 std::ostream& operator<<(std::ostream& os, const OpSize& kind); 433 std::ostream& operator<<(std::ostream& os, const OpKind& rhs); [all …]
|
D | pass_manager.h | 49 void SetDisablePassList(const std::string& list) { in SetDisablePassList() 52 const std::string& GetDisablePassList() const { in GetDisablePassList() 56 void SetPrintPassList(const std::string& list) { in SetPrintPassList() 59 const std::string& GetPrintPassList() const { in GetPrintPassList() 63 void SetDumpPassList(const std::string& list) { in SetDumpPassList() 66 const std::string& GetDumpPassList() const { in GetDumpPassList() 77 void SetOverriddenPassOptions(const std::string& list) { in SetOverriddenPassOptions() 80 const std::string& GetOverriddenPassOptions() const { in GetOverriddenPassOptions() 96 std::string print_pass_list_; 99 std::string dump_pass_list_; [all …]
|
/art/runtime/base/ |
D | hash_set_test.cc | 30 void MakeEmpty(std::string& item) const { in MakeEmpty() 33 bool IsEmpty(const std::string& item) const { in IsEmpty() 42 std::string RandomString(size_t len) { in RandomString() 43 std::ostringstream oss; in RandomString() 65 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 66 const std::string test_string = "hello world 1234"; in TEST_F() 81 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 83 std::vector<std::string> strings; in TEST_F() 113 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 116 std::vector<std::string> strings; in TEST_F() [all …]
|
/art/oatdump/ |
D | oatdump_test.cc | 45 std::string GetOatDumpFilePath() { in GetOatDumpFilePath() 46 std::string root = GetTestAndroidRoot(); in GetOatDumpFilePath() 61 bool Exec(Mode mode, const std::vector<std::string>& args, std::string* error_msg) { in Exec() 62 std::string file_path = GetOatDumpFilePath(); in Exec() 66 std::vector<std::string> exec_argv = { file_path }; in Exec() 83 std::string core_art_location_; 84 std::string core_oat_location_; 88 std::string error_msg; in TEST_F() 93 std::string error_msg; in TEST_F() 98 std::string error_msg; in TEST_F() [all …]
|
/art/imgdiag/ |
D | imgdiag_test.cc | 53 options->push_back(std::make_pair(runtime_args_image_, nullptr)); in SetUpRuntimeOptions() 57 std::string GetImgDiagFilePath() { in GetImgDiagFilePath() 58 std::string root = GetTestAndroidRoot(); in GetImgDiagFilePath() 67 std::string root32 = root + "32"; in GetImgDiagFilePath() 78 bool Exec(pid_t image_diff_pid, const std::string& boot_image, std::string* error_msg) { in Exec() 82 std::string file_path = GetImgDiagFilePath(); in Exec() 86 std::string diff_pid_args; in Exec() 88 std::stringstream diff_pid_args_ss; in Exec() 92 std::string boot_image_args; in Exec() 97 std::vector<std::string> exec_argv = { file_path, diff_pid_args, boot_image_args }; in Exec() [all …]
|