Home
last modified time | relevance | path

Searched refs:record (Results 1 – 25 of 41) sorted by relevance

12

/developtools/hiperf/test/unittest/common/native/
Dperf_event_record_test.cpp178 PerfRecordLost record((uint8_t *)&data); variable
179 ASSERT_EQ(record.GetType(), PERF_RECORD_LOST_SAMPLES);
180 ASSERT_EQ(record.GetName(), RECORDNAME_LOST);
181 ASSERT_EQ(record.GetMisc(), PERF_RECORD_MISC_KERNEL);
182 ASSERT_EQ(record.GetHeaderSize(), HEADER_SIZE);
183 ASSERT_EQ(record.GetSize(), sizeof(data));
186 ASSERT_TRUE(record.GetBinary(buff));
200 PerfRecordExit record((uint8_t *)&data); variable
201 ASSERT_EQ(record.GetType(), PERF_RECORD_EXIT);
202 ASSERT_EQ(record.GetName(), RECORDNAME_EXIT);
[all …]
Dreport_protobuf_file_test.cpp161 auto protobufReadBack = [&](Proto::HiperfRecord &record) { in __anonce00df710102() argument
162 printf("record name %s %d\n", record.GetTypeName().c_str(), record.RecordType_case()); in __anonce00df710102()
165 if (record.has_thread()) { in __anonce00df710102()
166 const VirtualThreadInfo &message = record.thread(); in __anonce00df710102()
192 auto protobufReadBack = [&](Proto::HiperfRecord &record) { in __anonce00df710202() argument
193 printf("record name %s %d\n", record.GetTypeName().c_str(), record.RecordType_case()); in __anonce00df710202()
196 if (record.has_statistic()) { in __anonce00df710202()
197 const SampleStatistic &message = record.statistic(); in __anonce00df710202()
223 auto protobufReadBack = [&](Proto::HiperfRecord &record) { in __anonce00df710302() argument
224 printf("record name %s %d\n", record.GetTypeName().c_str(), record.RecordType_case()); in __anonce00df710302()
[all …]
Dvirtual_runtime_test.cpp44 bool RecordCallBack(std::unique_ptr<PerfEventRecord> record);
72 bool VirtualRuntimeTest::RecordCallBack(std::unique_ptr<PerfEventRecord> record) in RecordCallBack() argument
75 printf("callbackCount_ %zu: type %d\n", callbackCount_, record->GetType()); in RecordCallBack()
109 PerfEventRecord &record = static_cast<PerfEventRecord &>(recordComm); variable
113 runtime_->UpdateFromRecord(record);
/developtools/hiperf/src/
Dreport_protobuf_file.cpp32 HiperfRecord record; in BeforeClose() local
33 SampleStatistic *message = record.mutable_statistic(); in BeforeClose()
37 protpbufCodedOutputStream_->WriteLittleEndian32(record.ByteSizeLong()); in BeforeClose()
38 record.SerializeToCodedStream(protpbufCodedOutputStream_.get()); in BeforeClose()
102 bool ReportProtobufFileWriter::ProcessRecord(const PerfEventRecord &record) in ProcessRecord() argument
104 HLOGM("ProcessRecord %d", record.GetType()); in ProcessRecord()
105 if (record.GetType() == PERF_RECORD_SAMPLE) { in ProcessRecord()
107 } else if (record.GetType() == PERF_RECORD_LOST_SAMPLES) { in ProcessRecord()
108 ProcessRecord(*static_cast<const PerfRecordLost *>(&record)); in ProcessRecord()
109 } else if (record.GetType() == PERF_RECORD_COMM) { in ProcessRecord()
[all …]
Dperf_file_writer.cpp119 bool PerfFileWriter::WriteRecord(const PerfEventRecord &record) in WriteRecord() argument
126 HLOGV("write '%s'", record.GetName().c_str()); in WriteRecord()
128 if (record.GetSize() > RECORD_SIZE_LIMIT) { in WriteRecord()
129 HLOGD("%s record size exceed limit", record.GetName().c_str()); in WriteRecord()
135 if (!record.GetBinary(buf)) { in WriteRecord()
139 if (!Write(buf.data(), record.GetSize())) { in WriteRecord()
142 dataSection_.size += record.GetSize(); in WriteRecord()
183 auto record = GetPerfEventRecord(static_cast<perf_event_type>(header->type), in ReadRecords() local
186 if (record == nullptr) in ReadRecords()
190 callback(std::move(record)); in ReadRecords()
Dvirtual_runtime.cpp185 auto record = std::make_unique<PerfRecordMmap>(true, 0, 0, map.begin_, in UpdateKernelModulesSpaceMaps() local
187 recordCallBack_(std::move(record)); in UpdateKernelModulesSpaceMaps()
199 auto record = std::make_unique<PerfRecordMmap>(true, 0, 0, map.begin_, in UpdateKernelSpaceMaps() local
201 recordCallBack_(std::move(record)); in UpdateKernelSpaceMaps()
232 auto record = std::make_unique<PerfRecordMmap>( in UpdateKernelSymbols() local
237 recordCallBack_(std::move(record)); in UpdateKernelSymbols()
263 void VirtualRuntime::UpdateFromRecord(PerfEventRecord &record) in UpdateFromRecord() argument
268 if (record.GetType() == PERF_RECORD_SAMPLE) { in UpdateFromRecord()
269 auto recordSample = static_cast<PerfRecordSample *>(&record); in UpdateFromRecord()
274 } else if (record.GetType() == PERF_RECORD_MMAP) { in UpdateFromRecord()
[all …]
Dsubcommand_dump.cpp373 void SubCommandDump::ExprotUserData(std::unique_ptr<PerfEventRecord> &record) in ExprotUserData() argument
375 if (record->GetType() == PERF_RECORD_SAMPLE) { in ExprotUserData()
379 PerfRecordSample *recordSample = static_cast<PerfRecordSample *>(record.get()); in ExprotUserData()
413 auto record_callback = [&](std::unique_ptr<PerfEventRecord> record) { in DumpDataPortion() argument
414 if (record == nullptr) { in DumpDataPortion()
420 vr_.UpdateFromRecord(*record); in DumpDataPortion()
423 record->Dump(indent); in DumpDataPortion()
426 ExprotUserData(record); in DumpDataPortion()
429 if (record->GetType() == PERF_RECORD_SAMPLE) { in DumpDataPortion()
431 static_cast<PerfRecordSample *>(record.release())); in DumpDataPortion()
Dsubcommand_record.cpp1066 bool SubCommandRecord::ProcessRecord(std::unique_ptr<PerfEventRecord> record) in ProcessRecord() argument
1071 if (record->GetType() == PERF_RECORD_SAMPLE) { in ProcessRecord()
1083 if (record->GetPid() == pid) { in ProcessRecord()
1092 virtualRuntime_.UpdateFromRecord(*record); in ProcessRecord()
1097 return SaveRecord(std::move(record)); in ProcessRecord()
1101 bool SubCommandRecord::SaveRecord(std::unique_ptr<PerfEventRecord> record) in SaveRecord() argument
1119 if (record) { in SaveRecord()
1123 if (!fileWriter_->WriteRecord(*record)) { in SaveRecord()
1126 HLOGV("fail to write record %s", record->GetName().c_str()); in SaveRecord()
1129 if (record->GetType() == PERF_RECORD_SAMPLE) { in SaveRecord()
[all …]
Dperf_file_reader.cpp281 std::unique_ptr<PerfEventRecord> record = GetPerfEventRecord( in ReadRecord() local
284 if (!record) { in ReadRecord()
287 HLOGV("record type %u", record->GetType()); in ReadRecord()
294 callback(std::move(record)); in ReadRecord()
Dsubcommand_report.cpp221 bool SubCommandReport::RecordCallBack(std::unique_ptr<PerfEventRecord> record) in RecordCallBack() argument
224 GetReport().virtualRuntime_.UpdateFromRecord(*record); in RecordCallBack()
226 if (record->GetType() == PERF_RECORD_SAMPLE) { in RecordCallBack()
227 std::unique_ptr<PerfRecordSample> sample(static_cast<PerfRecordSample *>(record.release())); in RecordCallBack()
262 protobufOutputFileWriter_->ProcessRecord(*record); in RecordCallBack()
/developtools/global_resource_tool/src/
Dresource_table.cpp97 RecordItem record; in LoadResTable() local
98 if (!ReadDataRecordPrepare(in, record, pos, length) || in LoadResTable()
99 !ReadDataRecordStart(in, record, limitKeys, datas, resInfos)) { in LoadResTable()
342 bool ResourceTable::ReadDataRecordPrepare(ifstream &in, RecordItem &record, int32_t &pos, int32_t l… in ReadDataRecordPrepare() argument
349 in.read(reinterpret_cast<char *>(&record.size), INT_TO_BYTES); in ReadDataRecordPrepare()
350 pos = pos + record.size; in ReadDataRecordPrepare()
355 in.read(reinterpret_cast<char *>(&record.resType), INT_TO_BYTES); in ReadDataRecordPrepare()
356 in.read(reinterpret_cast<char *>(&record.id), INT_TO_BYTES); in ReadDataRecordPrepare()
360 bool ResourceTable::ReadDataRecordStart(std::ifstream &in, RecordItem &record, in ReadDataRecordStart() argument
369 if (value_size + sizeof(uint16_t) > record.size) { in ReadDataRecordStart()
[all …]
Dincrement_index.cpp46 auto &record = root["index"][id][resourceItem.GetFilePath()]; in Save() local
48 record["data"] = data; in Save()
49 record["name"] = resourceItem.GetName(); in Save()
50 record["limitkey"] = resourceItem.GetLimitKey(); in Save()
51 record["type"] = ResourceUtil::ResTypeToString(resourceItem.GetResType()); in Save()
Did_worker.cpp208 auto record = root["record"]; in InitIdDefined() local
209 if (record.empty()) { in InitIdDefined()
213 if (!record.isArray()) { in InitIdDefined()
218 for (Json::ArrayIndex index = 0; index < record.size(); index++) { in InitIdDefined()
219 auto arrayItem = record[index]; in InitIdDefined()
/developtools/profiler/host/ohosprofiler/src/main/java/ohos/devtools/services/hiperf/
DHiperfParse.java87 HiperfReport.HiperfRecord record = HiperfReport.HiperfRecord.parseFrom(recordBytes); in parseFile() local
89 switch (record.getRecordTypeCase()) { in parseFile()
91 HiperfReport.SymbolTableFile file = record.getFile(); in parseFile()
95 HiperfReport.SampleStatistic situation = record.getStatistic(); in parseFile()
99 HiperfReport.CallStackSample sample = record.getSample(); in parseFile()
103 HiperfReport.VirtualThreadInfo thread = record.getThread(); in parseFile()
/developtools/bytrace_standard/bin/src/
Dbytrace_impl.cpp129 std::string record = g_markTypes[type] + "|"; in AddBytraceMarker() local
130 record += std::to_string(getpid()) + "|"; in AddBytraceMarker()
131 record += (name.size() < NAME_MAX_SIZE) ? name : name.substr(0, NAME_MAX_SIZE); in AddBytraceMarker()
132 record += " " + value; in AddBytraceMarker()
133 if (write(g_markerFd, record.c_str(), record.size()) < 0) { in AddBytraceMarker()
/developtools/hiperf/include/
Dreport_protobuf_file.h38 using ProtobufReadBack = std::function<void(Proto::HiperfRecord &record)>;
44 bool ProcessRecord(const PerfEventRecord &record);
90 bool Dump(const Proto::HiperfRecord &record, int indent = 0);
Dperf_file_writer.h48 bool WriteRecord(const PerfEventRecord &record);
62 using ProcessRecordCB = const std::function<bool(std::unique_ptr<PerfEventRecord> record)>;
/developtools/hiperf/test/unittest/resource/testdata/
Dreport_test_sort1.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_tids1.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_funcs.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_dsos.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_sort2.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_tids.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
Dreport_test_limit1.txt8 cmdline: hiperf record -d 1 -o /data/local/tmp/dlh.data
/developtools/global_resource_tool/include/
Dresource_table.h77 …bool ReadDataRecordPrepare(std::ifstream &in, RecordItem &record, int32_t &pos, int32_t length) co…
78 bool ReadDataRecordStart(std::ifstream &in, RecordItem &record,

12