-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CMake and Windows support #512
base: master
Are you sure you want to change the base?
Commits on Jul 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2b20db3 - Browse repository at this point
Copy the full SHA 2b20db3View commit details
Commits on Sep 9, 2023
-
With this patch, sysbench can be built (on Linux, macOS, or FreeBSD at least) using cmake. Packaging using cpack works, too.
Configuration menu - View commit details
-
Copy full SHA for e876cef - Browse repository at this point
Copy the full SHA e876cefView commit details -
CMake port - Test CMake build on CI (Ubuntu)
Add just basic build and unit test, nothing fancy
Configuration menu - View commit details
-
Copy full SHA for aeb1561 - Browse repository at this point
Copy the full SHA aeb1561View commit details -
CMake port - build and test on macOS
This build actually runs some 30 seconds OLTP smoke tests against MySQL 8.0
Configuration menu - View commit details
-
Copy full SHA for d32fec9 - Browse repository at this point
Copy the full SHA d32fec9View commit details -
Fix GCC 11.3 warning (stringop-truncation)
__builtin_strncpy specified bound 4096 equals destination size [-Werror=stringop-truncation] strncpy wants output buffer to have place for terminating 0
Configuration menu - View commit details
-
Copy full SHA for f1e1297 - Browse repository at this point
Copy the full SHA f1e1297View commit details -
Fix GCC 11.3 warning (-Werror=maybe-uninitialized)
sysbench/src/tests/memory/sb_memory.c:199:18: error: ‘buffer’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 199 | buffers[i] = buffer;
Configuration menu - View commit details
-
Copy full SHA for d240128 - Browse repository at this point
Copy the full SHA d240128View commit details -
Fix AppleClang 14 warning - use C11 _Static_assert for compile time a…
…ssert. This fixes warning about unused typedef - SB_ATTRIBUTE_UNUSED does not help
Configuration menu - View commit details
-
Copy full SHA for fd4241c - Browse repository at this point
Copy the full SHA fd4241cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e21765 - Browse repository at this point
Copy the full SHA 1e21765View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3559b2f - Browse repository at this point
Copy the full SHA 3559b2fView commit details -
Windows port - add pthreads library from Lockless Inc
The original URL is https://locklessinc.com/downloads/winpthreads.h mingw64 winpthreads is based on this library. Compared to other pthread implementations, this one does support pthread cancellation, which turns out to be important for sysbench.
Configuration menu - View commit details
-
Copy full SHA for 9c9198b - Browse repository at this point
Copy the full SHA 9c9198bView commit details -
Windows port - port several POSIX functions and definitions
Functions used in sysbench were ported : alarm() ,clock_gettime(), basename(), pread(), pwrite(), fdatasync() It also contains an open() portability wrapper that supports O_SYNC and O_DIRECT
Configuration menu - View commit details
-
Copy full SHA for 3dcd6af - Browse repository at this point
Copy the full SHA 3dcd6afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ade153 - Browse repository at this point
Copy the full SHA 5ade153View commit details -
Windows port - partial port of Concurrency Kit
Port some bits of ConcurrencyKit used by sysbench to MSVC compiler. Use native compiler intrinsics for ck_pr_{inc/dec/store} family functions. Copy ck_ring code from concurrency kit, as it is not possible to use the original header.
Configuration menu - View commit details
-
Copy full SHA for 1fbfaa0 - Browse repository at this point
Copy the full SHA 1fbfaa0View commit details -
Windows port - build or find LuaJit library on Windows
Use instructions from Luajit documentation to build the library. Allow FindLuajit.cmake to find luajit if it is built by vcpkg, if system luajit library is requested. Also fix BuildLuajit.cmake to work with Ninja
Configuration menu - View commit details
-
Copy full SHA for fae8c83 - Browse repository at this point
Copy the full SHA fae8c83View commit details -
Windows port - CMake option WITH_LIBMARIADB, build with libmariadb fr…
…om source As Windows does not have system libraries for MySQL or MariaDB client, for the sake of simplicity, allow to build libmariadb as external project during sysbench build. That is, if WITH_LIBMARIADB is defined, libmariadb will be built from source https://github.com/mariadb-corporation/mariadb-connector-c, courtesy of CMake's ExternalProject_Add libmariadb is chosen because it is easy to build standalone (as opposed to libmysqlclient) and works well with named pipes, which libmysqlclient has problems with. WITH_LIBMARIADB defaults to ON on Windows, as to OFF elsewhere. It is built as shared library on Windows, as static elsewhere( to avoid linker warning about mix of C runtimes)
Configuration menu - View commit details
-
Copy full SHA for 5a4c2f7 - Browse repository at this point
Copy the full SHA 5a4c2f7View commit details -
Windows port - fix for CK_CC_CACHELINE with MSVC.
MSVC does not allow to use declspec(align) after the variable definition. So CK_CC_CACHELINE is moved before variable declaration.
Configuration menu - View commit details
-
Copy full SHA for dfee295 - Browse repository at this point
Copy the full SHA dfee295View commit details -
Windows port - MSVC preprocessor fixes
- Do not use #ifdef within macro - Use do{}while(0) instead of unportable GCC braces in xfree() macro
Configuration menu - View commit details
-
Copy full SHA for 4b20112 - Browse repository at this point
Copy the full SHA 4b20112View commit details -
Windows port - aligned memory allocation
Use _aligned_malloc() for aligned allocation, and _aligned_free() for deallocation. Add sb_free_memaligned() instead of free() where appropriate.
Configuration menu - View commit details
-
Copy full SHA for bb8dbd6 - Browse repository at this point
Copy the full SHA bb8dbd6View commit details -
Windows port - implement nanosleep()/usleep()
Implement cancellable sleeps. "Cancellable" property is important here, otherwise sysbench is going to hang, when used with --report-interval
Configuration menu - View commit details
-
Copy full SHA for e14e78b - Browse repository at this point
Copy the full SHA e14e78bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d902b87 - Browse repository at this point
Copy the full SHA d902b87View commit details -
Windows port - fileio support for O_SYNC and O_DIRECT
Internally, those are translated to FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH
Configuration menu - View commit details
-
Copy full SHA for 09d499b - Browse repository at this point
Copy the full SHA 09d499bView commit details -
Configuration menu - View commit details
-
Copy full SHA for aff8435 - Browse repository at this point
Copy the full SHA aff8435View commit details -
Windows port - luajit search directories
Emulate search path logic on Windows from luajit code Search paths always relative to current executable, which is great for ZIP type distribution. Do not use Unixy path with "/usr/" etc on Windows.
Configuration menu - View commit details
-
Copy full SHA for 7a57f1c - Browse repository at this point
Copy the full SHA 7a57f1cView commit details -
Windows port - export symbols from sysbench executable
The list of symbols is extracted from ffi.cdef sections in internal lua files into "module definition file" sysbench.def, which is used by the linker to export symbols. Alternative to that could be WINDOWS_EXPORT_ALL_SYMBOLS in recent cmake, but that does not work with LTO/PGO, unfortunately.
Configuration menu - View commit details
-
Copy full SHA for fe0c652 - Browse repository at this point
Copy the full SHA fe0c652View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4127b30 - Browse repository at this point
Copy the full SHA 4127b30View commit details -
Windows port - use 'size_t' instead of 'long' to fill io buffer
long is 4 bytes , also on 64bit Windows, so that does not work as intended
Configuration menu - View commit details
-
Copy full SHA for 9909d75 - Browse repository at this point
Copy the full SHA 9909d75View commit details -
Windows port - fix warnings about function that is declared but not d…
…efined. HAVE_MMAP was not ported so far, and sb_get_allocation_granularity() is only defined with HAVE_MMAP Also, sb_next_event() does not exist.
Configuration menu - View commit details
-
Copy full SHA for 925ae42 - Browse repository at this point
Copy the full SHA 925ae42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 026529a - Browse repository at this point
Copy the full SHA 026529aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 615d32b - Browse repository at this point
Copy the full SHA 615d32bView commit details -
Windows port - prevent aggressive compiler optimizations in cpu_execu…
…te_event() MSVC compiler understands that the function has no side-effects, and optimizes the function away, completely. Also, clang-16 complains about set-but-unused variable. To fix both, assign calculated prime count in cpu_execute_event() to a thread local variable, at the end of function This way, cpu_execute_event() function has _some_ side-effect and will not be optimized away.
Configuration menu - View commit details
-
Copy full SHA for 289a611 - Browse repository at this point
Copy the full SHA 289a611View commit details -
Windows port - Windows build/packaging fixes
- Copy luajit and libmariadb DLLs next to sysbench executable, during build. This allows to test without packaging - Do not install Cram based test suite on Windows, it does not work - Install DLLs that sysbench depends on next to executable (luajit DLL, libmariadb, postgres client, and their dependencies such as openssl or zlib. Also install VC runtime DLLs, and ASAN runtime DLL, when built WITH_ASAN=1 - Default to ZIP for CPack.
Configuration menu - View commit details
-
Copy full SHA for d1a1540 - Browse repository at this point
Copy the full SHA d1a1540View commit details -
Windows port - instruct C runtime to use its maximum open file handles.
LuaJit opens source files using C runtime functions, and in sysbench it does so simultaneously in different threads. To avoid "Too many open files" error, use _setmaxstdio() with maximum possible value for open handles, which is 8K
Configuration menu - View commit details
-
Copy full SHA for eef167b - Browse repository at this point
Copy the full SHA eef167bView commit details -
Windows port - use timeBeginPeriod() for better Sleep() accuracy.
Without this call, Sleep(1) can take as much as 14-15ms
Configuration menu - View commit details
-
Copy full SHA for fd4a841 - Browse repository at this point
Copy the full SHA fd4a841View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57ac23e - Browse repository at this point
Copy the full SHA 57ac23eView commit details -
Windows port - build and test on CI (github workflows)
The build utilizes vcpkg package manager in order to build with Postgres driver. A ZIP sysbench package is built and stored as build artifact, so if desired, someone can use extract it, and produce official binary release. The tests are smoke OLTP tests that run against installed MariaDB and Postgres. As Cram unit test does not work on Windows, so this is the only test option
Configuration menu - View commit details
-
Copy full SHA for 9426021 - Browse repository at this point
Copy the full SHA 9426021View commit details -
Fix "Unknown extra flags value 5" when --file-extra-flags=sync,direct
Combining flags in file-extra-flags in fileio should be allowed O_SYNC|O_DIRECT, or O_DSYNC|O_DIRECT is actually reasonable combination.
Configuration menu - View commit details
-
Copy full SHA for b6dfe98 - Browse repository at this point
Copy the full SHA b6dfe98View commit details -
On CI, the error code of the message "Unknown MySQL server host 'non-existing' " is -3, not 0.
Configuration menu - View commit details
-
Copy full SHA for 4cf9338 - Browse repository at this point
Copy the full SHA 4cf9338View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66dc3c0 - Browse repository at this point
Copy the full SHA 66dc3c0View commit details -
CI : Unify cmake-based build, test, and packagin on Github Actions
Remove repetive copy-and-paste workflows, create a reusable one. Now the build and test, and ASAN, and building with non-default compilers runs on all supported (by CI) OSes (Windows, Linux, and macOS, as much uniform as possible. "make test" is not very portable in sysbench It does not work on Windows, does not work with either MariaDB client or server, does not work with recent poostgres Therefore on all combinations or OS(Windows, Linux, macOS)/database(MariaDB, MySQL, Postgres) some smoke tests (oltp) are also run. "make test" will run, where it is known to have worked before (non-Windows, server and client library are both recent MySQL) ASAN builds run on Windows and macOS. Due to a bug in ASAN on Ubuntu's gcc, google/sanitizers#1010 , we do not run it on ubuntu Ninja CMake generator is run on all OSes, and "alternative" compilers (clang on Linux, mingw64 gcc on Windows) are also tested.
Configuration menu - View commit details
-
Copy full SHA for 7a7da4f - Browse repository at this point
Copy the full SHA 7a7da4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d18436 - Browse repository at this point
Copy the full SHA 6d18436View commit details
Commits on Feb 19, 2024
-
Update libmariadb git tag, remove older workarounds
Also link MySQL-specific plugins statically.
Configuration menu - View commit details
-
Copy full SHA for 5f337bd - Browse repository at this point
Copy the full SHA 5f337bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for b691a7d - Browse repository at this point
Copy the full SHA b691a7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ddecca9 - Browse repository at this point
Copy the full SHA ddecca9View commit details -
Test - Workaround Windows named pipe bugs in MySQL.
Also disable Windows ASAN - something bad happened, it can't run on CI Reenable ASAN on Linux though
Configuration menu - View commit details
-
Copy full SHA for 5cfaa10 - Browse repository at this point
Copy the full SHA 5cfaa10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1edbba5 - Browse repository at this point
Copy the full SHA 1edbba5View commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 22b39a0 - Browse repository at this point
Copy the full SHA 22b39a0View commit details
Commits on Aug 7, 2024
-
There are some problems with PG client library, so it does not build as it should
Configuration menu - View commit details
-
Copy full SHA for cad7037 - Browse repository at this point
Copy the full SHA cad7037View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71a02ba - Browse repository at this point
Copy the full SHA 71a02baView commit details
Commits on Nov 22, 2024
-
Disable SSL in new libmariadb unless --mysql-ssl=on
The new libmariadb defaults to enabling SSL, which introduces backward compatibility issues. Moreover, certificate verification may be enforced, together with SSL, potentially breaking connections with MySQL and older MariaDB versions. Thus, disable both certificate validation (apparently there is no option for it at the moment) and SSL.
Configuration menu - View commit details
-
Copy full SHA for 80de759 - Browse repository at this point
Copy the full SHA 80de759View commit details