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 A3123B73978; Thu, 13 Jun 2024 12:55:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A3123B73978 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718272551; bh=lOImIUQqyOvZnes5izEU2AiDa1fI+TdRLnolehlvlNM=; 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=U1ox0yeBBJSOh6HFtn1fKZbMdFGLZwFlxvcxU6yPe+dkRMDnDlvIUsRqt9ZNB5uGW bHywzwrDQRm7r2dbEVlAQ4fRCd1FpP6xRGtooMmTSEV9ynnQKRlP9RZHTYm/UF1srv hp/H5wv63f4cEkkTopLir7u5mD21lUgXq+lfpZKk= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [95.163.41.78]) (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 CC388B73978 for ; Thu, 13 Jun 2024 12:55:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CC388B73978 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1sHhBN-00000006ZRE-2Y5m; Thu, 13 Jun 2024 12:55:50 +0300 Date: Thu, 13 Jun 2024 12:51:37 +0300 To: Sergey Bronnikov 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: 4F1203BC0FB41BD9923B2AA154DF63C69F83E24FDF70A404D569FCF785121A5C1313CFAB8367EF908E2BE116634AD74D4CB0A251F89325C432B60124B7DA44F2ABC92C7365C30B3634435B08DABD52D7768ACFD3FE3A7A49 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F65C230EDDCD559EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063748E7A03516F25E8E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D825EAF81084AC6EA9DF9466A11703FE32FCE7CC1F21E58D5DCC7F00164DA146DAFE8445B8C89999728AA50765F7900637F3E38EE449E3E2AE389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8989FD0BDF65E50FBF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F79006378A4BC95AACA28A5322CA9DD8327EE4930A3850AC1BE2E73525A4AB119743A3B3C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A548D120978E24F12F5002B1117B3ED696B2136EF4627CA6BE33EE06AFCD964888823CB91A9FED034534781492E4B8EEAD0942DC5495D0595EBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF863949B0308D736EDE083D7A2CE4D1A7108721C635D044E4838DCABD0054D8EB543A65BC901B954004A26A3878DC133031408A2A19D4A30698A1595643E23AF4955FD574FB3F98D15F4332CA8FE04980913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojP/c/PTD82AncWk8wk4e9yA== X-DA7885C5: 5FA5A95A807C30D5F255D290C0D534F9D4F3C42309726388FEAAD8641D2701BEA32F015A76CB4F115B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B94852B56549560AF1FDCC67F3A48D567D3AB04242B85D0BCE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F 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, Sergey! Thanks for the review! On 06.06.24, Sergey Bronnikov wrote: > Hi, Sergey > > > thanks for the patch! Please see a question below. > > On 22.04.2024 11:49, 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 > > +# 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 > > + # 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") > > Table optimization works on all architectures supported by LuaJIT except > aarch64, right? In the upstream, it works on all architectures. We have a problem building LuaJIT for aarch64 due to our metrics that too grows the `GG_State`. > > > > + endif() > > + AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_TABLE_BUMP) > > +endif() > > + > > # --- Main source tree --------------------------------------------------------- > > > > add_subdirectory(src) -- Best regards, Sergey Kaplun