Skip to content

PS-9647: MySQL Perf Improvements (inline) #5609

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

Merged
merged 2 commits into from
Jun 24, 2025

Conversation

kamil-holubicki
Copy link
Contributor

https://perconadev.atlassian.net/browse/PS-9647

Make the following functions inline using the 'always_inline' attribute

  1. row_mysql_store_col_in_innobase_format_func()
  2. row_mysql_store_col_in_innobase_format()
  3. rec_init_offsets_new()
  4. Move the definitions of row_mysql_store_col_in_innobase_format() and row_mysql_store_col_in_innobase_format_func() to row0sel.ic

NOTE:
This forceful inlining increases the binary size by 10 kBs.

Before the change (debug): 802135752
After the change (debug): 802146560
Increase in binary size: 10808 bytes

https://perconadev.atlassian.net/browse/PS-9647

Make the following functions inline using the 'always_inline' attribute

1. row_mysql_store_col_in_innobase_format_func()
2. row_mysql_store_col_in_innobase_format()
3. rec_init_offsets_new()
4. Move the definitions of row_mysql_store_col_in_innobase_format() and
   row_mysql_store_col_in_innobase_format_func() to row0sel.ic

NOTE:
This forceful inlining increases the binary size by 10 kBs.

Before the change (debug): 802135752
After the change (debug): 802146560
Increase in binary size: 10808 bytes
@kamil-holubicki kamil-holubicki changed the title PS-9647: MySQL Perf Improvements PS-9647: MySQL Perf Improvements (inline) May 23, 2025
record but the prebuilt template is in
clustered index format and used only for end
range comparison. */
void row_sel_field_store_in_mysql_format_func(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure about InnoDB conventions here but for other ALWAYS_INLINE functions (like rw_lock_lock_word_decr()) they leave static inline function declaration in the header file as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that there is no strict convention. E.g. sync0rw.ic, functions with inline are static, but with ALWAYS_INLINE are not.

Copy link
Collaborator

@percona-ysorokin percona-ysorokin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kamil-holubicki kamil-holubicki merged commit 45fc6df into percona:8.0 Jun 24, 2025
23 of 24 checks passed
kamil-holubicki added a commit that referenced this pull request Jul 15, 2025
PS-9647: MySQL Perf Improvements (inline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants