Androidのフルビルドでccacheを使っているつもりでちゃんと使えていなかったみたい。。。
$ ./prebuilts/misc/linux-x86/ccache/ccache -s cache directory ~/.ccache cache hit 2 cache miss 190017 called for link 3687 not a C/C++ file 5073 unsupported compiler option 793 files in cache 14830 cache size 850.9 Mbytes max cache size 976.6 Mbytes
work領域はいっぱい余ってるから
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sdc1 470G 67G 380G 15% work_v
大盤振る舞いにしてみる
$ ./prebuilts/misc/linux-x86/ccache/ccache -M 180G Set cache size limit to 188743680k $ ./prebuilts/misc/linux-x86/ccache/ccache -C Cleared cache $ ./prebuilts/misc/linux-x86/ccache/ccache -s cache directory /home/adachi/work_v/.ccache cache hit 2 cache miss 190017 called for link 3687 not a C/C++ file 5073 unsupported compiler option 793 files in cache 0 cache size 0 Kbytes max cache size 180.0 Gbytes
フルビルド初回でこんな感じ。(遅い)
real 38m1.859s user 271m25.351s sys 16m49.676s
キャッシュがこんなことになった
$ ./prebuilts/misc/linux-x86/ccache/ccache -s cache directory ~/.ccache cache hit 2 cache miss 208460 called for link 4089 not a C/C++ file 5544 unsupported compiler option 872 files in cache 36886 cache size 6.8 Gbytes max cache size 180.0 Gbytes
2回目
$ rm -rf out $ time make -j8 real 9m23.612s user 55m41.364s sys 6m56.896s
キャッシュは?
$ ./prebuilts/misc/linux-x86/ccache/ccache -s cache directory ~/.ccache cache hit 18416 cache miss 208489 called for link 4491 not a C/C++ file 6015 unsupported compiler option 951 files in cache 36944 cache size 6.8 Gbytes max cache size 180.0 Gbytes
20GBくらいで十分かもしれない。
速くなったといえば速くなったけれど、なんかもっと速くならんものか、、、