]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
13 months agofix: Disable the inode cache by default 4.7-maint v4.7.5
Joel Rosdahl [Mon, 20 Mar 2023 19:42:14 +0000 (20:42 +0100)] 
fix: Disable the inode cache by default

There have reports of ccache processes hanging on futex calls related to
the inode cache. (The inode cache synchronization mechanism has been
reworked not to use pthread mutexes in ccache 4.8, so the inode cache is
enabled by default in 4.8 and newer.)

17 months agochore: Update NEWS v4.7.4
Joel Rosdahl [Mon, 21 Nov 2022 18:53:32 +0000 (19:53 +0100)] 
chore: Update NEWS

17 months agochore: Fix typo
Joel Rosdahl [Sun, 20 Nov 2022 21:04:14 +0000 (22:04 +0100)] 
chore: Fix typo

17 months agobump: Upgrade to hiredis 1.1.0
Joel Rosdahl [Sun, 20 Nov 2022 19:46:16 +0000 (20:46 +0100)] 
bump: Upgrade to hiredis 1.1.0

17 months agofix: Avoid race condition in inode cache for quick updates
Joel Rosdahl [Thu, 17 Nov 2022 20:31:58 +0000 (21:31 +0100)] 
fix: Avoid race condition in inode cache for quick updates

The inode cache has a race condition that consists of these events:

1. A file is written with content C1, size S and timestamp (ctime/mtime)
   T.
2. Ccache hashes the file content and asks the inode cache to store the
   digest with a hash of S and T (and some other data) as the key.
3. The file is quickly thereafter written with content C2 without
   changing size S and timestamp T. The timestamp is not updated since
   the file writes are made within a time interval smaller than the
   granularity of the clock used for file system timestamps. At the time
   of writing, a common granularity on a Linux system is 0.004 s (250
   Hz).
4. The inode cache is asked for the file digest and the inode cache
   delivers a digest of C1 even though the file's content is C2.

To avoid the race condition, the inode cache now only caches inodes
whose timestamp was updated more than two seconds ago. This conservative
value is chosen since not all file systems have subsecond resolution.

Fixes #1215.

17 months agofix: Fall back to emulation for unsupported posix_fallocate (#1222)
Oleg Sidorkin [Mon, 14 Nov 2022 18:53:50 +0000 (21:53 +0300)] 
fix: Fall back to emulation for unsupported posix_fallocate (#1222)

posix_fallocate can return EINVAL if filesystem doesn't support it. Fall back to emulation in this case.

E.g. ZFS does so on FreeBSD (haven't tested with ZFS on linux).

This fixes Utill::fallocate unit tests on ZFS.

17 months agofix: Use $XDG_RUNTIME_DIR/ccache-tmp as the default temporary directory
Joel Rosdahl [Sun, 13 Nov 2022 13:43:35 +0000 (14:43 +0100)] 
fix: Use $XDG_RUNTIME_DIR/ccache-tmp as the default temporary directory

See discussion in #1221.

17 months agotest: Test TimePoint::nsec_decimal_part
Joel Rosdahl [Thu, 10 Nov 2022 15:28:08 +0000 (16:28 +0100)] 
test: Test TimePoint::nsec_decimal_part

17 months agofix: Fix bug in Duration arithmetic operators
Joel Rosdahl [Thu, 10 Nov 2022 15:29:25 +0000 (16:29 +0100)] 
fix: Fix bug in Duration arithmetic operators

The bug only affected LongLivedLockFile, which is not used yet.

17 months agoperf: Optimize util::write_file for empty data
Joel Rosdahl [Sun, 13 Nov 2022 08:48:10 +0000 (09:48 +0100)] 
perf: Optimize util::write_file for empty data

17 months agofix: Do not create /run directory on systems that don't have it (#1221)
Oleg Sidorkin [Sun, 13 Nov 2022 15:34:30 +0000 (18:34 +0300)] 
fix: Do not create /run directory on systems that don't have it (#1221)

17 months agodoc: Don't mention removed compiler type "pump"
Joel Rosdahl [Fri, 11 Nov 2022 21:50:06 +0000 (22:50 +0100)] 
doc: Don't mention removed compiler type "pump"

The implementation was removed in
2044fea84b86001b2976ecde946d3d6d0e88ec0a.

17 months agodoc: Add hint about using -fno-pch-timestamp for PCH with Clang
Joel Rosdahl [Fri, 11 Nov 2022 20:03:14 +0000 (21:03 +0100)] 
doc: Add hint about using -fno-pch-timestamp for PCH with Clang

17 months agodoc: Improve description of header file handling after 24cfb7998c27
Joel Rosdahl [Fri, 11 Nov 2022 19:53:09 +0000 (20:53 +0100)] 
doc: Improve description of header file handling after 24cfb7998c27

17 months agofix: Don't consider temporary files incompressible
Joel Rosdahl [Thu, 10 Nov 2022 10:17:26 +0000 (11:17 +0100)] 
fix: Don't consider temporary files incompressible

17 months agofix: Properly wait for recompression jobs if there is no f subdir
Joel Rosdahl [Thu, 10 Nov 2022 09:54:56 +0000 (10:54 +0100)] 
fix: Properly wait for recompression jobs if there is no f subdir

17 months agoenhance: Make subsequent calls to ThreadPool::shut_down NOPs
Joel Rosdahl [Thu, 10 Nov 2022 09:54:09 +0000 (10:54 +0100)] 
enhance: Make subsequent calls to ThreadPool::shut_down NOPs

17 months agodoc: Remove superfluous right parenthesis
Joel Rosdahl [Thu, 10 Nov 2022 10:11:13 +0000 (11:11 +0100)] 
doc: Remove superfluous right parenthesis

17 months agorefactor: Avoid changing loop variable in body of for loop
Joel Rosdahl [Wed, 9 Nov 2022 20:06:05 +0000 (21:06 +0100)] 
refactor: Avoid changing loop variable in body of for loop

This is to please CodeQL's "For loop variable changed in body" check.

17 months agorefactor: Remove empty if clause
Joel Rosdahl [Wed, 9 Nov 2022 20:02:19 +0000 (21:02 +0100)] 
refactor: Remove empty if clause

This is to please CodeQL's "Futile condition" check.

17 months agofix: Avoid duplicate magic header in --inspect
Joel Rosdahl [Tue, 8 Nov 2022 20:44:17 +0000 (21:44 +0100)] 
fix: Avoid duplicate magic header in --inspect

17 months agochore: Sort file list
Joel Rosdahl [Mon, 7 Nov 2022 20:11:36 +0000 (21:11 +0100)] 
chore: Sort file list

17 months agochore: Improve inode cache logging
Joel Rosdahl [Tue, 8 Nov 2022 20:31:32 +0000 (21:31 +0100)] 
chore: Improve inode cache logging

17 months agodoc: Fix indentation
Joel Rosdahl [Mon, 7 Nov 2022 19:16:31 +0000 (20:16 +0100)] 
doc: Fix indentation

17 months agofix(http-storage): Report connection timeout properly
Joel Rosdahl [Mon, 7 Nov 2022 08:16:15 +0000 (09:16 +0100)] 
fix(http-storage): Report connection timeout properly

17 months agoci: Don't run CodeQL on unit tests
Joel Rosdahl [Sun, 6 Nov 2022 08:27:52 +0000 (09:27 +0100)] 
ci: Don't run CodeQL on unit tests

Too many annoying false positives, like "Unused static function" for all
unit tests.

17 months agoci: Refactor ci/build script
Joel Rosdahl [Sun, 6 Nov 2022 08:26:56 +0000 (09:26 +0100)] 
ci: Refactor ci/build script

17 months agochore: Update NEWS v4.7.3
Joel Rosdahl [Sat, 5 Nov 2022 15:49:59 +0000 (16:49 +0100)] 
chore: Update NEWS

17 months agodoc: Mention the default value of keep_comments_cpp
Joel Rosdahl [Sat, 5 Nov 2022 12:13:58 +0000 (13:13 +0100)] 
doc: Mention the default value of keep_comments_cpp

17 months agochore: Fix grammar in comment
Joel Rosdahl [Sat, 5 Nov 2022 12:11:16 +0000 (13:11 +0100)] 
chore: Fix grammar in comment

17 months agofeat: Include I_MPI_CC/I_MPI_CXX in the input hash
Joel Rosdahl [Sat, 5 Nov 2022 12:03:22 +0000 (13:03 +0100)] 
feat: Include I_MPI_CC/I_MPI_CXX in the input hash

The I_MPI_CC and I_MPI_CXX variables affect which underlying compiler
ICC uses. Reference:
<https://www.intel.com/content/www/us/en/develop/documentation/
mpi-developer-reference-windows/top/environment-variable-reference/
compilation-environment-variables.html>.

Closes #1210.

17 months agochore: Improve inode cache logging
Joel Rosdahl [Sat, 5 Nov 2022 11:43:03 +0000 (12:43 +0100)] 
chore: Improve inode cache logging

- Only log inode cache hits/misses in debug mode.
- Always log accumulated inode statistics at program exit.

17 months agofeat: Support -Wp,-M[M]D with -o without -MMD/-MQ/-MT for GCC and Clang
Joel Rosdahl [Thu, 3 Nov 2022 20:47:59 +0000 (21:47 +0100)] 
feat: Support -Wp,-M[M]D with -o without -MMD/-MQ/-MT for GCC and Clang

Closes #1203.

17 months agotest: Silence progress messages from CCACHE_UMASK test
Joel Rosdahl [Thu, 3 Nov 2022 20:42:06 +0000 (21:42 +0100)] 
test: Silence progress messages from CCACHE_UMASK test

17 months agotest: Silence Clang warnings about unused arguments during compilation
Joel Rosdahl [Thu, 3 Nov 2022 20:39:37 +0000 (21:39 +0100)] 
test: Silence Clang warnings about unused arguments during compilation

17 months agotest: Remove left-over fi statement
Joel Rosdahl [Thu, 3 Nov 2022 20:06:46 +0000 (21:06 +0100)] 
test: Remove left-over fi statement

17 months agofix: Fix parsing of sloppiness with trailing delimiter
Joel Rosdahl [Thu, 3 Nov 2022 19:56:32 +0000 (20:56 +0100)] 
fix: Fix parsing of sloppiness with trailing delimiter

17 months agofix: Avoid redundant slash in HTTP storage URLs with subdirs
Joel Rosdahl [Thu, 3 Nov 2022 19:48:05 +0000 (20:48 +0100)] 
fix: Avoid redundant slash in HTTP storage URLs with subdirs

17 months agofix: Hash variables that affect Clang version on macOS
Joel Rosdahl [Thu, 3 Nov 2022 19:45:21 +0000 (20:45 +0100)] 
fix: Hash variables that affect Clang version on macOS

Fixes #1205.

17 months agochore: Tweak comments
Joel Rosdahl [Thu, 3 Nov 2022 19:28:18 +0000 (20:28 +0100)] 
chore: Tweak comments

18 months agochore: Improve logging of file read failures
Joel Rosdahl [Wed, 2 Nov 2022 18:18:21 +0000 (19:18 +0100)] 
chore: Improve logging of file read failures

18 months agochore: Update authors v4.7.2
Joel Rosdahl [Sat, 29 Oct 2022 11:17:57 +0000 (13:17 +0200)] 
chore: Update authors

18 months agochore: Update NEWS
Joel Rosdahl [Sat, 29 Oct 2022 08:10:45 +0000 (10:10 +0200)] 
chore: Update NEWS

18 months agofix: Process the argument following a -Xarch argument (#1199)
rblx-kbuck [Fri, 28 Oct 2022 18:41:28 +0000 (11:41 -0700)] 
fix: Process the argument following a -Xarch argument (#1199)

Since there are already checks enforcing that all -Xarch arguments match
each other and -arch, we can assume that the compiler would also
interpret the following argument, so ccache should interpret it too.

Fixes #1198.

18 months agofix: Use configured umask for command line operations like --zero-stats
Joel Rosdahl [Thu, 27 Oct 2022 20:23:50 +0000 (22:23 +0200)] 
fix: Use configured umask for command line operations like --zero-stats

Closes #1197.

18 months agotest: Disable flaky Windows profiling tests
Joel Rosdahl [Thu, 27 Oct 2022 20:05:39 +0000 (22:05 +0200)] 
test: Disable flaky Windows profiling tests

18 months agobuild: Include limits.h for PATH_MAX
Joel Rosdahl [Wed, 26 Oct 2022 19:00:31 +0000 (21:00 +0200)] 
build: Include limits.h for PATH_MAX

Note: The C++ climits header does not guarantee to define PATH_MAX.

Fixes #1193.

18 months agofix: Use separate 32-bit and 64-bit inode cache files
Joel Rosdahl [Tue, 25 Oct 2022 19:28:04 +0000 (21:28 +0200)] 
fix: Use separate 32-bit and 64-bit inode cache files

The memory layout of the shared region differs between 32-bit and 64-bit
ccache binaries, so use different inode cache files.

18 months agobuild: Apply standard settings and warnings to lockfile test (#1195)
Gregor Jasny [Mon, 24 Oct 2022 14:51:54 +0000 (16:51 +0200)] 
build: Apply standard settings and warnings to lockfile test (#1195)

This ensures the required include of `config.h` to get `mode_t` defined on Windows.

18 months agochore: Correct contributor in NEWS
Joel Rosdahl [Sat, 22 Oct 2022 18:06:08 +0000 (20:06 +0200)] 
chore: Correct contributor in NEWS

18 months agochore: Update NEWS v4.7.1
Joel Rosdahl [Sat, 22 Oct 2022 17:48:41 +0000 (19:48 +0200)] 
chore: Update NEWS

18 months agoci: Avoid using deprecated GitHub set-output command
Joel Rosdahl [Sat, 22 Oct 2022 11:33:37 +0000 (13:33 +0200)] 
ci: Avoid using deprecated GitHub set-output command

Reference:
<https://github.blog/changelog/
2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/>

18 months agoci: Add GCC 8 and GCC 9 jobs
Joel Rosdahl [Sat, 22 Oct 2022 11:27:56 +0000 (13:27 +0200)] 
ci: Add GCC 8 and GCC 9 jobs

18 months agobuild: Remove unneeded C++11 flag in libatomic test (#1191)
Orgad Shaneh [Sat, 22 Oct 2022 10:50:28 +0000 (13:50 +0300)] 
build: Remove unneeded C++11 flag in libatomic test (#1191)

The required C++ is 17 anyway.

18 months agobuild: Support compilation with GCC 8 (#1190)
Orgad Shaneh [Sat, 22 Oct 2022 10:48:25 +0000 (13:48 +0300)] 
build: Support compilation with GCC 8 (#1190)

See https://discourse.cmake.org/t/correct-way-to-link-std-filesystem-with-gcc-8/4121

18 months agofix: Handle -MD/-MMD when compiling assembler file
Joel Rosdahl [Wed, 19 Oct 2022 20:13:21 +0000 (22:13 +0200)] 
fix: Handle -MD/-MMD when compiling assembler file

When compiling an assembler file, -MD and -MMD don't produce any
dependency file, so don't expect one.

Also, make sure to fall back to running the real compiler in case an
expected output file is missing instead of exiting with an error.

Fixes #1189.

18 months agochore: Remove unused no-response bot config
Joel Rosdahl [Wed, 19 Oct 2022 17:48:20 +0000 (19:48 +0200)] 
chore: Remove unused no-response bot config

18 months agodoc: Fix markup in NEWS
Joel Rosdahl [Mon, 17 Oct 2022 18:27:30 +0000 (20:27 +0200)] 
doc: Fix markup in NEWS

18 months agochore: Update NEWS v4.7
Joel Rosdahl [Mon, 17 Oct 2022 18:11:11 +0000 (20:11 +0200)] 
chore: Update NEWS

18 months agodoc: Improve manual
Joel Rosdahl [Sun, 16 Oct 2022 20:02:00 +0000 (22:02 +0200)] 
doc: Improve manual

18 months agodoc: Fixed markup of __NAME__ macros
Joel Rosdahl [Sun, 16 Oct 2022 12:51:40 +0000 (14:51 +0200)] 
doc: Fixed markup of __NAME__ macros

18 months agorefactor: Avoid an extra data copy when rewriting stdout
Joel Rosdahl [Sun, 16 Oct 2022 08:17:01 +0000 (10:17 +0200)] 
refactor: Avoid an extra data copy when rewriting stdout

18 months agotest: Simplify util::read_file_part test
Joel Rosdahl [Sun, 16 Oct 2022 08:16:29 +0000 (10:16 +0200)] 
test: Simplify util::read_file_part test

18 months agoenhance: Add more util::Bytes::insert variants
Joel Rosdahl [Sun, 16 Oct 2022 08:11:14 +0000 (10:11 +0200)] 
enhance: Add more util::Bytes::insert variants

18 months agorefactor: Rename ShowIncludesParser to MsvcShowIncludesOutput
Joel Rosdahl [Sat, 15 Oct 2022 18:26:18 +0000 (20:26 +0200)] 
refactor: Rename ShowIncludesParser to MsvcShowIncludesOutput

I think that this is more in line with what the namespace represents. I
also renamed ShowIncludesParser::tokenize to
MsvcShowIncludesOutput::get_includes since it's not returning generic
tokens but specifically includes files.

18 months agochore: Tweak code related to auto depend mode for MSVC
Joel Rosdahl [Sat, 15 Oct 2022 18:17:00 +0000 (20:17 +0200)] 
chore: Tweak code related to auto depend mode for MSVC

18 months agodoc: Tweak manual and comments related to /showIncludes
Joel Rosdahl [Wed, 12 Oct 2022 18:35:42 +0000 (20:35 +0200)] 
doc: Tweak manual and comments related to /showIncludes

18 months agochore: Add news for version 4.6.3
Joel Rosdahl [Wed, 12 Oct 2022 18:15:32 +0000 (20:15 +0200)] 
chore: Add news for version 4.6.3

18 months agochore: Tweak README
Joel Rosdahl [Mon, 10 Oct 2022 18:26:51 +0000 (20:26 +0200)] 
chore: Tweak README

18 months agochore: Update authors
Joel Rosdahl [Thu, 6 Oct 2022 20:05:21 +0000 (22:05 +0200)] 
chore: Update authors

18 months agoci: Remove Ubuntu 18.04 jobs and add GCC 12 job (#1180)
Orgad Shaneh [Sun, 16 Oct 2022 07:37:45 +0000 (10:37 +0300)] 
ci: Remove Ubuntu 18.04 jobs and add GCC 12 job (#1180)

It is deprecated.

See https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/

Add GCC 12 on Ubuntu 22.04.

18 months agobuild: Add headers to CMake project files (#1178)
Orgad Shaneh [Sat, 15 Oct 2022 18:15:59 +0000 (21:15 +0300)] 
build: Add headers to CMake project files (#1178)

Useful for listing them in the IDE project tree, for IDEs that use
CMake file api (like Qt Creator).

18 months agofeat: Support auto depend mode for MSVC without /showIncludes (#1176)
Orgad Shaneh [Sat, 15 Oct 2022 18:09:36 +0000 (21:09 +0300)] 
feat: Support auto depend mode for MSVC without /showIncludes (#1176)

If MSVC is executed *without* /showIncludes, and ccache is configured with
depend mode, add /showIncludes and strip the extra output from stdout.

18 months agoci: Remove clang64 msys target from ci (#1179)
Orgad Shaneh [Sat, 15 Oct 2022 17:57:06 +0000 (20:57 +0300)] 
ci: Remove clang64 msys target from ci (#1179)

It frequently fails to install packages.

18 months agotest: Make the integration tests work under Windows (#1133)
Orgad Shaneh [Wed, 12 Oct 2022 18:49:07 +0000 (21:49 +0300)] 
test: Make the integration tests work under Windows (#1133)

Adapted the integration test scripts to be able to run on Windows.

- Added the ".sh" extension to most shell scripts. It looks like Windows needs
  this to run the scripts.
- Added special handling of carriage return characters.
- Tests that fail are deactivated for the moment.
- Added additional runners in different Msys2 environments.
- Disabled the remote_http tests "Basic auth required" and "Basic auth failed"
  due to intermittent failures.
- Disabled PCH tests for MSYS/Clang.

Co-authored-by: R. Voggenauer <rvogg@users.noreply.github.com>
18 months agobuild: Add missing source file extension
Joel Rosdahl [Wed, 12 Oct 2022 18:30:16 +0000 (20:30 +0200)] 
build: Add missing source file extension

18 months agofeat: Support depend mode for MSVC (#992)
Orgad Shaneh [Wed, 12 Oct 2022 18:29:01 +0000 (21:29 +0300)] 
feat: Support depend mode for MSVC (#992)

Based on -showIncludes, which prints included files on stdout with a
certain text prefix. Otherwise pretty similar to depend mode handling
for GCC.

This makes MSVC building way faster.

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
18 months agochore: Clean up code slightly
Joel Rosdahl [Wed, 5 Oct 2022 19:34:17 +0000 (21:34 +0200)] 
chore: Clean up code slightly

18 months agofix: Remove usage of deprecated codecvt header (#1172)
Orgad Shaneh [Wed, 5 Oct 2022 20:10:24 +0000 (23:10 +0300)] 
fix: Remove usage of deprecated codecvt header (#1172)

Based on https://stackoverflow.com/a/69410299/764870.

18 months agorefactor: Store compiler output as bytes
Joel Rosdahl [Wed, 5 Oct 2022 19:02:36 +0000 (21:02 +0200)] 
refactor: Store compiler output as bytes

As discussed in #1173.

18 months agoenhance: Add util::to_string instantiations for Bytes and span
Joel Rosdahl [Wed, 5 Oct 2022 18:58:01 +0000 (20:58 +0200)] 
enhance: Add util::to_string instantiations for Bytes and span

18 months agotest: Add tests for util::to_string and util::to_string_view
Joel Rosdahl [Wed, 5 Oct 2022 18:57:41 +0000 (20:57 +0200)] 
test: Add tests for util::to_string and util::to_string_view

18 months agofix: Handle spaces between target and colon in dependency files (#1166)
louiscaron [Wed, 5 Oct 2022 19:13:50 +0000 (21:13 +0200)] 
fix: Handle spaces between target and colon in dependency files (#1166)

Support dependency files that are generated with spaces between the target and
the colon sign.

18 months agotest: Add another depend mode test (#1174)
louiscaron [Wed, 5 Oct 2022 19:06:58 +0000 (21:06 +0200)] 
test: Add another depend mode test (#1174)

The first test exercises a relative path only identical generation.

The second test exhibits a known limitation when the same test case is done with
an absolute path (depend file is wrong).

18 months agofix: Retain line CRLF in compiler output on Windows (#1173)
Orgad Shaneh [Wed, 5 Oct 2022 18:24:14 +0000 (21:24 +0300)] 
fix: Retain line CRLF in compiler output on Windows (#1173)

When the cached data is read, the output to fd is binary
(Util::send_to_fd), so in order to maintain the original
line endings, the output must be stored as binary too.

18 months agoRevert "feat: Support auto depend mode for MSVC without /showIncludes (#1158)"
Joel Rosdahl [Wed, 5 Oct 2022 17:52:45 +0000 (19:52 +0200)] 
Revert "feat: Support auto depend mode for MSVC without /showIncludes (#1158)"

This reverts commit 8b65880b5ad817156b58c58b5133aafc99b0a264.

See <https://github.com/ccache/ccache/pull/1158#issuecomment-1268748557>.

18 months agofeat: Support auto depend mode for MSVC without /showIncludes (#1158)
Orgad Shaneh [Wed, 5 Oct 2022 17:34:31 +0000 (20:34 +0300)] 
feat: Support auto depend mode for MSVC without /showIncludes (#1158)

Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
18 months agobuild: Use pkgconfig for zstd search (#1169)
Rosen Penev [Wed, 5 Oct 2022 17:29:50 +0000 (10:29 -0700)] 
build: Use pkgconfig for zstd search (#1169)

18 months agofix: Capture MSVC stdout/stderr when running from Visual Studio (#1170)
Orgad Shaneh [Wed, 5 Oct 2022 05:41:09 +0000 (08:41 +0300)] 
fix: Capture MSVC stdout/stderr when running from Visual Studio (#1170)

18 months agofix: Fix implementation of unsetenv on Windows (#1171)
Orgad Shaneh [Wed, 5 Oct 2022 05:31:52 +0000 (08:31 +0300)] 
fix: Fix implementation of unsetenv on Windows (#1171)

18 months agodoc: Sort sloppiness values by name
Joel Rosdahl [Tue, 4 Oct 2022 19:32:55 +0000 (21:32 +0200)] 
doc: Sort sloppiness values by name

18 months agofeat: Improve handling of -frandom-seed and description of sloppiness
Joel Rosdahl [Tue, 4 Oct 2022 19:31:12 +0000 (21:31 +0200)] 
feat: Improve handling of -frandom-seed and description of sloppiness

I should not be necessary to distinguish between existence and
non-existence of -frandom-seed if random_seed sloppiness is requested,
so don't hash the "-frandom-seed=" part either.

18 months agofeat: Add sloppiness for -frandom-seed (#1168)
Raihaan Shouhell [Tue, 4 Oct 2022 19:21:42 +0000 (03:21 +0800)] 
feat: Add sloppiness for -frandom-seed (#1168)

18 months agofeat: Improve statistics for remote hits/misses
Joel Rosdahl [Mon, 3 Oct 2022 18:18:03 +0000 (20:18 +0200)] 
feat: Improve statistics for remote hits/misses

ccache collects statistics about local and remote storage layer get/put
operations and describes them as "local/remote hits/misses" in the
output of "ccache -s". However, since "hits" and "misses" mean "result
hit/miss" in the "cacheable calls" section, it's easy to think that they
measure the same thing.

This commit improves the situation by:

- Adding new "local/remote hits/misses" counters that mean "result
  hit/miss". These are shown if remote storage is used (since they
  otherwise are redundant and equal to the normal "hits/misses"
  counters) or if the -v/--verbose option is given.
- Presenting the previous "local/remote hits/misses" counters as
  "local/remote reads". Only shown in verbose mode.
- Adding "local/remote writes" counters. Only shown in verbose mode.

Closes #1016.

18 months agochore: Improve inode cache log messages
Joel Rosdahl [Sun, 2 Oct 2022 17:06:03 +0000 (19:06 +0200)] 
chore: Improve inode cache log messages

19 months agofix: Don't increment preprocessed_cache_miss in recache mode
Joel Rosdahl [Sun, 2 Oct 2022 17:02:09 +0000 (19:02 +0200)] 
fix: Don't increment preprocessed_cache_miss in recache mode

19 months agorefactor: Sort k_statistics_fields
Joel Rosdahl [Sun, 2 Oct 2022 11:26:22 +0000 (13:26 +0200)] 
refactor: Sort k_statistics_fields

19 months agorefactor: Extract code for retrieving manifest to a function
Joel Rosdahl [Tue, 27 Sep 2022 19:50:42 +0000 (21:50 +0200)] 
refactor: Extract code for retrieving manifest to a function

19 months agofeat: Implement "remote only" mode
Joel Rosdahl [Tue, 27 Sep 2022 18:54:29 +0000 (20:54 +0200)] 
feat: Implement "remote only" mode

Closes #1010.

19 months agochore: Rename primary/secondary storage to local/remote storage
Joel Rosdahl [Sun, 25 Sep 2022 18:28:40 +0000 (20:28 +0200)] 
chore: Rename primary/secondary storage to local/remote storage

There is a feature request to be able not to use a local cache at all,
only a network cache. With such a feature, the names "primary storage"
and "secondary storage" make less sense since ccache would be operating
in "secondary only" mode, but then that storage would of course become
the primary (and only).

Let's rename "primary storage" to "local storage" and "secondary
storage" to "remote storage" – operating in "remote only" mode then
makes sense.

One of the original motivations to call networked storage "secondary" is
that the file storage can be used for local file systems as well, making
such storage "not quite remote", but in practice I guess the file
storage backend used primarily for network file systems.