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 63EF66F3C4; Tue, 11 May 2021 10:09:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 63EF66F3C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620716998; bh=NRxroc+8fLycYhqMcwoIFJIIxAZ97bac3iCtYqEGbkc=; 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=oNxUsmKhrpVaog2tLb24Oj2xoCL+HbViEM7Z4IS3mUnVre6rJrAck64VA4rvJle49 X6KpNM4SWfh16bpaOb6SIJfRyR3H/DadPFlb/U3Y5za12GMuWSl+1UxWta6lO3TCNM pHS4SEecwJD/6vprjNck8uhqYVxmrvg5GZyJ8JUc= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (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 A76F26F3C4 for ; Tue, 11 May 2021 10:09:56 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A76F26F3C4 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1lgMWh-0004oW-2U; Tue, 11 May 2021 10:09:55 +0300 Date: Tue, 11 May 2021 10:08:50 +0300 To: Igor Munkin Message-ID: References: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72c91a259dd039fc95961992ae06baee820695be.1620072340.git.imun@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95978C26455E69BE0B2C7F7C3B0039F1303CE517DE434612D182A05F5380850408737748E00D26A6AA3067D3196C20CC33CC503C67B5820DB37509892D81380F4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F5B0FEFE70B13B25EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376F127A835590024F8F08D7030A58E5ADC58D69EE07B14084F39EFFDF887939037866D6147AF826D8C2AB48EC76EB48B6D07E6B6CB2333640117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55D5BE2F85BDEC5FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B65D56369A3576CBA5089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A568299150DE3A23F141406D52A9ABBB71FB2EDE14A4717B2CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A2EC120135420F90BC1AD7F3B391DF4566D41D1229516EC337C21E9E72C911027FA25F93CA7FD2E11D7E09C32AA3244C83ED7C1C05AEA9B353DB8949989906B8408A6A02710B7304FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPN2Bz4bQWZtyoz6VccJkjg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4F2077C3B1A96599125A1A0C23D116DF176CD77B6B7C1ECDFF2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 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 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" Hi, Igor! Thanks for the patch! LGTM, with a few ignorable questions. On 04.05.21, 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 ++++++++++++++ Should we add the Changelog entry for this? We can create a special arm64-related file where we will note all arm64-related changes. Feel free to ignore. > 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) Also I have two questions related to he patch: 1) AFAIK (at least from the activity in the "Red chat"), we declare preliminary support of 32-bit arm architecture, too. So, should be added as prebuild module as well. Also, as far as we support 64-bit arm architecture should we add the too? And while we are at it: maybe we should add all architectures at once, to simplify adaptation for other architectures, if we need some? At least, IINM, Mons and Vlad Grubov discussed oportunity of mips architecture usage. As a bonus, there is no follow-ups of this patch in the future. Feel free to ignore. 2) We don't need to add x86 as a built-in module when we build Tarantool for arm/arm64/... host. So we can just use the needed one. Feel free to ignore. > 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, Sergey Kaplun