/system/extras/tests/mmc_tracepoints/ |
D | mmc_trace_sample_data | 12 … mmcqd/0-82 [000] ...1 49.828932: mmc_blk_rw_start: cmd=25,addr=0x002c6518,size=0x00000010 13 … <...>-1484 [000] ..s4 49.829171: mmc_blk_rw_end: cmd=25,addr=0x002c6518,size=0x00000010 14 … mmcqd/0-82 [000] ...1 49.830095: mmc_blk_rw_start: cmd=25,addr=0x002c6528,size=0x00000008 15 … kworker/0:2-48 [000] ..s4 49.830218: mmc_blk_rw_end: cmd=25,addr=0x002c6528,size=0x00000008 16 … mmcqd/0-82 [000] ...1 52.465957: mmc_blk_rw_start: cmd=18,addr=0x001ad578,size=0x00000020 17 … <idle>-0 [000] ..s3 52.466404: mmc_blk_rw_end: cmd=18,addr=0x001ad578,size=0x00000020 18 … mmcqd/0-82 [000] ...1 52.492868: mmc_blk_rw_start: cmd=18,addr=0x001aecb8,size=0x00000020 19 … <idle>-0 [000] ..s3 52.493157: mmc_blk_rw_end: cmd=18,addr=0x001aecb8,size=0x00000020 20 … mmcqd/0-82 [000] ...1 54.834287: mmc_blk_rw_start: cmd=25,addr=0x005420a8,size=0x00000008 21 … <idle>-0 [000] ..s3 54.834383: mmc_blk_rw_end: cmd=25,addr=0x005420a8,size=0x00000008 [all …]
|
/system/core/libcutils/ |
D | ashmem_test.cpp | 32 void TestCreateRegion(size_t size, unique_fd &fd, int prot) { in TestCreateRegion() argument 33 fd = unique_fd(ashmem_create_region(nullptr, size)); in TestCreateRegion() 36 ASSERT_EQ(size, static_cast<size_t>(ashmem_get_size_region(fd))); in TestCreateRegion() 45 void TestMmap(const unique_fd& fd, size_t size, int prot, void** region, off_t off = 0) { in TestMmap() argument 48 *region = mmap(nullptr, size, prot, MAP_SHARED, fd, off); in TestMmap() 52 void TestProtDenied(const unique_fd &fd, size_t size, int prot) { in TestProtDenied() argument 55 EXPECT_EQ(MAP_FAILED, mmap(nullptr, size, prot, MAP_SHARED, fd, 0)); in TestProtDenied() 71 constexpr size_t size = PAGE_SIZE; in TEST() local 72 uint8_t data[size]; in TEST() 73 FillData(data, size); in TEST() [all …]
|
/system/media/audio_utils/tests/ |
D | channels_tests.cpp | 27 void checkMonotone(const T *ary, size_t size) in checkMonotone() argument 29 for (size_t i = 1; i < size; ++i) { in checkMonotone() 35 void checkUnsignedMonotoneOrZero(const T *ary, size_t size) in checkUnsignedMonotoneOrZero() argument 37 if (size == 0) return; in checkUnsignedMonotoneOrZero() 40 for (size_t i = 1; i < size; ++i) { in checkUnsignedMonotoneOrZero() 50 EXPECT_EQ(c1.size(), c2.size()); in expectEq() 51 EXPECT_EQ(0, memcmp(c1.data(), c2.data(), sizeof(c1[0]) * std::min(c1.size(), c2.size()))); in expectEq() 109 constexpr size_t size = 65536; in TEST() local 110 std::vector<uint16_t> u16ref(size); in TEST() 111 std::vector<uint16_t> u16expand(size * 2); in TEST() [all …]
|
/system/logging/logcat/ |
D | logpersist | 28 size=${size_default} 34 --size=*) size="${1#--size=}" ;; 35 --rotate-count=*) size="${1#--rotate-count=}" ;; 36 -n|--size|--rotate-count) size="${2}" ; shift ;; 54 if [ -z "${size}" -o "${size_default}" = "${size}" ]; then 55 unset size 57 if [ -n "${size}" ] && 58 ! ( [ 0 -lt "${size}" ] && [ 2048 -ge "${size}" ] ) >/dev/null 2>&1; then 59 echo ERROR: Invalid --size ${size} >&2 75 if [ -n "${size}${buffer}" -o "true" = "${clear}" ]; then [all …]
|
/system/bt/osi/src/ |
D | allocator.cc | 28 size_t size = strlen(str) + 1; // + 1 for the null terminator in osi_strdup() local 29 size_t real_size = allocation_tracker_resize_for_canary(size); in osi_strdup() 34 allocation_tracker_notify_alloc(alloc_allocator_id, ptr, size)); in osi_strdup() 37 memcpy(new_string, str, size); in osi_strdup() 42 size_t size = strlen(str); in osi_strndup() local 43 if (len < size) size = len; in osi_strndup() 45 size_t real_size = allocation_tracker_resize_for_canary(size + 1); in osi_strndup() 50 allocation_tracker_notify_alloc(alloc_allocator_id, ptr, size + 1)); in osi_strndup() 53 memcpy(new_string, str, size); in osi_strndup() 54 new_string[size] = '\0'; in osi_strndup() [all …]
|
/system/bt/gd/packet/ |
D | packet_view_unittest.cc | 61 …red_ptr<T>(new T({View(std::make_shared<const vector<uint8_t>>(count_all), 0, count_all.size())})); in SetUp() 96 … PacketView<true>({View(std::make_shared<const vector<uint8_t>>(count_all), 0, count_all.size())}); 98 View(std::make_shared<const vector<uint8_t>>(count_1), 0, count_1.size()), 99 View(std::make_shared<const vector<uint8_t>>(count_2), 0, count_2.size()), 100 View(std::make_shared<const vector<uint8_t>>(count_3), 0, count_3.size()), 119 … PacketView<true>({View(std::make_shared<const vector<uint8_t>>(count_all), 0, count_all.size())}); 121 PacketView<true>({View(std::make_shared<const vector<uint8_t>>(count_1), 0, count_1.size())}), 122 … {PacketView<true>({View(std::make_shared<const vector<uint8_t>>(count_2), 0, count_2.size())}), 123 … PacketView<true>({View(std::make_shared<const vector<uint8_t>>(count_3), 0, count_3.size())})}); 133 …View<true> packet({View(std::make_shared<const vector<uint8_t>>(count_all), 0, count_all.size())}); in TEST() [all …]
|
D | fragmenting_inserter_unittest.cc | 35 FragmentingInserter it(result.size(), std::back_insert_iterator(fragments)); in TEST() 44 ASSERT_EQ(1, fragments.size()); in TEST() 50 ASSERT_EQ(result.size(), bytes.size()); in TEST() 51 for (size_t i = 0; i < bytes.size(); i++) { in TEST() 61 FragmentingInserter it(result.size() + 1, std::back_insert_iterator(fragments)); in TEST() 74 ASSERT_EQ(1, fragments.size()); in TEST() 80 ASSERT_EQ(result.size(), bytes.size()); in TEST() 81 for (size_t i = 0; i < bytes.size(); i++) { in TEST() 85 ASSERT_EQ(result.size(), copy.size()); in TEST() 86 for (size_t i = 0; i < copy.size(); i++) { in TEST() [all …]
|
/system/memory/libion/tests/ |
D | exit_test.cpp | 30 for (size_t size : allocationSizes) { in TEST_F() local 33 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F() 39 ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, &handle_fd)); in TEST_F() 51 for (size_t size : allocationSizes) { in TEST_F() local 55 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F() 60 ASSERT_EQ(0, ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, in TEST_F() 67 << " and size " << size << " on iteration " << i; in TEST_F() 76 for (size_t size : allocationSizes) { in TEST_F() local 79 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F() 84 ASSERT_EQ(0, ion_alloc_fd(ionfd, size, 0, (1 << heap.heap_id), 0, &map_fd)); in TEST_F() [all …]
|
/system/media/audio_utils/fuzz/format_fuzzer/ |
D | format_fuzzer.cpp | 41 template<size_t size> 42 static void fillBuffer(const uint8_t bytes[], int16_t(&buffer)[size], size_t input_size) in fillBuffer() argument 44 if (size < input_size) { in fillBuffer() 45 input_size = size; in fillBuffer() 53 uint8_t check[size]; in fillBuffer() 59 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *bytes, size_t size) { in LLVMFuzzerTestOneInput() argument 60 if (size < 4 || size > UINT8_MAX) { in LLVMFuzzerTestOneInput() 64 int src = size % formats_len; in LLVMFuzzerTestOneInput() 79 fillBuffer(bytes, data, size); in LLVMFuzzerTestOneInput() 82 uint32_t databuff[size]; in LLVMFuzzerTestOneInput() [all …]
|
/system/bt/gd/packet/parser/ |
D | util.h | 28 inline std::string GetTypeForSize(int size) { in GetTypeForSize() argument 29 if (size > 64) { in GetTypeForSize() 30 ERROR() << __func__ << ": Cannot use a type larger than 64 bits. (" << size << ")\n"; in GetTypeForSize() 33 if (size <= 8) return "uint8_t"; in GetTypeForSize() 35 if (size <= 16) return "uint16_t"; in GetTypeForSize() 37 if (size <= 32) return "uint32_t"; in GetTypeForSize() 42 inline int RoundSizeUp(int size) { in RoundSizeUp() argument 43 if (size > 64) { in RoundSizeUp() 44 ERROR() << __func__ << ": Cannot use a type larger than 64 bits. (" << size << ")\n"; in RoundSizeUp() 47 if (size <= 8) return 8; in RoundSizeUp() [all …]
|
/system/libhidl/transport/allocator/1.0/vts/functional/ |
D | VtsHidlAllocatorV1_0TargetTest.cpp | 43 sp<IMemory> expectAllocateSuccess(size_t size) { in expectAllocateSuccess() argument 45 EXPECT_OK(allocator->allocate(size, [&](bool success, const hidl_memory& mem) { in expectAllocateSuccess() 46 ASSERT_TRUE(success) << "Allocate failed for size: " << size; in expectAllocateSuccess() 47 EXPECT_EQ(mem.size(), size) in expectAllocateSuccess() 48 << "Allocated " << size << " but got hidl_memory with size " << mem.size(); in expectAllocateSuccess() 52 EXPECT_EQ(memory->getSize(), size) in expectAllocateSuccess() 53 << "Allocated " << size << " but got IMemory with size " << memory->getSize(); in expectAllocateSuccess() 57 std::vector<sp<IMemory>> expectBatchAllocateSuccess(size_t size, size_t count) { in expectBatchAllocateSuccess() argument 61 size, count, [&](bool success, const hidl_vec<hidl_memory>& mems) { in expectBatchAllocateSuccess() 62 EXPECT_EQ(count, mems.size()); in expectBatchAllocateSuccess() [all …]
|
/system/nvram/messages/ |
D | io.cpp | 74 InputStreamBuffer::InputStreamBuffer(const void* data, size_t size) in InputStreamBuffer() argument 75 : InputStreamBuffer(data, static_cast<const uint8_t*>(data) + size) {} in InputStreamBuffer() 87 bool InputStreamBuffer::Read(void* data, size_t size) { in Read() argument 90 while (size > static_cast<size_t>(end_ - pos_)) { in Read() 93 size -= end_ - pos_; in Read() 100 memcpy(buffer, pos_, size); in Read() 101 pos_ += size; in Read() 117 bool InputStreamBuffer::Skip(size_t size) { in Skip() argument 119 while (size > static_cast<size_t>(end_ - pos_)) { in Skip() 120 size -= end_ - pos_; in Skip() [all …]
|
/system/media/camera/src/ |
D | camera_metadata_tag_info.c | 932 size_t size) { in camera_metadata_enum_snprint() argument 3455 strncpy(dst, msg, size - 1); in camera_metadata_enum_snprint() 3456 dst[size - 1] = '\0'; in camera_metadata_enum_snprint() 3463 size_t size, in camera_metadata_enum_value() argument 3475 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() 3481 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() 3487 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() 3502 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() 3508 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() 3514 if (strncmp(name, enumName, size) == 0) { in camera_metadata_enum_value() [all …]
|
/system/libbase/ |
D | strings.cpp | 33 CHECK_NE(delimiters.size(), 0U); in Split() 52 if (s.size() == 0) { in Trim() 57 size_t end_index = s.size() - 1; in Trim() 60 while (start_index < s.size()) { in Trim() 91 return s.substr(0, prefix.size()) == prefix; in StartsWith() 99 return s.size() >= prefix.size() && strncasecmp(s.data(), prefix.data(), prefix.size()) == 0; in StartsWithIgnoreCase() 103 return s.size() >= suffix.size() && s.substr(s.size() - suffix.size(), suffix.size()) == suffix; in EndsWith() 111 return s.size() >= suffix.size() && in EndsWithIgnoreCase() 112 strncasecmp(s.data() + (s.size() - suffix.size()), suffix.data(), suffix.size()) == 0; in EndsWithIgnoreCase() 116 return lhs.size() == rhs.size() && strncasecmp(lhs.data(), rhs.data(), lhs.size()) == 0; in EqualsIgnoreCase() [all …]
|
/system/incremental_delivery/incfs/ |
D | path.cpp | 39 if (sv[sv.size()] == '\0') { in CStrWrapper() 120 char fdNameBuffer[std::size(fdNameFormat) + 11 + 1]; // max int length + '\0' in fromFd() 121 snprintf(fdNameBuffer, std::size(fdNameBuffer), fdNameFormat, fd); in fromFd() 130 auto size = ::readlink(fdNameBuffer, &res[0], res.size()); in fromFd() local 131 if (size < 0) { in fromFd() 135 if (size >= ssize_t(res.size())) { in fromFd() 140 res.resize(size); in fromFd() 142 res.resize(size - kDeletedSuffix.size()); in fromFd() 151 (trimAll || (path.size() > 1 && path[1] == '/'))) { in preparePathComponent() 155 while (path.size() > !trimAll && path.back() == '/') { in preparePathComponent() [all …]
|
/system/bt/profile/sdp/common/ |
D | data_element_reader.cc | 45 DataElementSize size = static_cast<DataElementSize>(descriptor & 0b00000111); in ReadNext() local 55 if (size != DataElementSize::BYTE1) { in ReadNext() 56 LOG(WARNING) << __func__ << ": Invalid size for bool: " << size; in ReadNext() 63 return ReadSignedInt(size); in ReadNext() 65 return ReadUnsignedInt(size); in ReadNext() 67 return ReadUuid(size); in ReadNext() 69 return ReadString(size); in ReadNext() 71 return ReadSequence(size); in ReadNext() 108 DataElementSize size) { in ReadSignedInt() argument 109 switch (size) { in ReadSignedInt() [all …]
|
/system/bt/gd/packet/parser/test/ |
D | generated_packet_test.cc | 71 ASSERT_EQ(child_two_two_three.size(), packet->size()); in TEST() 77 ASSERT_EQ(packet_bytes->size(), child_two_two_three.size()); in TEST() 78 for (size_t i = 0; i < child_two_two_three.size(); i++) { in TEST() 103 ASSERT_EQ(child.size(), packet->size()); in TEST() 109 ASSERT_EQ(packet_bytes->size(), child.size()); in TEST() 110 for (size_t i = 0; i < child.size(); i++) { in TEST() 119 ASSERT_EQ(child[1 /* skip fixed field */], payload.size()); in TEST() 120 for (size_t i = 0; i < payload.size(); i++) { in TEST() 175 ASSERT_EQ(child_two_two_three.size(), packet->size()); in TEST() 181 ASSERT_EQ(packet_bytes->size(), child_two_two_three.size()); in TEST() [all …]
|
/system/core/fastboot/ |
D | bootimg_utils.cpp | 38 if (cmdline.size() >= sizeof(h->cmdline)) die("command line too large: %zu", cmdline.size()); in bootimg_set_cmdline_v3_and_above() 46 if (cmdline.size() >= sizeof(h->cmdline)) die("command line too large: %zu", cmdline.size()); in bootimg_set_cmdline() 55 int64_t kernel_actual = (kernel.size() + page_mask) & (~page_mask); in mkbootimg_v3_and_above() 56 int64_t ramdisk_actual = (ramdisk.size() + page_mask) & (~page_mask); in mkbootimg_v3_and_above() 64 hdr->kernel_size = kernel.size(); in mkbootimg_v3_and_above() 65 hdr->ramdisk_size = ramdisk.size(); in mkbootimg_v3_and_above() 75 memcpy(hdr->magic + V3_PAGE_SIZE, kernel.data(), kernel.size()); in mkbootimg_v3_and_above() 76 memcpy(hdr->magic + V3_PAGE_SIZE + kernel_actual, ramdisk.data(), ramdisk.size()); in mkbootimg_v3_and_above() 93 int64_t kernel_actual = (kernel.size() + page_mask) & (~page_mask); in mkbootimg() 94 int64_t ramdisk_actual = (ramdisk.size() + page_mask) & (~page_mask); in mkbootimg() [all …]
|
/system/core/libutils/ |
D | JenkinsHash.cpp | 37 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { in JenkinsHashMixBytes() argument 38 if (size > UINT32_MAX) { in JenkinsHashMixBytes() 41 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixBytes() 43 for (i = 0; i < (size & -4); i += 4) { in JenkinsHashMixBytes() 47 if (size & 3) { in JenkinsHashMixBytes() 49 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0; in JenkinsHashMixBytes() 50 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0; in JenkinsHashMixBytes() 56 uint32_t JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size) { in JenkinsHashMixShorts() argument 57 if (size > UINT32_MAX) { in JenkinsHashMixShorts() 60 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixShorts() [all …]
|
/system/bt/gd/hci/ |
D | acl_builder_test.cc | 65 ASSERT_EQ(counting_bytes.size(), count_payload->size()); in TEST() 70 ASSERT_EQ(counting_bytes.size() + 4, count_packet->size()); in TEST() 85 ASSERT_EQ(count_view.size(), counting_bytes.size()); in TEST() 86 for (size_t i = 0; i < count_view.size(); i++) { in TEST() 98 ASSERT_EQ(counting_down_bytes.size(), counting_down_bytes_payload->size()); in TEST() 103 ASSERT_EQ(counting_down_bytes.size() + 4, counting_down_bytes_packet->size()); in TEST() 117 ASSERT_EQ(counting_down_bytes_view.size(), counting_down_bytes.size()); in TEST() 118 for (size_t i = 0; i < counting_down_bytes_view.size(); i++) { in TEST() 131 ASSERT_EQ(payload_bytes.size(), payload->size()); in TEST() 136 ASSERT_EQ(information_request.size(), packet->size()); in TEST() [all …]
|
/system/extras/simpleperf/ |
D | record_file_writer.cpp | 93 if (!Write(attr_id.ids.data(), attr_id.ids.size() * sizeof(uint64_t))) { in WriteAttrSection() 107 file_attr.ids.size = attr_id.ids.size() * sizeof(uint64_t); in WriteAttrSection() 108 id_section_offset += file_attr.ids.size; in WriteAttrSection() 134 if (record.size() <= RECORD_SIZE_LIMIT) { in WriteRecord() 135 bool result = WriteData(record.Binary(), record.size()); in WriteRecord() 144 uint32_t left_bytes = static_cast<uint32_t>(record.size()); in WriteRecord() 151 header.size = bytes_to_write + Record::header_size(); in WriteRecord() 164 header.size = Record::header_size(); in WriteRecord() 206 if (record_buf.size() < header.size) { in ReadDataSection() 207 record_buf.resize(header.size); in ReadDataSection() [all …]
|
/system/core/property_service/libpropertyinfoserializer/ |
D | trie_serializer.cpp | 28 arena_->AllocateAndWriteUint32(strings.size()); in SerializeStrings() 31 uint32_t offset_array_offset = arena_->AllocateUint32Array(strings.size()); in SerializeStrings() 36 for (unsigned int i = 0; i < strings.size(); ++i, ++it) { in SerializeStrings() 52 serialized_property_entry->namelen = property_entry.name.size(); in WritePropertyEntry() 68 [](const auto& lhs, const auto& rhs) { return lhs.name.size() > rhs.name.size(); }); in WriteTrieNode() 70 trie->num_prefixes = sorted_prefix_matches.size(); in WriteTrieNode() 72 uint32_t prefix_entries_array_offset = arena_->AllocateUint32Array(sorted_prefix_matches.size()); in WriteTrieNode() 75 for (unsigned int i = 0; i < sorted_prefix_matches.size(); ++i) { in WriteTrieNode() 86 trie->num_exact_matches = sorted_exact_matches.size(); in WriteTrieNode() 89 arena_->AllocateUint32Array(sorted_exact_matches.size()); in WriteTrieNode() [all …]
|
/system/memory/libmemunreachable/tests/ |
D | MemUnreachable_test.cpp | 35 explicit HiddenPointer(size_t size = 256) { Set(malloc(size)); } in HiddenPointer() argument 68 void __attribute__((noinline)) CleanStack(size_t size) { in CleanStack() argument 69 void* buf = alloca(size); in CleanStack() 70 memset(buf, 0, size); in CleanStack() 88 ASSERT_EQ(0U, info.leaks.size()); in TEST_F() 101 ASSERT_EQ(0U, info.leaks.size()); in TEST_F() 110 ASSERT_EQ(1U, info.leaks.size()); in TEST_F() 119 ASSERT_EQ(0U, info.leaks.size()); in TEST_F() 134 ASSERT_EQ(0U, info.leaks.size()); in TEST_F() 143 ASSERT_EQ(1U, info.leaks.size()); in TEST_F() [all …]
|
/system/core/libutils/include/utils/ |
D | Flattenable.h | 38 static size_t align(size_t size) { in align() argument 40 return (size + (N-1)) & ~(N-1); in align() 61 static void advance(void*& buffer, size_t& size, size_t offset) { in advance() argument 63 size -= offset; in advance() 66 static void advance(void const*& buffer, size_t& size, size_t offset) { in advance() argument 68 size -= offset; in advance() 73 static void write(void*& buffer, size_t& size, const T& value) { in write() argument 77 advance(buffer, size, sizeof(T)); in write() 82 static void read(void const*& buffer, size_t& size, T& value) { in read() argument 86 advance(buffer, size, sizeof(T)); in read() [all …]
|
/system/chre/platform/slpi/ |
D | memory.cc | 37 void *memoryAlloc(size_t size) { in memoryAlloc() argument 39 void *ptr = sns_malloc(SNS_HEAP_CHRE_ISLAND, size); in memoryAlloc() 44 if (ptr == nullptr && size != 0) { in memoryAlloc() 48 ptr = memoryAllocBigImage(size); in memoryAlloc() 58 return malloc(size); in memoryAlloc() 62 void *memoryAllocBigImage(size_t size) { in memoryAllocBigImage() argument 63 return malloc(size); in memoryAllocBigImage() 66 void *palSystemApiMemoryAlloc(size_t size) { in palSystemApiMemoryAlloc() argument 67 return malloc(size); in palSystemApiMemoryAlloc()
|