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 B188A6C1AE; Mon, 17 May 2021 12:00:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B188A6C1AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1621242033; bh=kNRZLDeL02fbaIDamjlQtrktkrd2+hmMWie7q2cyruI=; 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=Vuy65zSocop7eLlY2rnhX6XIGaUJOD+WWglhbgiCsNqWplMBnQUNgF8C1WN/+r6Bu uU9uWP+XxIZpou4o3jkNzxBq/cormVinmBQHxcCXaTbpSd49fz+wBrLHkIrOofQhMn MWL0ZZi5hJqFUVnBqU1hMmibrAEBNmiOOs3LyIaE= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 1780B6C1AE for ; Mon, 17 May 2021 12:00:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1780B6C1AE Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1liZ70-00085n-Vu; Mon, 17 May 2021 12:00:31 +0300 Date: Mon, 17 May 2021 11:39:16 +0300 To: Sergey Ostanevich Message-ID: <20210517083916.GM3944@tarantool.org> References: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD95978C26455E69BE0BB6090B4F8997C21AA3492AFA30115D5182A05F538085040F6539F04440FA976232ED2A7C7EE6158A4706077973030BD8B6A2F48662F2ACC X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CB1634DB9A2F7B99EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F0135404761DA3FC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8844652886EFFE835F2AAE4AFCEDA903B117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6F7FD1A3A8AE6177F089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A54CBAB240B36BC2868EA45B22242CA487E63974D82D987D21D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752546FE575EB473F1410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34E229BE567979C940D7BBF07C4A490450C1296D756B071DF3C322FBDDC651C49ADDB113172C7B96451D7E09C32AA3244CBD4E93241E235A07B8BD352D044346778A6D4CC6FBFAC251927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlIWKWc0dtJ0uV/aGiI0Vyw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822D466C83AF416766BE4C0B0D7CB4D1A28A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] build: add missing module for jit.dump on ARM64 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergos, Thanks for your review! On 14.05.21, Sergey Ostanevich wrote: > Thanks for the patch, > > LGTM. Added you tag: | Reviewed-by: Sergey Ostanevich > > As for the plurality of dis modules - can we make decision at load time, > same as in dis_x64? So we’d introduce a set of dis_.lua in Tarantool > sources that will make a check if target is valid and load the luajit one. > Definitely - not in this patch. I tried to follow your thoughts, but get lost... This "decision" is done within jit/dump.lua: for low-level machinery it loads the necessary dis_.lua module, where is defined by variable. Do you propose the same as Sergey: preprocess and compile only the required dis_.lua into Tarantool binary considering the target platform? Anyway, let's discuss this and file the issue if necessary. > > > On 4 May 2021, at 11:29, Igor Munkin wrote: > > > > Since commit c9d88d5f48054d78727b587fef7567422cdc39a6 ('Fix #984: add > > jit.* library to the binary') all required modules implemented in Lua > > are bundled (i.e. compiled into the executable as a C literal) into > > Tarantool binary. While making Tarantool work on ARM64 platforms, it > > turned out the arch-specific module (namely, jit/dis_arm64.lua) is not > > bundled. Within this patch the missing sources are added and jit.dump > > loads fine on ARM64 hosts as a result. > > > > Part of #5983 > > Relates to #5629 > > Follows up #984 > > > > Signed-off-by: Igor Munkin > > --- > > > > Branch: https://github.com/tarantool/tarantool/tree/imun/gh-5983-add-jit-dump-on-arm64 > > Issue: https://github.com/tarantool/tarantool/issues/5983 > > > > CI looks to be OK[1] except the known problems with ASAN[2]. > > > > [1]: https://github.com/tarantool/tarantool/commit/be184b2 > > [2]: https://github.com/tarantool/tarantool/issues/6031 > > > > src/CMakeLists.txt | 1 + > > src/lua/init.c | 2 ++ > > .../gh-5983-jit-library-smoke-tests.test.lua | 14 ++++++++++++++ > > 3 files changed, 17 insertions(+) > > create mode 100755 test/app-tap/gh-5983-jit-library-smoke-tests.test.lua > > > > diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt > > index 9005a37d6..f7a776986 100644 > > --- a/src/CMakeLists.txt > > +++ b/src/CMakeLists.txt > > @@ -54,6 +54,7 @@ lua_source(lua_sources lua/swim.lua) > > # LuaJIT jit.* library > > lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/bc.lua) > > lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/bcsave.lua) > > +lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_arm64.lua) > > lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_x86.lua) > > lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dis_x64.lua) > > lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/src/jit/dump.lua) > > diff --git a/src/lua/init.c b/src/lua/init.c > > index 3358b7136..dfae4afb7 100644 > > --- a/src/lua/init.c > > +++ b/src/lua/init.c > > @@ -106,6 +106,7 @@ extern char strict_lua[], > > vmdef_lua[], > > bc_lua[], > > bcsave_lua[], > > + dis_arm64_lua[], > > dis_x86_lua[], > > dis_x64_lua[], > > dump_lua[], > > @@ -167,6 +168,7 @@ static const char *lua_modules[] = { > > "jit.vmdef", vmdef_lua, > > "jit.bc", bc_lua, > > "jit.bcsave", bcsave_lua, > > + "jit.dis_arm64", dis_arm64_lua, > > "jit.dis_x86", dis_x86_lua, > > "jit.dis_x64", dis_x64_lua, > > "jit.dump", dump_lua, > > diff --git a/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua b/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua > > new file mode 100755 > > index 000000000..ab42fbebf > > --- /dev/null > > +++ b/test/app-tap/gh-5983-jit-library-smoke-tests.test.lua > > @@ -0,0 +1,14 @@ > > +#!/usr/bin/env tarantool > > + > > +local tap = require('tap') > > + > > +local test = tap.test('gh-5983-jit-library-smoke-tests') > > +test:plan(1) > > + > > +-- Just check whether all Lua sources related to jit.dump are > > +-- bundled to the binary. Otherwise, loading jit.dump module > > +-- raises an error that is handled via and passed as a > > +-- second argument to the assertion. > > +test:ok(pcall(require, 'jit.dump')) > > + > > +os.exit(test:check() and 0 or 1) > > -- > > 2.25.0 > > > -- Best regards, IM