From 8c2e9f5d5bf6bf9812b596f1634b4e869137e2bd Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 2 Aug 2023 13:35:49 +0200 Subject: [PATCH] chore: Tweak documentation related to debug level --- doc/MANUAL.adoc | 33 +++++++++++++++------------------ src/Config.cpp | 2 +- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 05819f23c..4243fff18 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -684,11 +684,9 @@ _<>_. [#config_debug_level] *debug_level* (*CCACHE_DEBUGLEVEL*):: - Specifies amount of information dumped when the <> - is enabled. If set 1, only `..ccache-log` files with - per-file caching statistics are dumped. Otherwise, all possible debug - data is dumped. See _<>_ for more information. The default - is 2. + Specifies the amount of information that is written when the + <> is enabled. See _<>_ for more + information. The default is 2. [#config_depend_mode] *depend_mode* (*CCACHE_DEPEND* or *CCACHE_NODEPEND*, see _<>_ above):: @@ -1663,35 +1661,33 @@ why you don't get cache hits. Note that performance will be reduced slightly. When the debug mode is enabled, ccache will create up to five additional files next to the object file: -[options="header",cols="30%,70%"] +[options="header",cols="30%,10%,60%"] |============================================================================== -| *Filename* | *Description* +| *Filename* | *Debug level* | *Description* -| `..ccache-input-c` | +| `..ccache-input-c` | 2 | Binary input hashed by both the direct mode and the preprocessor mode. -| `..ccache-input-d` | +| `..ccache-input-d` | 2 | Binary input only hashed by the direct mode. -| `..ccache-input-p` | +| `..ccache-input-p` | 2 | Binary input only hashed by the preprocessor mode. -| `..ccache-input-text` | +| `..ccache-input-text` | 2 | Human-readable combined diffable text version of the three files above. -| `..ccache-log` | +| `..ccache-log` | 1 | Log for this object file. |============================================================================== - The timestamp format is +The timestamp format is `__`. -`..ccache-log` files can be useful for checking -caching results for every file. If you only need such statistics and don't -need `..ccache-input-*` files then you can set -<> (or environment variable `CCACHE_DEBUGLEVEL`) -to 1. + +If you only need the log file, set <> (environment +variable `CCACHE_DEBUGLEVEL`) to 1. If <> (environment variable `CCACHE_DEBUGDIR`) is set, the files above will be written to that directory with full absolute paths @@ -1717,6 +1713,7 @@ something like this: builds. This together with the `..ccache-log` files should give you some clues about what is happening. + == Compiling in different directories Some information included in the hash that identifies a unique compilation can diff --git a/src/Config.cpp b/src/Config.cpp index 7e99e3d2e..3fe992983 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -1031,7 +1031,7 @@ Config::set_item(const std::string& key, case ConfigItem::debug_level: m_debug_level = util::value_or_throw( - util::parse_unsigned(value, std::nullopt, std::nullopt, "debug_level")); + util::parse_unsigned(value, std::nullopt, std::nullopt, "debug level")); break; case ConfigItem::depend_mode: -- 2.47.2