OSDN Git Service

Add Cache Pruning support
authorMehdi Amini <mehdi.amini@apple.com>
Sat, 2 Apr 2016 03:28:26 +0000 (03:28 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Sat, 2 Apr 2016 03:28:26 +0000 (03:28 +0000)
commit22706dc4c03305692f494d0e42a6de1050d0ec62
tree79d13d5ffbecf9ae92549668634b621432102aa1
parent88fbbb352c89267312fdb66b39f78f5a4767f1b3
Add Cache Pruning support

Incremental LTO will usea cache to store object files.
This patch handles the pruning part of the cache, exposing
a few knobs:

- Pruning interval: the implementation keeps a "timestamp" file in the
  directory and will scan it only after a given interval since the
  last modification of the timestamp file. This is for performance
  purpose, we don't want to scan continuously the folder.
- Entry expiration: this is the time after which a file that hasn't
  been used is remove from the cache.
- Maximum size: expressed in percentage of the available disk space,
  it helps to avoid that we blow up the disk space.

http://reviews.llvm.org/D18422

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265209 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/CachePruning.h [new file with mode: 0644]
lib/Support/CMakeLists.txt
lib/Support/CachePruning.cpp [new file with mode: 0644]