-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
innobase/{lock0lock,dict0dict}: add noexcept
to lock/unlock methods
#3531
base: 10.6
Are you sure you want to change the base?
Conversation
Thank you! I knew that I think that this one needs to be rebased on the 10.6 branch, where the locking primitives were refactored and which most our customers using, as part of the MariaDB Enterprise Server offering. Can you also file a MDEV for this? |
a78b2a3
to
caf1f66
Compare
I created https://jira.mariadb.org/browse/MDEV-34973 and rebased the PR on branch 10.6 |
caf1f66
to
9b24dfb
Compare
I could not build the 10.5 branch because:
... and my bet that I could just fix the merge conflict and be done didn't work out. |
ce559a7
to
ed11519
Compare
MariaDB is compiled with C++ exceptions enabled, and that disallows some optimizations (e.g. the stack must always be unwinding-safe). By adding `noexcept` to functions that are guaranteed to never throw, some of these optimizations can be regained. Low-level locking functions that are called often are a good candidate for this. This shrinks the executable a bit (tested with GCC 14 on aarch64): text data bss dec hex filename 24448910 2436488 9473185 36358583 22ac9b7 build/release/sql/mariadbd 24448622 2436488 9473537 36358647 22ac9f7 build/release/sql/mariadbd
Another chance for cutting back overhead due to C++ exceptions being enabled; the `dict_sys_t` class is a good candidate because its locking methods are called frequently. Binary size reduction this time: text data bss dec hex filename 24448622 2436488 9473537 36358647 22ac9f7 build/release/sql/mariadbd 24448474 2436488 9473601 36358563 22ac9a3 build/release/sql/mariadbd
ed11519
to
e236afb
Compare
Hooray for try'n'error with CI logs. It now builds. |
Description
MariaDB is compiled with C++ exceptions enabled, and that disallows
some optimizations (e.g. the stack must always be unwinding-safe). By
adding
noexcept
to functions that are guaranteed to never throw,some of these optimizations can be regained. Low-level locking
functions that are called often are a good candidate for this.
This shrinks the executable a bit (tested with GCC 14 on aarch64):
24448910 2436488 9473185 36358583 22ac9b7 build/release/sql/mariadbd
24448474 2436488 9473601 36358563 22ac9a3 build/release/sql/mariadbd
(See #3529 (comment))
Release Notes
No runtime effect.
How can this PR be tested?
No runtime effect.
Basing the PR against the correct MariaDB version
main
branch.PR quality check