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 AC6566EC5B; Fri, 14 May 2021 16:13:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org AC6566EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620998018; bh=xcLJS5JerReHMc4g5/22XfnvFWCXUT4fd55lKLplWHg=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nYP8IwP4FragZ0/fkMWwVqFjfh9voiev4wXXtjxRzI6m/Hk6tpx7djN8GywAODCCw n5xKINpmX0zKzHW6TwsYXfzKb+HDVZ+6UMxbnOn2vWLf1f2drFmSiXWGfCQKReMIMV k4OzCNnbzxrRVeOScZKOb0VthWefiTA2aPu8FGvM= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 462D56EC5B for ; Fri, 14 May 2021 16:13:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 462D56EC5B Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1lhXdI-0003Wp-Dw; Fri, 14 May 2021 16:13:36 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) In-Reply-To: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> Date: Fri, 14 May 2021 16:13:35 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> To: Igor Munkin X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD95978C26455E69BE0890FB394E039F71AA2C815CBBA0C08E7182A05F538085040F6A9A13D8A34410667E5223156817CEE202D979D29DB23B1E02FB3A2559B9CF0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78EB5DF72B5A7B6ADEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DD7A7F9003AF293F8638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2ADE485BF3C764F116399F0297BE3412EAD368CDB2FD0D9CCD2E47CDBA5A96583C09775C1D3CA48CF4964A708C60C975A117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE74A95F4E53E8DCE969FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA71A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16BCE5475246E174218B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A510ADFF857B8AF6F1590E4050D2377C7B3A8DD0D45BB56E57D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75438CC92D4039F4E2410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340A59E724FC7897F7BD6FC4829F5513F35833B08CCD65F9B10FC32040847FF9000FFA93AA522F2AA81D7E09C32AA3244C22A36B4E1B3DFACB4F04D663F13B2835E8FBBEFAE1C4874CFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojoybArHp+PQUN8OCTPLRB1Q== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81EA08063505357C322C1F8927DA09241DEDB17410C6732C73CAD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 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: Sergey Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch, LGTM. As for the plurality of dis modules - can we make decision at load time, same as in dis_x64? So we=E2=80=99d 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. > On 4 May 2021, at 11:29, Igor Munkin wrote: >=20 > 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. >=20 > Part of #5983 > Relates to #5629 > Follows up #984 >=20 > Signed-off-by: Igor Munkin > --- >=20 > Branch: = https://github.com/tarantool/tarantool/tree/imun/gh-5983-add-jit-dump-on-a= rm64 > Issue: https://github.com/tarantool/tarantool/issues/5983 >=20 > CI looks to be OK[1] except the known problems with ASAN[2]. >=20 > [1]: https://github.com/tarantool/tarantool/commit/be184b2 > [2]: https://github.com/tarantool/tarantool/issues/6031 >=20 > 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 >=20 > 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[] =3D { > "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 =3D require('tap') > + > +local test =3D 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) > --=20 > 2.25.0 >=20