{"thread":{"id":"46420","subject":"`make profile-fast` fails with \"error: No $GIT_PERF_REPO defined, and your build directory is not a repo\"","startedAt":"2017-07-19T10:16:11Z","lastAt":"2017-07-19T15:11:48Z","messageCount":2,"participants":["Jan Keromnes"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"324758","messageId":"CAA6PgK74CTT09RZiQWGoih3x6B5G4tLa_Vz7e9BDNW4+TGdLXw@mail.gmail.com","threadId":"46420","inReplyTo":null,"subject":"`make profile-fast` fails with \"error: No $GIT_PERF_REPO defined, and your build directory is not a repo\"","fromName":"Jan Keromnes","fromEmail":"janx@linux.com","sentAt":"2017-07-19T10:16:02Z","receivedAt":"2017-07-19T10:16:11Z","isPatch":false,"sender":{"key":"janx@linux.com","avatar":"https://gravatar.com/avatar/2d842511ba2875cc54f5434fb9c6a6ef813eb53bd511b6fe05b645f6c151e344?d=mp&s=160"},"body":"Hello,\n\nI'm trying to build a profile-optimized Git. I used to do this with\nthe following commands:\n\n    mkdir /tmp/git\n    cd /tmp/git\n    curl https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.xz | tar xJ\n    cd git-2.13.3\n    make prefix=/usr profile man -j18\n    sudo make prefix=/usr PROFILE=BUILD install install-man -j18\n\nThis worked fine. However, on some machines, the build takes more than\n8 hours, so I'd like to use \"profile-fast\" instead of \"profile\":\n\n    [...]\n    make prefix=/usr profile-fast man -j18\n    [...]\n\nBut this fails with the following error:\n\n    ./run\n    === Running 20 tests in this tree ===\n    error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n    error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n    [...]\n    error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n    cannot open test-results/p0000-perf-lib-sanity.subtests: No such\nfile or directory at ./aggregate.perl line 78.\n    make[2]: *** [perf] Error 2\n    Makefile:7: recipe for target 'perf' failed\n    make[2]: Leaving directory '/tmp/git/git-2.13.3/t/perf'\n    Makefile:2325: recipe for target 'perf' failed\n    make[1]: *** [perf] Error 2\n    make[1]: Leaving directory '/tmp/git/git-2.13.3'\n    Makefile:1719: recipe for target 'profile-fast' failed\n    make: *** [profile-fast] Error 2\n\nThe following thread gives me the impression that a similar problem\nwas already fixed for `make profile`:\n\nhttp://git.661346.n2.nabble.com/make-profile-issue-on-Git-2-1-0-td7616964.html\n\nIs it possible that the above commit fixed `make profile`, but not\n`make profile-fast`?\n\nOr, is there a good way for me to work around this issue?\n\nMany thanks,\nJan Keromnes\n"},{"id":"324767","messageId":"CAA6PgK7W7rCp92QbjRr01LmHa7Tf0Z+rm7L58tsZMNAA4LiaPg@mail.gmail.com","threadId":"46420","inReplyTo":"CAA6PgK74CTT09RZiQWGoih3x6B5G4tLa_Vz7e9BDNW4+TGdLXw@mail.gmail.com","subject":"Re: `make profile-fast` fails with \"error: No $GIT_PERF_REPO defined, and your build directory is not a repo\"","fromName":"Jan Keromnes","fromEmail":"janx@linux.com","sentAt":"2017-07-19T15:11:41Z","receivedAt":"2017-07-19T15:11:48Z","isPatch":false,"sender":{"key":"janx@linux.com","avatar":"https://gravatar.com/avatar/2d842511ba2875cc54f5434fb9c6a6ef813eb53bd511b6fe05b645f6c151e344?d=mp&s=160"},"body":"Hello again,\n\nIn git/Makefile, we can see that `$(MAKE) PROFILE=GEN -j1 perf` is\nbeing skipped for the `profile` target when there is no\n`$GIT_PERF_REPO`:\n\n https://github.com/git/git/blob/cac25fc330fc26050dcbc92c4bfff169a4848e93/Makefile#L1769-L1782\n\nHowever, the same is not true for the `profile-fast` target, and it\nwouldn't even make sense to skip `$(MAKE) PROFILE=GEN -j1 perf` there,\nbecause it's the only command used to generate a profile.\n\nWhat is the best way to have a `$GIT_PERF_REPO` (or a local `.git`) in\norder for `make profile-fast` to work?\n\nCan I simply run a `git init .` inside the extracted tarball, or maybe\n`git clone <some-perf-repo> <somewhere-local>`?\n\nMany thanks,\nJan Keromnes\n\nOn Wed, Jul 19, 2017 at 12:16 PM, Jan Keromnes <janx@linux.com> wrote:\n> Hello,\n>\n> I'm trying to build a profile-optimized Git. I used to do this with\n> the following commands:\n>\n>     mkdir /tmp/git\n>     cd /tmp/git\n>     curl https://www.kernel.org/pub/software/scm/git/git-2.13.3.tar.xz | tar xJ\n>     cd git-2.13.3\n>     make prefix=/usr profile man -j18\n>     sudo make prefix=/usr PROFILE=BUILD install install-man -j18\n>\n> This worked fine. However, on some machines, the build takes more than\n> 8 hours, so I'd like to use \"profile-fast\" instead of \"profile\":\n>\n>     [...]\n>     make prefix=/usr profile-fast man -j18\n>     [...]\n>\n> But this fails with the following error:\n>\n>     ./run\n>     === Running 20 tests in this tree ===\n>     error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n>     error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n>     [...]\n>     error: No $GIT_PERF_REPO defined, and your build directory is not a repo\n>     cannot open test-results/p0000-perf-lib-sanity.subtests: No such\n> file or directory at ./aggregate.perl line 78.\n>     make[2]: *** [perf] Error 2\n>     Makefile:7: recipe for target 'perf' failed\n>     make[2]: Leaving directory '/tmp/git/git-2.13.3/t/perf'\n>     Makefile:2325: recipe for target 'perf' failed\n>     make[1]: *** [perf] Error 2\n>     make[1]: Leaving directory '/tmp/git/git-2.13.3'\n>     Makefile:1719: recipe for target 'profile-fast' failed\n>     make: *** [profile-fast] Error 2\n>\n> The following thread gives me the impression that a similar problem\n> was already fixed for `make profile`:\n>\n> http://git.661346.n2.nabble.com/make-profile-issue-on-Git-2-1-0-td7616964.html\n>\n> Is it possible that the above commit fixed `make profile`, but not\n> `make profile-fast`?\n>\n> Or, is there a good way for me to work around this issue?\n>\n> Many thanks,\n> Jan Keromnes\n"}]}