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 59CD4BA783A; Thu, 13 Jun 2024 17:38:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 59CD4BA783A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1718289524; bh=N7ZjxWL+4YLCWeB79uCrXTCXTg2JS+AiFUdf9wUEDec=; 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=EgZvh8VK/6jPDTL+4+3UWw7KzSqJ82d64UnlL9PPWY19YxQxKTfZf+HNaC4t+KOOF VIzh5ltuJFiGdWl0b6vBZO/tZIxcjf3ByjHwBXh1bf0qYEXJWtKxSqmo1j2knjFjU4 tWzk0XIJh+0l2uqOZpUoY9ZTTdKl5VMHsJYoc3fo= 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 D443A4A6671 for ; Thu, 13 Jun 2024 17:38:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D443A4A6671 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1sHlb7-0000000AmhS-3hJ0; Thu, 13 Jun 2024 17:38:42 +0300 Content-Type: multipart/alternative; boundary="------------Q3vpPSz6TSCngKitn6JWuvv7" Message-ID: <0f871885-f144-47af-b8db-ccdb5d9344b2@tarantool.org> Date: Thu, 13 Jun 2024 17:38:41 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Sergey Kaplun References: <7c0a7be30070d085d6ddd3b56c4338686e1c2baa.1713773432.git.skaplun@tarantool.org> <42b64daf-a9f6-4267-9d22-4c8d7b88fdca@tarantool.org> In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9923B2AA154DF63C69F83E24FDF70A404D569FCF785121A5C1313CFAB8367EF908E2BE116634AD74D9808DE47D989D147601F62E38CDD5EC66DAB9926CB6F42091CBD4ED7E141B44DF8D9167951636D18 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7922D113DFDC6D5A3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063748E7A03516F25E8E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D876C005E54BD9296E200D33607B7DA5FC0A7C7C32AA55ABB4CC7F00164DA146DAFE8445B8C89999728AA50765F790063793270F7220657A0A389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8ED96AA85C75E140D117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CFCF39425AD3EEC986BA3038C0950A5D36C8A9BA7A39EFB766D91E3A1F190DE8FDBA3038C0950A5D36D5E8D9A59859A8B6EF07B7DDBD92C3EF76E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C4DB04CA562B6C7F843847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A557EBE6B5466888E95002B1117B3ED696C4FAD2A869C232854869453249F34FA4823CB91A9FED034534781492E4B8EEADB1D70E2111C441FFBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFB5C1663CE12506950DCFD62A3A995CCD16F86D84C4772C575BD2D5A1237699D4EEB2523CC0526E3F04A26A3878DC1330105F5BBDB9077B0AB0721D00CC7056BA138D0346E3F31BF35F4332CA8FE04980913E6812662D5F2AB9AF64DB4688768036DF5FE9C0001AF333F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojP/c/PTD82AmXNN6RWqwcUg== X-Mailru-Sender: 520A125C2F17F0B1E52FEF5D219D61409808DE47D989D147601F62E38CDD5EC6A02DEA52D7F9B7090152A3D17938EB451EB5A0BCEC6A560B3DDE9B364B0DF289BE2DA36745F2EEB5CEBA01FB949A1F1EEAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v1 3/5] test: allow `jit.parse` to return aborted traces 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 Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------Q3vpPSz6TSCngKitn6JWuvv7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Sergey thanks for the fix and the answer. LGTM On 13.06.2024 13:00, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > > On 06.06.24, Sergey Bronnikov wrote: >> Sergey, >> >> >> thanks for the patch! Please see my comments below. >> >> On 22.04.2024 11:49, Sergey Kaplun wrote: >>> Now information about the abort of the trace is saved in the >>> `abort_reason` field of the corresponding structure. The >>> `jit.parse.finish()` returns now the second table containing aborted >>> traces. Each table key is a trace number containing an array of >>> potentially traces with this number, which was aborted. >>> >>> Needed for tarantool/tarantool#9924 >>> --- >>> .../unit-jit-parse-abort.test.lua | 38 +++++++++++++++++++ >>> test/tarantool-tests/utils/jit/parse.lua | 22 ++++++++--- >>> 2 files changed, 55 insertions(+), 5 deletions(-) >>> create mode 100644 test/tarantool-tests/unit-jit-parse-abort.test.lua >>> >>> diff --git a/test/tarantool-tests/unit-jit-parse-abort.test.lua b/test/tarantool-tests/unit-jit-parse-abort.test.lua >>> new file mode 100644 >>> index 00000000..91af5a56 >>> --- /dev/null >>> +++ b/test/tarantool-tests/unit-jit-parse-abort.test.lua >>> @@ -0,0 +1,38 @@ >>> +local tap = require('tap') >>> +local test = tap.test('unit-jit-parse'):skipcond({ >> Usually a name passed to `tap.test` matches to test file name, >> >> but here it is not matched. > My bad, thanks! > Fixed, see the iterative patch below. > > =================================================================== > diff --git a/test/tarantool-tests/unit-jit-parse-abort.test.lua b/test/tarantool-tests/unit-jit-parse-abort.test.lua > index 91af5a56..f09e696c 100644 > --- a/test/tarantool-tests/unit-jit-parse-abort.test.lua > +++ b/test/tarantool-tests/unit-jit-parse-abort.test.lua > @@ -1,5 +1,5 @@ > local tap = require('tap') > -local test = tap.test('unit-jit-parse'):skipcond({ > +local test = tap.test('unit-jit-parse-abort'):skipcond({ > ['Test requires JIT enabled'] = not jit.status(), > ['Disabled on *BSD due to #4819'] = jit.os == 'BSD', > }) > =================================================================== Thanks! >>> + ['Test requires JIT enabled'] = not jit.status(), >>> + ['Disabled on *BSD due to #4819'] = jit.os == 'BSD', >>> +}) >>> + >>> +local jparse = require('utils').jit.parse >>> + >>> +-- XXX: Avoid other traces compilation due to hotcount collisions >>> +-- for predictable results. >>> +jit.off() >>> +jit.flush() >>> + >>> +test:plan(1) >>> + >>> +jit.on() >>> +-- We only need the abort reason in the test. >>> +jparse.start('t') >> I would add a comment with explanation what does 't' flag mean. >> >> Feel free to ignore. > I suppose that readers who use `jit.dump` from time to time already > know all flags. If not, it can be easily found in . okay, let's keep it as is >>> + > > >>> -- Turn off compilation for the module to avoid side effects. --------------Q3vpPSz6TSCngKitn6JWuvv7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi, Sergey

thanks for the fix and the answer. LGTM

On 13.06.2024 13:00, Sergey Kaplun wrote:
Hi, Sergey!
Thanks for the review!

On 06.06.24, Sergey Bronnikov wrote:
Sergey,


thanks for the patch! Please see my comments below.

On 22.04.2024 11:49, Sergey Kaplun wrote:
Now information about the abort of the trace is saved in the
`abort_reason` field of the corresponding structure. The
`jit.parse.finish()` returns now the second table containing aborted
traces. Each table key is a trace number containing an array of
potentially traces with this number, which was aborted.

Needed for tarantool/tarantool#9924
---
  .../unit-jit-parse-abort.test.lua             | 38 +++++++++++++++++++
  test/tarantool-tests/utils/jit/parse.lua      | 22 ++++++++---
  2 files changed, 55 insertions(+), 5 deletions(-)
  create mode 100644 test/tarantool-tests/unit-jit-parse-abort.test.lua

diff --git a/test/tarantool-tests/unit-jit-parse-abort.test.lua b/test/tarantool-tests/unit-jit-parse-abort.test.lua
new file mode 100644
index 00000000..91af5a56
--- /dev/null
+++ b/test/tarantool-tests/unit-jit-parse-abort.test.lua
@@ -0,0 +1,38 @@
+local tap = require('tap')
+local test = tap.test('unit-jit-parse'):skipcond({
Usually a name passed to `tap.test` matches to test file name,

but here it is not matched.
My bad, thanks!
Fixed, see the iterative patch below.

===================================================================
diff --git a/test/tarantool-tests/unit-jit-parse-abort.test.lua b/test/tarantool-tests/unit-jit-parse-abort.test.lua
index 91af5a56..f09e696c 100644
--- a/test/tarantool-tests/unit-jit-parse-abort.test.lua
+++ b/test/tarantool-tests/unit-jit-parse-abort.test.lua
@@ -1,5 +1,5 @@
 local tap = require('tap')
-local test = tap.test('unit-jit-parse'):skipcond({
+local test = tap.test('unit-jit-parse-abort'):skipcond({
   ['Test requires JIT enabled'] = not jit.status(),
   ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
 })
===================================================================
Thanks!

      

        
+  ['Test requires JIT enabled'] = not jit.status(),
+  ['Disabled on *BSD due to #4819'] = jit.os == 'BSD',
+})
+
+local jparse = require('utils').jit.parse
+
+-- XXX: Avoid other traces compilation due to hotcount collisions
+-- for predictable results.
+jit.off()
+jit.flush()
+
+test:plan(1)
+
+jit.on()
+-- We only need the abort reason in the test.
+jparse.start('t')
I would add a comment with explanation what does 't' flag mean.

Feel free to ignore.
I suppose that readers who use `jit.dump` from time to time already
know all flags. If not, it can be easily found in <jit/dump.lua>.
okay, let's keep it as is

      

        
+
<snipped>

  -- Turn off compilation for the module to avoid side effects.

    
--------------Q3vpPSz6TSCngKitn6JWuvv7--