Lines Matching defs:recordMmap2

453         auto recordMmap2 = static_cast<PerfRecordMmap2 *>(&record);
454 UpdateFromRecord(*recordMmap2);
681 bool VirtualRuntime::CheckValidSandBoxMmap(PerfRecordMmap2 &recordMmap2)
684 if ((recordMmap2.data_.prot & PROT_EXEC) != 0) {
686 auto symFile = SymbolsFile::CreateSymbolsFile(SYMBOL_ELF_FILE, recordMmap2.data_.filename);
690 if (strstr(recordMmap2.data_.filename, ".hap") != nullptr) {
692 recordMmap2.data_.addr,
693 recordMmap2.data_.addr + recordMmap2.data_.len,
694 recordMmap2.data_.pgoff,
696 recordMmap2.data_.filename
707 if (strstr(recordMmap2.data_.filename, ".hap") == nullptr) {
709 u64 begin = recordMmap2.data_.addr - elfLoadInfoMap[0].mmapLen;
713 std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_.tid,
714 begin, len, pgoff, 0, 0, 0, PROT_READ, 0, std::string(recordMmap2.data_.filename));
720 u64 begin = recordMmap2.data_.addr - elfLoadInfoMap[0].mmapLen;
725 std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_.tid,
732 std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_.tid,
733 recordMmap2.data_.addr,
734 recordMmap2.data_.len,
735 recordMmap2.data_.pgoff - prevMap->offset, // minus load offset of hap
736 0, 0, 0, recordMmap2.data_.prot, 0, curMap->name);
740 recordMmap2.discard_ = true;
744 } else if (recordMmap2.data_.pgoff == 0) {
745 recordMmap2.discard_ = true;
748 if (strstr(recordMmap2.data_.filename, ".hap") != nullptr) {
750 recordMmap2.data_.addr,
751 recordMmap2.data_.addr + recordMmap2.data_.len,
752 recordMmap2.data_.pgoff,
754 recordMmap2.data_.filename
758 return !recordMmap2.discard_;
761 void VirtualRuntime::UpdateFromRecord(PerfRecordMmap2 &recordMmap2)
763 if (!OHOS::HiviewDFX::DfxMaps::IsLegalMapItem(recordMmap2.data_.filename)) {
767 HLOGV(" MMAP2: size %d pid %u tid %u", recordMmap2.header.size, recordMmap2.data_.pid,
768 recordMmap2.data_.tid);
769 HLOGV(" MMAP2: %s dso '%s' (0x%llx-0x%llx)@0x%llx prot:%u", recordMmap2.inKernel() ? "kernel" : "user",
770 recordMmap2.data_.filename, recordMmap2.data_.addr,
771 recordMmap2.data_.addr + recordMmap2.data_.len, recordMmap2.data_.pgoff, recordMmap2.data_.prot);
774 if (NeedAdaptSandboxPath(recordMmap2.data_.filename, recordMmap2.data_.pid, recordMmap2.header.size)) {
775 FixHMBundleMmap(recordMmap2.data_.filename, recordMmap2.data_.pid, recordMmap2.header.size);
776 CHECK_TRUE(!CheckValidSandBoxMmap(recordMmap2), NO_RETVAL, 0, "");
779 auto map = UpdateThreadMaps(recordMmap2.data_.pid, recordMmap2.data_.tid, recordMmap2.data_.filename,
780 recordMmap2.data_.addr, recordMmap2.data_.len, recordMmap2.data_.pgoff,
781 recordMmap2.data_.prot);
782 UpdateSymbols(map, recordMmap2.data_.pid);
1357 HLOGD("strncpy_s recordMmap2 failed!");