/art/libdexfile/dex/ |
D | art_dex_file_loader.h | 51 std::vector<uint32_t>* checksums, 52 std::string* error_msg, 57 std::unique_ptr<const DexFile> Open( 60 const std::string& location, 65 std::string* error_msg, 66 std::unique_ptr<DexFileContainer> container = nullptr) const override; 69 std::unique_ptr<const DexFile> Open(const std::string& location, 74 std::string* error_msg) const; 78 const std::string& location, 81 std::string* error_msg, [all …]
|
D | dex_file_loader.h | 65 static std::string GetMultiDexClassesDexName(size_t index); 69 static std::string GetMultiDexLocation(size_t index, const char* dex_location); 84 static std::string GetDexCanonicalLocation(const char* dex_location); 89 static std::string GetBaseLocation(const char* location) { in GetBaseLocation() 91 return (pos == nullptr) ? location : std::string(location, pos - location); in GetBaseLocation() 94 static std::string GetBaseLocation(const std::string& location) { in GetBaseLocation() 101 static std::string GetMultiDexSuffix(const std::string& location) { in GetMultiDexSuffix() 103 return (pos == std::string::npos) ? std::string() : location.substr(pos); in GetMultiDexSuffix() 118 std::vector<uint32_t>* checksums, 119 std::string* error_msg, [all …]
|
D | dex_file_loader_test.cc | 34 static inline std::vector<uint8_t> DecodeBase64Vec(const char* src) { in DecodeBase64Vec() 35 std::vector<uint8_t> res; in DecodeBase64Vec() 37 std::unique_ptr<uint8_t[]> data(DecodeBase64(src, &size)); in DecodeBase64Vec() 202 static void DecodeDexFile(const char* base64, std::vector<uint8_t>* dex_bytes) { in DecodeDexFile() 211 std::vector<uint8_t>* dex_bytes, in OpenDexFilesBase64() 212 std::vector<std::unique_ptr<const DexFile>>* dex_files, in OpenDexFilesBase64() 214 std::string* error_msg) { in OpenDexFilesBase64() 219 std::vector<std::unique_ptr<const DexFile>> tmp; in OpenDexFilesBase64() 232 static std::unique_ptr<const DexFile> OpenDexFileBase64(const char* base64, in OpenDexFileBase64() 234 std::vector<uint8_t>* dex_bytes) { in OpenDexFileBase64() [all …]
|
/art/libartbase/base/ |
D | file_utils.h | 30 bool ReadFileToString(const std::string& file_name, std::string* result); 33 std::string GetAndroidRoot(); 35 std::string GetAndroidRootSafe(/*out*/ std::string* error_msg); 38 std::string GetAndroidRuntimeRoot(); 40 std::string GetAndroidRuntimeRootSafe(/*out*/ std::string* error_msg); 43 std::string GetAndroidData(); 45 std::string GetAndroidDataSafe(/*out*/ std::string* error_msg); 49 std::string GetDefaultBootImageLocation(std::string* error_msg); 52 std::string GetDefaultBootImageLocation(const std::string& android_root); 56 std::string GetDalvikCache(const char* subdir); [all …]
|
D | common_art_test.h | 64 explicit ScratchFile(const std::string& filename); 76 const std::string& GetFilename() const { in GetFilename() 90 std::string filename_; 91 std::unique_ptr<File> file_; 106 static void SetUpAndroidDataDir(std::string& android_data); 108 static void TearDownAndroidDataDir(const std::string& android_data, bool fail_on_error); 111 virtual std::vector<std::string> GetLibCoreModuleNames() const; 114 std::vector<std::string> GetLibCoreDexFileNames(const std::vector<std::string>& modules) const; 117 std::vector<std::string> GetLibCoreDexFileNames() const; 120 std::vector<std::string> GetLibCoreDexLocations(const std::vector<std::string>& modules) const; [all …]
|
D | transform_array_ref_test.cc | 41 std::vector<ValueHolder> input({ 7, 6, 4, 0 }); in TEST() 42 std::vector<int> output; in TEST() 47 static_assert(std::is_same<int, decltype(taref)::value_type>::value, "value_type"); in TEST() 48 static_assert(std::is_same<TarefIter, decltype(taref)::pointer>::value, "pointer"); in TEST() 49 static_assert(std::is_same<int, decltype(taref)::reference>::value, "reference"); in TEST() 50 static_assert(std::is_same<ConstTarefIter, decltype(taref)::const_pointer>::value, in TEST() 52 static_assert(std::is_same<int, decltype(taref)::const_reference>::value, "const_reference"); in TEST() 54 std::copy(taref.begin(), taref.end(), std::back_inserter(output)); in TEST() 55 ASSERT_EQ(std::vector<int>({ 8, 7, 5, 1 }), output); in TEST() 58 std::copy(taref.cbegin(), taref.cend(), std::back_inserter(output)); in TEST() [all …]
|
D | common_art_test.cc | 64 ScratchFile::ScratchFile(const std::string& filename) : filename_(filename) { in ScratchFile() 77 *this = std::move(other); in ScratchFile() 82 std::swap(filename_, other.filename_); in operator =() 83 std::swap(file_, other.file_); in operator =() 129 std::string android_host_out = android_build_top_from_env; in SetUpAndroidRootEnvVars() 156 std::string android_runtime_root = android_host_out_from_env; in SetUpAndroidRootEnvVars() 167 std::string android_tzdata_root = android_host_out_from_env; in SetUpAndroidRootEnvVars() 176 void CommonArtTestImpl::SetUpAndroidDataDir(std::string& android_data) { in SetUpAndroidDataDir() 204 void CommonArtTestImpl::TearDownAndroidDataDir(const std::string& android_data, in TearDownAndroidDataDir() 215 std::string CommonArtTestImpl::GetAndroidToolsDir(const std::string& subdir1, in GetAndroidToolsDir() [all …]
|
D | transform_iterator_test.cc | 44 std::vector<ValueHolder> input({ 1, 7, 3, 8 }); in TEST() 45 std::vector<int> output; in TEST() 48 static_assert(std::is_same<std::random_access_iterator_tag, in TEST() 50 static_assert(std::is_same<int, vector_titer::value_type>::value, "value_type"); in TEST() 51 static_assert(std::is_same<vector_titer, vector_titer::pointer>::value, "pointer"); in TEST() 52 static_assert(std::is_same<int, vector_titer::reference>::value, "reference"); in TEST() 55 static_assert(std::is_same<std::random_access_iterator_tag, in TEST() 57 static_assert(std::is_same<int, vector_ctiter::value_type>::value, "value_type"); in TEST() 58 static_assert(std::is_same<vector_ctiter, vector_ctiter::pointer>::value, "pointer"); in TEST() 59 static_assert(std::is_same<int, vector_ctiter::reference>::value, "reference"); in TEST() [all …]
|
/art/compiler/utils/ |
D | assembler_test_base.h | 40 static std::string tmpnam_; // NOLINT [runtime/string] [4] 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 | 62 typedef std::string (*TestFn)(AssemblerTest* assembler_test, Ass* assembler); 64 void DriverFn(TestFn f, const std::string& test_name) { in DriverFn() 69 void DriverStr(const std::string& assembly_string, const std::string& test_name) { in DriverStr() 77 std::string RepeatR(void (Ass::*f)(Reg), const std::string& fmt) { in RepeatR() 84 std::string Repeatr(void (Ass::*f)(Reg), const std::string& fmt) { in Repeatr() 91 std::string RepeatRR(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRR() 100 std::string RepeatRRNoDupes(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRRNoDupes() 109 std::string Repeatrr(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatrr() 118 std::string Repeatww(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatww() 127 std::string Repeatbb(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatbb() [all …]
|
/art/runtime/gc/space/ |
D | image_space.h | 48 const std::vector<std::string>& boot_class_path, 49 const std::vector<std::string>& boot_class_path_locations, 50 const std::string& image_location, 57 /*out*/std::vector<std::unique_ptr<space::ImageSpace>>* boot_image_spaces, 61 static std::unique_ptr<ImageSpace> CreateFromAppImage(const char* image, 63 std::string* error_msg) 69 static std::unique_ptr<ImageHeader> ReadImageHeader(const char* image_location, 72 std::string* error_msg); 79 std::unique_ptr<const OatFile> ReleaseOatFile(); 90 const std::string GetImageFilename() const { in GetImageFilename() [all …]
|
/art/runtime/ |
D | class_loader_context.h | 78 const std::string& classpath_dir, 79 const std::vector<int>& context_fds = std::vector<int>()); 83 bool RemoveLocationsFromClassPaths(const dchecked_vector<std::string>& compilation_sources); 105 jobject CreateClassLoader(const std::vector<const DexFile*>& compilation_sources) const; 115 std::string EncodeContextForOatFile(const std::string& base_dir, 122 std::string EncodeContextForDex2oat(const std::string& base_dir) const; 126 std::vector<const DexFile*> FlattenOpenedDexFiles() const; 130 std::string FlattenDexPaths() const; 140 VerificationResult VerifyClassLoaderContextMatch(const std::string& context_spec, 155 static std::unique_ptr<ClassLoaderContext> Create(const std::string& spec); [all …]
|
D | oat_file_assistant.h | 150 const std::vector<int>& context_fds = std::vector<int>()); 162 std::unique_ptr<OatFile> GetBestOatFile(); 166 std::string GetStatusDump(); 177 static void GetOptimizationStatus(const std::string& filename, 179 std::string* out_compilation_filter, 180 std::string* out_compilation_reason); 183 static std::unique_ptr<gc::space::ImageSpace> OpenImageSpace(const OatFile* oat_file); 193 static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles( 200 const std::string& dex_location, 201 std::vector<std::unique_ptr<const DexFile>>* out_dex_files); [all …]
|
D | oat_file_manager.h | 55 const OatFile* RegisterOatFile(std::unique_ptr<const OatFile> oat_file) 62 const OatFile* FindOpenedOatFileFromOatLocation(const std::string& oat_location) const 67 const OatFile* FindOpenedOatFileFromDexLocation(const std::string& dex_base_location) const 71 std::vector<const OatFile*> GetBootOatFiles() const; 78 std::vector<const OatFile*> RegisterImageOatFiles( 79 const std::vector<gc::space::ImageSpace*>& spaces) 96 std::vector<std::unique_ptr<const DexFile>> OpenDexFilesFromOat( 101 /*out*/ std::vector<std::string>* error_msgs) 113 std::vector<std::unique_ptr<const DexFile>> OpenDexFilesFromOat( 114 std::vector<MemMap>&& dex_mem_maps, [all …]
|
D | dex2oat_environment_test.h | 66 odex_dir_ = odex_oat_dir_ + "/" + std::string(GetInstructionSetString(kRuntimeISA)); in SetUp() 70 std::vector<uint32_t> checksums; in SetUp() 71 std::string error_msg; in SetUp() 87 std::vector<std::unique_ptr<const DexFile>> multi1; in SetUp() 96 std::vector<std::unique_ptr<const DexFile>> multi2; in SetUp() 113 options->push_back(std::make_pair("-Ximage:" + GetImageLocation(), in SetUpRuntimeOptions() 133 static void Copy(const std::string& src, const std::string& dst) { in Copy() 134 std::ifstream src_stream(src, std::ios::binary); in Copy() 135 std::ofstream dst_stream(dst, std::ios::binary); in Copy() 144 std::string GetImageDirectory() const { in GetImageDirectory() [all …]
|
/art/tools/veridex/ |
D | hidden_api_finder.h | 42 void Run(const std::vector<std::unique_ptr<VeridexResolver>>& app_resolvers); 44 void Dump(std::ostream& os, HiddenApiStats* stats, bool dump_reflection); 50 void DumpReferences(std::ostream& os, const std::vector<MethodReference>& references); 53 std::set<std::string> classes_; 54 std::set<std::string> strings_; 55 std::map<std::string, std::vector<MethodReference>> reflection_locations_; 56 std::map<std::string, std::vector<MethodReference>> method_locations_; 57 std::map<std::string, std::vector<MethodReference>> field_locations_;
|
/art/dexlayout/ |
D | dexlayout_test.cc | 227 static std::vector<std::string> DefaultCompactDexOption() { in DefaultCompactDexOption() 229 std::vector<std::string>{"-x", "fast"} : std::vector<std::string>{"-x", "none"}; in DefaultCompactDexOption() 236 std::unique_ptr<uint8_t[]> bytes(DecodeBase64(base64, &length)); in WriteBase64ToFile() 245 std::unique_ptr<File> file(OS::CreateEmptyFile(location)); in WriteFileBase64() 255 std::string GetDexLayoutPath() { in GetDexLayoutPath() 260 bool FullPlainOutputExec(std::string* error_msg) { in FullPlainOutputExec() 263 const std::string& dexdump_filename = dexdump_output.GetFilename(); in FullPlainOutputExec() 264 std::string dexdump = GetTestAndroidRoot() + "/bin/dexdump2"; in FullPlainOutputExec() 268 const std::string& dexlayout_filename = dexlayout_output.GetFilename(); in FullPlainOutputExec() 270 for (const std::string& dex_file : GetLibCoreDexFileNames()) { in FullPlainOutputExec() [all …]
|
D | dexdiag.cc | 56 static_cast<int>(std::numeric_limits<uint32_t>::digits10); 62 std::string name; 66 static const std::map<uint16_t, DexSectionInfo> kDexSectionInfoMap = { 105 std::map<uint16_t, size_t> map_; 115 std::cout << StringPrintf("%-*s %*s %*s %% of %% of", in PrintHeader() 123 << std::endl; in PrintHeader() 124 std::cout << StringPrintf("%-*s %*s %*s sect. total", in PrintHeader() 131 << std::endl; in PrintHeader() 140 std::cout << StringPrintf("%-*s %*zd %*zd %6.2f %6.2f", in PrintOne() 149 << std::endl; in PrintOne() [all …]
|
D | dexdiag_test.cc | 42 std::string GetDexDiagFilePath() { in GetDexDiagFilePath() 43 std::string root = GetTestAndroidRoot(); in GetDexDiagFilePath() 48 std::string root32 = root + "32"; in GetDexDiagFilePath() 58 std::unique_ptr<OatFile> OpenOatAndVdexFiles() { in OpenOatAndVdexFiles() 65 const std::string default_location = GetCoreOatLocation(); in OpenOatAndVdexFiles() 67 std::string oat_location = GetSystemImageFilename(default_location.c_str(), kRuntimeISA); in OpenOatAndVdexFiles() 69 std::cout << "==" << oat_location << std::endl; in OpenOatAndVdexFiles() 70 std::string error_msg; in OpenOatAndVdexFiles() 71 std::unique_ptr<OatFile> oat(OatFile::Open(/*zip_fd=*/ -1, in OpenOatAndVdexFiles() 84 bool Exec(pid_t this_pid, const std::vector<std::string>& args, std::string* error_msg) { in Exec() [all …]
|
/art/runtime/ti/ |
D | agent.h | 41 explicit AgentSpec(const std::string& arg); 43 const std::string& GetName() const { in GetName() 47 const std::string& GetArgs() const { in GetArgs() 55 std::unique_ptr<Agent> Load(/*out*/jint* call_res, 57 /*out*/std::string* error_msg); 60 std::unique_ptr<Agent> Attach(JNIEnv* env, 64 /*out*/std::string* error_msg); 67 std::unique_ptr<Agent> DoDlOpen(JNIEnv* env, 70 /*out*/std::string* error_msg); 72 std::unique_ptr<Agent> DoLoadHelper(JNIEnv* env, [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/arch/ |
D | instruction_set_features_test.cc | 43 std::unique_ptr<const InstructionSetFeatures> instruction_set_features( 47 std::string key = StringPrintf("dalvik.vm.isa.%s.variant", GetInstructionSetString(kRuntimeISA)); 48 std::string dex2oat_isa_variant = android::base::GetProperty(key, ""); 52 std::string error_msg; 53 std::unique_ptr<const InstructionSetFeatures> property_features( 70 std::unique_ptr<const InstructionSetFeatures> instruction_set_features( 74 std::string variant_key = StringPrintf("dalvik.vm.isa.%s.variant", 76 std::string dex2oat_isa_variant = android::base::GetProperty(variant_key, ""); 79 std::string features_key = StringPrintf("dalvik.vm.isa.%s.features", 81 std::string dex2oat_isa_features = android::base::GetProperty(features_key, ""); [all …]
|
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(); 63 static std::unique_ptr<const InstructionSetFeatures> FromRuntimeDetection(); 66 static std::unique_ptr<const InstructionSetFeatures> FromCpuInfo(); 70 static std::unique_ptr<const InstructionSetFeatures> FromHwcap(); 74 static std::unique_ptr<const InstructionSetFeatures> FromAssembly(); 78 std::unique_ptr<const InstructionSetFeatures> AddFeaturesFromString( [all …]
|
/art/tools/hiddenapi/ |
D | hiddenapi_test.cc | 33 std::string GetHiddenApiCmd() { in GetHiddenApiCmd() 34 std::string file_path = GetTestAndroidRoot(); in GetHiddenApiCmd() 46 std::unique_ptr<const DexFile> RunHiddenapiEncode(const ScratchFile& flags_csv, in RunHiddenapiEncode() 47 const std::vector<std::string>& extra_args, in RunHiddenapiEncode() 49 std::string error; in RunHiddenapiEncode() 51 std::unique_ptr<ZipArchive> jar( in RunHiddenapiEncode() 57 std::unique_ptr<ZipEntry> jar_classes_dex(jar->Find("classes.dex", &error)); in RunHiddenapiEncode() 68 std::vector<std::string> argv_str; in RunHiddenapiEncode() 86 std::string error; in RunHiddenapiList() 87 std::string boot_jar = GetTestDexFileName("HiddenApi"); in RunHiddenapiList() [all …]
|
/art/dex2oat/ |
D | dex2oat_test.cc | 72 int GenerateOdexForTestWithStatus(const std::vector<std::string>& dex_locations, in GenerateOdexForTestWithStatus() 73 const std::string& odex_location, in GenerateOdexForTestWithStatus() 75 std::string* error_msg, in GenerateOdexForTestWithStatus() 76 const std::vector<std::string>& extra_args = {}, in GenerateOdexForTestWithStatus() 78 std::unique_ptr<File> oat_file; 79 std::vector<std::string> args; 81 for (const std::string& dex_location : dex_locations) { 87 args.push_back("--oat-fd=" + std::to_string(oat_file->Fd())); 110 const std::string& dex_location, in GenerateOdexForTest() 111 const std::string& odex_location, in GenerateOdexForTest() [all …]
|