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 87F756F873; Fri, 28 Jan 2022 14:57:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 87F756F873 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1643371043; bh=pkOnnry7wMYoZ2CTSiJyYBpvb7iFr1g63cCXIELqZIw=; 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=S3tcBpx3NwF6PPo+JQDAtQ1JJSJWnogHvGrIAfx1298yXtkSeVMlLQSGDbn79LUKV bMfHcGPGfirgF+A8oH+m0d1bp4aCUquA9o4HTx7gKKHojx3TPnECECvDsJomVsGXQ7 lrYeNrvTnckrji7u7JDkefIECqlAXRkgP9q01Pfw= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 392116F873 for ; Fri, 28 Jan 2022 14:57:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 392116F873 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1nDPsX-0003H0-9J; Fri, 28 Jan 2022 14:57:21 +0300 Date: Fri, 28 Jan 2022 14:55:56 +0300 To: Sergey Kaplun Message-ID: References: <20211229122731.31617-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9AA78FDF62ECAE61F27013EC9534AAA53678E560D4B152BF1182A05F5380850401F9321F3A28A01894F1704FFD46797E928EE2A0F27132159C1BAB73038457209 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EEF2A6A9DCF3640FC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE74FC7AD0AD96C1577EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BEBC5CAB6D411FFA6EAF383F2AAB097C648BE2EAB01F575A9CC7F00164DA146DAFE8445B8C89999728AA50765F790063783E00425F71A4181389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC82FFDA4F57982C5F4F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BEB1A37DF9DABAA8F75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A51859CC5B958FB952C6878797971E182E18240770ABACC6F0D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA757165F9D92552535A410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3438BC6CF312DA731585C6AC056D52C55AF7FA2FEE409D355486E0B381FF1AC3D8771A76850E0907891D7E09C32AA3244CE29718C562A1C10E262CE0C80938DEDBB4DF56057A86259F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqLK0kLh8sGcrFsgLvxnLdQ== X-Mailru-Sender: 689FA8AB762F739339CABD9B3CA9A7D68C71B0A7316F937E8F93EF43277AE664A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E3365FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] Actually implement maxirconst trace limit. 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On 28.01.22, Sergey Kaplun wrote: > Igor, > > Thanks for the review! > > > > > > > Issue: https://github.com/LuaJIT/LuaJIT/issues/430 > > > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-430-maxirconst-actually-implement-full-ci > > > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/lj-430-maxirconst-actually-implement-full-ci > > > > > > src/lj_record.c | 5 ++- > > > .../lj-430-maxirconst.test.lua | 43 +++++++++++++++++++ > > > 2 files changed, 46 insertions(+), 2 deletions(-) > > > create mode 100644 test/tarantool-tests/lj-430-maxirconst.test.lua > > > > > > > > > > > > diff --git a/test/tarantool-tests/lj-430-maxirconst.test.lua b/test/tarantool-tests/lj-430-maxirconst.test.lua > > > new file mode 100644 > > > index 00000000..1829b37d > > > --- /dev/null > > > +++ b/test/tarantool-tests/lj-430-maxirconst.test.lua > > > @@ -0,0 +1,43 @@ > > > +-- XXX: avoid any other traces compilation due to hotcount > > > +-- collisions for predictible results. > > > +jit.off() > > > +jit.flush() > > > > Minor: I'd rather move this part closer to 'jit.opt.start' to save the > > test structure closer to the other test chunks. Feel free to ignore. > > I really want to exclude __any__ JIT work here to avoid false-positive > hotcount (was precendents during writing this test :)). Ignoring. OK, got it. > > > > +test:ok(ntrace_old + 1 == misc.getmetrics().jit_trace_num, > > > + 'trace number increases') > > > > Typo: I doubt we use tabs in Lua sources, but I might be wrong... > > I suggest to use quarter tabs indent style as we use for C code and Mike > use in src/jit/*.lua (see bcsave.lua for example). > > There was no precedent before, IINM :). See test/tarantool-tests/lj-695-ffi-vararg-call.test.lua[1]. > > > > > > + > > > +ntrace_old = misc.getmetrics().jit_trace_num > > > +jit.on() > > > +irconst4() > > > +irconst4() > > > +jit.off() > > > +test:ok(ntrace_old == misc.getmetrics().jit_trace_num, > > > + 'trace number is the same') > > > > Ditto. > > > > > + > > > +os.exit(test:check() and 0 or 1) > > > -- > > > 2.34.1 > > > > > > > -- > > Best regards, > > IM > > -- > Best regards, > Sergey Kaplun [1]: https://github.com/tarantool/luajit/blob/tarantool/test/tarantool-tests/lj-695-ffi-vararg-call.test.lua -- Best regards, IM