Home
last modified time | relevance | path

Searched refs:file_size (Results 1 – 25 of 42) sorted by relevance

12

/system/extras/tests/pagingtest/
Dpageinout_test.c12 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 …]
Dpagingtest.c142 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()
Dpagingtest.h17 int pageinout_test(int test_runs, bool cache, unsigned long long file_size);
/system/core/libprocessgroup/cgrouprc/
Dcgroup_file.cpp50 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/
Dbasic_test.cpp33 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()
78 int64_t file_size; in TEST_F() local
79 ASSERT_TRUE(base::GetFileSize(boot_path, &file_size)); in TEST_F()
80 EXPECT_EQ(file_size, image_size); in TEST_F()
115 int64_t file_size; in TEST_F() local
116 ASSERT_TRUE(base::GetFileSize(system_path, &file_size)); in TEST_F()
117 EXPECT_EQ(file_size, image_size); in TEST_F()
Dfs_avb_test_util.cpp109 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()
131 int64_t file_size; in ExtractVBMetaImage() local
132 EXPECT_TRUE(base::GetFileSize(vbmeta_image.path, &file_size)); in ExtractVBMetaImage()
133 vbmeta_image.content.resize(file_size); in ExtractVBMetaImage()
135 reinterpret_cast<char*>(vbmeta_image.content.data()), file_size)); in ExtractVBMetaImage()
/system/core/fs_mgr/libfiemap/
Dfiemap_writer.cpp265 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 …]
Dsplit_fiemap_writer.cpp45 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/update_engine/payload_generator/
Dmapfile_filesystem.cc48 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()
Dboot_img_filesystem.cc134 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/pagecache/
Ddumpcache.c24 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/
Dversion_policy.c34 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/
Dlpadd.cc114 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/
Decc.h57 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/
Dbuilder.cpp67 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/extras/simpleperf/
Dread_elf.h45 uint32_t file_size, BuildId* build_id);
66 uint32_t file_size, const BuildId& expected_build_id,
79 uint32_t file_size,
Dread_elf.cpp170 uint64_t file_size, BinaryWrapper* wrapper) { in OpenObjectFile() argument
178 if (file_size == 0) { in OpenObjectFile()
179 file_size = GetFileSize(filename); in OpenObjectFile()
180 if (file_size == 0) { in OpenObjectFile()
188 auto buffer_or_err = llvm::MemoryBuffer::getOpenFileSlice(fd, filename, file_size, file_offset); in OpenObjectFile()
225 uint32_t file_size, BuildId* build_id) { in GetBuildIdFromEmbeddedElfFile() argument
227 ElfStatus result = OpenObjectFile(filename, file_offset, file_size, &wrapper); in GetBuildIdFromEmbeddedElfFile()
438 uint32_t file_size, const BuildId& expected_build_id, in ParseSymbolsFromEmbeddedElfFile() argument
441 ElfStatus result = OpenObjectFile(filename, file_offset, file_size, &wrapper); in ParseSymbolsFromEmbeddedElfFile()
531 uint32_t file_size, in ReadMinExecutableVirtualAddressFromEmbeddedElfFile() argument
[all …]
Dtracing.cpp65 uint64_t file_size = file.size(); in AppendFile() local
66 AppendData(data, file_size); in AppendFile()
68 uint32_t file_size = file.size(); in AppendFile() local
69 AppendData(data, file_size); in AppendFile()
76 uint64_t file_size = ConvertBytesToValue(p, file_size_bytes); in DetachFile() local
79 file.insert(file.end(), p, p + file_size); in DetachFile()
80 p += file_size; in DetachFile()
/system/tools/aidl/
Dio_delegate.cpp95 ssize_t file_size = in.tellg(); in GetFileContents() local
96 contents->resize(file_size + content_suffix.length()); in GetFileContents()
99 in.read(&(*contents)[0], file_size); in GetFileContents()
101 contents->replace(file_size, content_suffix.length(), content_suffix); in GetFileContents()
/system/core/fs_mgr/libfiemap/include/libfiemap/
Dfiemap_writer.h49 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,
Dsplit_fiemap_writer.h44 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/iorap/src/inode2filename/
Ddata_source.cc121 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/
Dfec_open.cpp42 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()
/system/core/adb/client/
Dincremental.cpp37 static std::pair<unique_fd, std::vector<char>> read_signature(Size file_size, in read_signature() argument
59 if (auto expected = verity_tree_size_for_file(file_size); tree_size != expected) { in read_signature()
72 static std::pair<unique_fd, std::string> read_and_encode_signature(Size file_size, in read_and_encode_signature() argument
75 auto [fd, signature] = read_signature(file_size, std::move(signature_file), silent); in read_and_encode_signature()
/system/update_engine/scripts/
Dupdate_device.py99 self.size = payload_info.file_size
115 def _parse_range(range_str, file_size): argument
126 end_range = file_size
136 if int(e) < file_size:
137 start_range = file_size - int(e)

12