[PATCH] D99110: [Coverage] Load records immediately

Choongwoo Han via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 14:17:11 PDT 2021


tunz created this revision.
tunz added a reviewer: vsk.
Herald added a subscriber: hiraditya.
tunz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The current implementation keeps binary buffers until it completes
loading of all files. This approach requires a lot of memory if there
are a lot of huge binaries. Thus, make it to load coverage records
immediately rather than waiting for loading other binaries.

This reduces memory usage from >128GB to 5GB in my case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99110

Files:
  llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
  llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
  llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
  llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
  llvm/unittests/ProfileData/CoverageMappingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99110.332424.patch
Type: text/x-patch
Size: 7944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210322/9e9df761/attachment.bin>


More information about the llvm-commits mailing list