On Mon, Dec 03, 2012 at 10:29:40PM -0200, Peter Senna Tschudin wrote:
> Greg,
> 
> I'm trying to find ways of speedup the build process.
> 
> Before going to distcc I was trying ccache. It was not working for me.
> Make allmodconfig enables GCOV that enables -fprofile-arcs
> -ftest-coverage gcc flags. ccache is not compatible with those flags.
> 
> After allmodconfig, changed .config from:
> 
> CONFIG_GCOV_KERNEL=y
> CONFIG_GCOV_PROFILE_ALL=y
> 
> to:
> 
> CONFIG_GCOV_KERNEL=n
> CONFIG_GCOV_PROFILE_ALL=n
> 
> Then ccache started to work. If ccache files are also on tmpfs the
> second build, after make clean, of same Kernel version has
> considerable speedup, from 5 to 1 minute on cc2.8xlarge, and from 30
> to 3 minutes on my notebook. It is useful to increase the ccache cache
> size so it can store more than one complete build. I'm using:
> 
> $ mkdir /tmp/tmpfs-ccache
> $ sudo mount -t tmpfs -o noatime,mode=777 tmpfs /tmp/tmpfs-ccache
> $ export CCACHE_DIR=/tmp/tmpfs-ccache
> $ ccache -F 0 -M 9G # -F 0 == unlimited number of files on cache
> $ ccache -s # -s show statistics and configuration for current user
> ...
> 
> I made scripts to make ccache on tmpfs boot persistent using simple
> systemd service. The scripts are at:
> https://github.com/petersenna/tmpfs-ccache
> 
> Is testing the build with
> 
> CONFIG_GCOV_KERNEL=n
> CONFIG_GCOV_PROFILE_ALL=n
> 
> a problem?

I don't know, I always disable GCOV, so it should be fine.  But I
usually can't use ccache as I'm touching .h files that require full
rebuilds.  When I'm not, rebuilding is fast, even locally, so it's not
an issue.

Thanks for figuring this out.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to