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 CB6A06EC40; Fri, 4 Jun 2021 18:36:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CB6A06EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622820971; bh=KDrX2IsIppcYVdffQQkx8MvRCRZoH00aFN6U6fEV3+o=; h=Date:In-Reply-To:To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=O9Wiy9GlcobCwqugh1HN+4pty9gHQ5jFflB1yPdkfpntNyO6VlO37cnzFlhvlz1Y9 P5HVyZgMVTLMmCvvD5+K4lBYBQ7Ao9idqYMYRa7dWw8fpnRmVPRYoWDRqHp8F0+8yd 1D7ILlNpks+n06rUB+KWQY4M6UVPT48BjIfK3CK0= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BF3406EC40 for ; Fri, 4 Jun 2021 18:36:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BF3406EC40 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1lpBrk-000866-Rd; Fri, 04 Jun 2021 18:36:09 +0300 Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_287C26D3-C25B-4AFB-9147-35D9E66EF404" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Date: Fri, 4 Jun 2021 18:36:08 +0300 In-Reply-To: To: Sergey Kaplun References: <703b21b49b4f5b04b71b322c25528eff4fb2d0e3.1621859367.git.skaplun@tarantool.org> <7D81109B-6734-42E4-914D-2567D1438BE4@tarantool.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C54907A7AE9C1BA82BC67C1327DFB87C6A6182A05F5380850403CEB73DB1369AC5225726F1579829964049208C3FF55F0745934EBB13A7E4585 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E2331B2371EFE129EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F7C2A16C2A438FE58638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81B9A443435A6452CCE57BF1D174A8D5F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B67393CE827C55B5F775ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A58BB7DF9488B011E55C1B4B4F7E2751B79BA34FA4E61DF2D2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FBC5FED0552DA851410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F3735C80F9F4B96D38A60C3B030E90EF6555669EA23BD061DE878DB63AB81408EB98DDAD794CA6351D7E09C32AA3244C13C15A6A79F7A42618AFAA058F4BFFB0D9ADFF0C0BDB8D1FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojz99asgmzejqkZEjripW2/Q== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81EA64E80CCB8DD0297348C412F8BB851DA0A224D6C2D12490EAD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/4] test: add skipcond on architectures for memprof 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 Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --Apple-Mail=_287C26D3-C25B-4AFB-9147-35D9E66EF404 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi! Thanks for the update.=20 I was bad in my ASCII art. The change I expected was > +-- Memprof is implemented for x86 and x64 architectures only. LGTM Sergos > On 4 Jun 2021, at 16:37, Sergey Kaplun wrote: >=20 > Hi! >=20 > Thanks for the review! >=20 > On 02.06.21, Sergey Ostanevich wrote: >> Hi! >>=20 >> Thanks for the patch! >> Just one fixup is needed. >>=20 >> Sergos >>=20 >>> On 24 May 2021, at 16:27, Sergey Kaplun = wrote: >>>=20 >>> Memprof's tests fail for architectures different from x86 and x64, >>> because memprof is not yet implemented for them. >>>=20 >>> This patch adds skip condition to corresponding test. >>> --- >>> test/tarantool-tests/misclib-memprof-lapi.test.lua | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>>=20 >>> diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua = b/test/tarantool-tests/misclib-memprof-lapi.test.lua >>> index b4d66509..4df9cfd8 100644 >>> --- a/test/tarantool-tests/misclib-memprof-lapi.test.lua >>> +++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua >>> @@ -1,3 +1,9 @@ >>> +-- Memprof is implemented only for x86 and x64 architectures. >> ^^^^ =E2=80=94=E2=80=94> = ^ >>> +require("utils").skipcond( >>> + jit.arch ~=3D "x86" or jit.arch ~=3D "x64", >>=20 >> I believe you overcomplicated the condition so it=E2=80=99ll skip = even for >> mentioned archs >>=20 >> tarantool> x=3D'x86' >> --- >> ... >>=20 >> tarantool> x~=3D'x86' or x~=3D'x64' >> --- >> - true >> ... >>=20 >=20 > Thanks, nice catch! >=20 > Fixed. > Branch is force-pushed. >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua = b/test/tarantool-tests/misclib-memprof-lapi.test.lua > index 4df9cfd8..96beb680 100644 > --- a/test/tarantool-tests/misclib-memprof-lapi.test.lua > +++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua > @@ -1,6 +1,6 @@ > --- Memprof is implemented only for x86 and x64 architectures. > +-- Memprof is implemented for only x86 and x64 architectures. > require("utils").skipcond( > - jit.arch ~=3D "x86" or jit.arch ~=3D "x64", > + jit.arch ~=3D "x86" and jit.arch ~=3D "x64", > jit.arch.." architecture is NIY for memprof" > ) >=20 > @@ -131,9 +131,9 @@ local free =3D fill_ev_type(events, symbols, = "free") > -- the number of allocations. > -- 1 event - alocation of table by itself + 1 allocation > -- of array part as far it is bigger than LJ_MAX_COLOSIZE (16). > -test:ok(check_alloc_report(alloc, 21, 19, 2)) > +test:ok(check_alloc_report(alloc, 27, 25, 2)) > -- 100 strings allocations. > -test:ok(check_alloc_report(alloc, 26, 19, 100)) > +test:ok(check_alloc_report(alloc, 32, 25, 100)) >=20 > -- Collect all previous allocated objects. > test:ok(free.INTERNAL.num =3D=3D 102) > @@ -141,8 +141,8 @@ test:ok(free.INTERNAL.num =3D=3D 102) > -- Tests for leak-only option. > -- See also https://github.com/tarantool/tarantool/issues/5812 = . > local heap_delta =3D process.form_heap_delta(events, symbols) > -local tab_alloc_stats =3D heap_delta[form_source_line(21)] > -local str_alloc_stats =3D heap_delta[form_source_line(26)] > +local tab_alloc_stats =3D heap_delta[form_source_line(27)] > +local str_alloc_stats =3D heap_delta[form_source_line(32)] > test:ok(tab_alloc_stats.nalloc =3D=3D tab_alloc_stats.nfree) > test:ok(tab_alloc_stats.dbytes =3D=3D 0) > test:ok(str_alloc_stats.nalloc =3D=3D str_alloc_stats.nfree) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >>=20 >>=20 >>> + jit.arch.." architecture is NIY for memprof" >>> +) >>> + >>> local tap =3D require("tap") >>>=20 >>> local test =3D tap.test("misc-memprof-lapi") >>> --=20 >>> 2.31.0 >>>=20 >>=20 >=20 > --=20 > Best regards, > Sergey Kaplun --Apple-Mail=_287C26D3-C25B-4AFB-9147-35D9E66EF404 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi!

Thanks = for the update. 
I was bad in my ASCII art. = The change I expected was

+-- Memprof is implemented for x86 and x64 = architectures only.

LGTM
Sergos


On 4 Jun 2021, at 16:37, Sergey Kaplun <skaplun@tarantool.org> wrote:

Hi!

Thanks for the review!

On 02.06.21, Sergey Ostanevich wrote:
Hi!

Thanks for the patch!
Just one = fixup is needed.

Sergos

On 24 May 2021, at = 16:27, Sergey Kaplun <skaplun@tarantool.org> wrote:

Memprof's tests fail for architectures different from x86 and = x64,
because memprof is not yet implemented for them.

This patch adds skip condition to = corresponding test.
---
test/tarantool-tests/misclib-memprof-lapi.test.lua | 6 = ++++++
1 file changed, 6 insertions(+)

diff --git = a/test/tarantool-tests/misclib-memprof-lapi.test.lua = b/test/tarantool-tests/misclib-memprof-lapi.test.lua
index = b4d66509..4df9cfd8 100644
--- = a/test/tarantool-tests/misclib-memprof-lapi.test.lua
+++ = b/test/tarantool-tests/misclib-memprof-lapi.test.lua
@@ = -1,3 +1,9 @@
+-- Memprof is implemented only for x86 and = x64 architectures.
        &n= bsp;           &nbs= p;       ^^^^ =E2=80=94=E2=80=94> =             &n= bsp;           &nbs= p;^
+require("utils").skipcond(
+  jit.arch ~=3D= "x86" or jit.arch ~=3D "x64",

I= believe you overcomplicated the condition so it=E2=80=99ll skip even = for
mentioned archs

tarantool> x=3D'x86'
---
...

tarantool> x~=3D'x86' or x~=3D'x64'
---
- true
...


Thanks, nice catch!

Fixed.
Branch is force-pushed.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
diff --git = a/test/tarantool-tests/misclib-memprof-lapi.test.lua = b/test/tarantool-tests/misclib-memprof-lapi.test.lua
index = 4df9cfd8..96beb680 100644
--- = a/test/tarantool-tests/misclib-memprof-lapi.test.lua
+++ = b/test/tarantool-tests/misclib-memprof-lapi.test.lua
@@ -1,6 +1,6 = @@
--- Memprof = is implemented only for x86 and x64 architectures.
+-- Memprof = is implemented for only x86 and x64 architectures.
require("utils").skipcond(
-  jit.arch ~=3D "x86" or jit.arch ~=3D "x64",
+ =  jit.arch ~=3D "x86" and jit.arch ~=3D "x64",
  jit.arch.." architecture is NIY for = memprof"
)

@@ -131,9 = +131,9 @@ local free =3D fill_ev_type(events, symbols, "free")
-- the number = of allocations.
-- 1 event - alocation of table by itself + 1 = allocation
-- of array = part as far it is bigger than LJ_MAX_COLOSIZE (16).
-test:ok(check_alloc_report(alloc, 21, 19, 2))
+test:ok(check_alloc_report(alloc, 27, 25, 2))
-- 100 = strings allocations.
-test:ok(check_alloc_report(alloc, 26, 19, 100))
+test:ok(check_alloc_report(alloc, 32, 25, 100))

-- Collect = all previous allocated objects.
test:ok(free.INTERNAL.num =3D=3D 102)
@@ -141,8 = +141,8 @@ test:ok(free.INTERNAL.num =3D=3D 102)
-- Tests for = leak-only option.
-- See also https://github.com/tarantool/tarantool/issues/5812.
local = heap_delta =3D process.form_heap_delta(events, symbols)
-local = tab_alloc_stats =3D heap_delta[form_source_line(21)]
-local = str_alloc_stats =3D heap_delta[form_source_line(26)]
+local = tab_alloc_stats =3D heap_delta[form_source_line(27)]
+local = str_alloc_stats =3D heap_delta[form_source_line(32)]
test:ok(tab_alloc_stats.nalloc =3D=3D = tab_alloc_stats.nfree)
test:ok(tab_alloc_stats.dbytes =3D=3D 0)
test:ok(str_alloc_stats.nalloc =3D=3D = str_alloc_stats.nfree)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



+ =  jit.arch.." architecture is NIY for memprof"
+)
+
local tap =3D require("tap")

local test =3D tap.test("misc-memprof-lapi")
-- 
2.31.0



-- Best = regards,
Sergey = Kaplun

= --Apple-Mail=_287C26D3-C25B-4AFB-9147-35D9E66EF404--