/art/compiler/utils/ |
D | assembler_test_base.h | 40 static std::string tmpnam_; 45 AssemblerTestInfrastructure(std::string architecture, in AssemblerTestInfrastructure() 46 std::string as, in AssemblerTestInfrastructure() 47 std::string as_params, in AssemblerTestInfrastructure() 48 std::string objdump, in AssemblerTestInfrastructure() 49 std::string objdump_params, in AssemblerTestInfrastructure() 50 std::string disasm, in AssemblerTestInfrastructure() 51 std::string disasm_params, in AssemblerTestInfrastructure() 73 std::string asm_tool = FindTool(assembler_cmd_name_); in CheckTools() 82 std::string objdump_tool = FindTool(objdump_cmd_name_); in CheckTools() [all …]
|
D | assembler_test.h | 55 typedef std::string (*TestFn)(AssemblerTest* assembler_test, Ass* assembler); 57 void DriverFn(TestFn f, const std::string& test_name) { in DriverFn() 62 void DriverStr(const std::string& assembly_string, const std::string& test_name) { in DriverStr() 66 std::string RepeatR(void (Ass::*f)(Reg), const std::string& fmt) { in RepeatR() 73 std::string Repeatr(void (Ass::*f)(Reg), const std::string& fmt) { in Repeatr() 80 std::string RepeatRR(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRR() 89 std::string RepeatRRNoDupes(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRRNoDupes() 98 std::string Repeatrr(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatrr() 107 std::string RepeatRRR(void (Ass::*f)(Reg, Reg, Reg), const std::string& fmt) { in RepeatRRR() 118 std::string Repeatrb(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatrb() [all …]
|
/art/runtime/base/ |
D | transform_array_ref_test.cc | 42 std::vector<ValueHolder> input({ 7, 6, 4, 0 }); in TEST() 43 std::vector<int> output; in TEST() 48 static_assert(std::is_same<int, decltype(taref)::value_type>::value, "value_type"); in TEST() 49 static_assert(std::is_same<TarefIter, decltype(taref)::pointer>::value, "pointer"); in TEST() 50 static_assert(std::is_same<int, decltype(taref)::reference>::value, "reference"); in TEST() 51 static_assert(std::is_same<ConstTarefIter, decltype(taref)::const_pointer>::value, in TEST() 53 static_assert(std::is_same<int, decltype(taref)::const_reference>::value, "const_reference"); in TEST() 55 std::copy(taref.begin(), taref.end(), std::back_inserter(output)); in TEST() 56 ASSERT_EQ(std::vector<int>({ 8, 7, 5, 1 }), output); in TEST() 59 std::copy(taref.cbegin(), taref.cend(), std::back_inserter(output)); in TEST() [all …]
|
D | transform_iterator_test.cc | 45 std::vector<ValueHolder> input({ 1, 7, 3, 8 }); in TEST() 46 std::vector<int> output; in TEST() 49 static_assert(std::is_same<std::random_access_iterator_tag, in TEST() 51 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST() 52 static_assert(std::is_same<vector_titer, vector_titer::pointer>::value, "pointer"); in TEST() 53 static_assert(std::is_same<int, vector_titer::reference>::value, "reference"); in TEST() 56 static_assert(std::is_same<std::random_access_iterator_tag, in TEST() 58 static_assert(std::is_same<int, vector_ctiter::value_type>::value, "value_type"); in TEST() 59 static_assert(std::is_same<vector_ctiter, vector_ctiter::pointer>::value, "pointer"); in TEST() 60 static_assert(std::is_same<int, vector_ctiter::reference>::value, "reference"); in TEST() [all …]
|
D | hash_set_test.cc | 32 void MakeEmpty(std::string& item) const { in MakeEmpty() 35 bool IsEmpty(const std::string& item) const { in IsEmpty() 44 std::string RandomString(size_t len) { in RandomString() 45 std::ostringstream oss; in RandomString() 67 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 68 const std::string test_string = "hello world 1234"; in TEST_F() 83 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 85 std::vector<std::string> strings; in TEST_F() 115 HashSet<std::string, IsEmptyFnString> hash_set; in TEST_F() 118 std::vector<std::string> strings; in TEST_F() [all …]
|
/art/tools/cpp-define-generator/ |
D | main.cc | 28 std::string to_upper(std::string input) { in to_upper() 29 std::transform(input.begin(), input.end(), input.begin(), ::toupper); in to_upper() 34 typename std::enable_if<!std::is_signed<T>::value, std::string>::type 37 std::stringstream ss; in pretty_format() 38 ss << std::showbase << std::hex << value; in pretty_format() 43 typename std::enable_if<std::is_signed<T>::value, std::string>::type 46 std::stringstream ss; in pretty_format() 62 void cpp_define(const std::string& name, T value) { in cpp_define() 63 std::cout << "#define " << name << " " << pretty_format(value) << std::endl; in cpp_define() 67 void emit_check_eq(T value, const std::string& expr) { in emit_check_eq() [all …]
|
/art/dexlayout/ |
D | dexlayout_test.cc | 225 std::unique_ptr<uint8_t[]> bytes(DecodeBase64(base64, &length)); in WriteBase64ToFile() 234 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); in WriteFileBase64() 249 bool FullPlainOutputExec(std::string* error_msg) { in FullPlainOutputExec() 252 const std::string& dexdump_filename = dexdump_output.GetFilename(); in FullPlainOutputExec() 253 std::string dexdump = GetTestAndroidRoot() + "/bin/dexdump2"; in FullPlainOutputExec() 257 const std::string& dexlayout_filename = dexlayout_output.GetFilename(); in FullPlainOutputExec() 258 std::string dexlayout = GetTestAndroidRoot() + "/bin/dexlayout"; in FullPlainOutputExec() 261 for (const std::string &dex_file : GetLibCoreDexFileNames()) { in FullPlainOutputExec() 262 std::vector<std::string> dexdump_exec_argv = in FullPlainOutputExec() 264 std::vector<std::string> dexlayout_exec_argv = in FullPlainOutputExec() [all …]
|
D | dex_verify.h | 31 std::string* error_msg); 33 template<class T> bool VerifyIds(std::vector<std::unique_ptr<T>>& orig, 34 std::vector<std::unique_ptr<T>>& output, 36 std::string* error_msg); 37 bool VerifyId(dex_ir::StringId* orig, dex_ir::StringId* output, std::string* error_msg); 38 bool VerifyId(dex_ir::TypeId* orig, dex_ir::TypeId* output, std::string* error_msg); 39 bool VerifyId(dex_ir::ProtoId* orig, dex_ir::ProtoId* output, std::string* error_msg); 40 bool VerifyId(dex_ir::FieldId* orig, dex_ir::FieldId* output, std::string* error_msg); 41 bool VerifyId(dex_ir::MethodId* orig, dex_ir::MethodId* output, std::string* error_msg); 43 bool VerifyClassDefs(std::vector<std::unique_ptr<dex_ir::ClassDef>>& orig, [all …]
|
D | dexdiag.cc | 48 static_cast<int>(std::numeric_limits<uint32_t>::digits10); 54 std::string name; 58 static const std::map<uint16_t, DexSectionInfo> kDexSectionInfoMap = { 95 std::map<uint16_t, size_t> map_; 105 std::cout << StringPrintf("%-*s %*s %*s %% of %% of", in PrintHeader() 113 << std::endl; in PrintHeader() 114 std::cout << StringPrintf("%-*s %*s %*s sect. total", in PrintHeader() 121 << std::endl; in PrintHeader() 130 std::cout << StringPrintf("%-*s %*zd %*zd %6.2f %6.2f", in PrintOne() 139 << std::endl; in PrintOne() [all …]
|
/art/compiler/utils/arm/ |
D | assembler_arm_test.h | 42 virtual void FillImmediates(std::vector<Imm>& immediates, int64_t imm_min, int64_t imm_max) { in FillImmediates() 66 std::string RepeatRRIIC(void (Ass::*f)(Reg, Reg, Imm, Imm, Cond), in RepeatRRIIC() 69 std::string fmt) { in RepeatRRIIC() 78 std::string RepeatTemplatedRRIIC(void (Ass::*f)(Reg1, Reg2, Imm, Imm, Cond), in RepeatTemplatedRRIIC() 79 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRRIIC() 80 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRRIIC() 81 std::string (AssemblerArmTest::*GetName1)(const Reg1&), in RepeatTemplatedRRIIC() 82 std::string (AssemblerArmTest::*GetName2)(const Reg2&), in RepeatTemplatedRRIIC() 85 std::string fmt) { in RepeatTemplatedRRIIC() 86 std::vector<Imm> immediates1; in RepeatTemplatedRRIIC() [all …]
|
/art/runtime/ |
D | oat_file_assistant.h | 147 bool Lock(std::string* error_msg); 182 ResultOfAttemptToUpdate MakeUpToDate(bool profile_changed, std::string* error_msg); 190 std::unique_ptr<OatFile> GetBestOatFile(); 194 std::string GetStatusDump(); 197 static std::unique_ptr<gc::space::ImageSpace> OpenImageSpace(const OatFile* oat_file); 207 static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles( 243 static bool Dex2Oat(const std::vector<std::string>& args, std::string* error_msg); 251 static bool DexLocationToOdexFilename(const std::string& location, 253 std::string* odex_filename, 254 std::string* error_msg); [all …]
|
D | common_runtime_test.h | 45 typedef std::vector<std::pair<std::string, const void*>> RuntimeOptions; 53 explicit ScratchFile(const std::string& filename); 65 const std::string& GetFilename() const { in GetFilename() 79 std::string filename_; 80 std::unique_ptr<File> file_; 91 static void SetUpAndroidData(std::string& android_data); 93 static void TearDownAndroidData(const std::string& android_data, bool fail_on_error); 96 static std::vector<std::string> GetLibCoreDexFileNames(); 99 static std::string GetAndroidHostToolsDir(); 102 static std::string GetAndroidTargetToolsDir(InstructionSet isa); [all …]
|
D | dex2oat_environment_test.h | 61 odex_dir_ = odex_oat_dir_ + "/" + std::string(GetInstructionSetString(kRuntimeISA)); in SetUp() 65 std::vector<uint32_t> checksums; in SetUp() 66 std::string error_msg; in SetUp() 81 std::vector<std::unique_ptr<const DexFile>> multi1; in SetUp() 86 std::vector<std::unique_ptr<const DexFile>> multi2; in SetUp() 99 options->push_back(std::make_pair("-Ximage:" + GetImageLocation(), in SetUpRuntimeOptions() 119 static void Copy(const std::string& src, const std::string& dst) { in Copy() 120 std::ifstream src_stream(src, std::ios::binary); in Copy() 121 std::ofstream dst_stream(dst, std::ios::binary); in Copy() 130 std::string GetImageDirectory() const { in GetImageDirectory() [all …]
|
D | utils.h | 46 if (std::numeric_limits<T>::max() < result) { in ParseUint() 60 if (result < std::numeric_limits<T>::min() || std::numeric_limits<T>::max() < result) { in ParseInt() 73 std::string PrintableChar(uint16_t ch); 77 std::string PrintableString(const char* utf8); 84 std::string PrettyDescriptor(const char* descriptor); 85 std::string PrettyDescriptor(Primitive::Type type); 88 std::string PrettyArguments(const char* signature); 89 std::string PrettyReturnType(const char* signature); 93 std::string PrettyJavaAccessFlags(uint32_t access_flags); 96 std::string PrettySize(int64_t size_in_bytes); [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/runtime/gc/space/ |
D | image_space.h | 44 static bool LoadBootImage(const std::string& image_file_name, 46 std::vector<space::ImageSpace*>* boot_image_spaces, 51 static std::unique_ptr<ImageSpace> CreateFromAppImage(const char* image, 53 std::string* error_msg) 61 std::string* error_msg); 68 std::unique_ptr<const OatFile> ReleaseOatFile(); 79 const std::string GetImageFilename() const { in GetImageFilename() 85 const std::string GetImageLocation() const { in GetImageLocation() 99 void Dump(std::ostream& os) const; 117 std::string* system_location, [all …]
|
/art/dex2oat/ |
D | dex2oat_test.cc | 54 int GenerateOdexForTestWithStatus(const std::string& dex_location, in GenerateOdexForTestWithStatus() 55 const std::string& odex_location, in GenerateOdexForTestWithStatus() 57 std::string* error_msg, in GenerateOdexForTestWithStatus() 58 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTestWithStatus() 60 std::unique_ptr<File> oat_file; 61 std::vector<std::string> args; 66 args.push_back("--oat-fd=" + std::to_string(oat_file->Fd())); 84 void GenerateOdexForTest(const std::string& dex_location, in GenerateOdexForTest() 85 const std::string& odex_location, in GenerateOdexForTest() 87 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTest() [all …]
|
/art/runtime/arch/ |
D | instruction_set_features.h | 40 static std::unique_ptr<const InstructionSetFeatures> FromVariant(InstructionSet isa, 41 const std::string& variant, 42 std::string* error_msg); 45 static std::unique_ptr<const InstructionSetFeatures> FromBitmap(InstructionSet isa, 49 static std::unique_ptr<const InstructionSetFeatures> FromCppDefines(); 52 static std::unique_ptr<const InstructionSetFeatures> FromCpuInfo(); 56 static std::unique_ptr<const InstructionSetFeatures> FromHwcap(); 60 static std::unique_ptr<const InstructionSetFeatures> FromAssembly(); 64 std::unique_ptr<const InstructionSetFeatures> AddFeaturesFromString( 65 const std::string& feature_list, std::string* error_msg) const WARN_UNUSED; [all …]
|
/art/compiler/ |
D | cfi_test.h | 40 const std::vector<uint8_t>& actual_asm, in GenerateExpected() 41 const std::vector<uint8_t>& actual_cfi) { in GenerateExpected() 42 std::vector<std::string> lines; in GenerateExpected() 55 std::vector<uintptr_t> debug_frame_patches; in GenerateExpected() 69 std::unique_ptr<Disassembler> disasm(Disassembler::Create(isa, opts)); in GenerateExpected() 70 std::stringstream stream; in GenerateExpected() 75 std::stable_sort(lines.begin(), lines.end(), CompareByAddress); in GenerateExpected() 76 for (const std::string& line : lines) { in GenerateExpected() 84 static size_t FindEndOf(const std::string& str, const char* substr) { in FindEndOf() 86 CHECK_NE(std::string::npos, pos); in FindEndOf() [all …]
|
/art/imgdiag/ |
D | imgdiag_test.cc | 54 std::vector<gc::space::ImageSpace*> image_spaces = in SetUp() 63 options->push_back(std::make_pair(runtime_args_image_, nullptr)); in SetUpRuntimeOptions() 67 std::string GetImgDiagFilePath() { in GetImgDiagFilePath() 68 std::string root = GetTestAndroidRoot(); in GetImgDiagFilePath() 77 std::string root32 = root + "32"; in GetImgDiagFilePath() 88 bool Exec(pid_t image_diff_pid, const std::string& boot_image, std::string* error_msg) { in Exec() 92 std::string file_path = GetImgDiagFilePath(); in Exec() 96 std::string diff_pid_args; in Exec() 97 std::string zygote_diff_pid_args; in Exec() 99 std::stringstream diff_pid_args_ss; in Exec() [all …]
|
/art/profman/ |
D | profman.cc | 52 static std::string CommandLine() { in CommandLine() 53 std::vector<std::string> command; in CommandLine() 67 std::string error; in UsageErrorV() 144 static const std::string kMethodSep = "->"; 145 static const std::string kMissingTypesMarker = "missing_types"; 146 static const std::string kInvalidClassDescriptor = "invalid_class"; 147 static const std::string kInvalidMethod = "invalid_method"; 148 static const std::string kClassAllMethods = "*"; 277 void OpenApkFilesFromLocations(std::vector<std::unique_ptr<const DexFile>>* dex_files) { in OpenApkFilesFromLocations() 292 std::string error_msg; in OpenApkFilesFromLocations() [all …]
|
/art/cmdline/ |
D | token_range.h | 39 using TokenList = std::vector<std::string>; 78 : token_list_(new TokenList(std::forward<TokenList>(token_list))), in TokenRange() 84 TokenRange(std::shared_ptr<TokenList> token_list, in TokenRange() 101 explicit TokenRange(std::shared_ptr<TokenList> token_list) in TokenRange() 116 static TokenRange Split(const std::string& string, std::initializer_list<char> separators) { in Split() 119 std::string tok; in Split() 130 new_token_list.push_back(std::string() + sep); in Split() 142 return TokenRange(std::move(new_token_list)); in Split() 157 return std::distance(begin_, end_); in Size() 166 const std::string& GetToken(size_t offset) const { in GetToken() [all …]
|
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 …]
|
/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 …]
|
/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 …]
|