Searched refs:buf (Results 1 - 25 of 43) sorted by relevance

12

/art/runtime/base/unix_file/
H A Drandom_access_file_utils.cc26 std::vector<char> buf(4096);
29 while ((n = src.Read(&buf[0], buf.size(), offset)) > 0) {
30 if (dst->Write(&buf[0], n, offset) != n) {
H A Drandom_access_file.h43 // Reads 'byte_count' bytes into 'buf' starting at offset 'offset' in the
45 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const = 0;
56 // Writes 'byte_count' bytes from 'buf' starting at offset 'offset' in the
60 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) = 0;
H A Drandom_access_file_test.h56 char buf[256]; local
59 while ((n = f->Read(buf, sizeof(buf), offset)) > 0) {
60 s->append(buf, n);
67 char buf[256]; local
72 ASSERT_EQ(0, file->Read(buf, 0, 0));
73 ASSERT_EQ(0, file->Read(buf, 123, 0));
85 std::unique_ptr<char[]> buf(new char[buf_size]);
87 ASSERT_EQ(-EINVAL, file->Read(buf.get(), 0, -123));
90 ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Read(buf
159 char buf[256]; local
[all...]
H A Dfd_file.cc154 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { argument
156 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset));
158 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset));
180 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { argument
183 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset));
185 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset));
207 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { argument
209 return read(fd, buf, count);
H A Dfd_file.h55 int64_t Read(char* buf, int64_t byte_count, int64_t offset) const OVERRIDE WARN_UNUSED;
58 int64_t Write(const char* buf, int64_t byte_count, int64_t offset) OVERRIDE WARN_UNUSED;
/art/runtime/jdwp/
H A Djdwp_bits.h70 static inline void Set1(uint8_t* buf, uint8_t val) { argument
71 *buf = val;
75 static inline void Set2BE(uint8_t* buf, uint16_t val) { argument
76 *buf++ = (uint8_t)(val >> 8);
77 *buf = (uint8_t)(val);
81 static inline void Set4BE(uint8_t* buf, uint32_t val) { argument
82 *buf++ = (uint8_t)(val >> 24);
83 *buf++ = (uint8_t)(val >> 16);
84 *buf++ = (uint8_t)(val >> 8);
85 *buf
89 Set8BE(uint8_t* buf, uint64_t val) argument
[all...]
H A Djdwp_expand_buf.cc153 static void SetUtf8String(uint8_t* buf, const char* str, size_t strLen) { argument
154 Set4BE(buf, strLen);
155 memcpy(buf + sizeof(uint32_t), str, strLen);
179 void expandBufAddLocation(ExpandBuf* buf, const JdwpLocation& location) { argument
180 expandBufAdd1(buf, location.type_tag);
181 expandBufAddObjectId(buf, location.class_id);
182 expandBufAddMethodId(buf, location.method_id);
183 expandBufAdd8BE(buf, location.dex_pc);
H A Djdwp.h65 static inline void SetFieldId(uint8_t* buf, FieldId val) { return Set8BE(buf, val); } argument
66 static inline void SetMethodId(uint8_t* buf, MethodId val) { return Set8BE(buf, val); } argument
67 static inline void SetObjectId(uint8_t* buf, ObjectId val) { return Set8BE(buf, val); } argument
68 static inline void SetRefTypeId(uint8_t* buf, RefTypeId val) { return Set8BE(buf, val); } argument
69 static inline void SetFrameId(uint8_t* buf, FrameId val) { return Set8BE(buf, va argument
[all...]
/art/sigchainlib/
H A Dsigchain_dummy.cc37 char buf[256]; local
40 vsnprintf(buf, sizeof(buf), format, ap);
42 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf);
44 std::cout << buf << "\n"; local
H A Dsigchain.cc102 char buf[256]; local
105 vsnprintf(buf, sizeof(buf), format, ap);
107 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf);
109 std::cout << buf << "\n"; local
/art/runtime/base/
H A Dbit_vector_test.cc216 // Test copying an empty BitVector. Padding should fill `buf` with zeroes.
218 uint32_t buf; local
220 bv.CopyTo(&buf, sizeof(buf));
222 EXPECT_EQ(0u, buf);
226 // Test copying when `bv.storage_` and `buf` are of equal lengths.
228 uint32_t buf; local
233 EXPECT_EQ(sizeof(buf), bv.GetSizeOf());
235 bv.CopyTo(&buf, sizeof(buf));
243 uint8_t buf[5]; local
260 uint32_t buf[2]; local
[all...]
H A Dstringprintf.cc51 char* buf = new char[length]; local
55 result = vsnprintf(buf, length, format, backup_ap);
60 dst->append(buf, result);
62 delete[] buf;
H A Dlogging.cc48 // host right now: for the device, a stream buf collating output into lines and calling LogLine or
285 char* buf = nullptr; local
288 // Allocate buffer for snprintf(buf, buf_size, "%s:%u] %s", file, line, message) below.
292 buf = reinterpret_cast<char*>(malloc(buf_size));
294 if (buf != nullptr) {
295 snprintf(buf, buf_size, "%s:%u] %s", file, line, message);
296 android_writeLog(priority, tag, buf);
297 free(buf);
H A Dstringpiece.cc37 StringPiece::size_type StringPiece::copy(char* buf, size_type n, size_type pos) const { argument
39 memcpy(buf, ptr_ + pos, ret);
/art/runtime/
H A Dutf_test.cc314 static void testConversions(uint16_t *buf, int char_count) { argument
321 byte_count_reference = CountUtf8Bytes_reference(buf, char_count);
322 byte_count_test = CountUtf8Bytes(buf, char_count);
326 ConvertUtf16ToModifiedUtf8_reference(bytes_reference, buf, char_count);
327 ConvertUtf16ToModifiedUtf8(bytes_test, byte_count_test, buf, char_count);
345 EXPECT_EQ(buf[i], out_buf_reference[i]);
346 EXPECT_EQ(buf[i], out_buf_test[i]);
352 uint16_t buf[4] = { 0 }; local
360 buf[0] = 'h';
361 buf[
[all...]
H A Dzip_archive_test.cc55 uint8_t buf[kBufSize]; local
57 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize));
61 computed_crc = crc32(computed_crc, buf, bytes_read);
H A Dmonitor_android.cc30 static void Set4LE(uint8_t* buf, uint32_t val) { argument
31 *buf++ = (uint8_t)(val);
32 *buf++ = (uint8_t)(val >> 8);
33 *buf++ = (uint8_t)(val >> 16);
34 *buf = (uint8_t)(val >> 24);
H A Dtrace.cc197 static void Append2LE(uint8_t* buf, uint16_t val) { argument
198 *buf++ = static_cast<uint8_t>(val);
199 *buf++ = static_cast<uint8_t>(val >> 8);
203 static void Append4LE(uint8_t* buf, uint32_t val) { argument
204 *buf++ = static_cast<uint8_t>(val);
205 *buf++ = static_cast<uint8_t>(val >> 8);
206 *buf++ = static_cast<uint8_t>(val >> 16);
207 *buf++ = static_cast<uint8_t>(val >> 24);
211 static void Append8LE(uint8_t* buf, uint64_t val) { argument
212 *buf
627 ReadBytes(uint8_t* buf, size_t bytes) argument
635 DumpBuf(uint8_t* buf, size_t buf_size, TraceClockSource clock_source) argument
[all...]
/art/compiler/debug/
H A Delf_gnu_debugdata_writer.h47 static SRes ReadImpl(void* p, void* buf, size_t* size) { argument
50 memcpy(buf, ctx->src_->data() + ctx->src_pos_, *size);
54 static size_t WriteImpl(void* p, const void* buf, size_t size) { argument
56 const uint8_t* buffer = reinterpret_cast<const uint8_t*>(buf);
/art/tools/dmtracedump/
H A Dtracedump.cc1246 char buf[80]; local
1265 sprintf(buf, "[%d]", relative->index);
1267 int32_t len = strlen(buf);
1269 sprintf(buf, "<a href=\"#m%d\">[%d]", relative->index, relative->index);
1281 "", space_ptr, buf, anchor_close, pTimed->numCalls, nCalls,
1285 "", per, space_ptr, buf, anchor_close, pTimed->numCalls, nCalls,
1292 space_ptr, buf, anchor_close, pTimed->numCalls, nCalls,
1296 per, space_ptr, buf, anchor_close, pTimed->numCalls, nCalls,
1514 char buf[40]; local
1541 sprintf(buf, "[
1643 printHtmlField(char* buf, int32_t width) argument
1735 char buf[80]; local
1779 char buf[80]; local
1945 char buf[80]; local
1989 char buf[80]; local
[all...]
H A Dcreatetesttrace.cc75 char buf[BUF_SIZE]; variable
128 while (fgets(buf, BUF_SIZE, inputFp)) {
129 char* cp = buf;
158 while (fgets(buf, BUF_SIZE, inputFp)) {
166 char* cp = buf;
235 printf("Indent: %d; IndentLevel: %d; Line: %s", indent, indentLevel, buf);
253 fprintf(stderr, "Error: line %d: %s", linenum, buf);
263 fprintf(stderr, "Error: line %d: %s", linenum, buf);
271 fprintf(stderr, "Error: line %d: %s", linenum, buf);
/art/compiler/linker/
H A Doutput_stream_test.cc44 uint8_t buf[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; local
45 EXPECT_TRUE(output_stream_->WriteFully(buf, 2));
49 EXPECT_TRUE(output_stream_->WriteFully(buf, 4));
51 EXPECT_TRUE(output_stream_->WriteFully(buf, 6));
/art/runtime/openjdkjvm/
H A DOpenjdkJvm.cc103 JNIEXPORT jint JVM_Read(jint fd, char* buf, jint nbytes) { argument
104 return TEMP_FAILURE_RETRY(read(fd, buf, nbytes));
108 JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) { argument
109 return TEMP_FAILURE_RETRY(write(fd, buf, nbytes));
161 JNIEXPORT jint JVM_GetLastErrorString(char* buf, int len) { argument
168 char* result = strerror_r(err, buf, len);
169 if (result != buf) {
170 strncpy(buf, result, len);
171 buf[len - 1] = '\0';
174 return strlen(buf);
268 JVM_Send(jint fd, char* buf, jint nBytes, jint flags) argument
[all...]
/art/tools/
H A Dstream-trace-converter.py64 buf = input.read(length)
65 if len(buf) != length:
67 output.write(buf)
/art/dexdump/
H A Ddexdump.cc499 const Instruction* pDecInsn, char* buf, size_t bufSize) {
535 outSize = snprintf(buf, bufSize, "<unknown-index>");
540 outSize = snprintf(buf, bufSize, "<no-index>");
545 outSize = snprintf(buf, bufSize, "%s // type@%0*x", tp, width, index);
547 outSize = snprintf(buf, bufSize, "<type?> // type@%0*x", width, index);
553 outSize = snprintf(buf, bufSize, "\"%s\" // string@%0*x", st, width, index);
555 outSize = snprintf(buf, bufSize, "<string?> // string@%0*x", width, index);
564 outSize = snprintf(buf, bufSize, "%s.%s:%s // method@%0*x",
567 outSize = snprintf(buf, bufSize, "<method?> // method@%0*x", width, index);
576 outSize = snprintf(buf, bufSiz
498 indexString(const DexFile* pDexFile, const Instruction* pDecInsn, char* buf, size_t bufSize) argument
[all...]

Completed in 241 milliseconds

12