Bump to ccache 4.4
[platform/upstream/ccache.git] / doc / DEVELOPER.md
1 Developer manual
2 ================
3
4 Tracing
5 -------
6
7 In order to see what ccache is doing, it is possible to enable internal
8 tracing:
9
10 * Build ccache with the `-DENABLE_TRACING=1` cmake option.
11 * Set the environment variable `CCACHE_INTERNAL_TRACE` to instruct ccache to
12   create trace files at runtime.
13
14 There will be one trace file per ccache invocation, named as the object file
15 with a `.ccache-trace` suffix, e.g. `file.o.ccache-trace`. The trace file can
16 then be loaded into the `chrome://tracing` page of Chromium/Chrome.
17
18 You can combine several trace files into by using the `misc/combine-trace-files`
19 script:
20
21     misc/combine-trace-files *.o.ccache-trace | gzip > ccache.trace.gz
22
23 (The gzip step is optional; Chrome supports both plain trace files and gzipped
24 trace files.) The script will offset each individual trace by its start time in
25 the combined file.
26
27 There is also a script called `summarize-trace-files` that generates a summary
28 (per job slot) of all the ccache runs:
29
30     misc/combine-trace-files *.o.ccache-trace | misc/summarize-trace-files 4 > ccache.trace
31
32 The script takes the number of job slots you used when building (e.g. `4` for
33 `make -j4`) as the first argument.