-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add missing module for jit.dump on ARM64
Since commit c9d88d5 ('Fix #984: add jit.* library to the binary') all required modules implemented in Lua are bundled (i.e. compiled into the executable as a C literal) into Tarantool binary. While making Tarantool work on ARM64 platforms, it turned out the arch-specific module (namely, jit/dis_arm64.lua) is not bundled. Within this patch the missing sources are added and jit.dump works fine on ARM64 hosts as a result. Part of #5983 Relates to #5629 Follows up #984 Reviewed-by: Sergey Kaplun <skaplun@tarantool.org> Reviewed-by: Sergey Ostanevich <sergos@tarantool.org> Signed-off-by: Igor Munkin <imun@tarantool.org>
- Loading branch information
1 parent
3fa165e
commit 93e2ce5
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import platform | ||
|
||
# Disabled on FreeBSD due to #4819. | ||
if platform.system() == 'FreeBSD': | ||
self.skip = 1 | ||
|
||
# vim: set ft=python: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env tarantool | ||
|
||
-- Just check whether all Lua sources related to jit.dump are | ||
-- bundled to the binary. Otherwise, jit.dump module raises | ||
-- an error that is handled via <pcall>. | ||
-- XXX: pure require for jit.dump doesn't cover all the cases, | ||
-- since dis_<arch>.lua are loaded at runtime. Furthermore, this | ||
-- error is handled by JIT engine, so we can't use <pcall> for it. | ||
-- Hence, simply sniff the output of the test to check that all | ||
-- phases of trace compilation are dumped. | ||
|
||
if #arg == 0 then | ||
local tap = require('tap') | ||
local test = tap.test('gh-5983-jit-library-smoke-tests') | ||
|
||
test:plan(1) | ||
|
||
-- XXX: Shell argument <test> is necessary to differ test case | ||
-- from the test runner. | ||
local cmd = string.gsub('<LUABIN> 2>&1 <SCRIPT> test', '%<(%w+)>', { | ||
LUABIN = arg[-1], | ||
SCRIPT = arg[0], | ||
}) | ||
local proc = io.popen(cmd) | ||
local got = proc:read('*all'):gsub('^%s+', ''):gsub('%s+$', '') | ||
local expected = table.concat({ | ||
'---- TRACE %d start', | ||
'---- TRACE %d IR', | ||
'---- TRACE %d mcode', | ||
'---- TRACE %d stop', | ||
'---- TRACE %d exit', | ||
}, '.+') | ||
|
||
test:like(got, expected , 'jit.dump smoke tests') | ||
|
||
os.exit(test:check() and 0 or 1) | ||
end | ||
|
||
-- Use *all* jit.dump options, so the test can check them all. | ||
require('jit.dump').start('+tbisrmXaT') | ||
-- Tune JIT engine to make the test faster and more robust. | ||
jit.opt.start('hotloop=1') | ||
-- Record primitive loop. | ||
for _ = 1, 3 do end |