Lines Matching refs:vma

150     auto collect_vmas = [&](const Vma& vma) {  in Smaps()  argument
151 if (std::find(g_blacklisted_vmas.begin(), g_blacklisted_vmas.end(), vma.name) == in Smaps()
153 maps_.emplace_back(vma); in Smaps()
228 bool ProcMemInfo::PageMap(const Vma& vma, std::vector<uint64_t>* pagemap) { in PageMap() argument
238 uint64_t nr_pages = (vma.end - vma.start) / getpagesize(); in PageMap()
242 off64_t start_addr = (vma.start / getpagesize()) * sizeof(uint64_t); in PageMap()
298 for (auto& vma : maps_) { in ReadMaps() local
299 if (!ReadVmaStats(pagemap_fd.get(), vma, get_wss, use_pageidle)) { in ReadMaps()
300 LOG(ERROR) << "Failed to read page map for vma " << vma.name << "[" << vma.start << "-" in ReadMaps()
301 << vma.end << "]"; in ReadMaps()
305 add_mem_usage(&usage_, vma.usage); in ReadMaps()
311 bool ProcMemInfo::FillInVmaStats(Vma& vma) { in FillInVmaStats() argument
317 if (!ReadVmaStats(pagemap_fd.get(), vma, get_wss_, false)) { in FillInVmaStats()
318 LOG(ERROR) << "Failed to read page map for vma " << vma.name << "[" << vma.start << "-" in FillInVmaStats()
319 << vma.end << "]"; in FillInVmaStats()
325 bool ProcMemInfo::ReadVmaStats(int pagemap_fd, Vma& vma, bool get_wss, bool use_pageidle) { in ReadVmaStats() argument
333 size_t num_pages = (vma.end - vma.start) / pagesz; in ReadVmaStats()
334 size_t first_page = vma.start / pagesz; in ReadVmaStats()
342 vma.usage.vss += pagesz; in ReadVmaStats()
376 vma.usage.swap += pagesz; in ReadVmaStats()
416 vma.usage.vss += pagesz; in ReadVmaStats()
419 vma.usage.rss += pagesz; in ReadVmaStats()
420 vma.usage.uss += is_private ? pagesz : 0; in ReadVmaStats()
421 vma.usage.pss += pagesz / cur_page_counts; in ReadVmaStats()
423 vma.usage.private_dirty += is_dirty ? pagesz : 0; in ReadVmaStats()
424 vma.usage.private_clean += is_dirty ? 0 : pagesz; in ReadVmaStats()
426 vma.usage.shared_dirty += is_dirty ? pagesz : 0; in ReadVmaStats()
427 vma.usage.shared_clean += is_dirty ? 0 : pagesz; in ReadVmaStats()
444 Vma vma; in ForEachVmaFromFile() local
450 if (parse_smaps_field(line, &vma.usage)) { in ForEachVmaFromFile()
456 callback(vma); in ForEachVmaFromFile()
460 vma.clear(); in ForEachVmaFromFile()
466 vma.start = start; in ForEachVmaFromFile()
467 vma.end = end; in ForEachVmaFromFile()
468 vma.flags = flags; in ForEachVmaFromFile()
469 vma.offset = pgoff; in ForEachVmaFromFile()
470 vma.name = name; in ForEachVmaFromFile()
482 callback(vma); in ForEachVmaFromFile()