git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: `make profile-fast` fails with "error: No $GIT_PERF_REPO defined, and your build directory is not a repo"

From
Jan Keromnes <janx@linux.com>
Date
Jul 19, 2017, 15:11 UTC
Message-ID
<CAA6PgK7W7rCp92QbjRr01LmHa7Tf0Z+rm7L58tsZMNAA4LiaPg@mail.gmail.com>
In-Reply-To
<CAA6PgK74CTT09RZiQWGoih3x6B5G4tLa_Vz7e9BDNW4+TGdLXw@mail.gmail.com>
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@linux.com> wrote:
Show 50 quoted lines
> 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
Previous: Jan Keromnes
Message 2 of 2 in “`make profile-fast` fails with "error: No $GIT_PERF_REPO defined, and your build directory is not a repo"”
  1. Jan KeromnesJul 19, 2017
  2. Jan KeromnesJul 19, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.