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 89452C5B3EC; Thu, 22 Aug 2024 18:06:33 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 89452C5B3EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1724339193; bh=CqtHFVx2TcBZ7Fmw74R9k/aQeGLG43WUUjr1ikps0TU=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=e6kvkWyZNJtEZaMXuRUOMcFV8kF0RrFj7lO9Fxs2FvRb6mDN7nkH2/40g43SX0whH t8mPwaMw+VjqyxoyAz9+bNGoPMaR2uwy51Z5EXvLNFTIQozk8NJwbmLkL+5KuIno6/ ba9rqq+8tFxK5HVN3bgpMYHEOAHNqo6RaZA9aYtc= Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [95.163.41.64]) (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 4EF3AC5B3EC for ; Thu, 22 Aug 2024 18:06:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4EF3AC5B3EC Received: by smtp41.i.mail.ru with esmtpa (envelope-from ) id 1sh9OR-0000000BM5M-2IQk; Thu, 22 Aug 2024 18:06:31 +0300 Content-Type: multipart/alternative; boundary="------------RKD5UiQ5m9lYCF0nTVeFzQZP" Message-ID: <20ae2c23-3310-4ce4-aa10-b009dc3f35b9@tarantool.org> Date: Thu, 22 Aug 2024 18:06:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun , Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org References: In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A67092BE052B1D9E1E479B3F2CBCDEB4895EA028370B821F182A05F53808504085DAF08AE5A93B5633594132A326AF8B8A0D002FFDCE9E39EDDFFFF196D306A5FB1AA341019AC2B8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7678D195E6F08FCA2EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E1D2769089B3DFB28638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80FF2B317481E8BDDCE9140BC0A665F73DF6794E5482A03B4CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637CAEE156C82D3D7D9389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F7900637DE9AA9445CB5F4E7D81D268191BDAD3DBD4B6F7A4D31EC0BE2F48590F00D11D6D81D268191BDAD3D78DA827A17800CE7AFF4C6A39F54B15FEC76A7562686271ED91E3A1F190DE8FD2E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3CD42BCEBB57B85E635872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-C1DE0DAB: 0D63561A33F958A50063EE500F3B622A5002B1117B3ED69699139B8C654F4DA292B673A2F5DDD7E7823CB91A9FED034534781492E4B8EEAD69BF13FED57427F1BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFDB77EDD789445A7CF52F374B3154D113F7DD8ACC8FBC1F86A94F421429CB546B3B77A83432DF81E42FB0CAD32ADFBF8435B614F6E84E6D268D63703971324202FAC5923C9E556E4B5F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbUwDRTee1Xq36LxJSlkiWg== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D6140C6E70CB7F07FD98BB43C08EBA11A768FCCC182BF273FF88D0152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 luajit 13/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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------RKD5UiQ5m9lYCF0nTVeFzQZP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sergey, On 21.08.2024 11:58, Sergey Kaplun wrote: > This patch moves the aforementioned test from the to the > directory, includes it in , and names subtests. > > The first test is adjusted to be runable in the test suite. > > Part of tarantool/tarantool#9398 > --- thanks for the patch! LGTM > .../{misc/gc_trace.lua => trace/gc.lua} | 30 +++++++++++-------- > test/LuaJIT-tests/trace/index | 1 + > 2 files changed, 18 insertions(+), 13 deletions(-) > rename test/LuaJIT-tests/{misc/gc_trace.lua => trace/gc.lua} (56%) > > diff --git a/test/LuaJIT-tests/misc/gc_trace.lua b/test/LuaJIT-tests/trace/gc.lua > similarity index 56% > rename from test/LuaJIT-tests/misc/gc_trace.lua > rename to test/LuaJIT-tests/trace/gc.lua > index bc38ce0c..43d7ae55 100644 > --- a/test/LuaJIT-tests/misc/gc_trace.lua > +++ b/test/LuaJIT-tests/trace/gc.lua > @@ -1,18 +1,23 @@ > +local jutil = require("jit.util") > > -if not jit or not jit.status or not jit.status() then return end > - > -collectgarbage() > -for j=1,100 do > - loadstring("for i=1,100 do end")() > +do --- Collect dead traces. > + jit.flush() > + collectgarbage() > + -- Prevent the creation of side traces. > + jit.off() > + for j=1,100 do > + jit.on() > + loadstring("for i=1,100 do end")() > + jit.off() > + end > + jit.on() > + collectgarbage() > + assert(jutil.traceinfo(1) == nil) > + assert(jutil.traceinfo(2) == nil) > + assert(jutil.traceinfo(3) == nil) > end > -local jutil = require("jit.util") > -assert(jutil.traceinfo(90) == nil) > -collectgarbage() > -assert(jutil.traceinfo(1) == nil) > -assert(jutil.traceinfo(2) == nil) > -assert(jutil.traceinfo(3) == nil) > > -do > +do --- Check KGC marking. > local f > local function reccb(tr) > if f == nil then > @@ -34,4 +39,3 @@ do > end > jit.attach(reccb) > end > - > diff --git a/test/LuaJIT-tests/trace/index b/test/LuaJIT-tests/trace/index > index ea7a22e0..46c8f5d2 100644 > --- a/test/LuaJIT-tests/trace/index > +++ b/test/LuaJIT-tests/trace/index > @@ -1,6 +1,7 @@ > exit_frame.lua > exit_growstack.lua > exit_jfuncf.lua > +gc.lua > gc64_slot_revival.lua > phi > snap.lua --------------RKD5UiQ5m9lYCF0nTVeFzQZP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Sergey,

On 21.08.2024 11:58, Sergey Kaplun wrote:
This patch moves the aforementioned test from the <misc> to the <trace/>
directory, includes it in <index>, and names subtests.

The first test is adjusted to be runable in the test suite.

Part of tarantool/tarantool#9398
---
thanks for the patch! LGTM
 .../{misc/gc_trace.lua => trace/gc.lua}       | 30 +++++++++++--------
 test/LuaJIT-tests/trace/index                 |  1 +
 2 files changed, 18 insertions(+), 13 deletions(-)
 rename test/LuaJIT-tests/{misc/gc_trace.lua => trace/gc.lua} (56%)

diff --git a/test/LuaJIT-tests/misc/gc_trace.lua b/test/LuaJIT-tests/trace/gc.lua
similarity index 56%
rename from test/LuaJIT-tests/misc/gc_trace.lua
rename to test/LuaJIT-tests/trace/gc.lua
index bc38ce0c..43d7ae55 100644
--- a/test/LuaJIT-tests/misc/gc_trace.lua
+++ b/test/LuaJIT-tests/trace/gc.lua
@@ -1,18 +1,23 @@
+local jutil = require("jit.util")
 
-if not jit or not jit.status or not jit.status() then return end
-
-collectgarbage()
-for j=1,100 do
-  loadstring("for i=1,100 do end")()
+do --- Collect dead traces.
+  jit.flush()
+  collectgarbage()
+  -- Prevent the creation of side traces.
+  jit.off()
+  for j=1,100 do
+    jit.on()
+    loadstring("for i=1,100 do end")()
+    jit.off()
+  end
+  jit.on()
+  collectgarbage()
+  assert(jutil.traceinfo(1) == nil)
+  assert(jutil.traceinfo(2) == nil)
+  assert(jutil.traceinfo(3) == nil)
 end
-local jutil = require("jit.util")
-assert(jutil.traceinfo(90) == nil)
-collectgarbage()
-assert(jutil.traceinfo(1) == nil)
-assert(jutil.traceinfo(2) == nil)
-assert(jutil.traceinfo(3) == nil)
 
-do
+do --- Check KGC marking.
   local f
   local function reccb(tr)
     if f == nil then
@@ -34,4 +39,3 @@ do
   end
   jit.attach(reccb)
 end
-
diff --git a/test/LuaJIT-tests/trace/index b/test/LuaJIT-tests/trace/index
index ea7a22e0..46c8f5d2 100644
--- a/test/LuaJIT-tests/trace/index
+++ b/test/LuaJIT-tests/trace/index
@@ -1,6 +1,7 @@
 exit_frame.lua
 exit_growstack.lua
 exit_jfuncf.lua
+gc.lua
 gc64_slot_revival.lua
 phi
 snap.lua
--------------RKD5UiQ5m9lYCF0nTVeFzQZP--