-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: runtime detection of CRC32 and ARM64 support. #82
Open
thibaultcha
wants to merge
7
commits into
openresty:v2.1-agentzh
Choose a base branch
from
thibaultcha:dynamic-sse42
base: v2.1-agentzh
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+504
−232
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7363d43
tests: x64: fixed a few minor issues with the x64 test suite.
thibaultcha af84811
feature: x86: Runtime detection of SSE4.2 support when compiled with …
thibaultcha d0d2b47
feature: implemented new extensions 'jit.crc32()' and 'jit.strhashcrc…
thibaultcha 4fc2919
feature: arm64: added support for CRC32 string hashing optimization.
thibaultcha 26a5196
travis-ci: added many missing testing suites and compilation flags.
thibaultcha fe3b2db
feature: dynamically enable the CRC32 string hashing optimization.
thibaultcha 8d6dca3
doc: readme.md: documented the new CRC32 and string hashing APIs and …
thibaultcha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ | |
*~ | ||
tags | ||
*.swo | ||
test/*.txt | ||
test/*.o | ||
test/*.d | ||
test/ht_test |
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 |
---|---|---|
@@ -1,49 +1,98 @@ | ||
sudo: required | ||
dist: xenial | ||
|
||
os: linux | ||
dist: xenial | ||
sudo: false | ||
|
||
language: c | ||
|
||
arch: | ||
- amd64 | ||
#- arm64 | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- axel | ||
- g++-5 | ||
- valgrind | ||
- cpanminus | ||
- libtest-base-perl | ||
- libtext-diff-perl | ||
- libtest-longstring-perl | ||
- liblist-moreutils-perl | ||
- libparallel-forkmanager-perl | ||
- libgd-dev | ||
- libmpc-dev | ||
- build-essential | ||
- libgtk2.0-dev | ||
- valgrind | ||
|
||
env: | ||
global: | ||
- JOBS=3 | ||
- LUAJIT_PREFIX=/opt/luajit21 | ||
- LUAJIT_SYSM_PREFIX=/opt/luajit21-sysm | ||
- LUAJIT_COMMON_XCFLAGS="-DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_NUMMODE=2 -msse4.2 -O1" | ||
- JOBS=6 | ||
- PREFIX=$HOME/luajit | ||
- XCFLAGS="-O1 -DLUA_USE_APICHECK -DLUA_USE_ASSERT -DLUAJIT_NUMMODE=2" | ||
matrix: | ||
- LUAJIT_XCFLAGS="$LUAJIT_COMMON_XCFLAGS" | ||
- LUAJIT_XCFLAGS="-DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1 | ||
- LUAJIT_XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC -DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1 FLAGS=-v | ||
- LUAJIT_XCFLAGS="-DLUAJIT_DISABLE_GC64 -DLUAJIT_ENABLE_LUA52COMPAT $LUAJIT_COMMON_XCFLAGS" LUA52=1 | ||
- XCFLAGS="-O3 -DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_NUMMODE=2" # OpenResty releases | ||
- XCFLAGS="-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS" | ||
- XCFLAGS="-DLUAJIT_DISABLE_JIT $XCFLAGS" | ||
- XCFLAGS="-DLUAJIT_DISABLE_GC64 $XCFLAGS" | ||
- XCFLAGS="-DLJ_OR_DISABLE_STRHASHCRC32 $XCFLAGS" | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- arch: arm64 | ||
|
||
stages: | ||
- test | ||
- openresty tests | ||
- string hashing tests | ||
|
||
jobs: | ||
allow_failures: | ||
- arch: arm64 | ||
include: | ||
- stage: openresty tests | ||
script: prove -j$JOBS t | ||
env: | ||
- stage: openresty tests | ||
script: prove -j$JOBS t | ||
env: | ||
arch: arm64 | ||
- stage: openresty tests | ||
script: prove -j$JOBS t | ||
env: TEST_LJ_USE_VALGRIND=1 XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS" | ||
- stage: string hashing tests | ||
script: make -C test test | ||
env: | ||
- stage: string hashing tests | ||
script: make -C test test | ||
env: | ||
arch: arm64 | ||
- stage: string hashing tests | ||
script: make -C test test | ||
env: WITH_VALGRIND=1 XCFLAGS="-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC $XCFLAGS" | ||
|
||
before_install: | ||
- cpanm --local-lib=$TRAVIS_BUILD_DIR/perl5 local::lib && eval $(perl -I$TRAVIS_BUILD_DIR/perl5/lib/perl5/ -Mlocal::lib) | ||
- cpanm --notest IPC::Run3 | ||
- valgrind --version | ||
- export CXX=g++-5 | ||
|
||
install: | ||
- git clone https://github.com/openresty/luajit2-test-suite.git ../luajit2-test-suite | ||
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$PREFIX XCFLAGS="$XCFLAGS" >build.log 2>&1 || (cat build.log && exit 1) | ||
- make install PREFIX=$PREFIX >build.log 2>&1 || (cat build.log && exit 1) | ||
- export PATH="$PREFIX/bin:$PATH" | ||
|
||
script: | ||
- valgrind --version | ||
- cd ../luajit2 | ||
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS="$LUAJIT_XCFLAGS" > build.log 2>&1 || (cat build.log && exit 1) | ||
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1) | ||
- cd ../luajit2-test-suite | ||
- ./run-tests -j $JOBS $FLAGS $LUAJIT_PREFIX | ||
- if [[ "$XCFLAGS" =~ "LUAJIT_ENABLE_LUA52COMPAT" ]]; then export LUA52=1; fi | ||
- if [[ "$XCFLAGS" =~ "LUAJIT_USE_VALGRIND" ]]; then export FLAGS=-v; fi | ||
- if [[ "$XCFLAGS" =~ "LJ_OR_DISABLE_STRHASHCRC32" ]]; then export NO_STRHASHCRC32=1; fi | ||
- git clone https://github.com/openresty/luajit2-test-suite.git | ||
- pushd luajit2-test-suite | ||
- ./run-tests -j$JOBS $FLAGS $PREFIX $PREFIX/bin/luajit $CC $CXX | ||
|
||
cache: | ||
apt: true | ||
directories: | ||
- perl5 |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The luajit2-test-suite is disabled for now on arm64 since it currently has a few failing test cases.