From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 0F1D370361; Wed, 10 Feb 2021 12:35:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0F1D370361 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612949757; bh=Lk8dLHDoD9hH+W7uRJfblCTigmSj7RmrLUiSmx1U1qQ=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=F3v+iR2qrMGdkNAtWHy/IYDWnE6lhbKjOvcn8LHFoXC9rmBq20OpiWcdrfb56y8R2 Z/ISyDAgQ2YkQ19j0EMqGbYgrzWuXNp6+cBduQrVhhfAZyrnSdQA3x/ByvnTts7BnV y8BL1VjbG32YG1o7mNLD5jhFTba05xA6m5f+2+x4= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2ECC070361 for ; Wed, 10 Feb 2021 12:35:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2ECC070361 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1l9luZ-0004Xx-0P; Wed, 10 Feb 2021 12:35:51 +0300 Date: Wed, 10 Feb 2021 12:35:09 +0300 To: Igor Munkin Message-ID: <20210210093509.GB9361@root> References: <20210209113852.GA23319@root> <20210209124731.GH5448@tarantool.org> <20210209144528.GA9361@root> <20210209152845.GK5448@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209152845.GK5448@tarantool.org> X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CAEF2BF42A2A7729330F8028A4C0D8125182A05F5380850405B8E1F2139E752570478E1C860EDD6DBA30F388B9972D0304298307A8F53CCDC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70F8483684B69468CB287FD4696A6DC2FA8DF7F3B2552694A4E2F5AFA99E116B42401471946AA11AFEE3A9D0FB4FE0F99DEFE6A28F0C4BE998F08D7030A58E5AD6BA297DBC24807EAA9D420A4CFB5DD3EC563187B941B34C46D432BB0ABE05F0F7B8F7967AE4870238941B15DA834481FA18204E546F3947CA9FF340AA05FB58CF6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F79006372A3B24BF85B2E607389733CBF5DBD5E9B5C8C57E37DE458BD96E472CDF7238E04AD6D5ED66289B5278DA827A17800CE7B2B7C64F398C741067F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C321259270BBF67A2035872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9DF33B08B2BB81206574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5C563187B941B34C46D432BB0ABE05F0F2CB6C4EE7940F2E4D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344EF254DC71474AA3F1FA32133BEA900FA25FDEA476EB9B9B2762DEF570889711667E5DCD4269B6FA1D7E09C32AA3244C821D400F186704FE79285229BA92AB3B51E887DA02A9F7BFFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmMmQ+JvDeDG7+2pydLL+YQ== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB45745F056F781420F332C2029CC169DF72D83D9AE89EADB3AF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/5] build: preserve the original build system X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, LGTM. Just some side notes below. On 09.02.21, Igor Munkin wrote: > Sergey, > > On 09.02.21, Sergey Kaplun wrote: > > Igor, > > > > On 09.02.21, Igor Munkin wrote: > > > Sergey, > > > > > > Thanks for your review! > > > > > > On 09.02.21, Sergey Kaplun wrote: > > > > Hi, Igor! > > > > > > > > Thanks for the patch! > > > > LGTM, except 4 comments about memory profiler parser below. > > Added your tag: > | Reviewed-by: Sergey Kaplun Thanks! > > > > > > > I have several questions, so postponed your Ack a bit. > > > > No problem. > > > > > > > > > > > > > On 02.02.21, Igor Munkin wrote: > > > > > Since the build machinery is going to be ported to CMake there would be > > > > > Makefile names clashing. This change renames the original build system > > > > > (and a couple of auxiliary files requiring configuring) to keep all this > > > > > machinery working. > > > > > > > > > > As a result of these changes one need to explicitly specify the Makefile > > > > > in the build command: > > > > > | make -f Makefile.original > > > > > > > > > > Needed for tarantool/tarantool#4862 > > > > > > > > > > Signed-off-by: Igor Munkin > > > > > --- > > > > > Makefile => Makefile.original | 44 +++++++++++++-------- > > > > > etc/{luajit.pc => luajit.pc.in} | 4 +- > > > > > src/{Makefile.dep => Makefile.dep.original} | 0 > > > > > src/{Makefile => Makefile.original} | 4 +- > > > > > tools/luajit-parse-memprof | 9 ----- > > > > > tools/luajit-parse-memprof.in | 6 +++ > > > > > 6 files changed, 38 insertions(+), 29 deletions(-) > > > > > rename Makefile => Makefile.original (85%) > > > > > rename etc/{luajit.pc => luajit.pc.in} (91%) > > > > > rename src/{Makefile.dep => Makefile.dep.original} (100%) > > > > > rename src/{Makefile => Makefile.original} (99%) > > > > > delete mode 100755 tools/luajit-parse-memprof > > > > > create mode 100644 tools/luajit-parse-memprof.in > > > > > > > > > > diff --git a/Makefile b/Makefile.original > > > > > similarity index 85% > > > > > rename from Makefile > > > > > rename to Makefile.original > > > > > index 61967df..b85d4bf 100644 > > > > > --- a/Makefile > > > > > +++ b/Makefile.original > > > > > > > > +# in scope of https://github.com/tarantool/tarantool/issues/5688. > > > > > +tools/$(FILE_TMEMPROF): > > > > > + @sed -e "s|@LUAJIT_TOOLS_DIR@|$(realpath tools)|" \ > > > > > + -e "s|@LUAJIT_TOOLS_BIN@|$(realpath src/luajit)|" \ > > > > > > > > 2. @LUAJIT_BIN@ looks more convenient, doesn't it? > > > > > > It doesn't for me. Why does the current naming look inconvenient to you? > > > > What does LUAJIT_TOOLS_BIN mean? I confused by TOOLS part. > > It means a LuaJIT binary used for tools, so one can distinct them if > necessary. As an additional bonus, the commands are well-aligned :) Really nice :) > > > > > > diff --git a/tools/luajit-parse-memprof.in b/tools/luajit-parse-memprof.in > > > > > new file mode 100644 > > > > > index 0000000..8867202 > > > > > --- /dev/null > > > > > +++ b/tools/luajit-parse-memprof.in > > > > > @@ -0,0 +1,6 @@ > > > > > +#!/bin/bash > > > > > +# > > > > > +# Launcher for memprof parser. > > > > > + > > > > > +LUA_PATH="@LUAJIT_TOOLS_DIR@/?.lua;;" \ > > > > > + @LUAJIT_TOOLS_BIN@ @LUAJIT_TOOLS_DIR@/memprof.lua $@ > > > > > > > > 3. Unfortunately, your solution doesn't work for me: > > > > > > Crap, I believe I've fixed this. > > > > > > > > > > > | $ git log --oneline -n1 > > > > | 7badb7e (HEAD) build: preserve the original build system > > > > | $ make -f Makefile.original -j > > > > | ==== Building LuaJIT 2.1.0-beta3 ==== > > > > | ... > > > > | ==== Successfully built LuaJIT 2.1.0-beta3 ==== > > > > > > > > Side note: I suppose it is nothing bad to add corresponding lines about > > > > tools building. At least it simplifies build debugging. > > > > Feel free to ignore. > > > > > > One can adjust this for debugging. Otherwise there is no need to see > > > this output. We can use those hacks with Q/E, but I hope this part will > > > have gone in the nearest future. > > > > OK, never mind. > > > > > > > > > > > > > | $ tools/luajit-parse-memprof /tmp/memprof_memleak.bin; echo -e "\n"; cat tools/luajit-parse-memprof > > > > | tools/luajit-parse-memprof: line 5: /home/burii/reviews/luajit/cmake/tools/memprof.lua: Permission denied > > > > | > > > > | #!/bin/bash > > > > | # > > > > | # Launcher for memprof parser. > > > > | > > > > | LUA_PATH="/home/burii/reviews/luajit/cmake/tools/?.lua;;" \ > > > > | /home/burii/reviews/luajit/cmake/tools/memprof.lua $@ > > > > > > > > This patch is working for me. But I am not bash|make guru :). > > > > > > Heh, try your patch on a clean repo: unfortunately it works neither. The > > > root cause is the lack of on configuration phase. I added > > > > Hmm, it's weird. `realpath` manual declares: > > | all but the last component must exist > > To be honest, I don't understand why it fails even in the first version > > -- obviously, exists. > > But does not -- that's the point. I thought so too at the beginning, but when test it: | $ realpath reviews/blabla && ls $_ | /home/burii/reviews/blabla | ls: cannot access 'reviews/blabla': No such file or directory Like manual declares. Anyway, we can discuss it offline :) > > > Anyway, LGTM. > > > > > the corresponding dependency for this rule. Fixed, squashed, > > > force-pushed to the branch. Diff is below: > > > > > > ================================================================================ > > > > > > diff --git a/Makefile.original b/Makefile.original > > > index c3172f0..33dc2ed 100644 > > > --- a/Makefile.original > > > +++ b/Makefile.original > > > @@ -198,7 +198,7 @@ tools: tools/$(FILE_TMEMPROF) > > > # FIXME: This is an ugly hack to manually configure an auxiliary > > > # tools/luajit-parse-memprof. This file should go away in scope of > > > # https://github.com/tarantool/tarantool/issues/5688. > > > -tools/$(FILE_TMEMPROF): > > > +tools/$(FILE_TMEMPROF): src/luajit > > > @sed -e "s|@LUAJIT_TOOLS_DIR@|$(realpath tools)|" \ > > > -e "s|@LUAJIT_TOOLS_BIN@|$(realpath src/luajit)|" \ > > > $@.in > $@ > > > > > > ================================================================================ > > > > > > After this patch everything is fine. > > > > > > > > > > > | diff --git a/Makefile.original b/Makefile.original > > > > | index b85d4bf..877398a 100644 > > > > | --- a/Makefile.original > > > > | +++ b/Makefile.original > > > > | @@ -199,8 +199,8 @@ tools: tools/$(FILE_TMEMPROF) > > > > | # tools/luajit-parse-memprof. I hope this file will have gone away > > > > | # in scope of https://github.com/tarantool/tarantool/issues/5688. > > > > | tools/$(FILE_TMEMPROF): > > > > | - @sed -e "s|@LUAJIT_TOOLS_DIR@|$(realpath tools)|" \ > > > > | - -e "s|@LUAJIT_TOOLS_BIN@|$(realpath src/luajit)|" \ > > > > | + @sed -e "s|@LUAJIT_TOOLS_DIR@|`realpath tools`|" \ > > > > | + -e "s|@LUAJIT_TOOLS_BIN@|`realpath src/luajit`|" \ > > > > | $@.in > $@ > > > > | @chmod +x $@ > > > > | > > > > > > > > 4. Please, create separate commit to tools-related changes. > > > > > > For what? > > > > I don't understand existing of these changes (but I like them :)) > > from commit message. Is it mentioned in the following part? > > Yes. > > > > > | (and a couple of auxiliary files requiring configuring) > > > > Is it better to mention directly tools files here instead "auxiliary"? > > No, since luajit.pc is also adjusted. I guess changes are mostly minimal > (but a bit hacky) to move them to a separate patch. OK. > > > > > > > > > > Also, I suppose, it would be nice to add > > > > to <.gitignore> as far as it's generated. These lines may be confusing: > > > > > > This is added in the next patch, but I'm not against moving it to this > > > one. Fixed, squashed, force-pushed to the branch. Diff is below: > > > > Thanks! But one nitpick, feel free to ignore. > > > > > > > > ================================================================================ > > > > > > diff --git a/.gitignore b/.gitignore > > > index 1a07bf7..fc9c31e 100644 > > > --- a/.gitignore > > > +++ b/.gitignore > > > @@ -9,3 +9,6 @@ > > > *.dmp > > > *.swp > > > .tags > > > + > > > +# Configured runner for LuaJIT memprof parser > > > > Nit: s/parser/parser./ > > Feel free to ignore. > > Thanks, fixed. > > > > > > +tools/luajit-parse-memprof > > > > > > ================================================================================ > > > > > > > > > > > | $ git status > > > > | HEAD detached at 7badb7e > > > > | Untracked files: > > > > | (use "git add ..." to include in what will be committed) > > > > | tools/luajit-parse-memprof > > > > > > > > > -- > > > > > 2.25.0 > > > > > > > > > > > > > -- > > > > Best regards, > > > > Sergey Kaplun > > > > > > -- > > > Best regards, > > > IM > > > > -- > > Best regards, > > Sergey Kaplun > > -- > Best regards, > IM -- Best regards, Sergey Kaplun