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 344F5254C7F; Mon, 22 Apr 2024 11:54:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 344F5254C7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1713776080; bh=WPpA/YWAJjyHor+kX5JW7PV3XDzSFpSdeXdk31SuWfw=; 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=QGlvr2+XMAMVy14jVJ7KVqvfKAG6Z2s0fsTDIsMzABg0iRnxE6YdQ/o0DTLzrXGiC S0/9U6emlCye37W1sYq88oLh2j2YsRj6s+VwGxZQkF3W6PAmnmzoNKMxiSyY7obN53 3uxC6fXgyx/0XR4a9aMXXwvPLm+ANiL7gyOJj3Yw= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 A8226254C7F for ; Mon, 22 Apr 2024 11:54:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A8226254C7F Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1rypRA-0000000BtKy-3u9s; Mon, 22 Apr 2024 11:54:09 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Mon, 22 Apr 2024 11:49:54 +0300 Message-ID: <87a4c5c213df4e9f85eeb77d6cbb98dc2047c084.1713773432.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD981EF5929CFC9C9843BC9DACD54AA45EFE805237F9B8C2EC600894C459B0CD1B970A510963B6819BEAD29F1F059031B34AE8084589E70947E959CEBAA5A3E512FAD222422030090D9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79145AB6E9E75F07EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373255E97C90679D468638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D85C9339DE798219D01DBF48A0D5DCDA274C3FBFCF3F07FD20CC7F00164DA146DAFE8445B8C89999728AA50765F7900637E603D20A273AEC4F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC82D01283D1ACF37BAF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C24F796C710B8583C302FCEF25BFAB3454AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C32686BFA937AE0EF4BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3C9EEE74C166EF7BC35872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A5D10C69F67C9AE8865002B1117B3ED696AF8E8DE2F17A96E2B91D2EB2DEE3878C823CB91A9FED034534781492E4B8EEAD6804EF05EF4ADF2AF36E2E0160E5C55395B8A2A0B6518DF68C46860778A80D548E8926FB43031F38 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF5B17DE13F83790918308A49A529E894A1E61083E99FBB5C578750032AE5F38826DD3C4C1BE61872BA1583B225F58ABB2E75563F5CD0B266C743E605242C55F8D1CFD6F11FA3AA786C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXgSec7GY+Z30BfnTB+P1lvX X-Mailru-Sender: 520A125C2F17F0B1A9638AD358559B59CCB84473EA90659F33594132A326AF8BE1C8B24FAC9CC8C7B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: [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" 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") + endif() + AppendFlags(TARGET_C_FLAGS -DLUAJIT_ENABLE_TABLE_BUMP) +endif() + # --- Main source tree --------------------------------------------------------- add_subdirectory(src) -- 2.44.0