Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 228) sorted by relevance

12345678910

/system/extras/tests/mmc_tracepoints/
Dmmc_trace_sample_data12 … 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/libion/tests/
Dexit_test.cpp32 for (size_t size : allocationSizes) { in TEST_F() local
34 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
38 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F()
50 for (size_t size : allocationSizes) { in TEST_F() local
52 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
56 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &handle_fd)); in TEST_F()
68 for (size_t size : allocationSizes) { in TEST_F() local
71 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
75 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &handle_fd)); in TEST_F()
80 << " and size " << size in TEST_F()
[all …]
Dmap_test.cpp32 for (size_t size : allocationSizes) { in TEST_F() local
34 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F()
42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F()
50 memset(ptr, 0xaa, size); in TEST_F()
52 ASSERT_EQ(0, munmap(ptr, size)); in TEST_F()
61 for (size_t size : allocationSizes) { in TEST_F() local
63 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
66 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &map_fd)); in TEST_F()
70 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
[all …]
Dallocate_test.cpp31 for (size_t size : allocationSizes) { in TEST_F() local
33 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
35 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle)); in TEST_F()
46 for (size_t size : allocationSizes) { in TEST_F() local
48 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
50 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED, &handle)); in TEST_F()
61 for (size_t size : allocationSizes) { in TEST_F() local
63 SCOPED_TRACE(::testing::Message() << "size " << size); in TEST_F()
65 … ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED_NEEDS_SYNC, &handle)); in TEST_F()
76 for (size_t size : allocationSizes) { in TEST_F() local
[all …]
/system/keymaster/
Dkey_blob_test.cpp84 size_t size = blob_->SerializedSize(); in TEST_F() local
85 UniquePtr<uint8_t[]> serialized_blob(new uint8_t[size]); in TEST_F()
86 blob_->Serialize(serialized_blob.get(), serialized_blob.get() + size); in TEST_F()
90 uint8_t* end = begin + size; in TEST_F()
94 keymaster_key_blob_t encrypted_blob = {serialized_blob.get(), size}; in TEST_F()
101 size_t size = blob_->SerializedSize(); in TEST_F() local
102 UniquePtr<uint8_t[]> serialized_blob(new uint8_t[size]); in TEST_F()
103 blob_->Serialize(serialized_blob.get(), serialized_blob.get() + size); in TEST_F()
109 keymaster_key_blob_t encrypted_blob = {serialized_blob.get(), size}; in TEST_F()
115 size_t size = blob_->SerializedSize(); in TEST_F() local
[all …]
Dserializable.cpp28 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
29 if (end < *buf_ptr + size) in copy_from_buf()
31 memcpy(dest, *buf_ptr, size); in copy_from_buf()
32 *buf_ptr += size; in copy_from_buf()
36 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, in copy_size_and_data_from_buf() argument
38 if (!copy_uint32_from_buf(buf_ptr, end, size) || *buf_ptr + *size > end) { in copy_size_and_data_from_buf()
41 if (*size == 0) { in copy_size_and_data_from_buf()
45 dest->reset(new uint8_t[*size]); in copy_size_and_data_from_buf()
48 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
51 bool Buffer::reserve(size_t size) { in reserve() argument
[all …]
Dauthorization_set_test.cpp46 EXPECT_EQ(8U, set.size()); in TEST()
77 EXPECT_EQ(8U, set.size()); in TEST()
109 EXPECT_EQ(8U, set.size()); in TEST()
135 EXPECT_EQ(8U, set.size()); in TEST()
161 size_t size = set.SerializedSize(); in TEST() local
162 EXPECT_TRUE(size > 0); in TEST()
164 UniquePtr<uint8_t[]> buf(new uint8_t[size]); in TEST()
165 EXPECT_EQ(buf.get() + size, set.Serialize(buf.get(), buf.get() + size)); in TEST()
166 AuthorizationSet deserialized(buf.get(), size); in TEST()
191 size_t size = set.SerializedSize(); in TEST() local
[all …]
/system/extras/tests/memtest/
Dmemtest.cpp119 size_t size = 0x40000000; in malloc_test() local
120 while (size) { in malloc_test()
121 void* addr = malloc(size); in malloc_test()
123 printf("size = %9zd failed\n", size); in malloc_test()
124 size >>= 1; in malloc_test()
126 total += size; in malloc_test()
128 size, addr, total, total / (1024*1024)); in malloc_test()
132 memset(addr, 0, size); in malloc_test()
134 size = size + (size>>1); in malloc_test()
144 size_t size = i==0 ? 4096 : 48*1024*1024; // 48 MB in madvise_test() local
[all …]
/system/extras/tests/sdcard/
Dsysutil.cpp77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) in readStringFromFile() argument
79 if (NULL == start || size == 0) in readStringFromFile()
99 --size; // reserve space for trailing '\0' in readStringFromFile()
101 while (size > 0 && !error && !eof && attempts < kMaxAttempts) in readStringFromFile()
105 s = read(fd, end, size); in readStringFromFile()
122 size -= s; in readStringFromFile()
161 size_t size = len; in writeStringToFile() local
165 while (size > 0 && !error && attempts < kMaxAttempts) in writeStringToFile()
167 ssize_t s = write(fd, start, size); in writeStringToFile()
180 size -= s; in writeStringToFile()
[all …]
Dstopwatch.cpp36 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \ argument
37 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \
39 if (len > static_cast<int>(size)) { \
43 (size) -= len; (str) += len; \
106 void StopWatch::sprint(char **str, size_t *size) in sprint() argument
118 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName); in sprint()
121 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n", in sprint()
123 printThroughput(str, size); in sprint()
124 printAverageMinMax(str, size); in sprint()
130 … SNPRINTF_OR_RETURN(*str, *size, "# Name Iterations Duration Min MinIdx Max MaxIdx SizeKbytes\n"); in sprint()
[all …]
/system/core/include/utils/
DFlattenable.h32 static size_t align(size_t size) { in align() argument
34 return (size + (N-1)) & ~(N-1); in align()
50 static void advance(void*& buffer, size_t& size, size_t offset) { in advance() argument
52 size -= offset; in advance()
55 static void advance(void const*& buffer, size_t& size, size_t offset) { in advance() argument
57 size -= offset; in advance()
62 static void write(void*& buffer, size_t& size, const T& value) { in write() argument
64 advance(buffer, size, sizeof(T)); in write()
69 static void read(void const*& buffer, size_t& size, T& value) { in read() argument
71 advance(buffer, size, sizeof(T)); in read()
[all …]
DString16.h67 inline size_t size() const;
147 inline size_t String16::size() const in size() function
178 return strzcmp16(mString, size(), other.mString, other.size()); in compare()
183 return strzcmp16(mString, size(), other.mString, other.size()) < 0;
188 return strzcmp16(mString, size(), other.mString, other.size()) <= 0;
193 return strzcmp16(mString, size(), other.mString, other.size()) == 0;
198 return strzcmp16(mString, size(), other.mString, other.size()) != 0;
203 return strzcmp16(mString, size(), other.mString, other.size()) >= 0;
208 return strzcmp16(mString, size(), other.mString, other.size()) > 0;
/system/core/libutils/
DLinearAllocator.cpp55 #define ADD_ALLOCATION(size) argument
56 #define RM_ALLOCATION(size) argument
72 static void _addAllocation(size_t size) { in _addAllocation() argument
74 s_totalAllocations += size; in _addAllocation()
78 #define ADD_ALLOCATION(size) _addAllocation(size); argument
79 #define RM_ALLOCATION(size) _addAllocation(-size); argument
140 bool LinearAllocator::fitsInCurrentPage(size_t size) { in fitsInCurrentPage() argument
141 return mNext && ((char*)mNext + size) <= end(mCurrentPage); in fitsInCurrentPage()
144 void LinearAllocator::ensureNext(size_t size) { in ensureNext() argument
145 if (fitsInCurrentPage(size)) return; in ensureNext()
[all …]
DJenkinsHash.cpp33 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { in JenkinsHashMixBytes() argument
34 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixBytes()
36 for (i = 0; i < (size & -4); i += 4) { in JenkinsHashMixBytes()
40 if (size & 3) { in JenkinsHashMixBytes()
42 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0; in JenkinsHashMixBytes()
43 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0; in JenkinsHashMixBytes()
49 uint32_t JenkinsHashMixShorts(uint32_t hash, const uint16_t* shorts, size_t size) { in JenkinsHashMixShorts() argument
50 hash = JenkinsHashMix(hash, (uint32_t)size); in JenkinsHashMixShorts()
52 for (i = 0; i < (size & -2); i += 2) { in JenkinsHashMixShorts()
56 if (size & 1) { in JenkinsHashMixShorts()
/system/core/fastboot/
Dprotocol.c50 static int check_response(usb_handle *usb, unsigned int size, char *response) in check_response() argument
91 if(!memcmp(status, "DATA", 4) && size > 0){ in check_response()
93 if(dsize > size) { in check_response()
109 static int _command_start(usb_handle *usb, const char *cmd, unsigned size, in _command_start() argument
129 return check_response(usb, size, response); in _command_start()
132 static int _command_data(usb_handle *usb, const void *data, unsigned size) in _command_data() argument
136 r = usb_write(usb, data, size); in _command_data()
142 if(r != ((int) size)) { in _command_data()
162 const void *data, unsigned size, in _command_send() argument
166 if (size == 0) { in _command_send()
[all …]
/system/extras/micro_bench/
Dmicro_bench.cpp112 uint8_t *allocateAlignedMemory(size_t size, int alignment, int or_mask) { in allocateAlignedMemory() argument
113 uint64_t ptr = reinterpret_cast<uint64_t>(malloc(size + 3 * alignment)); in allocateAlignedMemory()
119 void initString(uint8_t *buf, size_t size) { in initString() argument
120 for (size_t i = 0; i < size - 1; i++) { in initString()
123 buf[size-1] = '\0'; in initString()
126 static inline double computeAverage(uint64_t time_ns, size_t size, size_t copies) { in computeAverage() argument
127 return ((size/1024.0) * copies) / ((double)time_ns/NS_PER_SEC); in computeAverage()
142 static inline void printIter(uint64_t time_ns, const char *name, size_t size, size_t copies, double… in printIter() argument
144 name, copies, size, (double)time_ns/NS_PER_SEC, avg/1024.0); in printIter()
147 static inline void printSummary(uint64_t /*time_ns*/, const char *name, size_t size, size_t copies,… in printSummary() argument
[all …]
/system/core/toolbox/
Dinsmod.c18 ssize_t size; in read_file() local
29 size = sb.st_size; in read_file()
32 buffer = malloc(size); in read_file()
37 ret = read(fd, buffer, size); in read_file()
38 if (ret != size) in read_file()
42 *_size = size; in read_file()
52 ssize_t size = 0; in insmod_main() local
63 file = read_file(argv[1], &size); in insmod_main()
85 ret = init_module(file, size, opts); in insmod_main()
/system/core/libcutils/arch-mips/
Dandroid_memset.c20 void _memset16(uint16_t* dst, uint16_t value, size_t size);
21 void _memset32(uint32_t* dst, uint32_t value, size_t size);
23 void android_memset16(uint16_t* dst, uint16_t value, size_t size) in android_memset16() argument
25 _memset16(dst, value, size); in android_memset16()
28 void android_memset32(uint32_t* dst, uint32_t value, size_t size) in android_memset32() argument
30 _memset32(dst, value, size); in android_memset32()
/system/core/libcutils/
Dmemory.c20 void android_memset16(uint16_t* dst, uint16_t value, size_t size) in android_memset16() argument
22 size >>= 1; in android_memset16()
23 while (size--) { in android_memset16()
30 void android_memset32(uint32_t* dst, uint32_t value, size_t size) in android_memset32() argument
32 size >>= 2; in android_memset32()
33 while (size--) { in android_memset32()
/system/core/libzipfile/
Dtest_zipfile.c12 size_t size, unsize; in main() local
41 size = ftell(f); in main()
44 buf = malloc(size); in main()
45 fread(buf, 1, size, f); in main()
47 zip = init_zipfile(buf, size); in main()
76 size = unsize * 1.001; in main()
77 scratch = malloc(size); in main()
79 err = decompress_zipentry(entry, scratch, size); in main()
/system/core/libutils/tests/
DVector_test.cpp50 EXPECT_EQ(vector.size(), 3); in TEST_F()
55 EXPECT_EQ(other.size(), 3); in TEST_F()
61 EXPECT_EQ(vector.size(), 4); in TEST_F()
62 EXPECT_EQ(other.size(), 3); in TEST_F()
68 EXPECT_EQ(vector.size(), 4); in TEST_F()
69 EXPECT_EQ(other.size(), 4); in TEST_F()
146 ASSERT_EQ(vector1.size(), vector2.size()); in TEST_F()
147 for (size_t i = 0; i < vector1.size(); ++i) { in TEST_F()
DBlobCache_test.cpp274 size_t size = mBC->getFlattenedSize(); in roundTrip() local
275 uint8_t* flat = new uint8_t[size]; in roundTrip()
276 ASSERT_EQ(OK, mBC->flatten(flat, size)); in roundTrip()
277 ASSERT_EQ(OK, mBC2->unflatten(flat, size)); in roundTrip()
322 size_t size = mBC->getFlattenedSize(); in TEST_F() local
323 uint8_t* flat = new uint8_t[size]; in TEST_F()
324 ASSERT_EQ(OK, mBC->flatten(flat, size)); in TEST_F()
344 size_t size = mBC->getFlattenedSize() - 1; in TEST_F() local
345 uint8_t* flat = new uint8_t[size]; in TEST_F()
346 ASSERT_EQ(BAD_VALUE, mBC->flatten(flat, size)); in TEST_F()
[all …]
/system/core/libpixelflinger/codeflinger/
DCodeCache.cpp103 Assembly::Assembly(size_t size) in Assembly() argument
106 mBase = (uint32_t*)mspace_malloc(getMspace(), size); in Assembly()
109 "store of size %zd", size, kMaxCodeCacheCapacity); in Assembly()
110 mSize = size; in Assembly()
130 ssize_t Assembly::size() const in size() function in android::Assembly
148 return size(); in resize()
153 CodeCache::CodeCache(size_t size) in CodeCache() argument
154 : mCacheSize(size), mCacheInUse(0) in CodeCache()
183 const ssize_t assemblySize = assembly->size(); in cache()
187 size_t count = mCacheData.size(); in cache()
[all …]
/system/core/fastbootd/commands/
Dflash.c84 int64_t size; in flash_erase() local
85 size = get_block_device_size(fd); in flash_erase()
86 D(DEBUG, "erase %"PRId64" data from %d\n", size, fd); in flash_erase()
88 return wipe_block_device(fd, size); in flash_erase()
91 int flash_write(int partition_fd, int data_fd, ssize_t size, ssize_t skip) in flash_write() argument
97 while (written < size) { in flash_write()
98 int current_size = MIN(size - written, BUFFER_SIZE); in flash_write()
101 …D(ERR, "Error in writing data, unable to map data file %zd at %zd size %d", size, skip, current_si… in flash_write()
/system/extras/showmap/
Dshowmap.c18 unsigned size; member
93 int size; in parse_field() local
94 if (sscanf(line + len, "%d kB", &size) == 1) { in parse_field()
96 mi->size = size; in parse_field()
98 mi->rss = size; in parse_field()
100 mi->pss = size; in parse_field()
102 mi->shared_clean = size; in parse_field()
104 mi->shared_dirty = size; in parse_field()
106 mi->private_clean = size; in parse_field()
108 mi->private_dirty = size; in parse_field()
[all …]

12345678910