Lines Matching defs:record
64 // when there are many events, start record will take more time.
661 SymbolsFile::needParseJsFunc_ = true; // only in record and dwarf mode need to parse
806 auto processRecord = [this](std::unique_ptr<PerfEventRecord> record) -> bool {
807 return this->ProcessRecord(std::move(record));
892 auto saveRecord = [this](std::unique_ptr<PerfEventRecord> record) -> bool {
893 return this->SaveRecord(std::move(record), false);
1221 HLOGE("Fail to create record file %s", outputFilename_.c_str());
1222 HIPERF_HILOGE(MODULE_DEFAULT, "Fail to create record file %s", outputFilename_.c_str());
1242 // mmap record size has been larger than limit, dont start sampling.
1254 HLOGE("Fail to finish record file %s", outputFilename_.c_str());
1255 HIPERF_HILOGE(MODULE_DEFAULT, "Fail to finish record file %s", outputFilename_.c_str());
1258 HLOGE("Fail to post process record file");
1259 HIPERF_HILOGE(MODULE_DEFAULT, "Fail to post process record file");
1306 bool SubCommandRecord::ProcessRecord(std::unique_ptr<PerfEventRecord> record)
1308 CHECK_TRUE(record == nullptr, false, 1, "record is null");
1311 // but we still want to see the record number
1312 if (record->GetType() == PERF_RECORD_SAMPLE) {
1317 if (record->GetType() == PERF_RECORD_SAMPLE) {
1318 // when the record is allowed from a cache memory, does not free memory after use
1319 record.release();
1328 if (record->GetPid() == pid) {
1329 if (record->GetType() == PERF_RECORD_SAMPLE) {
1330 // when the record is allowed from a cache memory, does not free memory after use
1331 record.release();
1333 // discard record
1341 virtualRuntime_.UpdateFromRecord(*record);
1346 return SaveRecord(std::move(record), true);
1350 bool SubCommandRecord::SaveRecord(std::unique_ptr<PerfEventRecord> record, bool ptrReleaseFlag)
1353 if (ptrReleaseFlag && record->GetType() == PERF_RECORD_SAMPLE) {
1354 // when the record is allowed from a cache memory, does not free memory after use
1355 record.release();
1364 printf("record size %" PRIu64 " is large than limit %" PRIu64 ". stop sampling.\n",
1372 if (record) {
1376 if (!fileWriter_->WriteRecord(*record)) {
1377 // write file failed, need stop record
1379 HLOGV("fail to write record %s", record->GetName().c_str());
1382 if (record->GetType() == PERF_RECORD_SAMPLE) {
1387 HLOGV(" write done. size=%zu name=%s", record->GetSize(), record->GetName().c_str());
1569 HLOGD("create new record file %s", outputFilename_.c_str());
1586 // renew record file
1603 auto record_callback = [&](std::unique_ptr<PerfEventRecord> record) {
1604 if (record == nullptr) {
1607 } else if (record->GetType() == PERF_RECORD_SAMPLE) {
1608 HLOGM("readback record for unwind");
1609 virtualRuntime_.UnwindFromRecord(static_cast<PerfRecordSample &>(*record));
1611 SaveRecord(std::move(record));
1620 CHECK_TRUE(!FinishWriteRecordFile(), false, 1, "Fail to finish record file %s", outputFilename_.c_str());
1652 bool SubCommandRecord::CollectionSymbol(std::unique_ptr<PerfEventRecord> record)
1654 CHECK_TRUE(record == nullptr, false, 0, "");
1655 if (record->GetType() == PERF_RECORD_SAMPLE) {
1656 PerfRecordSample *sample = static_cast<PerfRecordSample *>(record.get());
1662 // the record is allowed from a cache memory, does not free memory after use
1663 record.release();
1666 if (isSpe_ && record->GetType() == PERF_RECORD_AUXTRACE) {
1667 PerfRecordAuxtrace *sample = static_cast<PerfRecordAuxtrace *>(record.get());
1737 [this] (std::unique_ptr<PerfEventRecord> record) -> bool {
1738 return this->CollectionSymbol(std::move(record));
1754 CHECK_TRUE(!fileWriter_->Close(), false, 1, "Fail to close record file %s", outputFilename_.c_str());
1819 printf("[ hiperf record: Captured and compressed %.3f MB perf data. ]\n", mb);
1821 printf("[ hiperf record: Captured %.3f MB perf data. ]\n", mb);
1838 return SubCommand::RegisterSubCommand("record", std::make_unique<SubCommandRecord>());