/developtools/profiler/device/plugins/ftrace_plugin/test/unittest/ |
D | ftrace_field_parser_test.cpp | 32 std::vector<uint8_t> buffer_; member in __anon2a876c6b0111::FtraceFieldParserTest 37 size_t offset = buffer_.size(); in AppendInt() 38 buffer_.resize(buffer_.size() + sizeof(value)); in AppendInt() 39 if (memcpy_s(&buffer_[offset], buffer_.capacity() - offset, &value, sizeof(value))) { in AppendInt() 53 size_t offset = buffer_.size(); in AppendString() 54 buffer_.resize(buffer_.size() + str.size()); in AppendString() 55 if (memcpy_s(&buffer_[offset], buffer_.capacity() - offset, &str[0], str.size())) { in AppendString() 82 … int actual = FtraceFieldParser::ParseIntField<int>(formats_[i], buffer_.data(), buffer_.size()); 97 … int actual = FtraceFieldParser::ParseIntField<int>(formats_, i, buffer_.data(), buffer_.size()); 112 …std::string actual = FtraceFieldParser::ParseStrField(formats_[i], buffer_.data(), buffer_.size()); [all …]
|
/developtools/profiler/hiebpf/src/ |
D | ringbuffer.cpp | 35 buffer_ = reinterpret_cast<char *>(temp); 44 buffer_ = reinterpret_cast<char *>(temp); 53 buffer_ = reinterpret_cast<char *>(temp); 62 buffer_ = reinterpret_cast<char *>(temp); 88 if (buffer_ == nullptr) { in Read() 92 destBufs[0].iov_base = buffer_ + tail_; in Read() 96 destBufs[1].iov_base = buffer_ + tail_ + len; in Read() 101 destBufs[1].iov_base = buffer_; in Read() 130 if (buffer_ == nullptr) { in Write() 134 srcBufs[0].iov_base = buffer_ + head_; in Write() [all …]
|
/developtools/profiler/device/plugins/diskio_plugin/src/ |
D | diskio_data_plugin.cpp | 31 buffer_ = nullptr; in DiskioDataPlugin() 43 if (buffer_ != nullptr) { in ~DiskioDataPlugin() 44 free(buffer_); in ~DiskioDataPlugin() 45 buffer_ = nullptr; in ~DiskioDataPlugin() 51 buffer_ = malloc(READ_BUFFER_SIZE); in Start() 52 CHECK_NOTNULL(buffer_, RET_FAIL, "%s:malloc buffer_ failed!", __func__); in Start() 104 if (buffer_ != nullptr) { in Stop() 105 free(buffer_); in Stop() 106 buffer_ = nullptr; in Stop() 129 if (buffer_ == nullptr) { in ReadFile() [all …]
|
/developtools/profiler/device/plugins/ftrace_plugin/src/ |
D | result_transporter.cpp | 72 buffer_.resize(size); in Write() 73 CHECK_TRUE(buffer_.size() == size, -1, in Write() 75 __func__, size, buffer_.size(), errno, strerror(errno)); in Write() 77 int ret = packet->SerializeToArray(buffer_.data(), buffer_.size()); in Write() 80 writer_->write(writer_, buffer_.data(), buffer_.size()); in Write() 81 return buffer_.size(); in Write()
|
/developtools/profiler/hiebpf/include/ |
D | ringbuffer.h | 37 if (buffer_ != nullptr) { in ~RingBuffer() 38 delete[] buffer_; in ~RingBuffer() 39 buffer_ = nullptr; in ~RingBuffer() 45 return buffer_; 80 int ret = memcpy_s(dest, len, buffer_ + head_, bufSize_ - head_); in Peek() 84 … ret = memcpy_s(dest + bufSize_ - head_, len + head_ - bufSize_, buffer_, len + head_ - bufSize_); in Peek() 89 if (memcpy_s(dest, len, buffer_ + head_, len) != EOK) { in Peek() 132 char *buffer_ {nullptr};
|
/developtools/profiler/device/plugins/stream_plugin/src/ |
D | stream_plugin.cpp | 71 buffer_.resize(dataProto.ByteSizeLong()); in Loop() 72 dataProto.SerializeToArray(buffer_.data(), buffer_.size()); in Loop() 74 resultWriter_->write(resultWriter_, buffer_.data(), buffer_.size()); in Loop()
|
/developtools/profiler/device/plugins/cpu_plugin/src/ |
D | cpu_data_plugin.cpp | 45 buffer_ = nullptr; in CpuDataPlugin() 58 if (buffer_ != nullptr) { in ~CpuDataPlugin() 59 free(buffer_); in ~CpuDataPlugin() 60 buffer_ = nullptr; in ~CpuDataPlugin() 73 buffer_ = malloc(READ_BUFFER_SIZE); in Start() 74 CHECK_NOTNULL(buffer_, RET_FAIL, "%s:malloc buffer_ failed!", __func__); in Start() 159 if (buffer_ != nullptr) { in Stop() 160 free(buffer_); in Stop() 161 buffer_ = nullptr; in Stop() 203 if (buffer_ == nullptr) { in ReadFile() [all …]
|
/developtools/profiler/hiebpf/test/unittest/ |
D | ringbuffer_test.cpp | 67 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 81 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 87 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 101 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 109 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 123 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 131 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 145 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 153 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); 192 ASSERT_TRUE(ringBuffer->buffer_ != nullptr); [all …]
|
/developtools/profiler/device/plugins/network_profiler/service/src/ |
D | network_profiler_handle.cpp | 29 buffer_ = std::make_unique<uint8_t[]>(bufferSize); in NetworkProfilerHandle() 115 data.SerializeToArray(buffer_.get(), length); in FlushData() 116 if (buffer_.get() == nullptr) { in FlushData() 125 writer_->Write(buffer_.get(), length); in FlushData()
|
/developtools/profiler/device/plugins/network_plugin/src/ |
D | network_plugin.cpp | 33 buffer_ = std::make_unique<uint8_t[]>(READ_BUFFER_SIZE); in NetworkPlugin() 38 CHECK_NOTNULL(buffer_, -1, "%s:NetworkPlugin, buffer_ is null", __func__); in Start() 160 buffer_ = nullptr; in Stop() 222 …size_t rsize = static_cast<size_t>(fread(buffer_.get(), sizeof(char), READ_BUFFER_SIZE - 1, fp_.ge… in ReadTxRxBytes() 223 buffer_.get()[rsize] = '\0'; in ReadTxRxBytes() 226 BufferSplitter totalbuffer((const char*)buffer_.get(), rsize + 1); in ReadTxRxBytes() 290 …size_t rsize = static_cast<size_t>(fread(buffer_.get(), sizeof(char), READ_BUFFER_SIZE - 1, fp_.ge… in ReadSystemTxRxBytes() 291 buffer_.get()[rsize] = '\0'; in ReadSystemTxRxBytes() 294 BufferSplitter totalbuffer((const char*)buffer_.get(), rsize + 1); in ReadSystemTxRxBytes()
|
/developtools/profiler/device/plugins/hidump_plugin/src/ |
D | hidump_plugin.cpp | 143 buffer_.resize(dataProto.ByteSizeLong()); in Loop() 144 dataProto.SerializeToArray(buffer_.data(), buffer_.size()); in Loop() 145 resultWriter_->write(resultWriter_, buffer_.data(), buffer_.size()); in Loop()
|
/developtools/profiler/device/plugins/process_plugin/src/ |
D | process_data_plugin.cpp | 40 buffer_ = std::make_unique<uint8_t[]>(READ_BUFFER_SIZE); in ProcessDataPlugin() 47 buffer_ = nullptr; in ~ProcessDataPlugin() 54 CHECK_NOTNULL(buffer_, RET_FAIL, "%s:buffer_ == null", __func__); in Start() 151 if (buffer_.get() == nullptr) { in ReadProcPidFile() 157 bytesRead = read(fd, buffer_.get(), READ_BUFFER_SIZE - 1); in ReadProcPidFile() 164 buffer_.get()[bytesRead] = '\0'; in ReadProcPidFile() 257 …processinfo.set_name(reinterpret_cast<char*>(buffer_.get()), strlen(reinterpret_cast<char*>(buffer… in WriteProcess() 267 if ((buffer_.get() == nullptr) || (ret == 0)) { in WriteProcessInfo() 271 WriteProcess(*processinfo, reinterpret_cast<char*>(buffer_.get()), ret, pid); in WriteProcessInfo()
|
/developtools/profiler/device/plugins/ffrt_profiler/service/src/ |
D | ffrt_profiler_handle.cpp | 27 buffer_ = std::make_unique<uint8_t[]>(bufferSize); in FfrtProfilerHandle() 163 data.SerializeToArray(buffer_.get(), length); in FlushData() 164 if (buffer_.get() == nullptr) { in FlushData() 173 writer_->Write(buffer_.get(), length); in FlushData()
|
/developtools/profiler/device/plugins/memory_plugin/src/ |
D | memory_data_plugin.cpp | 61 buffer_ = std::make_unique<uint8_t[]>(READ_BUFFER_SIZE); in MemoryDataPlugin() 68 buffer_ = nullptr; in ~MemoryDataPlugin() 164 CHECK_NOTNULL(buffer_, RET_FAIL, "%s:buffer_ == null", __func__); in Start() 210 BufferSplitter totalbuffer((const char*)buffer_.get(), readsize); in WriteMeminfo() 269 BufferSplitter totalbuffer((const char*)buffer_.get(), readsize); in WriteVmstat() 438 WriteProcess(processMemoryInfo, reinterpret_cast<char*>(buffer_.get()), readSize, pid); in WriteProcinfoByPidfds() 442 …essMemoryInfo.set_oom_score_adj(static_cast<int64_t>(strtol(reinterpret_cast<char*>(buffer_.get()), in WriteProcinfoByPidfds() 450 if ((buffer_.get() == nullptr) || (fd == -1)) { in ReadFile() 453 int readsize = pread(fd, buffer_.get(), READ_BUFFER_SIZE - 1, 0); in ReadFile() 581 if (buffer_.get() == nullptr) { in ReadProcPidFile() [all …]
|
/developtools/profiler/device/plugins/arkts_plugin/src/ |
D | arkts_plugin.cpp | 259 buffer_.resize(data.ByteSizeLong()); in FlushData() 260 data.SerializeToArray(buffer_.data(), buffer_.size()); in FlushData() 263 resultWriter_->write(resultWriter_, buffer_.data(), buffer_.size()); in FlushData() 268 std::string(buffer_.data(), buffer_.size()), in FlushData()
|
/developtools/profiler/device/plugins/stream_plugin/include/ |
D | stream_plugin.h | 41 std::vector<char> buffer_; variable
|
/developtools/profiler/device/plugins/native_daemon/include/ |
D | debug_logger.h | 279 return buffer_; in Stream() 285 DebugLogger::GetInstance()->Log(level_, HILOG_TAG, "%s\n", buffer_.str().c_str()); in ~LogMessage() 288 buffer_.str().c_str(), errno, strerror(errno)); in ~LogMessage() 296 std::ostringstream buffer_; variable
|
/developtools/profiler/device/plugins/hidump_plugin/include/ |
D | hidump_plugin.h | 57 std::vector<char> buffer_; variable
|
/developtools/profiler/device/plugins/diskio_plugin/include/ |
D | diskio_data_plugin.h | 67 void* buffer_;
|
/developtools/profiler/device/plugins/ftrace_plugin/include/ |
D | result_transporter.h | 65 std::vector<char> buffer_; variable
|
/developtools/smartperf_host/trace_streamer/src/parser/ebpf_parser/ |
D | ebpf_data_reader.cpp | 36 buffer_ = std::make_unique<uint8_t[]>(size); in InitEbpfData() 37 std::copy(dequeBuffer.begin(), dequeBuffer.begin() + size, buffer_.get()); in InitEbpfData() 39 startAddr_ = buffer_.get(); in InitEbpfData()
|
/developtools/profiler/device/plugins/arkts_plugin/include/ |
D | arkts_plugin.h | 63 std::vector<char> buffer_; variable
|
/developtools/profiler/device/plugins/network_plugin/include/ |
D | network_plugin.h | 110 std::unique_ptr<uint8_t[]> buffer_; variable
|
/developtools/profiler/device/plugins/ffrt_profiler/service/include/ |
D | ffrt_profiler_handle.h | 64 std::unique_ptr<uint8_t[]> buffer_{nullptr};
|
/developtools/profiler/device/plugins/network_profiler/service/include/ |
D | network_profiler_handle.h | 63 std::unique_ptr<uint8_t[]> buffer_{nullptr};
|