Home
last modified time | relevance | path

Searched refs:c_str (Results 1 – 25 of 135) sorted by relevance

123456

/art/runtime/gc/space/
Dimage_space.cc84 if (!OS::DirectoryExists(cache_dir_path.c_str())) { in RealPruneDexCache()
87 DIR* cache_dir = opendir(cache_dir_path.c_str()); in RealPruneDexCache()
109 if (TEMP_FAILURE_RETRY(unlink(cache_file.c_str())) != 0) { in RealPruneDexCache()
165 arg_vector.push_back(compiler_options[i].c_str()); in GenerateImage()
186 if (OS::FileExists(system_image_filename.c_str())) { in FindImageFilename()
204 if (!GetDalvikCacheFilename(image_location, dalvik_cache.c_str(), cache_filename, &error_msg)) { in FindImageFilename()
208 *has_cache = OS::FileExists(cache_filename->c_str()); in FindImageFilename()
306 if (!ReadSpecificImageHeader(system_filename.c_str(), sys_hdr.get())) { in ReadImageHeader()
308 image_location, system_filename.c_str()); in ReadImageHeader()
311 if (!ReadSpecificImageHeader(cache_filename.c_str(), cache_hdr.get())) { in ReadImageHeader()
[all …]
/art/runtime/native/
Djava_lang_VMClassLoader.cc31 if (name.c_str() == NULL) { in VMClassLoader_findLoadedClass()
35 std::string descriptor(DotToDescriptor(name.c_str())); in VMClassLoader_findLoadedClass()
36 mirror::Class* c = cl->LookupClass(descriptor.c_str(), loader); in VMClassLoader_findLoadedClass()
43 c = cl->FindClassInPathClassLoader(soa, soa.Self(), descriptor.c_str(), hs.NewHandle(loader)); in VMClassLoader_findLoadedClass()
72 if (name.c_str() == nullptr) { in VMClassLoader_getBootClassPathResource()
86 std::unique_ptr<ZipArchive> zip_archive(ZipArchive::Open(location.c_str(), &error_msg)); in VMClassLoader_getBootClassPathResource()
91 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(name.c_str(), &error_msg)); in VMClassLoader_getBootClassPathResource()
97 StringAppendF(&url, "jar:file://%s!/%s", location.c_str(), name.c_str()); in VMClassLoader_getBootClassPathResource()
98 return env->NewStringUTF(url.c_str()); in VMClassLoader_getBootClassPathResource()
Ddalvik_system_DexFile.cc78 const char* c_str() const { in c_str() function in art::NullableScopedUtfChars
103 if (sourceName.c_str() == NULL) { in DexFile_openDexFileNative()
115 bool success = linker->OpenDexFilesFromOat(sourceName.c_str(), outputName.c_str(), &error_msgs, in DexFile_openDexFileNative()
133 ThrowWrappedIOException("%s", it->c_str()); in DexFile_openDexFileNative()
177 if (class_name.c_str() == NULL) { in DexFile_defineClassNative()
181 const std::string descriptor(DotToDescriptor(class_name.c_str())); in DexFile_defineClassNative()
184 const DexFile::ClassDef* dex_class_def = dex_file->FindClassDef(descriptor.c_str()); in DexFile_defineClassNative()
192 mirror::Class* result = class_linker->DefineClass(descriptor.c_str(), class_loader, *dex_file, in DexFile_defineClassNative()
236 ScopedLocalRef<jstring> jdescriptor(env, env->NewStringUTF(descriptor.c_str())); in DexFile_getClassNameList()
417 int e1 = stat(profile_file.c_str(), &profstat); in CopyProfileFile()
[all …]
Djava_lang_Runtime.cc48 if (filename.c_str() == NULL) { in Runtime_nativeLoad()
54 if (ldLibraryPath.c_str() == NULL) { in Runtime_nativeLoad()
61 (*android_update_LD_LIBRARY_PATH)(ldLibraryPath.c_str()); in Runtime_nativeLoad()
74 bool success = vm->LoadNativeLibrary(filename.c_str(), classLoader, &detail); in Runtime_nativeLoad()
82 return env->NewStringUTF(detail.c_str()); in Runtime_nativeLoad()
Djava_lang_Class.cc48 if (name.c_str() == nullptr) { in Class_classForName()
55 if (!IsValidBinaryClassName(name.c_str())) { in Class_classForName()
58 "Invalid name: %s", name.c_str()); in Class_classForName()
62 std::string descriptor(DotToDescriptor(name.c_str())); in Class_classForName()
67 hs.NewHandle(class_linker->FindClass(soa.Self(), descriptor.c_str(), class_loader))); in Class_classForName()
/art/runtime/
Dcommon_runtime_test.cc68 int fd = open(filename_.c_str(), O_RDWR | O_CREAT, 0666); in ScratchFile()
88 if (!OS::FileExists(filename_.c_str())) { in Unlink()
91 int unlink_result = unlink(filename_.c_str()); in Unlink()
128 setenv("ANDROID_ROOT", root.c_str(), 1); in SetUpAndroidRoot()
156 setenv("ANDROID_DATA", android_data.c_str(), 1); in SetUpAndroidData()
161 ASSERT_EQ(rmdir(android_data.c_str()), 0); in TearDownAndroidData()
163 rmdir(android_data.c_str()); in TearDownAndroidData()
183 dalvik_cache_.append(android_data_.c_str()); in SetUp()
185 int mkdir_result = mkdir(dalvik_cache_.c_str(), 0700); in SetUp()
191 java_lang_dex_file_ = LoadExpectSingleDexFile(GetLibCoreDexFileName().c_str()); in SetUp()
[all …]
Dcommon_throws.cc61 self->ThrowNewException(computed_throw_location, exception_descriptor, msg.str().c_str()); in ThrowException()
63 self->ThrowNewException(*throw_location, exception_descriptor, msg.str().c_str()); in ThrowException()
83 … self->ThrowNewWrappedException(computed_throw_location, exception_descriptor, msg.str().c_str()); in ThrowWrappedException()
85 self->ThrowNewWrappedException(*throw_location, exception_descriptor, msg.str().c_str()); in ThrowWrappedException()
94 PrettyMethod(method).c_str()).c_str()); in ThrowAbstractMethodError()
107 StringPrintf("length=%d; index=%d", length, index).c_str()); in ThrowArrayIndexOutOfBoundsException()
115 PrettyDescriptor(element_class).c_str(), in ThrowArrayStoreException()
116 PrettyDescriptor(array_class).c_str()).c_str()); in ThrowArrayStoreException()
124 PrettyDescriptor(src_type).c_str(), in ThrowClassCastException()
125 PrettyDescriptor(dest_type).c_str()).c_str()); in ThrowClassCastException()
[all …]
Doat_file.cc89 std::unique_ptr<File> file(OS::OpenFileForReading(filename.c_str())); in Open()
156 char* absolute_path = realpath(elf_filename.c_str(), NULL); in Dlopen()
158 *error_msg = StringPrintf("Failed to find absolute path for '%s'", elf_filename.c_str()); in Dlopen()
164 *error_msg = StringPrintf("Failed to dlopen '%s': %s", elf_filename.c_str(), dlerror()); in Dlopen()
169 *error_msg = StringPrintf("Failed to find oatdata symbol in '%s': %s", elf_filename.c_str(), in Dlopen()
182 *error_msg = StringPrintf("Failed to find oatlastword symbol in '%s': %s", elf_filename.c_str(), in Dlopen()
205 *error_msg = StringPrintf("Failed to find oatdata symbol in '%s'", file->GetPath().c_str()); in ElfFileOpen()
217 *error_msg = StringPrintf("Failed to find oatlastword symbol in '%s'", file->GetPath().c_str()); in ElfFileOpen()
227 *error_msg = StringPrintf("Invalid oat magic for '%s'", GetLocation().c_str()); in Setup()
233 *error_msg = StringPrintf("In oat file '%s' found truncated OatHeader", GetLocation().c_str()); in Setup()
[all …]
Delf_file.cc162 file_->GetPath().c_str(), file_->Fd(), strerror(errno)); in Setup()
169 file_->GetPath().c_str()); in Setup()
177 file_->GetPath().c_str(), error_msg), in Setup()
186 sizeof(Elf32_Ehdr), file_->GetPath().c_str()); in Setup()
190 file_->GetPath().c_str(), error_msg), in Setup()
192 *error_msg = StringPrintf("Failed to map ELF program headers: %s", error_msg->c_str()); in Setup()
198 file_->GetPath().c_str(), error_msg), in Setup()
200 *error_msg = StringPrintf("Failed to map ELF file: %s", error_msg->c_str()); in Setup()
221 file_->GetPath().c_str()); in Setup()
229 file_->GetPath().c_str()); in Setup()
[all …]
Dreflection.cc218 PrettyDescriptor(found_descriptor).c_str()).c_str()); in ThrowIllegalPrimitiveArgumentException()
238 PrettyMethod(mh.GetMethod(), false).c_str(), in BuildArgArrayFromObjectArray()
240 PrettyDescriptor(dst_class).c_str(), in BuildArgArrayFromObjectArray()
241 PrettyTypeOf(arg).c_str()).c_str()); in BuildArgArrayFromObjectArray()
266 PrettyMethod(mh.GetMethod(), false).c_str(), \ in BuildArgArrayFromObjectArray()
269 PrettyTypeOf(arg).c_str()).c_str()); \ in BuildArgArrayFromObjectArray()
398 PrettyMethod(h_m.Get()).c_str()); in CheckMethodArguments()
563 classes_size, arg_count).c_str()); in InvokeMethod()
570 PrettyMethod(m).c_str()).c_str()); in InvokeMethod()
613 expected_class_name.c_str(), in VerifyObjectIsClass()
[all …]
Dreflection-inl.h93 PrettyDescriptor(srcType).c_str(), in ConvertPrimitiveValue()
94 PrettyDescriptor(dstType).c_str()).c_str()); in ConvertPrimitiveValue()
98 PrettyDescriptor(srcType).c_str(), in ConvertPrimitiveValue()
99 PrettyDescriptor(dstType).c_str()).c_str()); in ConvertPrimitiveValue()
Dparsed_options.cc162 Usage("Unknown -Xgc option %s\n", gc_option.c_str()); in ParseXGcOption()
298 Usage("Missing required class path value for %s\n", option.c_str()); in Parse()
317 UsageMessage(stderr, "Failed to parse JDWP option %s\n", tail.c_str()); in Parse()
324 size_t size = ParseMemoryOption(option.substr(strlen("-Xms")).c_str(), 1024); in Parse()
326 Usage("Failed to parse memory option %s\n", option.c_str()); in Parse()
331 size_t size = ParseMemoryOption(option.substr(strlen("-Xmx")).c_str(), 1024); in Parse()
333 Usage("Failed to parse memory option %s\n", option.c_str()); in Parse()
338 size_t size = ParseMemoryOption(option.substr(strlen("-XX:HeapGrowthLimit=")).c_str(), 1024); in Parse()
340 Usage("Failed to parse memory option %s\n", option.c_str()); in Parse()
345 size_t size = ParseMemoryOption(option.substr(strlen("-XX:HeapMinFree=")).c_str(), 1024); in Parse()
[all …]
Dprofiler.cc275 int fd = open(full_name.c_str(), O_RDWR); in WriteProfile()
300 const char *p = data.c_str(); in WriteProfile()
600 os << StringPrintf("%s/%u/%u\n", method_name.c_str(), count, method_size); in Write()
627 … PrettyMethod(current->GetMethod().dex_method_index, *(current->GetMethod().dex_file)).c_str(), in Write()
658 context_i.second, context_i.first.second.c_str())); in Write()
660 os << StringPrintf("%s/%u/%u/[%s]\n", method_name.c_str(), total_count, in Write()
661 method_size, Join(context_count_vector, '#').c_str()); in Write()
670 os << StringPrintf("%s/%u/%u\n", pi.first.c_str(), pi.second.count_, pi.second.method_size_); in Write()
672 os << StringPrintf("%s/%u/%u/[", pi.first.c_str(), pi.second.count_, pi.second.method_size_); in Write()
678 context_i.second, context_i.first.second.c_str())); in Write()
[all …]
Ddex_file_test.cc166 std::unique_ptr<const DexFile> raw(OpenDexFileBase64(kRawDex, tmp.GetFilename().c_str())); in TEST_F()
205 EXPECT_TRUE(DexFile::GetChecksum(GetLibCoreDexFileName().c_str(), &checksum, &error_msg)) in TEST_F()
350 const char* dex_location = dex_location_str.c_str(); in TEST_F()
358 UniqueCPtr<const char[]> dex_location_real(realpath(file.GetFilename().c_str(), nullptr)); in TEST_F()
361 ASSERT_EQ(dex_location, DexFile::GetDexCanonicalLocation(dex_location.c_str())); in TEST_F()
362 std::string multidex_location = DexFile::GetMultiDexClassesDexName(1, dex_location.c_str()); in TEST_F()
363 ASSERT_EQ(multidex_location, DexFile::GetDexCanonicalLocation(multidex_location.c_str())); in TEST_F()
366 ASSERT_EQ(0, symlink(dex_location.c_str(), dex_location_sym.c_str())); in TEST_F()
368 ASSERT_EQ(dex_location, DexFile::GetDexCanonicalLocation(dex_location_sym.c_str())); in TEST_F()
370 …std::string multidex_location_sym = DexFile::GetMultiDexClassesDexName(1, dex_location_sym.c_str()… in TEST_F()
[all …]
Dutils.cc232 return PrettyDescriptor(java_descriptor->ToModifiedUtf8().c_str()); in PrettyDescriptor()
349 result += PrettyDescriptor(argument_descriptor.c_str()); in PrettyArguments()
385 result = PrettyReturnType(sig_as_string.c_str()) + " " + result + in PrettyMethod()
386 PrettyArguments(sig_as_string.c_str()); in PrettyMethod()
405 result = PrettyReturnType(sig_as_string.c_str()) + " " + result + in PrettyMethod()
406 PrettyArguments(sig_as_string.c_str()); in PrettyMethod()
599 size_t char_count = CountModifiedUtf8Chars(s.c_str()); in MangleForJni()
1035 *utime = strtoull(fields[11].c_str(), NULL, 10); in GetTaskStats()
1036 *stime = strtoull(fields[12].c_str(), NULL, 10); in GetTaskStats()
1037 *task_cpu = strtoull(fields[36].c_str(), NULL, 10); in GetTaskStats()
[all …]
Dmem_map.cc57 (it->flags & PROT_EXEC) ? 'x' : '-', it->name.c_str()); in operator <<()
153 begin, end, maps.c_str()); in ContainedWithinExistingMap()
177 it->name.c_str(), in CheckNonOverlapping()
178 map_info.str().c_str()); in CheckNonOverlapping()
265 fd.reset(ashmem_create_region(debug_friendly_name.c_str(), page_aligned_byte_count)); in MapAnonymous()
375 strerror(saved_errno), maps.c_str()); in MapAnonymous()
439 strerror(saved_errno), maps.c_str()); in MapFileAtAddress()
526 ScopedFd fd(ashmem_create_region(debug_friendly_name.c_str(), tail_base_size)); in RemapAtEnd()
544 tail_base_begin, tail_base_size, name_.c_str(), in RemapAtEnd()
545 maps.c_str()); in RemapAtEnd()
[all …]
/art/runtime/base/unix_file/
Dmapped_file_test.cc36 int fd = TEMP_FAILURE_RETRY(open(good_path_.c_str(), O_CREAT|O_RDWR, 0666)); in SetUp()
46 ASSERT_EQ(unlink(good_path_.c_str()), 0); in TearDown()
52 TEMP_FAILURE_RETRY(truncate(good_path_.c_str(), 0)); in MakeTestFile()
97 EXPECT_EQ(0, memcmp(kContent.c_str(), file.data(), file.size())); in TEST_F()
115 ASSERT_EQ(-1, unlink(new_path.c_str())); in TEST_F()
124 memcpy(file.data(), kContent.c_str(), kContent.size()); in TEST_F()
128 FdFile new_file(TEMP_FAILURE_RETRY(open(new_path.c_str(), O_RDONLY))); in TEST_F()
132 EXPECT_EQ(0, unlink(new_path.c_str())); in TEST_F()
198 TEMP_FAILURE_RETRY(unlink(good_path_.c_str())); in TEST_F()
204 EXPECT_EQ(-EINVAL, file.Write(kContent.c_str(), 0, -123)); in TEST_F()
[all …]
/art/runtime/base/
Dhex_dump_test.cc37 EXPECT_STREQ(oss.str().c_str(), in TEST()
46 EXPECT_STREQ(oss.str().c_str(), in TEST()
59 EXPECT_STREQ(oss.str().c_str() + (kBitsPerWord / 4), in TEST()
67 EXPECT_STREQ(oss.str().c_str(), in TEST()
Dstringprintf_test.cc25 EXPECT_STREQ("00107e59", StringPrintf("%08zx", size).c_str()); in TEST()
26 EXPECT_STREQ("0x00107e59", StringPrintf("0x%08zx", size).c_str()); in TEST()
Dlogging.cc38 return (gCmdLine.get() != nullptr) ? gCmdLine->c_str() : nullptr; in GetCmdLine()
42 return (gProgramInvocationName.get() != nullptr) ? gProgramInvocationName->c_str() : "art"; in ProgramInvocationName()
46 return (gProgramInvocationShortName.get() != nullptr) ? gProgramInvocationShortName->c_str() in ProgramInvocationShortName()
146 LogLine(*data_, msg.c_str()); in ~LogMessage()
/art/compiler/optimizing/
Dparallel_move_test.cc87 ASSERT_STREQ("(1 -> 2) (0 -> 1)", resolver.GetMessage().c_str()); in TEST()
94 ASSERT_STREQ("(2 -> 3) (1 -> 2) (1 -> 4) (0 -> 1)", resolver.GetMessage().c_str()); in TEST()
106 ASSERT_STREQ("(1 <-> 0)", resolver.GetMessage().c_str()); in TEST()
113 ASSERT_STREQ("(1 -> 2) (1 <-> 0)", resolver.GetMessage().c_str()); in TEST()
120 ASSERT_STREQ("(4 <-> 1) (3 <-> 4) (2 <-> 3) (0 -> 1)", resolver.GetMessage().c_str()); in TEST()
127 ASSERT_STREQ("(4 <-> 1) (3 <-> 4) (2 <-> 3) (0 -> 1) (5 -> 4)", resolver.GetMessage().c_str()); in TEST()
/art/compiler/
Dimage_test.cc51 std::string image_filename(GetSystemImageFilename(image_location.GetFilename().c_str(), in TEST_F()
56 int mkdir_result = mkdir(image_dir.c_str(), 0700); in TEST_F()
58 ScratchFile image_file(OS::CreateEmptyFile(image_filename.c_str())); in TEST_F()
62 ScratchFile oat_file(OS::CreateEmptyFile(oat_filename.c_str())); in TEST_F()
94 std::unique_ptr<File> dup_oat(OS::OpenFileReadWrite(oat_file.GetFilename().c_str())); in TEST_F()
108 std::unique_ptr<File> file(OS::OpenFileForReading(image_file.GetFilename().c_str())); in TEST_F()
141 std::unique_ptr<const DexFile> dex(LoadExpectSingleDexFile(GetLibCoreDexFileName().c_str())); in TEST_F()
146 options.push_back(std::make_pair(image.c_str(), reinterpret_cast<void*>(NULL))); in TEST_F()
189 int rmdir_result = rmdir(image_dir.c_str()); in TEST_F()
Delf_fixup.cc76 elf_file.GetFile().GetPath().c_str(), i, in FixupDynamic()
96 elf_file.GetFile().GetPath().c_str(), i, in FixupSectionHeaders()
114 elf_file.GetFile().GetPath().c_str(), i, in FixupProgramHeaders()
140 elf_file.GetFile().GetPath().c_str(), i, in FixupSymbols()
158 elf_file.GetFile().GetPath().c_str(), i, in FixupRelocations()
168 elf_file.GetFile().GetPath().c_str(), i, in FixupRelocations()
/art/compiler/utils/
Dassembler_test.h468 std::remove(data_name.c_str()); in DisassembleBinaries()
475 std::remove(data_name.c_str()); in DisassembleBinaries()
476 std::remove((data_name + ".dis").c_str()); in DisassembleBinaries()
477 std::remove(as_name.c_str()); in DisassembleBinaries()
484 std::remove(data_name.c_str()); in DisassembleBinaries()
485 std::remove(as_name.c_str()); in DisassembleBinaries()
486 std::remove((data_name + ".dis").c_str()); in DisassembleBinaries()
487 std::remove((as_name + ".dis").c_str()); in DisassembleBinaries()
547 if (!Assemble((res->base_name + ".S").c_str(), (res->base_name + ".o").c_str(), in Compile()
593 std::remove((res->base_name + ".S").c_str()); in Clean()
[all …]
/art/patchoat/
Dpatchoat.cc75 std::string system_filename(GetSystemImageFilename(location.c_str(), isa)); in LocationToFilename()
76 if (OS::FileExists(system_filename.c_str())) { in LocationToFilename()
95 if (GetDalvikCacheFilename(location.c_str(), dalvik_cache.c_str(), in LocationToFilename()
127 std::unique_ptr<File> input_image(OS::OpenFileForReading(image_filename.c_str())); in Patch()
150 options.push_back(std::make_pair(img.c_str(), nullptr)); in Patch()
166 input_image->GetPath().c_str(), in Patch()
217 std::unique_ptr<File> input_image(OS::OpenFileForReading(image_filename.c_str())); in Patch()
239 options.push_back(std::make_pair(img.c_str(), nullptr)); in Patch()
255 input_image->GetPath().c_str(), in Patch()
656 UsageError("Command: %s", CommandLine().c_str()); in Usage()
[all …]

123456