/developtools/profiler/device/services/shared_memory/src/ |
D | share_memory_block.cpp | 56 header_(nullptr), in ShareMemoryBlock() 79 header_ = reinterpret_cast<BlockHeader*>(ptr); in CreateBlockWithFd() 117 header_ = reinterpret_cast<BlockHeader*>(ptr); in CreateBlock() 120 header_->info.readOffset_ = 0; in CreateBlock() 121 header_->info.writeOffset_ = 0; in CreateBlock() 122 header_->info.memorySize_ = size - sizeof(BlockHeader); in CreateBlock() 123 header_->info.bytesCount_ = 0; in CreateBlock() 124 header_->info.chunkCount_ = 0; in CreateBlock() 130 pthread_mutex_init(&header_->info.mutex_, &muAttr); in CreateBlock() 136 return header_ != nullptr; in Valid() [all …]
|
/developtools/profiler/device/services/profiler_service/src/ |
D | trace_file_helper.cpp | 34 …if (size > std::numeric_limits<decltype(header_.data_.length)>::max() - header_.data_.length - siz… in AddSegment() 38 header_.data_.segments += 1; in AddSegment() 39 header_.data_.length += size; in AddSegment() 41 …CHECK_TRUE(retval, false, "[%u] SHA256_Update FAILED, s:%u, d:%p!", header_.data_.segments, size, … in AddSegment() 48 retval = SHA256_Final(header_.data_.sha256, shaCtx_.get()); in Finish() 49 CHECK_TRUE(retval, false, "[%u] SHA256_Final FAILED!", header_.data_.segments); in Finish() 56 if (memcpy_s(&header, sizeof(header), &header_, sizeof(header)) != 0) { in Update() 65 return memcmp(&header_, &header, sizeof(header_)) == 0; in Validate()
|
D | trace_file_writer.cpp | 74 header_.data_.boottime = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 77 header_.data_.realtime = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 80 header_.data_.realtimeCoarse = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 83 header_.data_.monotonic = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 86 header_.data_.monotonicCoarse = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 89 header_.data_.monotonicRaw = static_cast<uint64_t>(ts.tv_sec) * nanoSeconds + in SetTimeStamp() 119 header_ = {}; in WriteHeader() 120 stream_.write(reinterpret_cast<CharPtr>(&header_), sizeof(header_)); in WriteHeader() 122 dataSize_ = header_.HEADER_SIZE; in WriteHeader() 195 helper_.Update(header_); in Finish() [all …]
|
D | trace_file_reader.cpp | 32 return header_; in GetHeader() 37 return helper_.Validate(header_); in ValidateHeader() 45 stream_.read(reinterpret_cast<CharPtr>(&header_), sizeof(header_)); in Open()
|
D | trace_file_helper.h | 40 TraceFileHeader header_ = {};
|
D | trace_file_reader.h | 49 TraceFileHeader header_ {};
|
D | trace_file_writer.h | 64 TraceFileHeader header_ {};
|
/developtools/profiler/device/plugins/api/test/unittest/ |
D | buffer_write_test.cpp | 61 …ShareMemoryBlock::BlockHeader* header_ = reinterpret_cast<ShareMemoryBlock::BlockHeader*>(g_smbAdd… in InitShareMemory1() local 64 header_->info.readOffset_ = 0; in InitShareMemory1() 65 header_->info.writeOffset_ = 0; in InitShareMemory1() 66 header_->info.memorySize_ = SMB1_SIZE - sizeof(ShareMemoryBlock::BlockHeader); in InitShareMemory1() 67 header_->info.bytesCount_ = 0; in InitShareMemory1() 68 header_->info.chunkCount_ = 0; in InitShareMemory1() 98 …ShareMemoryBlock::BlockHeader* header_ = reinterpret_cast<ShareMemoryBlock::BlockHeader*>(g_smbAdd… in InitShareMemory2() local 101 header_->info.readOffset_ = 0; in InitShareMemory2() 102 header_->info.writeOffset_ = 0; in InitShareMemory2() 103 header_->info.memorySize_ = SMB2_SIZE - sizeof(ShareMemoryBlock::BlockHeader); in InitShareMemory2() [all …]
|
/developtools/hiperf/src/ |
D | perf_file_reader.cpp | 110 return (memcmp(header_.magic, PERF_MAGIC, sizeof(header_.magic)) == 0); in IsValidDataFile() 115 return header_.magic[0] == '\x1f' and header_.magic[1] == '\x8b'; in IsGzipFile() 120 if (Read(&header_, sizeof(header_))) { in ReadFileHeader() 121 dataSectionSize_ = header_.data.size; in ReadFileHeader() 123 featureSectionOffset_ = header_.data.offset + header_.data.size; in ReadFileHeader() 125 std::bitset<SIZE_FETURE_COUNT> features(header_.features[i]); in ReadFileHeader() 140 if (header_.attrSize != sizeof(perf_file_attr)) { in ReadAttrSection() 142 HLOGW("attr size %" PRId64 " doesn't match expected size %zu", header_.attrSize, in ReadAttrSection() 146 int attrCount = header_.attrs.size / header_.attrSize; in ReadAttrSection() 151 if (fseek(fp_, header_.attrs.offset, SEEK_SET) != 0) { in ReadAttrSection() [all …]
|
D | perf_file_writer.cpp | 65 header_.size = sizeof(header_); in Open() 260 } else if (fseek(fp_, header_.size, SEEK_SET) == -1) { in WriteAttrAndId() 320 header_.attrSize = sizeof(perf_file_attr); in WriteHeader() 321 header_.attrs = attrSection_; in WriteHeader() 322 header_.data = dataSection_; in WriteHeader() 325 header_.eventTypes.size = 0; in WriteHeader() 326 header_.eventTypes.offset = 0; in WriteHeader() 333 if (!Write(&header_, sizeof(header_))) { in WriteHeader() 351 for (size_t i = 0; i < sizeof(header_.features); i++) { in WriteFeatureData() 352 if (header_.features[i] != 0) { in WriteFeatureData() [all …]
|
/developtools/profiler/host/smartperf/trace_streamer/src/parser/hiperf_parser/hiperf/ |
D | perf_file_reader.cpp | 137 return (memcmp(header_.magic, PERF_MAGIC, sizeof(header_.magic)) == 0); in IsValidDataFile() 142 return header_.magic[0] == '\x1f' and header_.magic[1] == '\x8b'; in IsGzipFile() 147 if (Read(&header_, sizeof(header_))) { in ReadFileHeader() 148 dataSectionSize_ = header_.data.size; in ReadFileHeader() 150 featureSectionOffset_ = header_.data.offset + header_.data.size; in ReadFileHeader() 152 std::bitset<SIZE_FETURE_COUNT> features(header_.features[i]); in ReadFileHeader() 167 if (header_.attrSize != sizeof(perf_file_attr)) { in ReadAttrSection() 169 HLOGW("attr size %" PRId64 " doesn't match expected size %zu", header_.attrSize, in ReadAttrSection() 173 int attrCount = header_.attrs.size / header_.attrSize; in ReadAttrSection() 178 if (!SeekFromBegin(header_.attrs.offset)) { in ReadAttrSection() [all …]
|
/developtools/profiler/device/plugins/native_hook/test/unittest/ |
D | stack_writer_test.cpp | 60 …ShareMemoryBlock::BlockHeader* header_ = reinterpret_cast<ShareMemoryBlock::BlockHeader*>(g_smbAdd… in InitShareMemory() local 63 header_->info.readOffset_ = 0; in InitShareMemory() 64 header_->info.writeOffset_ = 0; in InitShareMemory() 65 header_->info.memorySize_ = SMB_SIZE - sizeof(ShareMemoryBlock::BlockHeader); in InitShareMemory() 66 header_->info.bytesCount_ = 0; in InitShareMemory() 67 header_->info.chunkCount_ = 0; in InitShareMemory() 89 …ShareMemoryBlock::BlockHeader* header_ = reinterpret_cast<ShareMemoryBlock::BlockHeader*>(g_smbAdd… in CheckBuffer() local 90 …uint8_t* cmpaddr = (uint8_t*)g_smbAddr + sizeof(ShareMemoryBlock::BlockHeader) + header_->info.rea… in CheckBuffer() 93 header_->info.readOffset_ = header_->info.writeOffset_; in CheckBuffer()
|
/developtools/hiperf/test/unittest/common/native/ |
D | perf_event_record_test.cpp | 281 perf_event_header header_; member 287 record.header_.size = sizeof(perf_event_header); in InitTestRecordSample() 288 record.header_.size += in InitTestRecordSample() 298 record.header_.size += sizeof(record.data_.nr); in InitTestRecordSample() 301 record.header_.size += sizeof(record.data_.raw_size); in InitTestRecordSample() 304 record.header_.size += sizeof(record.data_.bnr); in InitTestRecordSample() 307 record.header_.size += sizeof(record.data_.user_abi); in InitTestRecordSample() 309 record.header_.size += sizeof(record.data_.stack_size); in InitTestRecordSample() 348 if (buf.size() < record.header_.size) { in CompareRecordSample()
|
/developtools/hiperf/include/ |
D | perf_file_writer.h | 78 perf_file_header header_; variable
|
D | perf_file_reader.h | 83 perf_file_header header_; variable
|
/developtools/profiler/device/services/shared_memory/include/ |
D | share_memory_block.h | 91 BlockHeader* header_; variable
|