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 CB8FFC6B390; Sun, 16 Jun 2024 13:05:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CB8FFC6B390 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718532300; bh=XMwspPLJ9gmIIoeyMKWL/jMuxKd5+r+xYUysflmtZSI=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BvCsGYs2hY8EQWKXL0F5FlI7EgCs8gPOvRw7dzYYxvCdvbhm/9hW5CksIrC1MehhB xfcT2Lx1n9nCgbin96kIxYSmg8j3c46cQa3AQuXncU5CU0+5Ymj1cS3jvI+slsJlJn oJILAlD0UyFxmob1kF52PfRZ1lJpUABUO94VIExM= Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [95.163.41.80]) (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 DEB30C6B390 for ; Sun, 16 Jun 2024 13:04:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DEB30C6B390 Received: by smtp39.i.mail.ru with esmtpa (envelope-from ) id 1sImkP-0000000Fftq-2MWc; Sun, 16 Jun 2024 13:04:30 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Sun, 16 Jun 2024 13:00:09 +0300 Message-ID: <5e37d4e892b4ae1dc4bb6a0cb8f298563f92c97c.1718528874.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9AC8CA0B4439200FAAADCB0684E75543E0F6F500DBE411A6A00894C459B0CD1B918A1FDA5A1C4718E10B999B7BE3335B56B65B19B24223124DF8292320A6A5419ED199C4BD4F2E418 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE742D9BD90C58D50E0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D0177A61392D8FF38638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D848C8490553BCDBF7AE6BF3E8E72F99D95D958179C6FD3D74CC7F00164DA146DAFE8445B8C89999728AA50765F7900637E603D20A273AEC4F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8FA486DC37A503D0BF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F7900637F09814068C508CC822CA9DD8327EE4930A3850AC1BE2E7356C9A9530EBF72002C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A586C1C3AFFD4808BB5002B1117B3ED696E68D78568D3440DCC89B063BDC7FAC35823CB91A9FED034534781492E4B8EEADCAFEFF123806BC82C79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF0192822CA47DA768C560890393EA7B6B16AFE65B1ECAA404D0FAC74AC551AA2416D5D591715857ECBC11D93875BCBCAC5085C2E5DFF26EE1992F8167577D1E7CE5163B3A3B568345C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXjSaBu37xHSOw2PeJ2C39qd X-DA7885C5: 3A0D6335B23F2B3FF255D290C0D534F92BDF57EF543698C632C2D88E5D903E00DF9D19E5ED8A577C5B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9B8403AD0B17FF7250294DC2D8F921DC346DAB771510408DF8E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 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" 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..ce8d0311 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 +# 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) + # With table bump optimization enabled (and due to our + # modification related to metrics), some offsets in `GG_State` + # 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") + endif() + AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_TABLE_BUMP) +endif() + # --- Main source tree --------------------------------------------------------- add_subdirectory(src) -- 2.45.1