Home
last modified time | relevance | path

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

12

/art/runtime/jdwp/
Djdwp_bits.h70 static inline void Set1(uint8_t* buf, uint8_t val) { in Set1() argument
71 *buf = val; in Set1()
75 static inline void Set2BE(uint8_t* buf, uint16_t val) { in Set2BE() argument
76 *buf++ = (uint8_t)(val >> 8); in Set2BE()
77 *buf = (uint8_t)(val); in Set2BE()
81 static inline void Set4BE(uint8_t* buf, uint32_t val) { in Set4BE() argument
82 *buf++ = (uint8_t)(val >> 24); in Set4BE()
83 *buf++ = (uint8_t)(val >> 16); in Set4BE()
84 *buf++ = (uint8_t)(val >> 8); in Set4BE()
85 *buf = (uint8_t)(val); in Set4BE()
[all …]
Djdwp_expand_buf.cc153 static void SetUtf8String(uint8_t* buf, const char* str, size_t strLen) { in SetUtf8String() argument
154 Set4BE(buf, strLen); in SetUtf8String()
155 memcpy(buf + sizeof(uint32_t), str, strLen); in SetUtf8String()
179 void expandBufAddLocation(ExpandBuf* buf, const JdwpLocation& location) { in expandBufAddLocation() argument
180 expandBufAdd1(buf, location.type_tag); in expandBufAddLocation()
181 expandBufAddObjectId(buf, location.class_id); in expandBufAddLocation()
182 expandBufAddMethodId(buf, location.method_id); in expandBufAddLocation()
183 expandBufAdd8BE(buf, location.dex_pc); in expandBufAddLocation()
Djdwp.h65 static inline void SetFieldId(uint8_t* buf, FieldId val) { return Set8BE(buf, val); } in SetFieldId() argument
66 static inline void SetMethodId(uint8_t* buf, MethodId val) { return Set8BE(buf, val); } in SetMethodId() argument
67 static inline void SetObjectId(uint8_t* buf, ObjectId val) { return Set8BE(buf, val); } in SetObjectId() argument
68 static inline void SetRefTypeId(uint8_t* buf, RefTypeId val) { return Set8BE(buf, val); } in SetRefTypeId() argument
69 static inline void SetFrameId(uint8_t* buf, FrameId val) { return Set8BE(buf, val); } in SetFrameId() argument
/art/runtime/base/unix_file/
Drandom_access_file_test.h56 char buf[256]; in ReadString() local
59 while ((n = f->Read(buf, sizeof(buf), offset)) > 0) { in ReadString()
60 s->append(buf, n); in ReadString()
67 char buf[256]; in TestRead() local
72 ASSERT_EQ(0, file->Read(buf, 0, 0)); in TestRead()
73 ASSERT_EQ(0, file->Read(buf, 123, 0)); in TestRead()
85 std::unique_ptr<char[]> buf(new char[buf_size]); in TestReadContent()
87 ASSERT_EQ(-EINVAL, file->Read(buf.get(), 0, -123)); in TestReadContent()
90 ASSERT_EQ(content.size(), static_cast<uint64_t>(file->Read(buf.get(), buf_size, 0))); in TestReadContent()
91 ASSERT_EQ(std::string(buf.get(), content.size()), content); in TestReadContent()
[all …]
Drandom_access_file_utils.cc26 std::vector<char> buf(4096); in CopyFile() local
29 while ((n = src.Read(&buf[0], buf.size(), offset)) > 0) { in CopyFile()
30 if (dst->Write(&buf[0], n, offset) != n) { in CopyFile()
Drandom_access_file.h45 virtual int64_t Read(char* buf, int64_t byte_count, int64_t offset) const = 0;
60 virtual int64_t Write(const char* buf, int64_t byte_count, int64_t offset) = 0;
Dfd_file.cc154 int64_t FdFile::Read(char* buf, int64_t byte_count, int64_t offset) const { in Read() argument
156 int rc = TEMP_FAILURE_RETRY(pread64(fd_, buf, byte_count, offset)); in Read()
158 int rc = TEMP_FAILURE_RETRY(pread(fd_, buf, byte_count, offset)); in Read()
180 int64_t FdFile::Write(const char* buf, int64_t byte_count, int64_t offset) { in Write() argument
183 int rc = TEMP_FAILURE_RETRY(pwrite64(fd_, buf, byte_count, offset)); in Write()
185 int rc = TEMP_FAILURE_RETRY(pwrite(fd_, buf, byte_count, offset)); in Write()
207 static ssize_t ReadIgnoreOffset(int fd, void *buf, size_t count, off_t offset) { in ReadIgnoreOffset() argument
209 return read(fd, buf, count); in ReadIgnoreOffset()
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/
Dutf_test.cc314 static void testConversions(uint16_t *buf, int char_count) { in testConversions() argument
321 byte_count_reference = CountUtf8Bytes_reference(buf, char_count); in testConversions()
322 byte_count_test = CountUtf8Bytes(buf, char_count); in testConversions()
326 ConvertUtf16ToModifiedUtf8_reference(bytes_reference, buf, char_count); in testConversions()
327 ConvertUtf16ToModifiedUtf8(bytes_test, byte_count_test, buf, char_count); in testConversions()
345 EXPECT_EQ(buf[i], out_buf_reference[i]); in testConversions()
346 EXPECT_EQ(buf[i], out_buf_test[i]); in testConversions()
352 uint16_t buf[4] = { 0 }; in TEST_F() local
360 buf[0] = 'h'; in TEST_F()
361 buf[1] = codePoint; in TEST_F()
[all …]
Dmonitor_android.cc30 static void Set4LE(uint8_t* buf, uint32_t val) { in Set4LE() argument
31 *buf++ = (uint8_t)(val); in Set4LE()
32 *buf++ = (uint8_t)(val >> 8); in Set4LE()
33 *buf++ = (uint8_t)(val >> 16); in Set4LE()
34 *buf = (uint8_t)(val >> 24); in Set4LE()
Dzip_archive_test.cc55 uint8_t buf[kBufSize]; in TEST_F() local
57 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize)); in TEST_F()
61 computed_crc = crc32(computed_crc, buf, bytes_read); in TEST_F()
Dtrace.cc197 static void Append2LE(uint8_t* buf, uint16_t val) { in Append2LE() argument
198 *buf++ = static_cast<uint8_t>(val); in Append2LE()
199 *buf++ = static_cast<uint8_t>(val >> 8); in Append2LE()
203 static void Append4LE(uint8_t* buf, uint32_t val) { in Append4LE() argument
204 *buf++ = static_cast<uint8_t>(val); in Append4LE()
205 *buf++ = static_cast<uint8_t>(val >> 8); in Append4LE()
206 *buf++ = static_cast<uint8_t>(val >> 16); in Append4LE()
207 *buf++ = static_cast<uint8_t>(val >> 24); in Append4LE()
211 static void Append8LE(uint8_t* buf, uint64_t val) { in Append8LE() argument
212 *buf++ = static_cast<uint8_t>(val); in Append8LE()
[all …]
Dutils.cc144 std::vector<char> buf(8 * KB); in ReadFileToString() local
146 int64_t n = TEMP_FAILURE_RETRY(read(file.Fd(), &buf[0], buf.size())); in ReadFileToString()
153 result->append(&buf[0], n); in ReadFileToString()
164 char buf[kBufSize + 1]; // +1 for terminator. in PrintFileToLog() local
168 int64_t n = TEMP_FAILURE_RETRY(read(file.Fd(), &buf[filled_to], kBufSize - filled_to)); in PrintFileToLog()
172 buf[filled_to] = 0; in PrintFileToLog()
173 LOG(level) << buf; in PrintFileToLog()
181 if (buf[i] == '\n') { in PrintFileToLog()
183 buf[i] = 0; in PrintFileToLog()
184 LOG(level) << buf; in PrintFileToLog()
[all …]
/art/runtime/base/
Dbit_vector_test.cc218 uint32_t buf; in TEST() local
220 bv.CopyTo(&buf, sizeof(buf)); in TEST()
222 EXPECT_EQ(0u, buf); in TEST()
228 uint32_t buf; in TEST() local
233 EXPECT_EQ(sizeof(buf), bv.GetSizeOf()); in TEST()
235 bv.CopyTo(&buf, sizeof(buf)); in TEST()
236 EXPECT_EQ(0x04020001u, buf); in TEST()
243 uint8_t buf[5]; in TEST() local
247 EXPECT_LT(sizeof(buf), bv.GetSizeOf()); in TEST()
249 bv.CopyTo(buf, sizeof(buf)); in TEST()
[all …]
Dstringprintf.cc51 char* buf = new char[length]; in StringAppendV() local
55 result = vsnprintf(buf, length, format, backup_ap); in StringAppendV()
60 dst->append(buf, result); in StringAppendV()
62 delete[] buf; in StringAppendV()
Dlogging.cc285 char* buf = nullptr; in LogLineLowStack() local
292 buf = reinterpret_cast<char*>(malloc(buf_size)); in LogLineLowStack()
294 if (buf != nullptr) { in LogLineLowStack()
295 snprintf(buf, buf_size, "%s:%u] %s", file, line, message); in LogLineLowStack()
296 android_writeLog(priority, tag, buf); in LogLineLowStack()
297 free(buf); in LogLineLowStack()
/art/sigchainlib/
Dsigchain_dummy.cc37 char buf[256]; in log() local
40 vsnprintf(buf, sizeof(buf), format, ap); in log()
42 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf); in log()
44 std::cout << buf << "\n"; in log()
Dsigchain.cc102 char buf[256]; in log() local
105 vsnprintf(buf, sizeof(buf), format, ap); in log()
107 __android_log_write(ANDROID_LOG_ERROR, "libsigchain", buf); in log()
109 std::cout << buf << "\n"; in log()
/art/tools/dmtracedump/
Dtracedump.cc1246 char buf[80]; in printInclusiveMethod() local
1265 sprintf(buf, "[%d]", relative->index); in printInclusiveMethod()
1267 int32_t len = strlen(buf); in printInclusiveMethod()
1269 sprintf(buf, "<a href=\"#m%d\">[%d]", relative->index, relative->index); in printInclusiveMethod()
1281 "", space_ptr, buf, anchor_close, pTimed->numCalls, nCalls, in printInclusiveMethod()
1285 "", per, space_ptr, buf, anchor_close, pTimed->numCalls, nCalls, in printInclusiveMethod()
1292 space_ptr, buf, anchor_close, pTimed->numCalls, nCalls, in printInclusiveMethod()
1296 per, space_ptr, buf, anchor_close, pTimed->numCalls, nCalls, in printInclusiveMethod()
1514 char buf[40]; in printInclusiveProfile() local
1541 sprintf(buf, "[%d]", ii); in printInclusiveProfile()
[all …]
Dcreatetesttrace.cc75 char buf[BUF_SIZE]; variable
128 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile()
129 char* cp = buf; in parseInputFile()
158 while (fgets(buf, BUF_SIZE, inputFp)) { in parseInputFile()
166 char* cp = buf; in parseInputFile()
235 printf("Indent: %d; IndentLevel: %d; Line: %s", indent, indentLevel, buf); in parseInputFile()
253 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
263 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
271 fprintf(stderr, "Error: line %d: %s", linenum, buf); in parseInputFile()
/art/runtime/openjdkjvm/
DOpenjdkJvm.cc103 JNIEXPORT jint JVM_Read(jint fd, char* buf, jint nbytes) { in JVM_Read() argument
104 return TEMP_FAILURE_RETRY(read(fd, buf, nbytes)); in JVM_Read()
108 JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) { in JVM_Write() argument
109 return TEMP_FAILURE_RETRY(write(fd, buf, nbytes)); in JVM_Write()
161 JNIEXPORT jint JVM_GetLastErrorString(char* buf, int len) { in JVM_GetLastErrorString() argument
168 char* result = strerror_r(err, buf, len); in JVM_GetLastErrorString()
169 if (result != buf) { in JVM_GetLastErrorString()
170 strncpy(buf, result, len); in JVM_GetLastErrorString()
171 buf[len - 1] = '\0'; in JVM_GetLastErrorString()
174 return strlen(buf); in JVM_GetLastErrorString()
[all …]
/art/compiler/debug/
Delf_gnu_debugdata_writer.h47 static SRes ReadImpl(void* p, void* buf, size_t* size) { in XzCompress()
50 memcpy(buf, ctx->src_->data() + ctx->src_pos_, *size); in XzCompress()
54 static size_t WriteImpl(void* p, const void* buf, size_t size) { in XzCompress()
56 const uint8_t* buffer = reinterpret_cast<const uint8_t*>(buf); in XzCompress()
/art/compiler/linker/
Doutput_stream_test.cc44 uint8_t buf[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; in GenerateTestOutput() local
45 EXPECT_TRUE(output_stream_->WriteFully(buf, 2)); in GenerateTestOutput()
49 EXPECT_TRUE(output_stream_->WriteFully(buf, 4)); in GenerateTestOutput()
51 EXPECT_TRUE(output_stream_->WriteFully(buf, 6)); in GenerateTestOutput()
/art/tools/
Dstream-trace-converter.py64 buf = input.read(length)
65 if len(buf) != length:
67 output.write(buf)
/art/dexdump/
Ddexdump.cc499 const Instruction* pDecInsn, char* buf, size_t bufSize) { in indexString() argument
535 outSize = snprintf(buf, bufSize, "<unknown-index>"); in indexString()
540 outSize = snprintf(buf, bufSize, "<no-index>"); in indexString()
545 outSize = snprintf(buf, bufSize, "%s // type@%0*x", tp, width, index); in indexString()
547 outSize = snprintf(buf, bufSize, "<type?> // type@%0*x", width, index); in indexString()
553 outSize = snprintf(buf, bufSize, "\"%s\" // string@%0*x", st, width, index); in indexString()
555 outSize = snprintf(buf, bufSize, "<string?> // string@%0*x", width, index); in indexString()
564 outSize = snprintf(buf, bufSize, "%s.%s:%s // method@%0*x", in indexString()
567 outSize = snprintf(buf, bufSize, "<method?> // method@%0*x", width, index); in indexString()
576 outSize = snprintf(buf, bufSize, "%s.%s:%s // field@%0*x", in indexString()
[all …]

12