From: pullmoll <pullmoll@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: ccache isn't working with xbps-src
Date: Thu, 19 Nov 2020 22:31:23 +0100 [thread overview]
Message-ID: <20201119213123._vbhseJIM73hC7zUoMf3IAUQp6FZpU3mLaUu9LT5WVM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26508@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/issues/26508#issuecomment-730645253
Comment:
1) You probably cannot expect a single hit between chromium-86 and chromium-87 because headers changed and a change in a central header (think `version.h`) prevents a cache hit.
2) You need to make sure to re-bootstrap your environment, i.e. do `./xbps-src zap` and `./xbps-src binary-bootstrap` again to make the `etc/conf` (not `etc/config` AFAICT) change take effect.
3) Any change in the compiler binary invalidates the entire current cache, because a checksum of the compiler binary (`/usr/bin/clang++` in this case) is used to make sure that compilation results will indeed be identical. So the update of llvm10 to llvm11 already invalidated all your existing cache entries for `clang` / `clang++`. You can clean and zap the cache (`ccache -C` and `ccache -Z`) in such a case, except perhaps if you also have lots of `gcc` and `g++` cache entries.
I have a separate 1TB SSD for ccache and currently have 653 GiB of 768 GiB used with a cache hit rate of 8.06%. I'm building literally tens of thousands of packages for all architectures and can confirm that `ccache` indeed works as it is supposed to.
Just to show you the figures this is the output of `ccache -s`. In my user's environment I have `CCACHE_DIR=/work/void/ccache` i.e. the same directory which is used from inside the chroot:
```
cache directory /work/void/ccache
primary config /work/void/ccache/ccache.conf
secondary config (readonly) /etc/ccache.conf
stats updated Thu Nov 19 22:29:31 2020
cache hit (direct) 819345
cache hit (preprocessed) 178710
cache miss 11381469
cache hit rate 8.06 %
called for link 994196
called for preprocessing 994011
multiple source files 1762
compiler produced stdout 9438
compiler produced no output 77
compiler produced empty output 10314
compile failed 200101
ccache internal error 613
preprocessor error 145901
can't use precompiled header 89380
bad compiler arguments 162657
unsupported source language 62376
autoconf compile/link 867964
unsupported compiler option 93317
unsupported code directive 1051
output to stdout 4
could not write to output file 6
no input file 345577
cleanups performed 2489
files in cache 8008769
cache size 654.3 GB
max cache size 768.0 GB
```
next prev parent reply other threads:[~2020-11-19 21:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 20:30 [ISSUE] " Logarithmus
2020-11-19 21:23 ` pullmoll
2020-11-19 21:25 ` pullmoll
2020-11-19 21:27 ` pullmoll
2020-11-19 21:29 ` pullmoll
2020-11-19 21:31 ` pullmoll [this message]
2020-11-19 21:35 ` pullmoll
2020-11-20 19:18 ` Logarithmus
2020-11-21 19:56 ` [ISSUE] [CLOSED] " Logarithmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201119213123._vbhseJIM73hC7zUoMf3IAUQp6FZpU3mLaUu9LT5WVM@z \
--to=pullmoll@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).