From: Junio C Hamano Date: Fri, 03 Feb 2012 00:58:09 GMT Subject: Re: [PATCH, RFC] Fix build problems related to profile-directed optimization Message-ID: <7vvcnou40u.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120202201226.GA1032@thunk.org> Ted Ts'o writes: > ... > At least in theory, it should be possible to have something which > supports both PROFILE_GEN/PROFILE_USE as well as a combined > PROFILE_BUILD. > > The hard part is that PROFILE_BUILD requires a multi-pass process; you > need to build with one set of CFLAGS, then run the sample workload to > get the data for your feedback directed optimizations, and then re-run > the build with another set of CFLAGS. Yeah, I can see how that forces us to some kludgy solution, but I tend to agree that the separation between GEN/USE is a good thing. > I think what we could to check > for PROFILE_BUILD, and if it is set, do the first PROFILE_GEN / make > test commands as part of the top-level Makefile's all: rule, and then > do the normal build after that. Yeah, something like that would emulate the "make profile-all" well enough for people not to notice the change while giving us the flexibility of GEN/USE separation. I kinda like it. Thanks.