Hello again, In git/Makefile, we can see that `$(MAKE) PROFILE=GEN -j1 perf` is being skipped for the `profile` target when there is no `$GIT_PERF_REPO`: https://github.com/git/git/blob/cac25fc330fc26050dcbc92c4bfff169a4848e93/Makefile#L1769-L1782 However, the same is not true for the `profile-fast` target, and it wouldn't even make sense to skip `$(MAKE) PROFILE=GEN -j1 perf` there, because it's the only command used to generate a profile. What is the best way to have a `$GIT_PERF_REPO` (or a local `.git`) in order for `make profile-fast` to work? Can I simply run a `git init .` inside the extracted tarball, or maybe `git clone <some-perf-repo> <somewhere-local>`? Many thanks, Jan Keromnes On Wed, Jul 19, 2017 at 12:16 PM, Jan Keromnes <janx@xxxxxxxxx> wrote: > Hello, > > I'm trying to build a profile-optimized Git. I used to do this with > the following commands: > > mkdir /tmp/git > cd /tmp/git > curl https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.xz | tar xJ > cd git-2.13.3 > make prefix=/usr profile man -j18 > sudo make prefix=/usr PROFILE=BUILD install install-man -j18 > > This worked fine. However, on some machines, the build takes more than > 8 hours, so I'd like to use "profile-fast" instead of "profile": > > [...] > make prefix=/usr profile-fast man -j18 > [...] > > But this fails with the following error: > > ./run > === Running 20 tests in this tree === > error: No $GIT_PERF_REPO defined, and your build directory is not a repo > error: No $GIT_PERF_REPO defined, and your build directory is not a repo > [...] > error: No $GIT_PERF_REPO defined, and your build directory is not a repo > cannot open test-results/p0000-perf-lib-sanity.subtests: No such > file or directory at ./aggregate.perl line 78. > make[2]: *** [perf] Error 2 > Makefile:7: recipe for target 'perf' failed > make[2]: Leaving directory '/tmp/git/git-2.13.3/t/perf' > Makefile:2325: recipe for target 'perf' failed > make[1]: *** [perf] Error 2 > make[1]: Leaving directory '/tmp/git/git-2.13.3' > Makefile:1719: recipe for target 'profile-fast' failed > make: *** [profile-fast] Error 2 > > The following thread gives me the impression that a similar problem > was already fixed for `make profile`: > > http://git.661346.n2.nabble.com/make-profile-issue-on-Git-2-1-0-td7616964.html > > Is it possible that the above commit fixed `make profile`, but not > `make profile-fast`? > > Or, is there a good way for me to work around this issue? > > Many thanks, > Jan Keromnes