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 56FBEC74DC6; Wed, 21 Aug 2024 12:08:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 56FBEC74DC6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724231311; bh=JPG5gI0OYXu8ZSDACKk1zNAsViJ9+3T7R7aS6kgrzn4=; 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=YY3ziN+L6ZWsU7HAqh4FFZkBwU/aHopD4K2HEjLA4kpluVjhkNO4CfjIYrotMsr/V SB29q/OJnnSF85uP0pVskgDIKECBnBfsY7KkoyV/EfDqae4fXKy/Fo9NDHpKkcMU+a qa0aga+OcemAky1cz+AmWZYJNFhfOAmwqIW5JS/Q= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [95.163.41.76]) (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 612FCC6198D for ; Wed, 21 Aug 2024 11:59:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 612FCC6198D Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1sghBd-00000005aRz-1Pza; Wed, 21 Aug 2024 11:59:25 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Wed, 21 Aug 2024 11:58:22 +0300 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD93D5A650E6D4F687E04563BCA4E39D9BAF0F8F024842D4CD3182A05F53808504091E1D22371B98BF6D27678DDAA806314D9A69AEF6B8CC78FEFF80BD07D1CDB798221C18B3D1622A4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76C0A440987CA342DC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7178CF5C0F418A002EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B043BF0FB74779F36C9BDAD47FD963C62B871019616B657E70D1C5B496C6AEF58A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3A12191B5F2BB8629117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006377F02F59195295693EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5913D5E26CF5E67045002B1117B3ED6968FE2AACB41135F40250A03108B67251B823CB91A9FED034534781492E4B8EEADCAFEFF123806BC82C79554A2A72441328621D336A7BC284946AD531847A6065A17B107DEF921CE79BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFC7F53D9D86DBC5340AA415EBD322CBA1B989B4B1C854819C5497C790A05AA00D14625291CC5E48B9D14E51FF79EEE6031D73DB5622D4A10DB2A94BCD9D7316CE9A7E79BAFFE48B19C226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojegttVMu7AX8TxavGGxHr0A== X-DA7885C5: 165067F512E74E66F255D290C0D534F97CE97BC3DB97399D608CD7180CE7EFC10BFC554CE23BE8225B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393C6D0B12EA33CAA9BE0C22F5F333C6681DAC77899D9C4377F0750F3DAD4CA74D9E49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 19/45] test: enable LuaJIT test 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 patch moves the aforementioned test from the to the directory, includes it in , and names the subtest. Also, it slightly refactors the code to make it closer to our code style. The test is adjusted to be runable in the test suite by adding the `jit.flush()` to avoid collisions of traces. Also, the number of iterations for the compiled loop inside the hook is increased to avoid hotcount collisions. Part of tarantool/tarantool#9398 --- test/LuaJIT-tests/misc/hook_record.lua | 8 -------- test/LuaJIT-tests/trace/hook_record.lua | 7 +++++++ test/LuaJIT-tests/trace/index | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 test/LuaJIT-tests/misc/hook_record.lua create mode 100644 test/LuaJIT-tests/trace/hook_record.lua diff --git a/test/LuaJIT-tests/misc/hook_record.lua b/test/LuaJIT-tests/misc/hook_record.lua deleted file mode 100644 index 6f1646de..00000000 --- a/test/LuaJIT-tests/misc/hook_record.lua +++ /dev/null @@ -1,8 +0,0 @@ - -if not jit or not jit.status or not jit.status() then return end - -debug.sethook(function() for i=1,100 do end end, "", 10) -for i=1,10 do end -debug.sethook() -assert((require("jit.util").traceinfo(1))) - diff --git a/test/LuaJIT-tests/trace/hook_record.lua b/test/LuaJIT-tests/trace/hook_record.lua new file mode 100644 index 00000000..684e1139 --- /dev/null +++ b/test/LuaJIT-tests/trace/hook_record.lua @@ -0,0 +1,7 @@ +do --- Recording traces inside the hook. + jit.flush() + debug.sethook(function() for _ = 1, 1000 do end end, "", 10) + for _ = 1, 10 do end + debug.sethook() + assert((require("jit.util").traceinfo(1))) +end diff --git a/test/LuaJIT-tests/trace/index b/test/LuaJIT-tests/trace/index index 595a71d2..63af7870 100644 --- a/test/LuaJIT-tests/trace/index +++ b/test/LuaJIT-tests/trace/index @@ -4,6 +4,7 @@ exit_jfuncf.lua gc.lua gc64_slot_revival.lua hook_norecord.lua +hook_record.lua phi snap.lua stitch.lua -- 2.45.2