[all-commits] [llvm/llvm-project] 772e1d: [Coverage] Load records immediately

Choongwoo Han via All-commits all-commits at lists.llvm.org
Tue Mar 23 16:26:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 772e1dd1ddc0cf138ab1a5e88d9614229e978491
      https://github.com/llvm/llvm-project/commit/772e1dd1ddc0cf138ab1a5e88d9614229e978491
  Author: Choongwoo Han <choongwoo.han at microsoft.com>
  Date:   2021-03-23 (Tue, 23 Mar 2021)

  Changed paths:
    M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

  Log Message:
  -----------
  [Coverage] Load records immediately

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

This reduces memory usage of llvm-cov from >128GB to 5GB when
loading Chromium binaries in Windows.

Additional testing: check-profile, check-llvm

Differential Revision: https://reviews.llvm.org/D99110




More information about the All-commits mailing list