[all-commits] [llvm/llvm-project] 9d8a3e: [llvm-cov] Cache file status information

Choongwoo Han via All-commits all-commits at lists.llvm.org
Wed Mar 3 10:08:41 PST 2021


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

  Changed paths:
    M llvm/tools/llvm-cov/CodeCoverage.cpp

  Log Message:
  -----------
  [llvm-cov] Cache file status information

Currently, getSourceFile accesses file system to check if two paths are
the same file with a thread lock, which is a huge performance bottleneck
in some cases. Currently, it's accessing file system size(files) * size(files) times.

Thus, cache file status information, which reduces file system access to size(files) times.

When I tested it with two binaries and 16 cpu cores,
it saved over 70% of time.

Binary 1: 56 secs -> 3 secs
Binary 2: 17 hours -> 4 hours

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




More information about the All-commits mailing list