r306126 - Add a ThinLTO cache policy for controlling the maximum cache size in bytes.
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 23 10:05:04 PDT 2017
Author: pcc
Date: Fri Jun 23 12:05:03 2017
New Revision: 306126
URL: http://llvm.org/viewvc/llvm-project?rev=306126&view=rev
Log:
Add a ThinLTO cache policy for controlling the maximum cache size in bytes.
This is useful when an upper limit on the cache size needs to be
controlled independently of the amount of the amount of free space.
One use case is a machine with a large number of cache directories
(e.g. a buildbot slave hosting a large number of independent build
jobs). By imposing an upper size limit on each cache directory,
users can more easily estimate the server's capacity.
Differential Revision: https://reviews.llvm.org/D34547
Modified:
cfe/trunk/docs/ThinLTO.rst
Modified: cfe/trunk/docs/ThinLTO.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ThinLTO.rst?rev=306126&r1=306125&r2=306126&view=diff
==============================================================================
--- cfe/trunk/docs/ThinLTO.rst (original)
+++ cfe/trunk/docs/ThinLTO.rst Fri Jun 23 12:05:03 2017
@@ -146,6 +146,18 @@ Possible key-value pairs are:
disk space. A value over 100 is invalid. A value of 0 disables the percentage
size-based pruning. The default is 75%.
+- ``cache_size_bytes=X``, ``cache_size_bytes=Xk``, ``cache_size_bytes=Xm``,
+ ``cache_size_bytes=Xg``:
+ Sets the maximum size for the cache directory to ``X`` bytes (or KB, MB,
+ GB respectively). A value over the amount of available space on the disk
+ will be reduced to the amount of available space. A value of 0 disables
+ the byte size-based pruning. The default is no byte size-based pruning.
+
+ Note that ThinLTO will apply both size-based pruning policies simultaneously,
+ and changing one does not affect the other. For example, a policy of
+ ``cache_size_bytes=1g`` on its own will cause both the 1GB and default 75%
+ policies to be applied unless the default ``cache_size`` is overridden.
+
- ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the
expiration time for cache files to ``X`` seconds (or minutes, hours
respectively). When a file hasn't been accessed for ``prune_after`` seconds,
More information about the cfe-commits
mailing list