[PATCH] D54039: Reland "Change the timestamp of llvmcache-foo file to meet the thinLTO prune policy"

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 10:46:54 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD346006: Reland "Change  the timestamp of llvmcache-foo file to meet the thinLTO pruneā€¦ (authored by MaskRay, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D54039?vs=172391&id=172398#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54039

Files:
  test/ELF/lto/cache.ll
  test/wasm/lto/cache.ll


Index: test/ELF/lto/cache.ll
===================================================================
--- test/ELF/lto/cache.ll
+++ test/ELF/lto/cache.ll
@@ -19,6 +19,10 @@
 ; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=128k:prune_interval=0s -o %t3 %t2.o %t.o
 ; RUN: ls %t.cache | count 5
 
+; Increase the age of llvmcache-foo, which will give it the oldest time stamp
+; so that it is processed and removed first.
+; RUN: %python -c 'import os,sys,time; t=time.time()-120; os.utime(sys.argv[1],(t,t))' %t.cache/llvmcache-foo
+
 ; This should remove it.
 ; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=32k:prune_interval=0s -o %t3 %t2.o %t.o
 ; RUN: ls %t.cache | count 4
Index: test/wasm/lto/cache.ll
===================================================================
--- test/wasm/lto/cache.ll
+++ test/wasm/lto/cache.ll
@@ -17,6 +17,10 @@
 ; RUN: wasm-ld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=128k:prune_interval=0s -o %t.wasm %t2.o %t.o
 ; RUN: ls %t.cache | count 5
 
+; Increase the age of llvmcache-foo, which will give it the oldest time stamp
+; so that it is processed and removed first.
+; RUN: %python -c 'import os,sys,time; t=time.time()-120; os.utime(sys.argv[1],(t,t))' %t.cache/llvmcache-foo
+
 ; This should remove it.
 ; RUN: wasm-ld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=32k:prune_interval=0s -o %t.wasm %t2.o %t.o
 ; RUN: ls %t.cache | count 4


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54039.172398.patch
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181102/398b99d6/attachment.bin>


More information about the llvm-commits mailing list