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 E1E356F873; Sat, 29 Jan 2022 04:19:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E1E356F873 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1643419187; bh=FW8BpbL5XLERsWcqgON+Av/l1OSHSzxHZs1lrrzkXhc=; 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=SQHSOCGXWXkwIJfuEZzCczArROOA0YXiEyjrO4gmywXS6/c3l954m8ujudVHOL2Jz 1Ni2+Ssf9GBu3DkHlhZ9fB9YIypK+8+AfRbaGIBif2WUiNsfaibptthG4mb47ZZe/g yKlTlQrAh/5KepDtbhWUb3aYbLfj8GPZCNX2mkf8= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 273176F873 for ; Sat, 29 Jan 2022 04:19:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 273176F873 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1nDcP2-0005G1-AU; Sat, 29 Jan 2022 04:19:44 +0300 Date: Sat, 29 Jan 2022 04:17:44 +0300 To: Igor Munkin Message-ID: References: <20211229122731.31617-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD99F281FB7F96F126DD97BA77611AE8DBB1611F84FB5BBE26000894C459B0CD1B93BD9FC73F703668B9452A9D41C8E1A40C3860B4EE3EE9A2B00FFB266B5ED13F5 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE722003BD978DAE1FCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BC8EAE35C9B9FAA78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80AECC2D225E97EA741FDFAB822EA5CD2117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B65D56369A3576CBA5089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A5665D9472212DDCB1D1AF756DC48B508F82D3B1A70D6B13A5D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D1AE09A115117C96CEE88BC129FC1665F320498995C847F262E5F2C1023A589EE7017EE8E000C30F1D7E09C32AA3244C607AEAD447428779AA54DCA0729146A3408A6A02710B7304FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj3WWIHBKIeBEH/boVtsI/sQ== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4025D735FAE1C0E1A80AEC1A9DAEBD381E0CC5C60C4892C08F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A84198E0F3ECE9B5443453F38A29522196 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: 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" Igor, On 29.01.22, Igor Munkin wrote: > Sergey, > > Bad things happen... I was much concerned about using module in > the test, but I failed to understand why exactly. Now I finally got it > (the hard way): is missing in 1.10 which is one of the target > branches for this patch. Could you please adjust the test using > helper or via any other way to check that only the > first trace is compiled? Fixed, see the iterative patch below: Branch is force-pushed. =================================================================== diff --git a/test/tarantool-tests/lj-430-maxirconst.test.lua b/test/tarantool-tests/lj-430-maxirconst.test.lua index 10de2520..45f0bb1d 100644 --- a/test/tarantool-tests/lj-430-maxirconst.test.lua +++ b/test/tarantool-tests/lj-430-maxirconst.test.lua @@ -7,6 +7,7 @@ jit.flush() require('utils').skipcond(jit.os == 'BSD', 'Disabled due to #4819') local tap = require('tap') +local traceinfo = require('jit.util').traceinfo local test = tap.test('lj-430-maxirconst') test:plan(2) @@ -24,20 +25,17 @@ local function irconst4() local _ = 42 end -local ntrace_old = misc.getmetrics().jit_trace_num +assert(not traceinfo(1), 'no any traces') jit.on() irconst3() irconst3() jit.off() -test:ok(ntrace_old + 1 == misc.getmetrics().jit_trace_num, - 'trace number increases') +test:ok(traceinfo(1), 'new trace created') -ntrace_old = misc.getmetrics().jit_trace_num jit.on() irconst4() irconst4() jit.off() -test:ok(ntrace_old == misc.getmetrics().jit_trace_num, - 'trace should not appear due to maxirconst limit') +test:ok(not traceinfo(2), 'trace should not appear due to maxirconst limit') os.exit(test:check() and 0 or 1) =================================================================== > > P.S. many thanks to luacheck: > | $ make -j test > | Consolidate compiler generated dependencies of target minilua > | Consolidate compiler generated dependencies of target libmixcframe > | Consolidate compiler generated dependencies of target libsandwich > | Consolidate compiler generated dependencies of target lib1 > | Consolidate compiler generated dependencies of target lib2 > | Consolidate compiler generated dependencies of target lib21 > | Consolidate compiler generated dependencies of target lib11 > | Consolidate compiler generated dependencies of target libflush > | [ 3%] Built target libsandwich > | [ 3%] Built target libmixcframe > | Running luacheck static analysis > | [ 8%] Built target lib1 > | [ 11%] Built target lib21 > | [ 6%] Built target minilua > | [ 6%] Built target lib2 > | [ 13%] Built target lib11 > | [ 15%] Built target libflush > | [ 16%] Generating buildvm_arch.h > | Create directory for PUC-Rio Lua 5.1 tests > | [ 16%] Built target PUC-Rio-Lua-5.1-tests-prepare > | Checking /home/imun/projects/tarantool-luajit-maintain/test/luajit-test-init.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-3196-incorrect-string-length.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-4427-ffi-sandwich.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-4476-fix-string-find-recording.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-4773-tonumber-fail-on-NUL-char.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-6227-bytecode-allocator-for-comparisons.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/gh-6371-string-char-no-arg.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-375-ir-bufput-signed-char.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-430-maxirconst.test.lua 4 warnings > | > | /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-430-maxirconst.test.lua:27:20: (W113) accessing undefined variable misc > | /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-430-maxirconst.test.lua:32:27: (W113) accessing undefined variable misc > | /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-430-maxirconst.test.lua:35:14: (W113) accessing undefined variable misc > | /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-430-maxirconst.test.lua:40:23: (W113) accessing undefined variable misc > | > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-494-table-chain-infinite-loop.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-505-fold-no-strref-for-ptrdiff.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-524-fold-conv-respect-src-irt.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-584-bad-renames-for-sunk-values.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-601-fix-gc-finderrfunc.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/lj-flush-on-trace.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/or-232-unsink-64-kptr.test.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/tap.lua OK > | Checking /home/imun/projects/tarantool-luajit-maintain/test/tarantool-tests/utils.lua OK > | > | Total: 4 warnings / 0 errors in 18 files > | make[3]: *** [test/CMakeFiles/LuaJIT-luacheck.dir/build.make:331: LuaJIT-luacheck] Error 1 > | make[2]: *** [CMakeFiles/Makefile2:731: test/CMakeFiles/LuaJIT-luacheck.dir/all] Error 2 > | make[2]: *** Waiting for unfinished jobs.... > | [ 20%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_fold.c.o > | [ 20%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_lib.c.o > | [ 20%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_asm.c.o > | [ 20%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm.c.o > | [ 22%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_peobj.c.o > | [ 22%] Linking C executable buildvm > | [ 22%] Built target buildvm > | make[1]: *** [CMakeFiles/Makefile2:683: test/CMakeFiles/test.dir/rule] Error 2 > | make: *** [Makefile:351: test] Error 2 > > -- > Best regards, > IM -- Best regards, Sergey Kaplun