On Sun, Feb 05, 2012 at 07:44:50PM -0500, Theodore Ts'o wrote:
quoted hunk ↗ jump to hunk
diff --git a/INSTALL b/INSTALL
index 6fa83fe..5b7eec1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -28,16 +28,25 @@ set up install paths (via config.mak.autogen), so you can write instead
If you're willing to trade off (much) longer build time for a later
faster git you can also do a profile feedback build with
- $ make profile-all
- # make prefix=... install
+ $ make --prefix=/usr PROFILE=BUILD all
+ # make --prefix=/usr PROFILE=BUILD install
Eh? --prefix?
+As a caveat: a profile-optimized build takes a *lot* longer since it
+is the sources have to be built twice, and in order for the profiling
s/it is//
quoted hunk ↗ jump to hunk
diff --git a/Makefile b/Makefile
index c457c34..8cea247 100644
--- a/Makefile
+++ b/Makefile
@@ -1772,6 +1772,24 @@ ifdef ASCIIDOC7
[...]
+ifeq "$(PROFILE)" "GEN"
+ CFLAGS += -fprofile-generate=$(PROFILE_DIR) -DNO_NORETURN=1
+ EXTLIBS += -lgcov
+ export CCACHE_DISABLE=t
+ V=1
+else ifneq "$PROFILE" ""
+ CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1
+ export CCACHE_DISABLE=t
+ V=1
+endif
Did you mean "$(PROFILE)" in the second conditional?
-Peff