Hi, Sergey
thanks for the fix and the answer. LGTM
Thanks!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', }) ===================================================================
okay, let's keep it as is+ ['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>.
+<snipped>-- Turn off compilation for the module to avoid side effects.