/system/extras/tests/pagingtest/ |
D | pageinout_test.c | 12 int pageinout_test(int test_runs, bool cache, unsigned long long file_size) { in pageinout_test() argument 27 fd = create_tmp_file(tmpname, file_size); in pageinout_test() 32 vec = alloc_mincore_vec(file_size); in pageinout_test() 37 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0); in pageinout_test() 43 if (!check_caching((void *)buf, vec, file_size, false)) { in pageinout_test() 49 rc = madvise((void *)buf, file_size, MADV_RANDOM) || in pageinout_test() 50 posix_fadvise(fd, 0, file_size, POSIX_FADV_RANDOM); in pageinout_test() 59 for (j = 0; j < file_size; j += pagesize) { in pageinout_test() 67 if (!check_caching((void *)buf, vec, file_size, true)) { in pageinout_test() 72 rc = madvise((void *)buf, file_size, MADV_DONTNEED) || in pageinout_test() [all …]
|
D | pagingtest.c | 142 unsigned long long file_size = 0ULL; in main() local 160 file_size = strtoull(argv[3], NULL, 10); in main() 162 if (!file_size) { in main() 163 file_size = FILE_SIZE; in main() 170 rc = pageinout_test(test_runs, true, file_size); in main() 174 rc = pageinout_test(test_runs, false, file_size); in main()
|
/system/core/libprocessgroup/cgrouprc/ |
D | cgroup_file.cpp | 50 size_t file_size = sb.st_size; in LoadRcFile() local 51 if (file_size < sizeof(CgroupFile)) { in LoadRcFile() 56 CgroupFile* file_data = (CgroupFile*)mmap(nullptr, file_size, PROT_READ, MAP_SHARED, fd, 0); in LoadRcFile() 64 munmap(file_data, file_size); in LoadRcFile() 69 if (file_size != expected) { in LoadRcFile() 71 << ", actual " << file_size; in LoadRcFile() 72 munmap(file_data, file_size); in LoadRcFile()
|
/system/core/fs_mgr/libfs_avb/tests/ |
D | basic_test.cpp | 33 int64_t file_size; in TEST_F() local 34 ASSERT_TRUE(base::GetFileSize(boot_path, &file_size)); in TEST_F() 35 EXPECT_EQ(file_size, image_size); in TEST_F() 80 int64_t file_size; in TEST_F() local 81 ASSERT_TRUE(base::GetFileSize(boot_path, &file_size)); in TEST_F() 82 EXPECT_EQ(file_size, image_size); in TEST_F() 119 int64_t file_size; in TEST_F() local 120 ASSERT_TRUE(base::GetFileSize(system_path, &file_size)); in TEST_F() 121 EXPECT_EQ(file_size, image_size); in TEST_F()
|
D | fs_avb_test_util.cpp | 109 int64_t file_size; in GenerateVBMetaImage() local 110 EXPECT_TRUE(base::GetFileSize(vbmeta_image.path, &file_size)); in GenerateVBMetaImage() 111 vbmeta_image.content.resize(file_size); in GenerateVBMetaImage() 113 reinterpret_cast<char*>(vbmeta_image.content.data()), file_size)); in GenerateVBMetaImage() 132 int64_t file_size; in ExtractVBMetaImage() local 133 EXPECT_TRUE(base::GetFileSize(vbmeta_image.path, &file_size)); in ExtractVBMetaImage() 134 vbmeta_image.content.resize(file_size); in ExtractVBMetaImage() 136 reinterpret_cast<char*>(vbmeta_image.content.data()), file_size)); in ExtractVBMetaImage()
|
/system/core/trusty/apploader/ |
D | apploader.cpp | 94 off64_t file_size, file_page_offset, file_page_size; in read_file() local 110 file_size = st.st_size; in read_file() 113 file_page_offset = file_size & (page_size - 1); in read_file() 117 if (__builtin_add_overflow(file_size, file_page_offset, &file_page_size)) { in read_file() 135 while (file_offset < file_size) { in read_file() 137 pread(file_fd, (char*)shm + file_offset, file_size - file_offset, file_offset)); in read_file() 154 if (file_offset < file_size) { in read_file() 158 assert(file_offset == file_size); in read_file() 160 *out_file_size = file_size; in read_file()
|
/system/core/fs_mgr/libfiemap/ |
D | fiemap_writer.cpp | 265 static FiemapStatus FallocateFallback(int file_fd, uint64_t block_size, uint64_t file_size, in FallocateFallback() argument 272 uint64_t bytes_per_chunk = std::max(file_size / 1000, block_size); in FallocateFallback() 277 off_t end = static_cast<off_t>(file_size); in FallocateFallback() 294 if (on_progress && !on_progress(cursor, file_size)) { in FallocateFallback() 386 uint64_t file_size, in WriteZeroes() argument 401 while (offset < file_size) { in WriteZeroes() 412 int new_permille = (static_cast<uint64_t>(offset) * 1000) / file_size; in WriteZeroes() 413 if (new_permille != permille && static_cast<uint64_t>(offset) != file_size) { in WriteZeroes() 414 if (on_progress && !on_progress(offset, file_size)) { in WriteZeroes() 433 uint64_t file_size, unsigned int fs_type, in AllocateFile() argument [all …]
|
D | split_fiemap_writer.cpp | 45 std::unique_ptr<SplitFiemap> SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument 49 if (!Create(file_path, file_size, max_piece_size, &ret, progress).is_ok()) { in Create() 55 FiemapStatus SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument 60 if (!file_size) { in Create() 81 int new_permille = (actual_written * 1000) / file_size; in Create() 82 if (new_permille != permille && actual_written < file_size) { in Create() 83 if (progress && !progress(actual_written, file_size)) { in Create() 95 uint64_t remaining_bytes = file_size; in Create() 98 LOG(ERROR) << "Requested size " << file_size << " created too many split files"; in Create()
|
/system/unwinding/libunwindstack/ |
D | DexFile.cpp | 86 std::shared_ptr<DexFile> DexFile::Create(uint64_t base_addr, uint64_t file_size, Memory* memory, in Create() argument 89 if (!has_dex_support || file_size == 0) { in Create() 107 std::shared_ptr<DexFile> dex_file = CreateFromDisk(base_addr, file_size, info); in Create() 114 if (!copy->Resize(file_size)) { in Create() 117 if (!memory->ReadFully(base_addr, copy->GetPtr(0), file_size)) { in Create() 121 art_api::dex::DexFile::Create(copy->GetPtr(0), file_size, nullptr, "", &dex); in Create() 126 return std::shared_ptr<DexFile>(new DexFile(base_addr, file_size, std::move(api))); in Create()
|
D | DexFile.h | 51 static std::shared_ptr<DexFile> Create(uint64_t base_addr, uint64_t file_size, Memory* memory, 64 DexFile(uint64_t base_addr, uint64_t file_size, std::shared_ptr<DexFileApi>&& dex_api) in DexFile() argument 65 : base_addr_(base_addr), file_size_(file_size), dex_api_(std::move(dex_api)) {} in DexFile()
|
/system/update_engine/payload_generator/ |
D | mapfile_filesystem.cc | 48 off_t file_size = utils::FileSize(filename); in CreateFromFile() local 49 if (file_size < 0) in CreateFromFile() 52 if (file_size % kMapfileBlockSize) { in CreateFromFile() 53 LOG(ERROR) << "Image file " << filename << " has a size of " << file_size in CreateFromFile() 57 off_t num_blocks = file_size / kMapfileBlockSize; in CreateFromFile()
|
D | boot_img_filesystem.cc | 134 const uint64_t file_size = utils::FileSize(filename_); in GetFiles() local 137 if (kernel_size_ > 0 && offset + kernel_size_ <= file_size) { in GetFiles() 141 if (ramdisk_size_ > 0 && offset + ramdisk_size_ <= file_size) { in GetFiles()
|
/system/extras/simpleperf/ |
D | read_dex_file.cpp | 89 size_t file_size = GetFileSize(file_path); in ReadSymbolsFromDexFile() local 90 if (file_size == 0) { in ReadSymbolsFromDexFile() 94 map = android::base::MappedFile::FromFd(fd, 0, file_size, PROT_READ); in ReadSymbolsFromDexFile() 98 return ReadSymbolsFromDexFileInMemory(map->data(), file_size, dex_file_offsets, symbol_callback); in ReadSymbolsFromDexFile()
|
/system/bt/gd/hal/ |
D | snoop_logger_test.cc | 122 ASSERT_EQ(std::filesystem::file_size(temp_snoop_log_), sizeof(SnoopLogger::FileHeaderType)); in TEST_F() 154 std::filesystem::file_size(temp_snoop_log_), in TEST_F() 174 std::filesystem::file_size(temp_snooz_log_), in TEST_F() 194 std::filesystem::file_size(temp_snooz_log_), in TEST_F() 214 std::filesystem::file_size(temp_snooz_log_), in TEST_F() 234 std::filesystem::file_size(temp_snooz_log_), in TEST_F() 253 std::filesystem::file_size(temp_snoop_log_), in TEST_F() 271 std::filesystem::file_size(temp_snoop_log_), in TEST_F() 274 std::filesystem::file_size(temp_snoop_log_last_), in TEST_F() 295 std::filesystem::file_size(temp_snoop_log_), in TEST_F() [all …]
|
/system/extras/pagecache/ |
D | dumpcache.c | 24 size_t file_size; member 43 static struct file_info *get_file_info(const char* fpath, size_t file_size) { in get_file_info() argument 68 info->file_size = file_size; in get_file_info() 163 (100 * info->num_cached_pages * g_page_size) / info->file_size); in main()
|
/system/sepolicy/tools/ |
D | version_policy.c | 34 uint32_t file_size; in read_cil_file() local 48 file_size = filedata.st_size; in read_cil_file() 49 buff = malloc(file_size); in read_cil_file() 55 rc = fread(buff, file_size, 1, file); in read_cil_file() 65 rc = cil_add_file(*db, path, buff, file_size); in read_cil_file()
|
/system/extras/partition_tools/ |
D | lpadd.cc | 114 bool WritePartition(borrowed_fd fd, uint64_t file_size, const std::string& partition_name); 115 bool WriteExtent(borrowed_fd fd, uint64_t file_size, const LpMetadataExtent& extent); 176 uint64_t file_size; in AddPartition() local 200 file_size = (uint64_t)size; in AddPartition() 211 if (source_fd >= 0 && !WritePartition(source_fd, file_size, partition_name)) { in AddPartition() 295 bool SuperHelper::WritePartition(borrowed_fd fd, uint64_t file_size, in WritePartition() argument 307 if (!WriteExtent(fd, file_size, extent)) { in WritePartition() 314 CHECK(pos >= 0 && (uint64_t)pos == file_size); in WritePartition() 318 bool SuperHelper::WriteExtent(borrowed_fd fd, uint64_t file_size, const LpMetadataExtent& extent) { in WriteExtent() argument 331 CHECK((uint64_t)pos <= file_size); in WriteExtent() [all …]
|
/system/extras/libfec/include/fec/ |
D | ecc.h | 57 inline uint64_t fec_ecc_get_size(uint64_t file_size, int roots) in fec_ecc_get_size() argument 59 return fec_div_round_up(fec_div_round_up(file_size, FEC_BLOCKSIZE), in fec_ecc_get_size()
|
/system/core/fs_mgr/libvbmeta/ |
D | builder.cpp | 67 Result<uint64_t> file_size = GetFileSize(source_fd); in ReadVBMetaImageFromFile() local 68 if (!file_size.ok()) { in ReadVBMetaImageFromFile() 69 return file_size.error(); in ReadVBMetaImageFromFile() 72 if (file_size.value() > VBMETA_IMAGE_MAX_SIZE) { in ReadVBMetaImageFromFile() 73 return Error() << "vbmeta image file size " << file_size.value() << " is too large"; in ReadVBMetaImageFromFile() 77 if (!android::base::ReadFully(source_fd, buffer.get(), file_size.value())) { in ReadVBMetaImageFromFile()
|
/system/update_engine/common/ |
D | hash_calculator.cc | 99 const auto file_size = utils::FileSize(name); in RawHashOfFile() local 100 return RawHashOfFile(name, file_size, out_hash) == file_size; in RawHashOfFile()
|
/system/core/fs_mgr/libfiemap/include/libfiemap/ |
D | fiemap_writer.h | 49 static FiemapUniquePtr Open(const std::string& file_path, uint64_t file_size, 52 static FiemapStatus Open(const std::string& file_path, uint64_t file_size, FiemapUniquePtr* out,
|
D | split_fiemap_writer.h | 44 static std::unique_ptr<SplitFiemap> Create(const std::string& file_path, uint64_t file_size, 47 static FiemapStatus Create(const std::string& file_path, uint64_t file_size,
|
/system/tools/aidl/ |
D | io_delegate.cpp | 98 ssize_t file_size = in.tellg(); in GetFileContents() local 99 contents->resize(file_size + content_suffix.length()); in GetFileContents() 102 in.read(&(*contents)[0], file_size); in GetFileContents() 104 contents->replace(file_size, content_suffix.length(), content_suffix); in GetFileContents()
|
/system/iorap/src/inode2filename/ |
D | data_source.cc | 121 uint64_t file_size = 0; in EmitInodes() local 129 ifs >> file_size; in EmitInodes() 130 (void)file_size; // Not used in iorapd. in EmitInodes()
|
/system/extras/libfec/ |
D | fec_open.cpp | 42 static int find_offset(uint64_t file_size, int roots, uint64_t *offset, in find_offset() argument 49 if (file_size % FEC_BLOCKSIZE) { in find_offset() 56 uint64_t mi = get_appr_size(file_size, roots); in find_offset() 57 uint64_t lo = file_size - mi * 2; in find_offset() 58 uint64_t hi = file_size - mi / 2; in find_offset() 64 if (total < file_size) { in find_offset() 66 } else if (total > file_size) { in find_offset() 70 debug("file_size = %" PRIu64 " -> offset = %" PRIu64, file_size, in find_offset()
|