Re: [ccache] Cache misses are extremely expensive.

2016-07-21 Thread Guillaume Campagna
Yes, I did see the part about the -include. I didn’t specify it because Xcode 
does the right thing by default. There was also no preprocessor error in the 
stats. 

Attached a log but I don’t see anything wrong with it. Also updated to 3.2.7 
but didn’t change something so far. I’ll keep looking too. 

Thanks!

Guillaume

[2016-07-21T10:31:37.793499 82587] === CCACHE 3.2.5 STARTED 
=
[2016-07-21T10:31:37.793499 82587] Config: (default) base_dir =
[2016-07-21T10:31:37.793499 82587] Config: (default) cache_dir = 
/Users/gcamp/.ccache
[2016-07-21T10:31:37.793499 82587] Config: (default) cache_dir_levels = 2
[2016-07-21T10:31:37.793499 82587] Config: (default) compiler =
[2016-07-21T10:31:37.793499 82587] Config: (default) compiler_check = mtime
[2016-07-21T10:31:37.793499 82587] Config: (default) compression = false
[2016-07-21T10:31:37.793499 82587] Config: (default) compression_level = 6
[2016-07-21T10:31:37.793499 82587] Config: (default) cpp_extension =
[2016-07-21T10:31:37.793499 82587] Config: (default) direct_mode = true
[2016-07-21T10:31:37.793499 82587] Config: (default) disable = false
[2016-07-21T10:31:37.793499 82587] Config: (default) extra_files_to_hash =
[2016-07-21T10:31:37.793499 82587] Config: (environment) hard_link = true
[2016-07-21T10:31:37.793499 82587] Config: (default) hash_dir = false
[2016-07-21T10:31:37.793499 82587] Config: (environment) log_file = 
/Users/gcamp/ccache.log
[2016-07-21T10:31:37.793499 82587] Config: (default) max_files = 0
[2016-07-21T10:31:37.793499 82587] Config: (environment) max_size = 3.0G
[2016-07-21T10:31:37.793499 82587] Config: (default) path =
[2016-07-21T10:31:37.793499 82587] Config: (default) prefix_command =
[2016-07-21T10:31:37.793499 82587] Config: (default) read_only = false
[2016-07-21T10:31:37.793499 82587] Config: (default) read_only_direct = false
[2016-07-21T10:31:37.793499 82587] Config: (default) recache = false
[2016-07-21T10:31:37.793499 82587] Config: (default) run_second_cpp = false
[2016-07-21T10:31:37.793499 82587] Config: (environment) sloppiness = 
file_macro, include_file_mtime, include_file_ctime, time_macros, pch_defines, 
file_stat_matches
[2016-07-21T10:31:37.793499 82587] Config: (default) stats = true
[2016-07-21T10:31:37.793499 82587] Config: (default) temporary_dir =
[2016-07-21T10:31:37.793499 82587] Config: (default) umask =
[2016-07-21T10:31:37.793499 82587] Config: (default) unify = false
[2016-07-21T10:31:37.794203 82587] Command line: ccache /usr/bin/clang -x c++ 
-arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack 
-fmacro-backtrace-limit=0 -std=gnu++1y -stdlib=libc++ -Wno-trigraphs 
-fpascal-strings -O0 -fno-common -Wno-missing-field-initializers 
-Wno-missing-prototypes -Wunreachable-code -Werror=deprecated-objc-isa-usage 
-Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual 
-Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch 
-Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable 
-Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas 
-Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion 
-Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 
-Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk
 -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof 
-mios-simulator-version-min=8.0 -g -fvisibility-inlines-hidden 
-Wno-sign-conversion 
-I/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/bgtfsLib.build/Debug-iphonesimulator/bgtfsLib.build/bgtfsLib.hmap
 -I/usr/local/include 
-I/Users/gcamp/Dev/Transit-iOS/Submodules/transitLib/bgtfs/bgtfsLib/TransitUtils
 
-I/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Products/Debug-iphonesimulator/include
 
-I/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/bgtfsLib.build/Debug-iphonesimulator/bgtfsLib.build/DerivedSources/x86_64
 
-I/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/bgtfsLib.build/Debug-iphonesimulator/bgtfsLib.build/DerivedSources
 
-F/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Products/Debug-iphonesimulator
 -include 
/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/PrecompiledHeaders/bgtfsLib-cyxnnvfzlwevhvfipapwjvyfxobr/bgtfsLib.pch
 -MMD -MT dependencies -MF 
/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/bgtfsLib.build/Debug-iphonesimulator/bgtfsLib.build/Objects-normal/x86_64/RoutesRepresentation.d
 --serialize-diagnostics 
/Users/gcamp/Dev/DerivedData/Transit-ecarlyzsybvyawbnymtoooesgrce/Build/Intermediates/bgtfsLib.build/Debug-iphonesimulator/bgtfsLib.build/Objects-normal/x86_64/RoutesRepresentation.di

Re: [ccache] Cache misses are extremely expensive.

2016-07-12 Thread Joel Rosdahl
On 23 June 2016 at 21:14, Guillaume Campagna 
 wrote:

> Just started using ccache based on this tutorial and so far I like it.
> However, caches miss being extremely slow. [..] Note that I do use a pch,
> if that changes something. [...]


Since you included pch_defines and time_macros in CCACHE_SLOPPINESS, I
guess you've seen the instructions on
https://ccache.samba.org/manual.html#_precompiled_headers already? If so,
did you also follow the instructions about using -include or
-fpch-preprocess?

To get more information on what's happening, you can set CCACHE_LOGFILE to
a file path and then look in that file for clues.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] Cache misses are extremely expensive.

2016-06-23 Thread Guillaume Campagna
Hi, 

Just started using ccache based on this tutorial and so far I like it. However, 
caches miss being extremely slow. Here are my results : 

Regular clean build without ccache : 1m40s
First build with ccache : 4m36s
Second build with ccache : 30s

I’m not sure where to start debugging. The performance page 
(https://ccache.samba.org/performance.html) mentions how complexity of the make 
file can slow down compilation, but in this context I use Xcode so call of 
ccache should be relatively quick. I was expecting some performance decrease, 
but not this much!

There are my current settings using version 3.2.5 : 

export CCACHE_MAXSIZE=3G
export CCACHE_HARDLINK=true
export 
CCACHE_SLOPPINESS=pch_defines,file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches

Note that I do use a pch, if that changes something. 

Thanks for any pointers!



___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache