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 C1C24B006D1; Mon, 13 May 2024 14:51:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C1C24B006D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1715601091; bh=av+c25RH+zxhadwbfrVGjwjGr7Gi22RlfS/d6ipfCtU=; 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=uvcY0XGhTHbUom0DqrzwnQeLCvwSW7SF3o4ZSdHr6VMLyErpFWD88ZZahhWPM+lOR zfbcIbmhtl66OvJN347WfmqF8WjLTwAFZWt3cWj3fGR0FTexNEQHQ9LXADSBWlPfkm smoY28y3amkNEMW1ON+6cz4RfAqzKck+OrtgbdTk= Received: from smtp56.i.mail.ru (smtp56.i.mail.ru [95.163.41.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2221C772F20 for ; Mon, 13 May 2024 14:51:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2221C772F20 Received: by smtp56.i.mail.ru with esmtpa (envelope-from ) id 1s6UDI-0000000DqyL-14uR; Mon, 13 May 2024 14:51:28 +0300 Date: Mon, 13 May 2024 14:47:17 +0300 To: Maxim Kokryashkin Message-ID: References: <87a4c5c213df4e9f85eeb77d6cbb98dc2047c084.1713773432.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9FE60AC74BBEF0CF04EAACC96EBE9F46C9B51F3F288ED3121182A05F5380850404C228DA9ACA6FE27D96DAF5B95B46F64AC8EDD30083ED68E1D25912D9E37C15B1C32CF11B01418A4E9F8F47979F3B776 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7956F10FFCC7409BAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F4EDC07301919F278638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D854CA29B10DECA159E805A82F4CF0899335D11FD38CEDCAB2CC7F00164DA146DAFE8445B8C89999728AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8062BEEFFB5F8EA3EF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD189C87C2358C8A9BAF3A03B725D353964BB861051D4BA689FC35872C767BF85DA227C277FBC8AE2E8BD77DF2741F6D7EBCEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A54A8A91C59CA523475002B1117B3ED696CC271D156E43A9DBBFF4097FFC9E796F823CB91A9FED034534781492E4B8EEADB05233B9BC4759D3 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF7871F7AD502B646860093B8D687EBF2310E74C35BE4F86B369067F5D3C3B07A13B77A83432DF81E4A198138DB11F6B953FA492F16198F3430A7C0686B83AED0E64A2A6370CA95E325F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojcheZ1TQj/oexzU5jf8Udqg== X-DA7885C5: 855AC0B8A93BBACBF255D290C0D534F919B08148E00CB145B5174EA12FABD99823E32969C748FC145B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B1B6BC383074F748135CE9D36E58DC88B98AA8DC6F309C0BCE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v1 1/5] build: introduce option LUAJIT_ENABLE_TABLE_BUMP 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, Maxim! Thanks for the review! Fixed your comments. See the iterative patch below. On 05.05.24, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM, except for a few nits below. > On Mon, Apr 22, 2024 at 11:49:54AM UTC, Sergey Kaplun wrote: > > This option enables table bump optimization if sink optimization is > > enabled. The table bump optimization patches the bytecodes with a table > > allocation on the trace recording if the recorded trace exceeds the size > > of the allocated table. This optimization still has some bugs, so it is > > disabled by default. For more details, see the comment in > > . > > > > Needed for tarantool/tarantool#9924 > > --- > > CMakeLists.txt | 17 +++++++++++++++++ > > 1 file changed, 17 insertions(+) > > > > diff --git a/CMakeLists.txt b/CMakeLists.txt > > index 2355ce17..52014296 100644 > > --- a/CMakeLists.txt > > +++ b/CMakeLists.txt > > @@ -307,6 +307,23 @@ if(LUAJIT_ENABLE_COVERAGE) > > include(CodeCoverage) > > endif() > > > > +# Enable table bump optimization. This optimization patches the > > +# bytecodes with a table allocation on the trace recording if the > Typo: s/bytecodes/bytecode/ Fixed. > > +# recorded trace exceeds the size of the allocated table. > > +# This optimization still has some bugs, so it is disabled by > > +# default. See also: https://github.com/LuaJIT/LuaJIT/issues/606. > > +option(LUAJIT_ENABLE_TABLE_BUMP "Enable table bump optimization" OFF) > > +if(LUAJIT_ENABLE_TABLE_BUMP) > > + # Within table bump optimization enabled (and due to our > Typo: s/Within/With/ Fixed. > > + # modification related to metrics), some offsets in `GG_State` > > + # stop fit in 12bit immediate. Hence, the build failed due to > > + # the DASM error (DASM_S_RANGE_I). > > + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") > > + message(FATAL_ERROR "Table Bump optimization is unsupported for aarch64") > Typo: s/Bump/bump/ Fixed. =================================================================== diff --git a/CMakeLists.txt b/CMakeLists.txt index 52014296..ce8d0311 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,18 +308,18 @@ if(LUAJIT_ENABLE_COVERAGE) endif() # Enable table bump optimization. This optimization patches the -# bytecodes with a table allocation on the trace recording if the +# bytecode with a table allocation on the trace recording if the # recorded trace exceeds the size of the allocated table. # This optimization still has some bugs, so it is disabled by # default. See also: https://github.com/LuaJIT/LuaJIT/issues/606. option(LUAJIT_ENABLE_TABLE_BUMP "Enable table bump optimization" OFF) if(LUAJIT_ENABLE_TABLE_BUMP) - # Within table bump optimization enabled (and due to our + # With table bump optimization enabled (and due to our # modification related to metrics), some offsets in `GG_State` - # stop fit in 12bit immediate. Hence, the build failed due to - # the DASM error (DASM_S_RANGE_I). + # stop fitting in 12bit immediate. Hence, the build failed due + # to the DASM error (`DASM_S_RANGE_I`). if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - message(FATAL_ERROR "Table Bump optimization is unsupported for aarch64") + message(FATAL_ERROR "Table bump optimization is unsupported for aarch64") endif() AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_TABLE_BUMP) endif() =================================================================== -- Best regards, Sergey Kaplun