git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* make profile issue on Git 2.1.0
@ 2014-08-18  2:35 Andrés Sicard-Ramírez
  2014-08-19  6:12 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Andrés Sicard-Ramírez @ 2014-08-18  2:35 UTC (permalink / raw
  To: git

Hi,

I have the following issue on Git 2.1.0:

$ make prefix=/some-directory profile
...
make[2]: Entering directory `/home/asr/src/git/git-2.1.0/t/perf'
rm -rf test-results
./run
=== Running 9 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
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
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 77.
make[2]: *** [perf] Error 2


I hadn't issues running the same command on Git 2.0.2.

Thanks,

-- 
Andrés

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make profile issue on Git 2.1.0
  2014-08-18  2:35 make profile issue on Git 2.1.0 Andrés Sicard-Ramírez
@ 2014-08-19  6:12 ` Jeff King
  2014-08-19 11:54   ` Andi Kleen
  2014-08-19 15:33   ` Andrés Sicard-Ramírez
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff King @ 2014-08-19  6:12 UTC (permalink / raw
  To: Andrés Sicard-Ramírez; +Cc: Andi Kleen, Junio C Hamano, git

On Sun, Aug 17, 2014 at 09:35:29PM -0500, Andrés Sicard-Ramírez wrote:

> I have the following issue on Git 2.1.0:
> 
> $ make prefix=/some-directory profile
> ...
> make[2]: Entering directory `/home/asr/src/git/git-2.1.0/t/perf'
> rm -rf test-results
> ./run
> === Running 9 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
> 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
> 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 77.
> make[2]: *** [perf] Error 2
> 
> I hadn't issues running the same command on Git 2.0.2.

This is because v2.1.0 started using "make perf" to feed the profile
builds, but it doesn't work on tarballs.

Maybe we should do this:

-- >8 --
Subject: Makefile: make perf tests optional for profile build

The perf tests need a repository to operate on; if none is
defined, we fall back to the repository containing our build
directory.  That fails, though, for an exported tarball of
git.git, which has no repository.

Since 5d7fd6d we run the perf tests as part of "make
profile". Therefore "make profile" fails out of the box on
released tarballs of v2.1.0.

We can fix this by making the perf tests optional; if they
are skipped, we still run the regular test suite, which
should give a lot of profile data (and is what we used to do
prior to 5d7fd6d anyway).

Signed-off-by: Jeff King <peff@peff.net>
---
As a side note, while testing this I noticed that the "make perf" run
goes a lot faster if you set GIT_PERF_REPEAT_COUNT=1. This is bad for
actually measuring things, but probably fine for profile feedback. I
don't use the profile builds myself, though, so I will leave it to
somebody who cares more to investigate whether such a change would be a
good idea.

 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2320de5..9f984a9 100644
--- a/Makefile
+++ b/Makefile
@@ -1659,7 +1659,11 @@ endif
 profile:: profile-clean
 	$(MAKE) PROFILE=GEN all
 	$(MAKE) PROFILE=GEN -j1 test
-	$(MAKE) PROFILE=GEN -j1 perf
+	@if test -n "$$GIT_PERF_REPO" || test -d .git; then \
+		$(MAKE) PROFILE=GEN -j1 perf; \
+	else \
+		echo "Skipping profile of perf tests..."; \
+	fi
 	$(MAKE) PROFILE=USE all
 
 profile-fast: profile-clean
-- 
2.1.0.346.ga0367b9

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: make profile issue on Git 2.1.0
  2014-08-19  6:12 ` Jeff King
@ 2014-08-19 11:54   ` Andi Kleen
  2014-08-19 15:33   ` Andrés Sicard-Ramírez
  1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2014-08-19 11:54 UTC (permalink / raw
  To: Jeff King; +Cc: Andrés Sicard-Ramírez, Junio C Hamano, git

> Maybe we should do this:

Looks good to me.

> As a side note, while testing this I noticed that the "make perf" run
> goes a lot faster if you set GIT_PERF_REPEAT_COUNT=1. This is bad for
> actually measuring things, but probably fine for profile feedback. I
> don't use the profile builds myself, though, so I will leave it to
> somebody who cares more to investigate whether such a change would be a
> good idea.

Yes should be fine too.

Another way to speed it up would be also to run the tests (both 
tests and benchmarks) in parallel on multiple cores. The gcc feedback mechanism
won't mind, as it doesn't measure time.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: make profile issue on Git 2.1.0
  2014-08-19  6:12 ` Jeff King
  2014-08-19 11:54   ` Andi Kleen
@ 2014-08-19 15:33   ` Andrés Sicard-Ramírez
  1 sibling, 0 replies; 4+ messages in thread
From: Andrés Sicard-Ramírez @ 2014-08-19 15:33 UTC (permalink / raw
  To: Jeff King; +Cc: Andi Kleen, Junio C Hamano, git

On 19 August 2014 01:12, Jeff King <peff@peff.net> wrote:
> This is because v2.1.0 started using "make perf" to feed the profile
> builds, but it doesn't work on tarballs.

Thanks for the explanation.

-- 
Andrés

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-19 15:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18  2:35 make profile issue on Git 2.1.0 Andrés Sicard-Ramírez
2014-08-19  6:12 ` Jeff King
2014-08-19 11:54   ` Andi Kleen
2014-08-19 15:33   ` Andrés Sicard-Ramírez

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).