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

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 17:41:14 PDT 2018


andrew.w.kaylor added inline comments.


================
Comment at: test/tools/gold/X86/cache.ll:64
 ; RUN:     --plugin-opt=cache-dir=%t.cache \
 ; RUN:     --plugin-opt=cache-policy=cache_size_bytes=32k:prune_interval=0s \
 ; RUN:     -o %t4.o %t2.o %t.o
----------------
tejohnson wrote:
> The default prune_after is 1 week, so I'm not sure why we are pruning any of the files here based on whether the timestamps of files just created are the same or different. The llvmcache-foo file as well as the two created by the link should all have very recent time stamps.
> 
> Did you confirm it is being removed due to age via the debug messages (i.e. --plugin-opt=-debug-only=cache-pruning)? What does it think the age is?
> 
> Also, the same test exists for lld: tools/lld/test/ELF/lto/cache.ll, so whatever change is needed here would presumably be needed there too. But I'd like to understand the answer to my question above first.
Here's the output I got when the test failed:

```
Exit Code: 1

Command Output (stderr):
--
Occupancy: 0% target is: 75%, 32768 bytes
 - Remove /export/iusers/akaylor/llvm/test/tools/gold/X86/Output/cache.ll.tmp.cache/llvmcache-03F746885AFFCCA0CAE821DEF570C61729F7B86C (size 600), new occupancy is 66017%
 - Remove /export/iusers/akaylor/llvm/test/tools/gold/X86/Output/cache.ll.tmp.cache/llvmcache-1EF80E4A284B68475881854D2B20EE892E0A839C (size 480), new occupancy is 65537%
 - Remove /export/iusers/akaylor/llvm/test/tools/gold/X86/Output/cache.ll.tmp.cache/llvmcache-foo (size 65537), new occupancy is 0%
Expected 4 lines, got 2.

--
```


https://reviews.llvm.org/D52452





More information about the llvm-commits mailing list