{"thread":{"id":"37368","subject":"make profile issue on Git 2.1.0","startedAt":"2014-08-18T02:35:29Z","lastAt":"2014-08-19T15:33:34Z","messageCount":4,"participants":["Andrés Sicard-Ramírez","Jeff King","Andi Kleen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"247830","messageId":"CAOUWSGA+6gX8ZBv3Wo8FgUdyd99TYWOybTwGT6ADv_HtNFsFMQ@mail.gmail.com","threadId":"37368","inReplyTo":null,"subject":"make profile issue on Git 2.1.0","fromName":"Andrés Sicard-Ramírez","fromEmail":"asr@eafit.edu.co","sentAt":"2014-08-18T02:35:29Z","receivedAt":"2014-08-18T02:35:29Z","isPatch":false,"sender":{"key":"asr@eafit.edu.co","avatar":null},"body":"Hi,\n\nI have the following issue on Git 2.1.0:\n\n$ make prefix=/some-directory profile\n...\nmake[2]: Entering directory `/home/asr/src/git/git-2.1.0/t/perf'\nrm -rf test-results\n./run\n=== Running 9 tests in this tree ===\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\nerror: No $GIT_PERF_REPO defined, and your build directory is not a repo\ncannot open test-results/p0000-perf-lib-sanity.subtests: No such file\nor directory at ./aggregate.perl line 77.\nmake[2]: *** [perf] Error 2\n\n\nI hadn't issues running the same command on Git 2.0.2.\n\nThanks,\n\n-- \nAndrés\n"},{"id":"247893","messageId":"20140819061203.GA14924@peff.net","threadId":"37368","inReplyTo":"CAOUWSGA+6gX8ZBv3Wo8FgUdyd99TYWOybTwGT6ADv_HtNFsFMQ@mail.gmail.com","subject":"Re: make profile issue on Git 2.1.0","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-08-19T06:12:03Z","receivedAt":"2014-08-19T06:12:03Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Aug 17, 2014 at 09:35:29PM -0500, Andrés Sicard-Ramírez wrote:\n\n> I have the following issue on Git 2.1.0:\n> \n> $ make prefix=/some-directory profile\n> ...\n> make[2]: Entering directory `/home/asr/src/git/git-2.1.0/t/perf'\n> rm -rf test-results\n> ./run\n> === Running 9 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> 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> 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> 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> 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 file\n> or directory at ./aggregate.perl line 77.\n> make[2]: *** [perf] Error 2\n> \n> I hadn't issues running the same command on Git 2.0.2.\n\nThis is because v2.1.0 started using \"make perf\" to feed the profile\nbuilds, but it doesn't work on tarballs.\n\nMaybe we should do this:\n\n-- >8 --\nSubject: Makefile: make perf tests optional for profile build\n\nThe perf tests need a repository to operate on; if none is\ndefined, we fall back to the repository containing our build\ndirectory.  That fails, though, for an exported tarball of\ngit.git, which has no repository.\n\nSince 5d7fd6d we run the perf tests as part of \"make\nprofile\". Therefore \"make profile\" fails out of the box on\nreleased tarballs of v2.1.0.\n\nWe can fix this by making the perf tests optional; if they\nare skipped, we still run the regular test suite, which\nshould give a lot of profile data (and is what we used to do\nprior to 5d7fd6d anyway).\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nAs a side note, while testing this I noticed that the \"make perf\" run\ngoes a lot faster if you set GIT_PERF_REPEAT_COUNT=1. This is bad for\nactually measuring things, but probably fine for profile feedback. I\ndon't use the profile builds myself, though, so I will leave it to\nsomebody who cares more to investigate whether such a change would be a\ngood idea.\n\n Makefile | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 2320de5..9f984a9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1659,7 +1659,11 @@ endif\n profile:: profile-clean\n \t$(MAKE) PROFILE=GEN all\n \t$(MAKE) PROFILE=GEN -j1 test\n-\t$(MAKE) PROFILE=GEN -j1 perf\n+\t@if test -n \"$$GIT_PERF_REPO\" || test -d .git; then \\\n+\t\t$(MAKE) PROFILE=GEN -j1 perf; \\\n+\telse \\\n+\t\techo \"Skipping profile of perf tests...\"; \\\n+\tfi\n \t$(MAKE) PROFILE=USE all\n \n profile-fast: profile-clean\n-- \n2.1.0.346.ga0367b9\n"},{"id":"247904","messageId":"20140819115449.GV5803@tassilo.jf.intel.com","threadId":"37368","inReplyTo":"20140819061203.GA14924@peff.net","subject":"Re: make profile issue on Git 2.1.0","fromName":"Andi Kleen","fromEmail":"ak@linux.intel.com","sentAt":"2014-08-19T11:54:49Z","receivedAt":"2014-08-19T11:54:49Z","isPatch":false,"sender":{"key":"ak@linux.intel.com","avatar":null},"body":"> Maybe we should do this:\n\nLooks good to me.\n\n> As a side note, while testing this I noticed that the \"make perf\" run\n> goes a lot faster if you set GIT_PERF_REPEAT_COUNT=1. This is bad for\n> actually measuring things, but probably fine for profile feedback. I\n> don't use the profile builds myself, though, so I will leave it to\n> somebody who cares more to investigate whether such a change would be a\n> good idea.\n\nYes should be fine too.\n\nAnother way to speed it up would be also to run the tests (both \ntests and benchmarks) in parallel on multiple cores. The gcc feedback mechanism\nwon't mind, as it doesn't measure time.\n\n-Andi\n"},{"id":"247910","messageId":"CAOUWSGDYwMUL4_w8NNMYJCeC-r9AMMzCTmZ-8sEagdjHJOENYQ@mail.gmail.com","threadId":"37368","inReplyTo":"20140819061203.GA14924@peff.net","subject":"Re: make profile issue on Git 2.1.0","fromName":"Andrés Sicard-Ramírez","fromEmail":"asr@eafit.edu.co","sentAt":"2014-08-19T15:33:34Z","receivedAt":"2014-08-19T15:33:34Z","isPatch":false,"sender":{"key":"asr@eafit.edu.co","avatar":null},"body":"On 19 August 2014 01:12, Jeff King <peff@peff.net> wrote:\n> This is because v2.1.0 started using \"make perf\" to feed the profile\n> builds, but it doesn't work on tarballs.\n\nThanks for the explanation.\n\n-- \nAndrés\n"}]}